@camstack/addon-pipeline 1.2.201 → 1.2.203
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-nKgB-_mg.js → default-detection-model-CfIEdJop.js} +1 -1
- package/dist/{default-detection-model-fUMLQHB2.mjs → default-detection-model-ClY8fk-K.mjs} +1 -1
- package/dist/detection-pipeline/index.js +5 -5
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-D2jcEuZD.mjs → dist-B5x2ogXC.mjs} +19 -2
- package/dist/{dist-Bd875pfj.js → dist-Czm3CW8M.js} +19 -2
- package/dist/{lazy-sharp-B4KrLp0u.js → lazy-sharp-AhHg_Hb-.js} +1 -1
- package/dist/motion-wasm/index.js +2 -2
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-CmfXSgr3.mjs → node-Bx76sJbU.mjs} +1 -1
- package/dist/{node-dwhLC9Fh.js → node-u0M7kQe-.js} +1 -1
- package/dist/pipeline-runner/index.js +41 -26
- package/dist/pipeline-runner/index.mjs +40 -25
- package/dist/{process-memory-BDRJK5Vq.js → process-memory-D5JcMSDA.js} +1 -1
- package/dist/{process-memory-CH5qO7AX.mjs → process-memory-iiE4Q2mt.mjs} +1 -1
- package/dist/recorder/index.js +2 -2
- package/dist/recorder/index.mjs +2 -2
- package/dist/{segment-demux-js-BHTuEBhC.mjs → segment-demux-js-BcbB_hcJ.mjs} +1 -1
- package/dist/{segment-demux-js-cmfLROII.js → segment-demux-js-CSt1T2Vi.js} +1 -1
- package/dist/session-decode/decode-worker-child.js +234 -24
- package/dist/session-decode/decode-worker-child.mjs +233 -23
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DZcCQR5t.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BSWELhoJ.mjs} +3 -3
- 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-CZt5Lq_M.mjs → hostInit-BJlv_j8i.mjs} +3 -3
- 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/dist/{worker-protocol--PcFsRrE.js → worker-protocol-B4C4seRh.js} +1 -1
- package/dist/{worker-protocol-D4GyRNnY.mjs → worker-protocol-ClwpoGoP.mjs} +1 -1
- package/package.json +1 -1
|
@@ -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_process_memory = require("../process-memory-
|
|
5
|
+
const require_dist = require("../dist-Czm3CW8M.js");
|
|
6
|
+
const require_process_memory = require("../process-memory-D5JcMSDA.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_dist.__toESM(node_fs);
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { Dt as resolvePoolMemoryPolicy, It as errMsg, Jt as hydrateSchema, M as audioAnalyzerCapability, S as PoolMemoryWatchdog, Ut as BaseAddon, j as audioAnalysisCapability, n as AUDIO_BACKEND_CHOICES, ot as mapAudioLabelToMacro, s as DEFAULT_AUDIO_ANALYZER_CONFIG, v as HF_BASE_URL } from "../dist-
|
|
3
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
2
|
+
import { Dt as resolvePoolMemoryPolicy, It as errMsg, Jt as hydrateSchema, M as audioAnalyzerCapability, S as PoolMemoryWatchdog, Ut as BaseAddon, j as audioAnalysisCapability, n as AUDIO_BACKEND_CHOICES, ot as mapAudioLabelToMacro, s as DEFAULT_AUDIO_ANALYZER_CONFIG, v as HF_BASE_URL } from "../dist-B5x2ogXC.mjs";
|
|
3
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-iiE4Q2mt.mjs";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
import { downloadFile } from "@camstack/system/addon-utils";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as audioKindId, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS, tt as hfModelUrl } from "./dist-
|
|
1
|
+
import { N as audioKindId, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS, tt as hfModelUrl } from "./dist-B5x2ogXC.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
//#region src/detection-pipeline/registry/model-catalogs.ts
|
|
4
4
|
var HF_REPO = "camstack/camstack-models";
|
|
@@ -2,12 +2,12 @@ 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_node = require("../node-
|
|
7
|
-
const require_default_detection_model = require("../default-detection-model-
|
|
8
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
5
|
+
const require_dist = require("../dist-Czm3CW8M.js");
|
|
6
|
+
const require_node = require("../node-u0M7kQe-.js");
|
|
7
|
+
const require_default_detection_model = require("../default-detection-model-CfIEdJop.js");
|
|
8
|
+
const require_lazy_sharp = require("../lazy-sharp-AhHg_Hb-.js");
|
|
9
9
|
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
|
|
10
|
-
const require_process_memory = require("../process-memory-
|
|
10
|
+
const require_process_memory = require("../process-memory-D5JcMSDA.js");
|
|
11
11
|
let node_os = require("node:os");
|
|
12
12
|
node_os = require_dist.__toESM(node_os);
|
|
13
13
|
let node_fs = require("node:fs");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { $t as parseJsonUnknown, B as defaultDeviceFor$1, Dt as resolvePoolMemoryPolicy, G as detectionPipelineCapability, It as errMsg, J as enumerateInferenceDevices, Jt as hydrateSchema, Pt as supportedRuntimes$1, Qt as nodePin, S as PoolMemoryWatchdog, Ut as BaseAddon, X as evaluateZoneRules, c as DEFAULT_CLUSTER_STEP_MODELS, gt as pickClusterStepSettings, hn as EventCategory, ht as pickClusterStepModels, in as array, it as loadContributionCapability, k as YAMNET_TO_MACRO, kt as runtimeDevices$1, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, mn as union, nn as sleep, nt as inferModelProvider, pn as string, pt as overlayClusterStepSettings, qt as createEvent, t as APPLE_SA_TO_MACRO, un as object, wt as resolveClusterStepModelId, yt as pipelineExecutorCapability } from "../dist-
|
|
3
|
-
import { o as readProcessCost } from "../node-
|
|
4
|
-
import { a as ALL_PIPELINE_STEPS, c as getStep, d as landmarkPrecisionVerdict, l as getStepDefinition, n as resolveDefaultDetectionModel, o as ALL_STEPS, r as localFrameRegistry, s as getDefaultModelForFormat, u as resolveModelForFormat } from "../default-detection-model-
|
|
2
|
+
import { $t as parseJsonUnknown, B as defaultDeviceFor$1, Dt as resolvePoolMemoryPolicy, G as detectionPipelineCapability, It as errMsg, J as enumerateInferenceDevices, Jt as hydrateSchema, Pt as supportedRuntimes$1, Qt as nodePin, S as PoolMemoryWatchdog, Ut as BaseAddon, X as evaluateZoneRules, c as DEFAULT_CLUSTER_STEP_MODELS, gt as pickClusterStepSettings, hn as EventCategory, ht as pickClusterStepModels, in as array, it as loadContributionCapability, k as YAMNET_TO_MACRO, kt as runtimeDevices$1, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, mn as union, nn as sleep, nt as inferModelProvider, pn as string, pt as overlayClusterStepSettings, qt as createEvent, t as APPLE_SA_TO_MACRO, un as object, wt as resolveClusterStepModelId, yt as pipelineExecutorCapability } from "../dist-B5x2ogXC.mjs";
|
|
3
|
+
import { o as readProcessCost } from "../node-Bx76sJbU.mjs";
|
|
4
|
+
import { a as ALL_PIPELINE_STEPS, c as getStep, d as landmarkPrecisionVerdict, l as getStepDefinition, n as resolveDefaultDetectionModel, o as ALL_STEPS, r as localFrameRegistry, s as getDefaultModelForFormat, u as resolveModelForFormat } from "../default-detection-model-ClY8fk-K.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
6
|
import { n as startEventLoopStallMonitor } from "../event-loop-stall-monitor-DXLNBMkY.mjs";
|
|
7
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
7
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-iiE4Q2mt.mjs";
|
|
8
8
|
import * as os from "node:os";
|
|
9
9
|
import * as fs from "node:fs";
|
|
10
10
|
import * as path$1 from "node:path";
|
|
@@ -22845,8 +22845,25 @@ var occupancyRecheckFramesField = {
|
|
|
22845
22845
|
* (analyzer attaches detected `regions[]`; onboard does not — the
|
|
22846
22846
|
* camera typically only reports a binary signal plus an optional
|
|
22847
22847
|
* channel/AI class which lives in dedicated event channels).
|
|
22848
|
-
|
|
22849
|
-
|
|
22848
|
+
*
|
|
22849
|
+
* - `onboard` — the camera's firmware said something moved.
|
|
22850
|
+
* - `analyzer` — this runner's frame-diff said so, and attaches `regions[]`.
|
|
22851
|
+
* - `device-activity` — the DEVICE said it is doing its job: the
|
|
22852
|
+
* `recording-signal` LEVEL the same device raises for the recorder
|
|
22853
|
+
* ([D380](../../../../docs/decisions/adr-0380-a-device-decided-recording-is-a-mode-with-no-schedule-seeded-once.md)),
|
|
22854
|
+
* republished as a motion source. It attaches **nothing** — no regions, no
|
|
22855
|
+
* class: the only fact it carries is that the device is active, and a robot
|
|
22856
|
+
* vacuum that is itself the moving object has no region worth sending. It is
|
|
22857
|
+
* a LEVEL, so unlike `onboard` it has a real falling edge, and unlike
|
|
22858
|
+
* `analyzer` it must not open the frame-diff side-channel — the runner's
|
|
22859
|
+
* `handleOnboardMotionAnalyzer` gate is `source === 'onboard'` and stays that
|
|
22860
|
+
* way ([D392](../../../../docs/decisions/adr-0392-a-device-that-says-it-is-working-is-a-motion-source-of-its-own.md)).
|
|
22861
|
+
*/
|
|
22862
|
+
var MotionSourceEnum = _enum([
|
|
22863
|
+
"onboard",
|
|
22864
|
+
"analyzer",
|
|
22865
|
+
"device-activity"
|
|
22866
|
+
]);
|
|
22850
22867
|
/**
|
|
22851
22868
|
* List of motion sources active on a camera. Empty array is valid:
|
|
22852
22869
|
* "no source" — happens for battery cams without firmware motion when
|
|
@@ -22868,8 +22868,25 @@ var occupancyRecheckFramesField = {
|
|
|
22868
22868
|
* (analyzer attaches detected `regions[]`; onboard does not — the
|
|
22869
22869
|
* camera typically only reports a binary signal plus an optional
|
|
22870
22870
|
* channel/AI class which lives in dedicated event channels).
|
|
22871
|
-
|
|
22872
|
-
|
|
22871
|
+
*
|
|
22872
|
+
* - `onboard` — the camera's firmware said something moved.
|
|
22873
|
+
* - `analyzer` — this runner's frame-diff said so, and attaches `regions[]`.
|
|
22874
|
+
* - `device-activity` — the DEVICE said it is doing its job: the
|
|
22875
|
+
* `recording-signal` LEVEL the same device raises for the recorder
|
|
22876
|
+
* ([D380](../../../../docs/decisions/adr-0380-a-device-decided-recording-is-a-mode-with-no-schedule-seeded-once.md)),
|
|
22877
|
+
* republished as a motion source. It attaches **nothing** — no regions, no
|
|
22878
|
+
* class: the only fact it carries is that the device is active, and a robot
|
|
22879
|
+
* vacuum that is itself the moving object has no region worth sending. It is
|
|
22880
|
+
* a LEVEL, so unlike `onboard` it has a real falling edge, and unlike
|
|
22881
|
+
* `analyzer` it must not open the frame-diff side-channel — the runner's
|
|
22882
|
+
* `handleOnboardMotionAnalyzer` gate is `source === 'onboard'` and stays that
|
|
22883
|
+
* way ([D392](../../../../docs/decisions/adr-0392-a-device-that-says-it-is-working-is-a-motion-source-of-its-own.md)).
|
|
22884
|
+
*/
|
|
22885
|
+
var MotionSourceEnum = _enum([
|
|
22886
|
+
"onboard",
|
|
22887
|
+
"analyzer",
|
|
22888
|
+
"device-activity"
|
|
22889
|
+
]);
|
|
22873
22890
|
/**
|
|
22874
22891
|
* List of motion sources active on a camera. Empty array is valid:
|
|
22875
22892
|
* "no source" — happens for battery cams without firmware motion when
|
|
@@ -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-Czm3CW8M.js");
|
|
6
|
+
const require_lazy_sharp = require("../lazy-sharp-AhHg_Hb-.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
//#region src/motion-wasm/wasm-motion-detector.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Jt as hydrateSchema, Kt as DeviceType, Ut as BaseAddon, X as evaluateZoneRules, ft as motionDetectionCapability } from "../dist-
|
|
1
|
+
import { Jt as hydrateSchema, Kt as DeviceType, Ut as BaseAddon, X as evaluateZoneRules, ft as motionDetectionCapability } from "../dist-B5x2ogXC.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 { It as errMsg, Rt as Fmp4BoxSplitter, Vt as isSoftwareDecode, zt as buildFfmpegArgs } from "./dist-
|
|
1
|
+
import { It as errMsg, Rt as Fmp4BoxSplitter, Vt as isSoftwareDecode, zt as buildFfmpegArgs } from "./dist-B5x2ogXC.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -2,12 +2,12 @@ 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_node = require("../node-
|
|
7
|
-
const require_default_detection_model = require("../default-detection-model-
|
|
8
|
-
const require_worker_protocol = require("../worker-protocol
|
|
5
|
+
const require_dist = require("../dist-Czm3CW8M.js");
|
|
6
|
+
const require_node = require("../node-u0M7kQe-.js");
|
|
7
|
+
const require_default_detection_model = require("../default-detection-model-CfIEdJop.js");
|
|
8
|
+
const require_worker_protocol = require("../worker-protocol-B4C4seRh.js");
|
|
9
9
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
10
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
10
|
+
const require_lazy_sharp = require("../lazy-sharp-AhHg_Hb-.js");
|
|
11
11
|
const require_restream_intent = require("../restream-intent-B1Difcnq.js");
|
|
12
12
|
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
|
|
13
13
|
const require_remote_restream = require("../remote-restream-CO36Sr30.js");
|
|
@@ -1093,7 +1093,7 @@ var SessionDecodeSession = class {
|
|
|
1093
1093
|
* rejects — native crops are strictly best-effort with a free fallback.
|
|
1094
1094
|
*/
|
|
1095
1095
|
requestNativeCrop(frameId, bbox, maxWidth) {
|
|
1096
|
-
if (this.exited) return Promise.resolve(
|
|
1096
|
+
if (this.exited) return Promise.resolve({ kind: "miss" });
|
|
1097
1097
|
const requestId = this.nextNativeCropId++;
|
|
1098
1098
|
return new Promise((resolve) => {
|
|
1099
1099
|
this.pendingNativeCrops.set(requestId, { resolve });
|
|
@@ -1107,7 +1107,7 @@ var SessionDecodeSession = class {
|
|
|
1107
1107
|
});
|
|
1108
1108
|
} catch {
|
|
1109
1109
|
this.pendingNativeCrops.delete(requestId);
|
|
1110
|
-
resolve(
|
|
1110
|
+
resolve({ kind: "miss" });
|
|
1111
1111
|
}
|
|
1112
1112
|
});
|
|
1113
1113
|
}
|
|
@@ -1187,10 +1187,13 @@ var SessionDecodeSession = class {
|
|
|
1187
1187
|
return;
|
|
1188
1188
|
case "nativeCropResult":
|
|
1189
1189
|
this.settleNativeCrop(raw.requestId, {
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1190
|
+
kind: "crop",
|
|
1191
|
+
crop: {
|
|
1192
|
+
bytes: raw.bytes,
|
|
1193
|
+
width: raw.width,
|
|
1194
|
+
height: raw.height,
|
|
1195
|
+
...raw.source ? { source: raw.source } : {}
|
|
1196
|
+
}
|
|
1194
1197
|
});
|
|
1195
1198
|
return;
|
|
1196
1199
|
case "nativeCropMiss":
|
|
@@ -1198,7 +1201,10 @@ var SessionDecodeSession = class {
|
|
|
1198
1201
|
requestId: raw.requestId,
|
|
1199
1202
|
reason: raw.reason
|
|
1200
1203
|
} });
|
|
1201
|
-
this.settleNativeCrop(raw.requestId,
|
|
1204
|
+
this.settleNativeCrop(raw.requestId, {
|
|
1205
|
+
kind: "miss",
|
|
1206
|
+
...raw.reason !== void 0 ? { workerReason: raw.reason } : {}
|
|
1207
|
+
});
|
|
1202
1208
|
return;
|
|
1203
1209
|
case "error":
|
|
1204
1210
|
this.settleError(raw.message, raw.frameId);
|
|
@@ -1235,15 +1241,15 @@ var SessionDecodeSession = class {
|
|
|
1235
1241
|
}
|
|
1236
1242
|
for (const waiters of this.pendingToBuffers.values()) for (const waiter of waiters) waiter.reject(/* @__PURE__ */ new Error("session-decode-coordinator: worker exited before toBuffer reply"));
|
|
1237
1243
|
this.pendingToBuffers.clear();
|
|
1238
|
-
for (const waiter of this.pendingNativeCrops.values()) waiter.resolve(
|
|
1244
|
+
for (const waiter of this.pendingNativeCrops.values()) waiter.resolve({ kind: "miss" });
|
|
1239
1245
|
this.pendingNativeCrops.clear();
|
|
1240
1246
|
}
|
|
1241
1247
|
/** Settle the `nativeCrop` waiter for `requestId` (dropping unknown/stale ids). */
|
|
1242
|
-
settleNativeCrop(requestId,
|
|
1248
|
+
settleNativeCrop(requestId, attempt) {
|
|
1243
1249
|
const waiter = this.pendingNativeCrops.get(requestId);
|
|
1244
1250
|
if (!waiter) return;
|
|
1245
1251
|
this.pendingNativeCrops.delete(requestId);
|
|
1246
|
-
waiter.resolve(
|
|
1252
|
+
waiter.resolve(attempt);
|
|
1247
1253
|
}
|
|
1248
1254
|
settlePendingPull(outcome) {
|
|
1249
1255
|
const waiter = this.pendingPull;
|
|
@@ -2907,7 +2913,8 @@ async function runDetailSubtree(deps, input) {
|
|
|
2907
2913
|
hadFrameJpeg: input.frameJpeg !== void 0,
|
|
2908
2914
|
hadCropJpeg: input.cropJpeg !== void 0,
|
|
2909
2915
|
nativeMissReason: nativeMiss?.miss ?? null,
|
|
2910
|
-
nativeHandleAgeMs: nativeMiss?.handleAgeMs ?? null
|
|
2916
|
+
nativeHandleAgeMs: nativeMiss?.handleAgeMs ?? null,
|
|
2917
|
+
nativeWorkerReason: nativeMiss?.workerReason ?? null
|
|
2911
2918
|
}
|
|
2912
2919
|
});
|
|
2913
2920
|
return null;
|
|
@@ -7243,6 +7250,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
7243
7250
|
handleNodeId: input.handle.nodeId,
|
|
7244
7251
|
nativeMissReason: resolved.missReason,
|
|
7245
7252
|
nativeHandleAgeMs: resolved.handleAgeMs,
|
|
7253
|
+
...resolved.workerReason !== void 0 ? { nativeWorkerReason: resolved.workerReason } : {},
|
|
7246
7254
|
maxWidth: input.maxWidth ?? null,
|
|
7247
7255
|
hint: "both the native lease and the retained-frame window have closed for this frame — the detail dispatch that asked for it produces NO crop"
|
|
7248
7256
|
}
|
|
@@ -7526,18 +7534,22 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
7526
7534
|
let nativeResult = null;
|
|
7527
7535
|
let missReason = null;
|
|
7528
7536
|
let handleAgeMs = null;
|
|
7537
|
+
let workerReason;
|
|
7529
7538
|
if (!isUnboundedFullFrame) {
|
|
7530
7539
|
const found = this.nativeCropRegistry.get(input.handle);
|
|
7531
7540
|
handleAgeMs = found?.ageMs ?? null;
|
|
7532
7541
|
if (found) {
|
|
7533
|
-
const
|
|
7534
|
-
if (
|
|
7535
|
-
bytes:
|
|
7536
|
-
width:
|
|
7537
|
-
height:
|
|
7538
|
-
...
|
|
7542
|
+
const attempt = await found.request(input.bbox, input.maxWidth);
|
|
7543
|
+
if (attempt.kind === "crop") nativeResult = {
|
|
7544
|
+
bytes: attempt.crop.bytes,
|
|
7545
|
+
width: attempt.crop.width,
|
|
7546
|
+
height: attempt.crop.height,
|
|
7547
|
+
...attempt.crop.source ? { source: attempt.crop.source } : {}
|
|
7539
7548
|
};
|
|
7540
|
-
else
|
|
7549
|
+
else {
|
|
7550
|
+
missReason = "worker-lease-gone";
|
|
7551
|
+
workerReason = attempt.workerReason;
|
|
7552
|
+
}
|
|
7541
7553
|
} else missReason = "no-registry-entry";
|
|
7542
7554
|
if (missReason !== null) {
|
|
7543
7555
|
const tierOnMiss = resolveNativeCropSource(isFullFrame, false);
|
|
@@ -7550,7 +7562,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
7550
7562
|
handleNodeId: input.handle.nodeId,
|
|
7551
7563
|
handleAgeMs,
|
|
7552
7564
|
registrySize: this.nativeCropRegistry.size,
|
|
7553
|
-
registryCap: DEFAULT_NATIVE_CROP_REGISTRY_CAP
|
|
7565
|
+
registryCap: DEFAULT_NATIVE_CROP_REGISTRY_CAP,
|
|
7566
|
+
...workerReason !== void 0 ? { workerReason } : {}
|
|
7554
7567
|
}
|
|
7555
7568
|
};
|
|
7556
7569
|
if (tierOnMiss === "miss") this.ctx.logger.warn("native crop miss", fields);
|
|
@@ -7561,7 +7574,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
7561
7574
|
pixels: nativeResult,
|
|
7562
7575
|
tier: resolveNativeCropSource(isFullFrame, nativeResult !== null),
|
|
7563
7576
|
missReason,
|
|
7564
|
-
handleAgeMs
|
|
7577
|
+
handleAgeMs,
|
|
7578
|
+
workerReason
|
|
7565
7579
|
};
|
|
7566
7580
|
}
|
|
7567
7581
|
/**
|
|
@@ -7871,7 +7885,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
7871
7885
|
});
|
|
7872
7886
|
if (resolved.pixels === null || resolved.tier !== "native") return {
|
|
7873
7887
|
miss: resolved.missReason ?? "worker-lease-gone",
|
|
7874
|
-
handleAgeMs: resolved.handleAgeMs
|
|
7888
|
+
handleAgeMs: resolved.handleAgeMs,
|
|
7889
|
+
...resolved.workerReason !== void 0 ? { workerReason: resolved.workerReason } : {}
|
|
7875
7890
|
};
|
|
7876
7891
|
const encoded = await this.encodeNativeCropResult(resolved.pixels, "native", true);
|
|
7877
7892
|
if (!encoded?.jpeg) return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as failureContributionCapability, It as errMsg, Qt as nodePin, R as customAction, U as deriveDetailCropRect, Ut as BaseAddon, V as defineCustomActions, _ as FailureCounters, _t as pickDetailCropConvention, an as boolean, bt as pipelineRunnerCapability, cn as literal, hn as EventCategory, in as array, it as loadContributionCapability, ln as number, m as DEVICE_BACKEND_TO_FORMAT, p as DEFAULT_NATIVE_LEASE_SETTINGS, pn as string, qt as createEvent, rn as _enum, sn as lazy, u as DEFAULT_DETAIL_CROP_CONVENTION, un as object, vt as pickNativeLeaseOverride } from "../dist-
|
|
2
|
-
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
3
|
-
import { i as resolveFrameViewGeometry, l as getStepDefinition, r as localFrameRegistry } from "../default-detection-model-
|
|
4
|
-
import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-
|
|
1
|
+
import { $ as failureContributionCapability, It as errMsg, Qt as nodePin, R as customAction, U as deriveDetailCropRect, Ut as BaseAddon, V as defineCustomActions, _ as FailureCounters, _t as pickDetailCropConvention, an as boolean, bt as pipelineRunnerCapability, cn as literal, hn as EventCategory, in as array, it as loadContributionCapability, ln as number, m as DEVICE_BACKEND_TO_FORMAT, p as DEFAULT_NATIVE_LEASE_SETTINGS, pn as string, qt as createEvent, rn as _enum, sn as lazy, u as DEFAULT_DETAIL_CROP_CONVENTION, un as object, vt as pickNativeLeaseOverride } from "../dist-B5x2ogXC.mjs";
|
|
2
|
+
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-Bx76sJbU.mjs";
|
|
3
|
+
import { i as resolveFrameViewGeometry, l as getStepDefinition, r as localFrameRegistry } from "../default-detection-model-ClY8fk-K.mjs";
|
|
4
|
+
import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-ClwpoGoP.mjs";
|
|
5
5
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
6
6
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
7
7
|
import { a as preRollRequestOf, o as withDetectionIntent, t as DETECTION_PRE_ROLL_REQUEST_MS } from "../restream-intent-DWe2kInY.mjs";
|
|
@@ -1087,7 +1087,7 @@ var SessionDecodeSession = class {
|
|
|
1087
1087
|
* rejects — native crops are strictly best-effort with a free fallback.
|
|
1088
1088
|
*/
|
|
1089
1089
|
requestNativeCrop(frameId, bbox, maxWidth) {
|
|
1090
|
-
if (this.exited) return Promise.resolve(
|
|
1090
|
+
if (this.exited) return Promise.resolve({ kind: "miss" });
|
|
1091
1091
|
const requestId = this.nextNativeCropId++;
|
|
1092
1092
|
return new Promise((resolve) => {
|
|
1093
1093
|
this.pendingNativeCrops.set(requestId, { resolve });
|
|
@@ -1101,7 +1101,7 @@ var SessionDecodeSession = class {
|
|
|
1101
1101
|
});
|
|
1102
1102
|
} catch {
|
|
1103
1103
|
this.pendingNativeCrops.delete(requestId);
|
|
1104
|
-
resolve(
|
|
1104
|
+
resolve({ kind: "miss" });
|
|
1105
1105
|
}
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
@@ -1181,10 +1181,13 @@ var SessionDecodeSession = class {
|
|
|
1181
1181
|
return;
|
|
1182
1182
|
case "nativeCropResult":
|
|
1183
1183
|
this.settleNativeCrop(raw.requestId, {
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1184
|
+
kind: "crop",
|
|
1185
|
+
crop: {
|
|
1186
|
+
bytes: raw.bytes,
|
|
1187
|
+
width: raw.width,
|
|
1188
|
+
height: raw.height,
|
|
1189
|
+
...raw.source ? { source: raw.source } : {}
|
|
1190
|
+
}
|
|
1188
1191
|
});
|
|
1189
1192
|
return;
|
|
1190
1193
|
case "nativeCropMiss":
|
|
@@ -1192,7 +1195,10 @@ var SessionDecodeSession = class {
|
|
|
1192
1195
|
requestId: raw.requestId,
|
|
1193
1196
|
reason: raw.reason
|
|
1194
1197
|
} });
|
|
1195
|
-
this.settleNativeCrop(raw.requestId,
|
|
1198
|
+
this.settleNativeCrop(raw.requestId, {
|
|
1199
|
+
kind: "miss",
|
|
1200
|
+
...raw.reason !== void 0 ? { workerReason: raw.reason } : {}
|
|
1201
|
+
});
|
|
1196
1202
|
return;
|
|
1197
1203
|
case "error":
|
|
1198
1204
|
this.settleError(raw.message, raw.frameId);
|
|
@@ -1229,15 +1235,15 @@ var SessionDecodeSession = class {
|
|
|
1229
1235
|
}
|
|
1230
1236
|
for (const waiters of this.pendingToBuffers.values()) for (const waiter of waiters) waiter.reject(/* @__PURE__ */ new Error("session-decode-coordinator: worker exited before toBuffer reply"));
|
|
1231
1237
|
this.pendingToBuffers.clear();
|
|
1232
|
-
for (const waiter of this.pendingNativeCrops.values()) waiter.resolve(
|
|
1238
|
+
for (const waiter of this.pendingNativeCrops.values()) waiter.resolve({ kind: "miss" });
|
|
1233
1239
|
this.pendingNativeCrops.clear();
|
|
1234
1240
|
}
|
|
1235
1241
|
/** Settle the `nativeCrop` waiter for `requestId` (dropping unknown/stale ids). */
|
|
1236
|
-
settleNativeCrop(requestId,
|
|
1242
|
+
settleNativeCrop(requestId, attempt) {
|
|
1237
1243
|
const waiter = this.pendingNativeCrops.get(requestId);
|
|
1238
1244
|
if (!waiter) return;
|
|
1239
1245
|
this.pendingNativeCrops.delete(requestId);
|
|
1240
|
-
waiter.resolve(
|
|
1246
|
+
waiter.resolve(attempt);
|
|
1241
1247
|
}
|
|
1242
1248
|
settlePendingPull(outcome) {
|
|
1243
1249
|
const waiter = this.pendingPull;
|
|
@@ -2900,7 +2906,8 @@ async function runDetailSubtree(deps, input) {
|
|
|
2900
2906
|
hadFrameJpeg: input.frameJpeg !== void 0,
|
|
2901
2907
|
hadCropJpeg: input.cropJpeg !== void 0,
|
|
2902
2908
|
nativeMissReason: nativeMiss?.miss ?? null,
|
|
2903
|
-
nativeHandleAgeMs: nativeMiss?.handleAgeMs ?? null
|
|
2909
|
+
nativeHandleAgeMs: nativeMiss?.handleAgeMs ?? null,
|
|
2910
|
+
nativeWorkerReason: nativeMiss?.workerReason ?? null
|
|
2904
2911
|
}
|
|
2905
2912
|
});
|
|
2906
2913
|
return null;
|
|
@@ -7236,6 +7243,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
7236
7243
|
handleNodeId: input.handle.nodeId,
|
|
7237
7244
|
nativeMissReason: resolved.missReason,
|
|
7238
7245
|
nativeHandleAgeMs: resolved.handleAgeMs,
|
|
7246
|
+
...resolved.workerReason !== void 0 ? { nativeWorkerReason: resolved.workerReason } : {},
|
|
7239
7247
|
maxWidth: input.maxWidth ?? null,
|
|
7240
7248
|
hint: "both the native lease and the retained-frame window have closed for this frame — the detail dispatch that asked for it produces NO crop"
|
|
7241
7249
|
}
|
|
@@ -7519,18 +7527,22 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
7519
7527
|
let nativeResult = null;
|
|
7520
7528
|
let missReason = null;
|
|
7521
7529
|
let handleAgeMs = null;
|
|
7530
|
+
let workerReason;
|
|
7522
7531
|
if (!isUnboundedFullFrame) {
|
|
7523
7532
|
const found = this.nativeCropRegistry.get(input.handle);
|
|
7524
7533
|
handleAgeMs = found?.ageMs ?? null;
|
|
7525
7534
|
if (found) {
|
|
7526
|
-
const
|
|
7527
|
-
if (
|
|
7528
|
-
bytes:
|
|
7529
|
-
width:
|
|
7530
|
-
height:
|
|
7531
|
-
...
|
|
7535
|
+
const attempt = await found.request(input.bbox, input.maxWidth);
|
|
7536
|
+
if (attempt.kind === "crop") nativeResult = {
|
|
7537
|
+
bytes: attempt.crop.bytes,
|
|
7538
|
+
width: attempt.crop.width,
|
|
7539
|
+
height: attempt.crop.height,
|
|
7540
|
+
...attempt.crop.source ? { source: attempt.crop.source } : {}
|
|
7532
7541
|
};
|
|
7533
|
-
else
|
|
7542
|
+
else {
|
|
7543
|
+
missReason = "worker-lease-gone";
|
|
7544
|
+
workerReason = attempt.workerReason;
|
|
7545
|
+
}
|
|
7534
7546
|
} else missReason = "no-registry-entry";
|
|
7535
7547
|
if (missReason !== null) {
|
|
7536
7548
|
const tierOnMiss = resolveNativeCropSource(isFullFrame, false);
|
|
@@ -7543,7 +7555,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
7543
7555
|
handleNodeId: input.handle.nodeId,
|
|
7544
7556
|
handleAgeMs,
|
|
7545
7557
|
registrySize: this.nativeCropRegistry.size,
|
|
7546
|
-
registryCap: DEFAULT_NATIVE_CROP_REGISTRY_CAP
|
|
7558
|
+
registryCap: DEFAULT_NATIVE_CROP_REGISTRY_CAP,
|
|
7559
|
+
...workerReason !== void 0 ? { workerReason } : {}
|
|
7547
7560
|
}
|
|
7548
7561
|
};
|
|
7549
7562
|
if (tierOnMiss === "miss") this.ctx.logger.warn("native crop miss", fields);
|
|
@@ -7554,7 +7567,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
7554
7567
|
pixels: nativeResult,
|
|
7555
7568
|
tier: resolveNativeCropSource(isFullFrame, nativeResult !== null),
|
|
7556
7569
|
missReason,
|
|
7557
|
-
handleAgeMs
|
|
7570
|
+
handleAgeMs,
|
|
7571
|
+
workerReason
|
|
7558
7572
|
};
|
|
7559
7573
|
}
|
|
7560
7574
|
/**
|
|
@@ -7864,7 +7878,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
7864
7878
|
});
|
|
7865
7879
|
if (resolved.pixels === null || resolved.tier !== "native") return {
|
|
7866
7880
|
miss: resolved.missReason ?? "worker-lease-gone",
|
|
7867
|
-
handleAgeMs: resolved.handleAgeMs
|
|
7881
|
+
handleAgeMs: resolved.handleAgeMs,
|
|
7882
|
+
...resolved.workerReason !== void 0 ? { workerReason: resolved.workerReason } : {}
|
|
7868
7883
|
};
|
|
7869
7884
|
const encoded = await this.encodeNativeCropResult(resolved.pixels, "native", true);
|
|
7870
7885
|
if (!encoded?.jpeg) return {
|
package/dist/recorder/index.js
CHANGED
|
@@ -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_node = require("../node-
|
|
5
|
+
const require_dist = require("../dist-Czm3CW8M.js");
|
|
6
|
+
const require_node = require("../node-u0M7kQe-.js");
|
|
7
7
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
8
8
|
const require_restream_intent = require("../restream-intent-B1Difcnq.js");
|
|
9
9
|
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
|
package/dist/recorder/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { At as storageEvictableCapability, Ct as recordingSignalCapability, D as RecordingSignalStatusSchema, E as RecordingConfigSchema, Et as resolveLocationMode, Gt as DeviceFeature, H as deriveBatteryPresence, It as errMsg, Jt as hydrateSchema, Kt as DeviceType, Nt as stripRetiredBandPreBufferSec, Ot as resolveRecordingProfiles, P as batteryCapability, Q as evictionPolicyOfLocation, Qt as nodePin, R as customAction, St as recordingExportCapability, T as RECORDING_EXPORT_MAX_READ_BYTES, Ut as BaseAddon, V as defineCustomActions, W as deriveRecordingMode, Y as evaluateSensorEdge, Z as evictionPolicyForMode, an as boolean, ct as mayReadLocation, d as DEFAULT_EVENTS_BAND_BUFFER_SEC, dn as preprocess, dt as modeMayWrite, et as gbToBytes, fn as record, g as ExportRecordSchema, hn as EventCategory, i as BatteryStatusSchema, in as array, it as loadContributionCapability, jt as storageOccupancyCapability, ln as number, lt as mayWriteToLocation, nn as sleep$1, pn as string, rn as _enum, rt as isFirstLevelMacroClass, tn as selectAssignedProfileSlots, un as object, ut as migrateLegacyDeviceSignalConfig, x as OpsLogEntrySchema, xt as recordingCapability } from "../dist-
|
|
2
|
-
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
1
|
+
import { At as storageEvictableCapability, Ct as recordingSignalCapability, D as RecordingSignalStatusSchema, E as RecordingConfigSchema, Et as resolveLocationMode, Gt as DeviceFeature, H as deriveBatteryPresence, It as errMsg, Jt as hydrateSchema, Kt as DeviceType, Nt as stripRetiredBandPreBufferSec, Ot as resolveRecordingProfiles, P as batteryCapability, Q as evictionPolicyOfLocation, Qt as nodePin, R as customAction, St as recordingExportCapability, T as RECORDING_EXPORT_MAX_READ_BYTES, Ut as BaseAddon, V as defineCustomActions, W as deriveRecordingMode, Y as evaluateSensorEdge, Z as evictionPolicyForMode, an as boolean, ct as mayReadLocation, d as DEFAULT_EVENTS_BAND_BUFFER_SEC, dn as preprocess, dt as modeMayWrite, et as gbToBytes, fn as record, g as ExportRecordSchema, hn as EventCategory, i as BatteryStatusSchema, in as array, it as loadContributionCapability, jt as storageOccupancyCapability, ln as number, lt as mayWriteToLocation, nn as sleep$1, pn as string, rn as _enum, rt as isFirstLevelMacroClass, tn as selectAssignedProfileSlots, un as object, ut as migrateLegacyDeviceSignalConfig, x as OpsLogEntrySchema, xt as recordingCapability } from "../dist-B5x2ogXC.mjs";
|
|
2
|
+
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-Bx76sJbU.mjs";
|
|
3
3
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
4
4
|
import { c as PREBUFFER_MAX_MS, r as RECORDING_PRE_ROLL_REQUEST_MS, s as withRecordingIntent } from "../restream-intent-DWe2kInY.mjs";
|
|
5
5
|
import { n as startEventLoopStallMonitor } from "../event-loop-stall-monitor-DXLNBMkY.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { It as errMsg } from "./dist-
|
|
2
|
+
import { It as errMsg } from "./dist-B5x2ogXC.mjs";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
//#region ../../node_modules/mp4box/dist/mp4box.all.js
|
|
5
5
|
var require_mp4box_all = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
1
|
+
const require_dist = require("./dist-Czm3CW8M.js");
|
|
2
2
|
let node_child_process = require("node:child_process");
|
|
3
3
|
//#region ../../node_modules/mp4box/dist/mp4box.all.js
|
|
4
4
|
var require_mp4box_all = /* @__PURE__ */ require_dist.__commonJSMin(((exports) => {
|