@camstack/addon-pipeline 1.2.299 → 1.2.301
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-DMcHBVmE.mjs → default-detection-model-JDKeiJPf.mjs} +15 -8
- package/dist/{default-detection-model-H_NzHI_P.js → default-detection-model-P7IIrP0a.js} +20 -7
- package/dist/detection-pipeline/index.js +15 -17
- package/dist/detection-pipeline/index.mjs +15 -17
- package/dist/{dist-BzDPLvQ6.js → dist-BUs7H-fe.js} +437 -23
- package/dist/{dist-DNlqf8dr.mjs → dist-DvzAabca.mjs} +437 -23
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-g2ZRFDvc.mjs → node-DnP_6GBZ.mjs} +1 -1
- package/dist/{node-B-cB_Hdy.js → node-DxVMyys-.js} +1 -1
- package/dist/pipeline-runner/index.js +129 -5
- package/dist/pipeline-runner/index.mjs +129 -5
- package/dist/{process-memory-kKYoJ9hl.mjs → process-memory-BMr61qT1.mjs} +1 -1
- package/dist/{process-memory-Bo3-laZ_.js → process-memory-DmYzYip-.js} +1 -1
- package/dist/recorder/index.js +15 -2
- package/dist/recorder/index.mjs +15 -2
- package/dist/{segment-demux-js-DrDj8kP6.js → segment-demux-js-DANvUJgH.js} +1 -1
- package/dist/{segment-demux-js-QK7qFMSj.mjs → segment-demux-js-DBqdboBI.mjs} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Da_bbYQp.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-D0etdxl0.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-vnc0r4NV.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-CUFWg1jj.mjs +26 -0
- 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-aFrOa5WT.mjs → hostInit-TY9BRVDy.mjs} +2 -2
- package/dist/stream-broker/index.js +3 -3
- package/dist/stream-broker/index.mjs +3 -3
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/python/postprocessors/testdata/ssdlite_mobiledet_outputs.json +289 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CxT9ry2j.mjs +0 -26
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Dti8Ex88.mjs +0 -26
|
@@ -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-BUs7H-fe.js");
|
|
7
|
+
const require_node = require("../node-DxVMyys-.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-P7IIrP0a.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");
|
|
@@ -3704,6 +3704,87 @@ function buildDetailNotAttachedError(deviceId) {
|
|
|
3704
3704
|
return /* @__PURE__ */ new Error(`${DETAIL_NOT_ATTACHED_MARKER} — camera ${deviceId} is not attached and no detail state is parked within the grace window`);
|
|
3705
3705
|
}
|
|
3706
3706
|
//#endregion
|
|
3707
|
+
//#region src/pipeline-runner/face-parent-geometry.ts
|
|
3708
|
+
/** Is the centre of `face` inside `parent` (edges inclusive)? */
|
|
3709
|
+
function faceCentreInsideParent(face, parent) {
|
|
3710
|
+
const cx = face.x + face.w / 2;
|
|
3711
|
+
const cy = face.y + face.h / 2;
|
|
3712
|
+
return cx >= parent.x && cx <= parent.x + parent.w && cy >= parent.y && cy <= parent.y + parent.h;
|
|
3713
|
+
}
|
|
3714
|
+
/** The log line, one name for both the throttled and the fallback path. */
|
|
3715
|
+
var FACE_GUARD_UNAVAILABLE_MESSAGE = "face geometry guard cannot run on a caller-cut tile — its padding is unknown, the faces pass unjudged";
|
|
3716
|
+
var FACE_OUTSIDE_PARENT_MESSAGE = "face dropped — its centre is outside the person box (it was found in the crop padding)";
|
|
3717
|
+
/** The fields of a drop the log line carries. */
|
|
3718
|
+
function faceOutsideParentMeta(drop) {
|
|
3719
|
+
const round = (r) => ({
|
|
3720
|
+
x: Math.round(r.x),
|
|
3721
|
+
y: Math.round(r.y),
|
|
3722
|
+
w: Math.round(r.w),
|
|
3723
|
+
h: Math.round(r.h)
|
|
3724
|
+
});
|
|
3725
|
+
return {
|
|
3726
|
+
score: Number(drop.score.toFixed(4)),
|
|
3727
|
+
faceBbox: round(drop.faceBbox),
|
|
3728
|
+
parentBbox: round(drop.parentBbox)
|
|
3729
|
+
};
|
|
3730
|
+
}
|
|
3731
|
+
/** Default window: the dispatcher refreshes a face every second per track. */
|
|
3732
|
+
var FACE_OUTSIDE_PARENT_LOG_INTERVAL_MS = 6e4;
|
|
3733
|
+
/**
|
|
3734
|
+
* Per-camera, rate-limited announcement of dropped faces (D391: a branch that
|
|
3735
|
+
* drops work says so). The first drop on a camera is logged at once; drops
|
|
3736
|
+
* inside the window are held and emitted as ONE line carrying their count —
|
|
3737
|
+
* by the next drop after the window, or by a flush armed when the first one
|
|
3738
|
+
* was held, whichever comes first. Every drop is counted in exactly one line.
|
|
3739
|
+
*/
|
|
3740
|
+
var FaceOutsideParentLog = class {
|
|
3741
|
+
opts;
|
|
3742
|
+
lastLineAt = /* @__PURE__ */ new Map();
|
|
3743
|
+
heldBack = /* @__PURE__ */ new Map();
|
|
3744
|
+
flushArmed = /* @__PURE__ */ new Set();
|
|
3745
|
+
/** The latest held drop per camera — the example a flushed line shows. */
|
|
3746
|
+
lastHeld = /* @__PURE__ */ new Map();
|
|
3747
|
+
constructor(opts) {
|
|
3748
|
+
this.opts = opts;
|
|
3749
|
+
}
|
|
3750
|
+
record(drop) {
|
|
3751
|
+
const now = this.opts.now();
|
|
3752
|
+
const held = (this.heldBack.get(drop.deviceId) ?? 0) + 1;
|
|
3753
|
+
const last = this.lastLineAt.get(drop.deviceId);
|
|
3754
|
+
if (last !== void 0 && now - last < this.opts.intervalMs) {
|
|
3755
|
+
this.heldBack.set(drop.deviceId, held);
|
|
3756
|
+
this.lastHeld.set(drop.deviceId, drop);
|
|
3757
|
+
if (!this.flushArmed.has(drop.deviceId)) {
|
|
3758
|
+
this.flushArmed.add(drop.deviceId);
|
|
3759
|
+
this.opts.schedule(() => this.flush(drop.deviceId), last + this.opts.intervalMs - now);
|
|
3760
|
+
}
|
|
3761
|
+
return;
|
|
3762
|
+
}
|
|
3763
|
+
this.emit(drop, held, now);
|
|
3764
|
+
}
|
|
3765
|
+
/** Emit what a window held back, if anything; a no-op once already said. */
|
|
3766
|
+
flush(deviceId) {
|
|
3767
|
+
this.flushArmed.delete(deviceId);
|
|
3768
|
+
const held = this.heldBack.get(deviceId) ?? 0;
|
|
3769
|
+
const drop = this.lastHeld.get(deviceId);
|
|
3770
|
+
if (held === 0 || drop === void 0) return;
|
|
3771
|
+
this.emit(drop, held, this.opts.now());
|
|
3772
|
+
}
|
|
3773
|
+
emit(drop, count, now) {
|
|
3774
|
+
this.lastLineAt.set(drop.deviceId, now);
|
|
3775
|
+
this.heldBack.set(drop.deviceId, 0);
|
|
3776
|
+
this.flushArmed.delete(drop.deviceId);
|
|
3777
|
+
this.opts.info(FACE_OUTSIDE_PARENT_MESSAGE, {
|
|
3778
|
+
tags: { deviceId: drop.deviceId },
|
|
3779
|
+
meta: {
|
|
3780
|
+
...faceOutsideParentMeta(drop),
|
|
3781
|
+
droppedSinceLastLine: count,
|
|
3782
|
+
windowMs: this.opts.intervalMs
|
|
3783
|
+
}
|
|
3784
|
+
});
|
|
3785
|
+
}
|
|
3786
|
+
};
|
|
3787
|
+
//#endregion
|
|
3707
3788
|
//#region src/pipeline-runner/detail-subtree.ts
|
|
3708
3789
|
/** Did the subtree run refuse because the camera is not attached (park lapsed)? */
|
|
3709
3790
|
function isDetailNotAttachedRefusal(outcome) {
|
|
@@ -3713,6 +3794,8 @@ function isDetailNotAttachedRefusal(outcome) {
|
|
|
3713
3794
|
function isNativeCropMiss(fetch) {
|
|
3714
3795
|
return "miss" in fetch;
|
|
3715
3796
|
}
|
|
3797
|
+
/** The class the geometry guard judges — the face detector's output. */
|
|
3798
|
+
var FACE_CLASS = "face";
|
|
3716
3799
|
/** Normalize a frame-space pixel rect to `[0,1]` by the given frame dims. */
|
|
3717
3800
|
function normalizeRect(rect, frameWidth, frameHeight) {
|
|
3718
3801
|
return {
|
|
@@ -4014,14 +4097,45 @@ async function runDetailSubtree(deps, input) {
|
|
|
4014
4097
|
cropFrameSpace: crop.frameSpace
|
|
4015
4098
|
} : void 0;
|
|
4016
4099
|
const details = [];
|
|
4100
|
+
let unjudgedFaces = 0;
|
|
4017
4101
|
for (const step of steps) {
|
|
4018
4102
|
const placement = deps.placeStep?.(input.deviceId, step);
|
|
4019
4103
|
const result = await deps.runPipeline([placement?.step ?? step], crop.jpeg, input.deviceId, placement?.deviceKey, nativeCropRef);
|
|
4020
4104
|
if (!result) continue;
|
|
4021
|
-
for (const detection of result.detections)
|
|
4105
|
+
for (const detection of result.detections) {
|
|
4106
|
+
const detail = toDetailResult(detection, step.addonId, crop);
|
|
4107
|
+
if (detail.className === FACE_CLASS && crop.source === "fallback") unjudgedFaces += 1;
|
|
4108
|
+
else if (detail.className === FACE_CLASS && detail.bbox !== void 0 && !faceCentreInsideParent(detail.bbox, input.parent.bbox)) {
|
|
4109
|
+
announceFaceOutsideParent(deps, {
|
|
4110
|
+
deviceId: input.deviceId,
|
|
4111
|
+
score: detail.score,
|
|
4112
|
+
faceBbox: detail.bbox,
|
|
4113
|
+
parentBbox: input.parent.bbox
|
|
4114
|
+
});
|
|
4115
|
+
continue;
|
|
4116
|
+
}
|
|
4117
|
+
details.push(detail);
|
|
4118
|
+
}
|
|
4022
4119
|
}
|
|
4120
|
+
if (unjudgedFaces > 0) deps.logger.warn(FACE_GUARD_UNAVAILABLE_MESSAGE, {
|
|
4121
|
+
tags: { deviceId: input.deviceId },
|
|
4122
|
+
meta: {
|
|
4123
|
+
faces: unjudgedFaces,
|
|
4124
|
+
cropSource: crop.source
|
|
4125
|
+
}
|
|
4126
|
+
});
|
|
4023
4127
|
return { details };
|
|
4024
4128
|
}
|
|
4129
|
+
function announceFaceOutsideParent(deps, drop) {
|
|
4130
|
+
if (deps.recordFaceOutsideParent !== void 0) {
|
|
4131
|
+
deps.recordFaceOutsideParent(drop);
|
|
4132
|
+
return;
|
|
4133
|
+
}
|
|
4134
|
+
deps.logger.warn(FACE_OUTSIDE_PARENT_MESSAGE, {
|
|
4135
|
+
tags: { deviceId: drop.deviceId },
|
|
4136
|
+
meta: faceOutsideParentMeta(drop)
|
|
4137
|
+
});
|
|
4138
|
+
}
|
|
4025
4139
|
//#endregion
|
|
4026
4140
|
//#region src/pipeline-runner/device-load.ts
|
|
4027
4141
|
/** The backend prefix of a `<backend>:<device>` key (bare `cpu` → `cpu`). */
|
|
@@ -9682,7 +9796,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
9682
9796
|
runPipeline: (steps, imageJpeg, deviceId, deviceKey, nativeCropRef) => this.runDetailPipeline(steps, imageJpeg, deviceId, deviceKey, nativeCropRef),
|
|
9683
9797
|
placeStep: (deviceId, step) => this.placeDetailStepForCamera(deviceId, step),
|
|
9684
9798
|
resolveCropConvention: () => convention,
|
|
9685
|
-
logger: this.detailSubtreeLogger()
|
|
9799
|
+
logger: this.detailSubtreeLogger(),
|
|
9800
|
+
recordFaceOutsideParent: (drop) => this.faceOutsideParentLog.record(drop)
|
|
9686
9801
|
}, input);
|
|
9687
9802
|
if (outcome !== null && isDetailNotAttachedRefusal(outcome)) throw buildDetailNotAttachedError(input.deviceId);
|
|
9688
9803
|
return outcome;
|
|
@@ -9896,6 +10011,15 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
9896
10011
|
decodeCeilingInForce: this.liveWorkers?.ceiling
|
|
9897
10012
|
} });
|
|
9898
10013
|
}
|
|
10014
|
+
/** D662: faces the detail plane's geometry guard dropped, one line per camera per minute. */
|
|
10015
|
+
faceOutsideParentLog = new FaceOutsideParentLog({
|
|
10016
|
+
info: (message, extras) => this.ctxIfReady?.logger.info(message, extras),
|
|
10017
|
+
now: () => Date.now(),
|
|
10018
|
+
intervalMs: FACE_OUTSIDE_PARENT_LOG_INTERVAL_MS,
|
|
10019
|
+
schedule: (flush, delayMs) => {
|
|
10020
|
+
setTimeout(flush, delayMs).unref();
|
|
10021
|
+
}
|
|
10022
|
+
});
|
|
9899
10023
|
/** A warn sink that survives a not-yet-ready ctx (boot-order dispatches). */
|
|
9900
10024
|
detailSubtreeLogger() {
|
|
9901
10025
|
return { warn: (message, extras) => this.ctxIfReady?.logger.warn(message, extras) };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { An as lazy, At as pickDetailCropConvention, D as MOTION_CLOSE_AFTER_MS, Dn as array, En as _enum, In as string, Mn as number, Nn as object, Nt as pipelineRunnerCapability, O as NativeLeaseAdmissionSchema, On as boolean, Rn as EventCategory, en as errMsg, h as DEFAULT_DETAIL_CROP_CONVENTION, hn as defineCustomActions, i as BackgroundRunRegistry, jn as literal, jt as pickNativeLeaseOverride, k as NativeLeaseSettingsSchema, mn as customAction, nt as deriveDetailCropRect, pn as createEvent, pt as failureContributionCapability, sn as BaseAddon, v as DEFAULT_NATIVE_LEASE_SETTINGS, vt as loadContributionCapability, w as FailureCounters, xn as nodePin } from "../dist-
|
|
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 { An as lazy, At as pickDetailCropConvention, D as MOTION_CLOSE_AFTER_MS, Dn as array, En as _enum, In as string, Mn as number, Nn as object, Nt as pipelineRunnerCapability, O as NativeLeaseAdmissionSchema, On as boolean, Rn as EventCategory, en as errMsg, h as DEFAULT_DETAIL_CROP_CONVENTION, hn as defineCustomActions, i as BackgroundRunRegistry, jn as literal, jt as pickNativeLeaseOverride, k as NativeLeaseSettingsSchema, mn as customAction, nt as deriveDetailCropRect, pn as createEvent, pt as failureContributionCapability, sn as BaseAddon, v as DEFAULT_NATIVE_LEASE_SETTINGS, vt as loadContributionCapability, w as FailureCounters, xn as nodePin } from "../dist-DvzAabca.mjs";
|
|
2
|
+
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-DnP_6GBZ.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-JDKeiJPf.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";
|
|
@@ -3696,6 +3696,87 @@ function buildDetailNotAttachedError(deviceId) {
|
|
|
3696
3696
|
return /* @__PURE__ */ new Error(`${DETAIL_NOT_ATTACHED_MARKER} — camera ${deviceId} is not attached and no detail state is parked within the grace window`);
|
|
3697
3697
|
}
|
|
3698
3698
|
//#endregion
|
|
3699
|
+
//#region src/pipeline-runner/face-parent-geometry.ts
|
|
3700
|
+
/** Is the centre of `face` inside `parent` (edges inclusive)? */
|
|
3701
|
+
function faceCentreInsideParent(face, parent) {
|
|
3702
|
+
const cx = face.x + face.w / 2;
|
|
3703
|
+
const cy = face.y + face.h / 2;
|
|
3704
|
+
return cx >= parent.x && cx <= parent.x + parent.w && cy >= parent.y && cy <= parent.y + parent.h;
|
|
3705
|
+
}
|
|
3706
|
+
/** The log line, one name for both the throttled and the fallback path. */
|
|
3707
|
+
var FACE_GUARD_UNAVAILABLE_MESSAGE = "face geometry guard cannot run on a caller-cut tile — its padding is unknown, the faces pass unjudged";
|
|
3708
|
+
var FACE_OUTSIDE_PARENT_MESSAGE = "face dropped — its centre is outside the person box (it was found in the crop padding)";
|
|
3709
|
+
/** The fields of a drop the log line carries. */
|
|
3710
|
+
function faceOutsideParentMeta(drop) {
|
|
3711
|
+
const round = (r) => ({
|
|
3712
|
+
x: Math.round(r.x),
|
|
3713
|
+
y: Math.round(r.y),
|
|
3714
|
+
w: Math.round(r.w),
|
|
3715
|
+
h: Math.round(r.h)
|
|
3716
|
+
});
|
|
3717
|
+
return {
|
|
3718
|
+
score: Number(drop.score.toFixed(4)),
|
|
3719
|
+
faceBbox: round(drop.faceBbox),
|
|
3720
|
+
parentBbox: round(drop.parentBbox)
|
|
3721
|
+
};
|
|
3722
|
+
}
|
|
3723
|
+
/** Default window: the dispatcher refreshes a face every second per track. */
|
|
3724
|
+
var FACE_OUTSIDE_PARENT_LOG_INTERVAL_MS = 6e4;
|
|
3725
|
+
/**
|
|
3726
|
+
* Per-camera, rate-limited announcement of dropped faces (D391: a branch that
|
|
3727
|
+
* drops work says so). The first drop on a camera is logged at once; drops
|
|
3728
|
+
* inside the window are held and emitted as ONE line carrying their count —
|
|
3729
|
+
* by the next drop after the window, or by a flush armed when the first one
|
|
3730
|
+
* was held, whichever comes first. Every drop is counted in exactly one line.
|
|
3731
|
+
*/
|
|
3732
|
+
var FaceOutsideParentLog = class {
|
|
3733
|
+
opts;
|
|
3734
|
+
lastLineAt = /* @__PURE__ */ new Map();
|
|
3735
|
+
heldBack = /* @__PURE__ */ new Map();
|
|
3736
|
+
flushArmed = /* @__PURE__ */ new Set();
|
|
3737
|
+
/** The latest held drop per camera — the example a flushed line shows. */
|
|
3738
|
+
lastHeld = /* @__PURE__ */ new Map();
|
|
3739
|
+
constructor(opts) {
|
|
3740
|
+
this.opts = opts;
|
|
3741
|
+
}
|
|
3742
|
+
record(drop) {
|
|
3743
|
+
const now = this.opts.now();
|
|
3744
|
+
const held = (this.heldBack.get(drop.deviceId) ?? 0) + 1;
|
|
3745
|
+
const last = this.lastLineAt.get(drop.deviceId);
|
|
3746
|
+
if (last !== void 0 && now - last < this.opts.intervalMs) {
|
|
3747
|
+
this.heldBack.set(drop.deviceId, held);
|
|
3748
|
+
this.lastHeld.set(drop.deviceId, drop);
|
|
3749
|
+
if (!this.flushArmed.has(drop.deviceId)) {
|
|
3750
|
+
this.flushArmed.add(drop.deviceId);
|
|
3751
|
+
this.opts.schedule(() => this.flush(drop.deviceId), last + this.opts.intervalMs - now);
|
|
3752
|
+
}
|
|
3753
|
+
return;
|
|
3754
|
+
}
|
|
3755
|
+
this.emit(drop, held, now);
|
|
3756
|
+
}
|
|
3757
|
+
/** Emit what a window held back, if anything; a no-op once already said. */
|
|
3758
|
+
flush(deviceId) {
|
|
3759
|
+
this.flushArmed.delete(deviceId);
|
|
3760
|
+
const held = this.heldBack.get(deviceId) ?? 0;
|
|
3761
|
+
const drop = this.lastHeld.get(deviceId);
|
|
3762
|
+
if (held === 0 || drop === void 0) return;
|
|
3763
|
+
this.emit(drop, held, this.opts.now());
|
|
3764
|
+
}
|
|
3765
|
+
emit(drop, count, now) {
|
|
3766
|
+
this.lastLineAt.set(drop.deviceId, now);
|
|
3767
|
+
this.heldBack.set(drop.deviceId, 0);
|
|
3768
|
+
this.flushArmed.delete(drop.deviceId);
|
|
3769
|
+
this.opts.info(FACE_OUTSIDE_PARENT_MESSAGE, {
|
|
3770
|
+
tags: { deviceId: drop.deviceId },
|
|
3771
|
+
meta: {
|
|
3772
|
+
...faceOutsideParentMeta(drop),
|
|
3773
|
+
droppedSinceLastLine: count,
|
|
3774
|
+
windowMs: this.opts.intervalMs
|
|
3775
|
+
}
|
|
3776
|
+
});
|
|
3777
|
+
}
|
|
3778
|
+
};
|
|
3779
|
+
//#endregion
|
|
3699
3780
|
//#region src/pipeline-runner/detail-subtree.ts
|
|
3700
3781
|
/** Did the subtree run refuse because the camera is not attached (park lapsed)? */
|
|
3701
3782
|
function isDetailNotAttachedRefusal(outcome) {
|
|
@@ -3705,6 +3786,8 @@ function isDetailNotAttachedRefusal(outcome) {
|
|
|
3705
3786
|
function isNativeCropMiss(fetch) {
|
|
3706
3787
|
return "miss" in fetch;
|
|
3707
3788
|
}
|
|
3789
|
+
/** The class the geometry guard judges — the face detector's output. */
|
|
3790
|
+
var FACE_CLASS = "face";
|
|
3708
3791
|
/** Normalize a frame-space pixel rect to `[0,1]` by the given frame dims. */
|
|
3709
3792
|
function normalizeRect(rect, frameWidth, frameHeight) {
|
|
3710
3793
|
return {
|
|
@@ -4006,14 +4089,45 @@ async function runDetailSubtree(deps, input) {
|
|
|
4006
4089
|
cropFrameSpace: crop.frameSpace
|
|
4007
4090
|
} : void 0;
|
|
4008
4091
|
const details = [];
|
|
4092
|
+
let unjudgedFaces = 0;
|
|
4009
4093
|
for (const step of steps) {
|
|
4010
4094
|
const placement = deps.placeStep?.(input.deviceId, step);
|
|
4011
4095
|
const result = await deps.runPipeline([placement?.step ?? step], crop.jpeg, input.deviceId, placement?.deviceKey, nativeCropRef);
|
|
4012
4096
|
if (!result) continue;
|
|
4013
|
-
for (const detection of result.detections)
|
|
4097
|
+
for (const detection of result.detections) {
|
|
4098
|
+
const detail = toDetailResult(detection, step.addonId, crop);
|
|
4099
|
+
if (detail.className === FACE_CLASS && crop.source === "fallback") unjudgedFaces += 1;
|
|
4100
|
+
else if (detail.className === FACE_CLASS && detail.bbox !== void 0 && !faceCentreInsideParent(detail.bbox, input.parent.bbox)) {
|
|
4101
|
+
announceFaceOutsideParent(deps, {
|
|
4102
|
+
deviceId: input.deviceId,
|
|
4103
|
+
score: detail.score,
|
|
4104
|
+
faceBbox: detail.bbox,
|
|
4105
|
+
parentBbox: input.parent.bbox
|
|
4106
|
+
});
|
|
4107
|
+
continue;
|
|
4108
|
+
}
|
|
4109
|
+
details.push(detail);
|
|
4110
|
+
}
|
|
4014
4111
|
}
|
|
4112
|
+
if (unjudgedFaces > 0) deps.logger.warn(FACE_GUARD_UNAVAILABLE_MESSAGE, {
|
|
4113
|
+
tags: { deviceId: input.deviceId },
|
|
4114
|
+
meta: {
|
|
4115
|
+
faces: unjudgedFaces,
|
|
4116
|
+
cropSource: crop.source
|
|
4117
|
+
}
|
|
4118
|
+
});
|
|
4015
4119
|
return { details };
|
|
4016
4120
|
}
|
|
4121
|
+
function announceFaceOutsideParent(deps, drop) {
|
|
4122
|
+
if (deps.recordFaceOutsideParent !== void 0) {
|
|
4123
|
+
deps.recordFaceOutsideParent(drop);
|
|
4124
|
+
return;
|
|
4125
|
+
}
|
|
4126
|
+
deps.logger.warn(FACE_OUTSIDE_PARENT_MESSAGE, {
|
|
4127
|
+
tags: { deviceId: drop.deviceId },
|
|
4128
|
+
meta: faceOutsideParentMeta(drop)
|
|
4129
|
+
});
|
|
4130
|
+
}
|
|
4017
4131
|
//#endregion
|
|
4018
4132
|
//#region src/pipeline-runner/device-load.ts
|
|
4019
4133
|
/** The backend prefix of a `<backend>:<device>` key (bare `cpu` → `cpu`). */
|
|
@@ -9674,7 +9788,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
9674
9788
|
runPipeline: (steps, imageJpeg, deviceId, deviceKey, nativeCropRef) => this.runDetailPipeline(steps, imageJpeg, deviceId, deviceKey, nativeCropRef),
|
|
9675
9789
|
placeStep: (deviceId, step) => this.placeDetailStepForCamera(deviceId, step),
|
|
9676
9790
|
resolveCropConvention: () => convention,
|
|
9677
|
-
logger: this.detailSubtreeLogger()
|
|
9791
|
+
logger: this.detailSubtreeLogger(),
|
|
9792
|
+
recordFaceOutsideParent: (drop) => this.faceOutsideParentLog.record(drop)
|
|
9678
9793
|
}, input);
|
|
9679
9794
|
if (outcome !== null && isDetailNotAttachedRefusal(outcome)) throw buildDetailNotAttachedError(input.deviceId);
|
|
9680
9795
|
return outcome;
|
|
@@ -9888,6 +10003,15 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
9888
10003
|
decodeCeilingInForce: this.liveWorkers?.ceiling
|
|
9889
10004
|
} });
|
|
9890
10005
|
}
|
|
10006
|
+
/** D662: faces the detail plane's geometry guard dropped, one line per camera per minute. */
|
|
10007
|
+
faceOutsideParentLog = new FaceOutsideParentLog({
|
|
10008
|
+
info: (message, extras) => this.ctxIfReady?.logger.info(message, extras),
|
|
10009
|
+
now: () => Date.now(),
|
|
10010
|
+
intervalMs: FACE_OUTSIDE_PARENT_LOG_INTERVAL_MS,
|
|
10011
|
+
schedule: (flush, delayMs) => {
|
|
10012
|
+
setTimeout(flush, delayMs).unref();
|
|
10013
|
+
}
|
|
10014
|
+
});
|
|
9891
10015
|
/** A warn sink that survives a not-yet-ready ctx (boot-order dispatches). */
|
|
9892
10016
|
detailSubtreeLogger() {
|
|
9893
10017
|
return { warn: (message, extras) => this.ctxIfReady?.logger.warn(message, extras) };
|
|
@@ -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-BUs7H-fe.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");
|
package/dist/recorder/index.js
CHANGED
|
@@ -3,8 +3,8 @@ 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-
|
|
6
|
+
const require_dist = require("../dist-BUs7H-fe.js");
|
|
7
|
+
const require_node = require("../node-DxVMyys-.js");
|
|
8
8
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
9
9
|
const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
|
|
10
10
|
const require_retire_root_keys = require("../retire-root-keys-Csb8z2f3.js");
|
|
@@ -9209,6 +9209,8 @@ function runFfmpeg(renderDeps, args, ext) {
|
|
|
9209
9209
|
var DEFAULT_LOAD_LIMIT = 1e5;
|
|
9210
9210
|
var DurableLedger = class DurableLedger {
|
|
9211
9211
|
mirror = /* @__PURE__ */ new Map();
|
|
9212
|
+
/** Whether ANY load has read the store successfully — see {@link hasAnswered}. */
|
|
9213
|
+
answered = false;
|
|
9212
9214
|
spec;
|
|
9213
9215
|
store;
|
|
9214
9216
|
logger;
|
|
@@ -9264,6 +9266,7 @@ var DurableLedger = class DurableLedger {
|
|
|
9264
9266
|
}
|
|
9265
9267
|
this.mirror.clear();
|
|
9266
9268
|
for (const [key, row] of next) this.mirror.set(key, row);
|
|
9269
|
+
this.answered = true;
|
|
9267
9270
|
if (skipped > 0) this.logger.warn("durable rows skipped as malformed — they gate NOTHING", { meta: {
|
|
9268
9271
|
collection: this.spec.collection,
|
|
9269
9272
|
skipped
|
|
@@ -9278,6 +9281,16 @@ var DurableLedger = class DurableLedger {
|
|
|
9278
9281
|
return [...this.mirror.values()];
|
|
9279
9282
|
}
|
|
9280
9283
|
}
|
|
9284
|
+
/**
|
|
9285
|
+
* Whether the mirror is an ANSWER from the store: true once any load has
|
|
9286
|
+
* succeeded, and never false again (a later failed load keeps that answer).
|
|
9287
|
+
* Before it, an empty mirror is "not read yet", never "the store is empty" —
|
|
9288
|
+
* {@link load} swallows its failure, so a caller that must tell the two apart
|
|
9289
|
+
* asks here (D642 review I1).
|
|
9290
|
+
*/
|
|
9291
|
+
hasAnswered() {
|
|
9292
|
+
return this.answered;
|
|
9293
|
+
}
|
|
9281
9294
|
/** Every mirrored row, insertion-ordered. */
|
|
9282
9295
|
snapshot() {
|
|
9283
9296
|
return [...this.mirror.values()];
|
package/dist/recorder/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as OpsLogEntrySchema, B as VIDEOCLIPS_MAX_OFFER_BYTES, Bt as resolveCreateExportSubject, C as ExportRecordSchema, Ct as mayWriteToLocation, Dn as array, En as _enum, F as RECORDING_SOURCE_CAMSTACK, Fn as record, Ft as recordingArchiveCapability, Ht as resolveLocationMode, I as RECORDING_SOURCE_CAMSTACK_ADDON, In as string, It as recordingCapability, Jt as storageOccupancyCapability, L as RecordingConfigSchema, Lt as recordingExportCapability, Mn as number, Nn as object, On as boolean, P as RECORDING_EXPORT_MAX_READ_BYTES, Pn as preprocess, Qt as videoclipsCapability, R as RecordingSignalStatusSchema, Rn as EventCategory, Rt as recordingSignalCapability, St as mayReadLocation, Tn as sleep$1, Tt as modeMayWrite, V as VISIT_MERGE_GAP_MS, Wt as resolveRecordingProfiles, X as clipExportFailureOf, Xt as stripRetiredBandPreBufferSec, Y as clipExportFailure, _n as hydrateSchema, _t as isFirstLevelMacroClass, a as BatteryStatusSchema, b as EVENT_OWNER_TYPES, ct as evaluateSensorEdge, dn as DeviceType, dt as evictionPolicyOfLocation, en as errMsg, ft as exportSubjectOf, g as DEFAULT_EVENTS_BAND_BUFFER_SEC, hn as defineCustomActions, mn as customAction, mt as gbToBytes, o as CLIP_BROKER_PACED_RATES, q as batteryCapability, qt as storageEvictableCapability, rt as deriveRecordingMode, sn as BaseAddon, tt as deriveBatteryPresence, un as DeviceFeature, ut as evictionPolicyForMode, vt as loadContributionCapability, wn as selectAssignedProfileSlots, wt as migrateLegacyDeviceSignalConfig, x as EVENT_PAD_MS, xn as nodePin } from "../dist-
|
|
2
|
-
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
1
|
+
import { A as OpsLogEntrySchema, B as VIDEOCLIPS_MAX_OFFER_BYTES, Bt as resolveCreateExportSubject, C as ExportRecordSchema, Ct as mayWriteToLocation, Dn as array, En as _enum, F as RECORDING_SOURCE_CAMSTACK, Fn as record, Ft as recordingArchiveCapability, Ht as resolveLocationMode, I as RECORDING_SOURCE_CAMSTACK_ADDON, In as string, It as recordingCapability, Jt as storageOccupancyCapability, L as RecordingConfigSchema, Lt as recordingExportCapability, Mn as number, Nn as object, On as boolean, P as RECORDING_EXPORT_MAX_READ_BYTES, Pn as preprocess, Qt as videoclipsCapability, R as RecordingSignalStatusSchema, Rn as EventCategory, Rt as recordingSignalCapability, St as mayReadLocation, Tn as sleep$1, Tt as modeMayWrite, V as VISIT_MERGE_GAP_MS, Wt as resolveRecordingProfiles, X as clipExportFailureOf, Xt as stripRetiredBandPreBufferSec, Y as clipExportFailure, _n as hydrateSchema, _t as isFirstLevelMacroClass, a as BatteryStatusSchema, b as EVENT_OWNER_TYPES, ct as evaluateSensorEdge, dn as DeviceType, dt as evictionPolicyOfLocation, en as errMsg, ft as exportSubjectOf, g as DEFAULT_EVENTS_BAND_BUFFER_SEC, hn as defineCustomActions, mn as customAction, mt as gbToBytes, o as CLIP_BROKER_PACED_RATES, q as batteryCapability, qt as storageEvictableCapability, rt as deriveRecordingMode, sn as BaseAddon, tt as deriveBatteryPresence, un as DeviceFeature, ut as evictionPolicyForMode, vt as loadContributionCapability, wn as selectAssignedProfileSlots, wt as migrateLegacyDeviceSignalConfig, x as EVENT_PAD_MS, xn as nodePin } from "../dist-DvzAabca.mjs";
|
|
2
|
+
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-DnP_6GBZ.mjs";
|
|
3
3
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
4
4
|
import { d as PREBUFFER_MAX_MS, l as withRecordingIntent, r as RECORDING_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
|
|
5
5
|
import { n as RowMapStore, t as retireRootKeys } from "../retire-root-keys-DZvlso2l.mjs";
|
|
@@ -9202,6 +9202,8 @@ function runFfmpeg(renderDeps, args, ext) {
|
|
|
9202
9202
|
var DEFAULT_LOAD_LIMIT = 1e5;
|
|
9203
9203
|
var DurableLedger = class DurableLedger {
|
|
9204
9204
|
mirror = /* @__PURE__ */ new Map();
|
|
9205
|
+
/** Whether ANY load has read the store successfully — see {@link hasAnswered}. */
|
|
9206
|
+
answered = false;
|
|
9205
9207
|
spec;
|
|
9206
9208
|
store;
|
|
9207
9209
|
logger;
|
|
@@ -9257,6 +9259,7 @@ var DurableLedger = class DurableLedger {
|
|
|
9257
9259
|
}
|
|
9258
9260
|
this.mirror.clear();
|
|
9259
9261
|
for (const [key, row] of next) this.mirror.set(key, row);
|
|
9262
|
+
this.answered = true;
|
|
9260
9263
|
if (skipped > 0) this.logger.warn("durable rows skipped as malformed — they gate NOTHING", { meta: {
|
|
9261
9264
|
collection: this.spec.collection,
|
|
9262
9265
|
skipped
|
|
@@ -9271,6 +9274,16 @@ var DurableLedger = class DurableLedger {
|
|
|
9271
9274
|
return [...this.mirror.values()];
|
|
9272
9275
|
}
|
|
9273
9276
|
}
|
|
9277
|
+
/**
|
|
9278
|
+
* Whether the mirror is an ANSWER from the store: true once any load has
|
|
9279
|
+
* succeeded, and never false again (a later failed load keeps that answer).
|
|
9280
|
+
* Before it, an empty mirror is "not read yet", never "the store is empty" —
|
|
9281
|
+
* {@link load} swallows its failure, so a caller that must tell the two apart
|
|
9282
|
+
* asks here (D642 review I1).
|
|
9283
|
+
*/
|
|
9284
|
+
hasAnswered() {
|
|
9285
|
+
return this.answered;
|
|
9286
|
+
}
|
|
9274
9287
|
/** Every mirrored row, insertion-ordered. */
|
|
9275
9288
|
snapshot() {
|
|
9276
9289
|
return [...this.mirror.values()];
|
|
@@ -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-BUs7H-fe.js");
|
|
3
3
|
let node_child_process = require("node:child_process");
|
|
4
4
|
//#region src/stream-broker/recorded/avcc-annexb.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { en as errMsg } from "./dist-
|
|
2
|
+
import { en as errMsg } from "./dist-DvzAabca.mjs";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
//#region src/stream-broker/recorded/avcc-annexb.ts
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CUFWg1jj.mjs";
|
|
2
2
|
import { a as p, i as m, n as h, o as g, r as _, t as v } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.js-C9j-2lBe.mjs";
|
|
3
3
|
import { n as y, r as b, t as x } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-XO0-Pyu6.mjs";
|
|
4
|
-
import { t as S } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-
|
|
4
|
+
import { t as S } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-vnc0r4NV.mjs";
|
|
5
5
|
import { n as C, t as w } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BO7TIbJV.mjs";
|
|
6
6
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
7
7
|
var T = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), E = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), D = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), O = (e) => {
|
|
@@ -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.266",
|
|
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.209",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_stream_broker_widgets",
|