@camstack/addon-pipeline 1.2.310 → 1.2.311
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.
|
@@ -3885,6 +3885,24 @@ function isParkedDetailFresh(parked, nowMs) {
|
|
|
3885
3885
|
function buildDetailNotAttachedError(deviceId) {
|
|
3886
3886
|
return /* @__PURE__ */ new Error(`${DETAIL_NOT_ATTACHED_MARKER} — camera ${deviceId} is not attached and no detail state is parked within the grace window`);
|
|
3887
3887
|
}
|
|
3888
|
+
/**
|
|
3889
|
+
* The wire marker for the typed handle-expired refusal (D688): the frame handle
|
|
3890
|
+
* a detail dispatch named is past the native lease age bound, so every later
|
|
3891
|
+
* ask for it is refused too. Twin constant in
|
|
3892
|
+
* `addon-post-analysis/src/pipeline-analytics/detail-refusal.ts` — keep in sync.
|
|
3893
|
+
* An error rather than a result field for the same reason as
|
|
3894
|
+
* {@link DETAIL_NOT_ATTACHED_MARKER}: the cap output schema strips unknown keys.
|
|
3895
|
+
*/
|
|
3896
|
+
var DETAIL_HANDLE_EXPIRED_MARKER = "runDetailSubtree-refused:handle-expired";
|
|
3897
|
+
/**
|
|
3898
|
+
* The error the cap method throws when the dispatch's only pixel source was a
|
|
3899
|
+
* frame handle the lease registry refused as expired. The dispatcher recognises
|
|
3900
|
+
* the marker, retires the handle for that track and falls back to its parked
|
|
3901
|
+
* frame — it never names the same handle again.
|
|
3902
|
+
*/
|
|
3903
|
+
function buildDetailHandleExpiredError(deviceId, handleAgeMs) {
|
|
3904
|
+
return /* @__PURE__ */ new Error(`${DETAIL_HANDLE_EXPIRED_MARKER} — camera ${deviceId}: the frame handle is past the native lease age bound (age ${handleAgeMs ?? "unknown"} ms)`);
|
|
3905
|
+
}
|
|
3888
3906
|
//#endregion
|
|
3889
3907
|
//#region src/pipeline-runner/face-parent-geometry.ts
|
|
3890
3908
|
/** Is the centre of `face` inside `parent` (edges inclusive)? */
|
|
@@ -3970,7 +3988,11 @@ var FaceOutsideParentLog = class {
|
|
|
3970
3988
|
//#region src/pipeline-runner/detail-subtree.ts
|
|
3971
3989
|
/** Did the subtree run refuse because the camera is not attached (park lapsed)? */
|
|
3972
3990
|
function isDetailNotAttachedRefusal(outcome) {
|
|
3973
|
-
return "refusal" in outcome;
|
|
3991
|
+
return "refusal" in outcome && outcome.refusal === "not-attached";
|
|
3992
|
+
}
|
|
3993
|
+
/** Did the subtree run refuse because the named frame handle is past its lease age bound? */
|
|
3994
|
+
function isDetailHandleExpiredRefusal(outcome) {
|
|
3995
|
+
return "refusal" in outcome && outcome.refusal === "handle-expired";
|
|
3974
3996
|
}
|
|
3975
3997
|
/** Did the native-lease fetch report a miss (rather than return pixels)? */
|
|
3976
3998
|
function isNativeCropMiss(fetch) {
|
|
@@ -4272,6 +4294,10 @@ async function runDetailSubtree(deps, input) {
|
|
|
4272
4294
|
nativeWorkerReason: nativeMiss?.workerReason ?? null
|
|
4273
4295
|
}
|
|
4274
4296
|
});
|
|
4297
|
+
if (nativeMiss?.miss === "handle-expired") return {
|
|
4298
|
+
refusal: "handle-expired",
|
|
4299
|
+
handleAgeMs: nativeMiss.handleAgeMs
|
|
4300
|
+
};
|
|
4275
4301
|
return null;
|
|
4276
4302
|
}
|
|
4277
4303
|
const nativeCropRef = input.frameHandle !== void 0 && crop.source === "native" ? {
|
|
@@ -10071,6 +10097,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
10071
10097
|
recordFaceOutsideParent: (drop) => this.faceOutsideParentLog.record(drop)
|
|
10072
10098
|
}, input);
|
|
10073
10099
|
if (outcome !== null && isDetailNotAttachedRefusal(outcome)) throw buildDetailNotAttachedError(input.deviceId);
|
|
10100
|
+
if (outcome !== null && isDetailHandleExpiredRefusal(outcome)) throw buildDetailHandleExpiredError(input.deviceId, outcome.handleAgeMs);
|
|
10074
10101
|
return outcome;
|
|
10075
10102
|
}
|
|
10076
10103
|
/**
|
|
@@ -3877,6 +3877,24 @@ function isParkedDetailFresh(parked, nowMs) {
|
|
|
3877
3877
|
function buildDetailNotAttachedError(deviceId) {
|
|
3878
3878
|
return /* @__PURE__ */ new Error(`${DETAIL_NOT_ATTACHED_MARKER} — camera ${deviceId} is not attached and no detail state is parked within the grace window`);
|
|
3879
3879
|
}
|
|
3880
|
+
/**
|
|
3881
|
+
* The wire marker for the typed handle-expired refusal (D688): the frame handle
|
|
3882
|
+
* a detail dispatch named is past the native lease age bound, so every later
|
|
3883
|
+
* ask for it is refused too. Twin constant in
|
|
3884
|
+
* `addon-post-analysis/src/pipeline-analytics/detail-refusal.ts` — keep in sync.
|
|
3885
|
+
* An error rather than a result field for the same reason as
|
|
3886
|
+
* {@link DETAIL_NOT_ATTACHED_MARKER}: the cap output schema strips unknown keys.
|
|
3887
|
+
*/
|
|
3888
|
+
var DETAIL_HANDLE_EXPIRED_MARKER = "runDetailSubtree-refused:handle-expired";
|
|
3889
|
+
/**
|
|
3890
|
+
* The error the cap method throws when the dispatch's only pixel source was a
|
|
3891
|
+
* frame handle the lease registry refused as expired. The dispatcher recognises
|
|
3892
|
+
* the marker, retires the handle for that track and falls back to its parked
|
|
3893
|
+
* frame — it never names the same handle again.
|
|
3894
|
+
*/
|
|
3895
|
+
function buildDetailHandleExpiredError(deviceId, handleAgeMs) {
|
|
3896
|
+
return /* @__PURE__ */ new Error(`${DETAIL_HANDLE_EXPIRED_MARKER} — camera ${deviceId}: the frame handle is past the native lease age bound (age ${handleAgeMs ?? "unknown"} ms)`);
|
|
3897
|
+
}
|
|
3880
3898
|
//#endregion
|
|
3881
3899
|
//#region src/pipeline-runner/face-parent-geometry.ts
|
|
3882
3900
|
/** Is the centre of `face` inside `parent` (edges inclusive)? */
|
|
@@ -3962,7 +3980,11 @@ var FaceOutsideParentLog = class {
|
|
|
3962
3980
|
//#region src/pipeline-runner/detail-subtree.ts
|
|
3963
3981
|
/** Did the subtree run refuse because the camera is not attached (park lapsed)? */
|
|
3964
3982
|
function isDetailNotAttachedRefusal(outcome) {
|
|
3965
|
-
return "refusal" in outcome;
|
|
3983
|
+
return "refusal" in outcome && outcome.refusal === "not-attached";
|
|
3984
|
+
}
|
|
3985
|
+
/** Did the subtree run refuse because the named frame handle is past its lease age bound? */
|
|
3986
|
+
function isDetailHandleExpiredRefusal(outcome) {
|
|
3987
|
+
return "refusal" in outcome && outcome.refusal === "handle-expired";
|
|
3966
3988
|
}
|
|
3967
3989
|
/** Did the native-lease fetch report a miss (rather than return pixels)? */
|
|
3968
3990
|
function isNativeCropMiss(fetch) {
|
|
@@ -4264,6 +4286,10 @@ async function runDetailSubtree(deps, input) {
|
|
|
4264
4286
|
nativeWorkerReason: nativeMiss?.workerReason ?? null
|
|
4265
4287
|
}
|
|
4266
4288
|
});
|
|
4289
|
+
if (nativeMiss?.miss === "handle-expired") return {
|
|
4290
|
+
refusal: "handle-expired",
|
|
4291
|
+
handleAgeMs: nativeMiss.handleAgeMs
|
|
4292
|
+
};
|
|
4267
4293
|
return null;
|
|
4268
4294
|
}
|
|
4269
4295
|
const nativeCropRef = input.frameHandle !== void 0 && crop.source === "native" ? {
|
|
@@ -10063,6 +10089,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
10063
10089
|
recordFaceOutsideParent: (drop) => this.faceOutsideParentLog.record(drop)
|
|
10064
10090
|
}, input);
|
|
10065
10091
|
if (outcome !== null && isDetailNotAttachedRefusal(outcome)) throw buildDetailNotAttachedError(input.deviceId);
|
|
10092
|
+
if (outcome !== null && isDetailHandleExpiredRefusal(outcome)) throw buildDetailHandleExpiredError(input.deviceId, outcome.handleAgeMs);
|
|
10066
10093
|
return outcome;
|
|
10067
10094
|
}
|
|
10068
10095
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-pipeline",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.311",
|
|
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",
|