@camstack/addon-pipeline 1.1.55 → 1.1.57

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.
Files changed (46) hide show
  1. package/dist/audio-analyzer/index.js +2 -2
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/detection-pipeline/index.js +92 -88
  4. package/dist/detection-pipeline/index.mjs +91 -87
  5. package/dist/{dist-DI57FC8K.js → dist-CK8Ur-OS.js} +1045 -43
  6. package/dist/{dist-RWGGPwVx.mjs → dist-CL531uVA.mjs} +1045 -43
  7. package/dist/motion-wasm/index.js +9 -41
  8. package/dist/motion-wasm/index.mjs +9 -41
  9. package/dist/pipeline-runner/index.js +338 -664
  10. package/dist/pipeline-runner/index.mjs +327 -655
  11. package/dist/recorder/index.js +2 -2
  12. package/dist/recorder/index.mjs +2 -2
  13. package/dist/remote-restream-BeHi78PZ.mjs +25 -0
  14. package/dist/remote-restream-CO36Sr30.js +36 -0
  15. package/dist/session-decode/decode-worker-child.js +5 -3
  16. package/dist/session-decode/decode-worker-child.mjs +5 -3
  17. package/dist/{step-definitions-CP9kVSml.mjs → step-definitions-1d3_vQ6S.mjs} +45 -3
  18. package/dist/{step-definitions-CNBFKjZe.js → step-definitions-DHAxruAQ.js} +45 -3
  19. package/dist/stream-broker/_stub.js +351 -291
  20. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-mDCPzmT3.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Cm_B-hQT.mjs} +2 -2
  21. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ba7Eyd47.mjs +26 -0
  22. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Dn_pxzP-.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-TWCUWhCm.mjs} +2 -2
  23. package/dist/stream-broker/{hostInit-GM_CI22k.mjs → hostInit-DEaqJpGA.mjs} +2 -2
  24. package/dist/stream-broker/index.js +935 -38
  25. package/dist/stream-broker/index.mjs +932 -35
  26. package/dist/stream-broker/remoteEntry.js +1 -1
  27. package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-BChW0ntM.js → MaskShapeCanvas-DI4BY7W2-CZUzu3MF.js} +1 -1
  28. package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-DDzqEbSe.js → MotionZonesSettings-NcxxQN8r-CmZbzLQi.js} +1 -1
  29. package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-B879GXaf.js → PrivacyMaskSettings-APgPLF7p-BOKDrH0N.js} +1 -1
  30. package/embed-dist/assets/index-Bmpl9O1K.css +2 -0
  31. package/embed-dist/assets/index-DOsK8CZb.js +81 -0
  32. package/embed-dist/index.html +2 -2
  33. package/package.json +7 -5
  34. package/python/inference_pool.py +183 -29
  35. package/python/postprocessors/__init__.py +2 -0
  36. package/python/postprocessors/ssd.py +128 -0
  37. package/python/requirements-edgetpu.txt +23 -0
  38. package/python/test_inference_pool_layout.py +16 -1
  39. package/python/test_inference_pool_preprocess.py +65 -0
  40. package/dist/remote-source-plane-CHgvzzA6.js +0 -1030
  41. package/dist/remote-source-plane-DU0aRSPv.mjs +0 -1001
  42. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B3gTdHEh.mjs +0 -26
  43. package/embed-dist/assets/index-CC06JBcl.css +0 -2
  44. package/embed-dist/assets/index-CNjQ5rAE.js +0 -81
  45. package/dist/{model-download-service-C-IHWnXx-BPy6aoAx.mjs → model-download-service-C-IHWnXx-3Mmeob3l.mjs} +1 -1
  46. package/dist/{model-download-service-C-IHWnXx-BLXzxpRB.js → model-download-service-C-IHWnXx-D326YNnt.js} +1 -1
@@ -2,8 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-DI57FC8K.js");
6
- let _camstack_shm_ring = require("@camstack/shm-ring");
5
+ const require_dist = require("../dist-CK8Ur-OS.js");
7
6
  let node_fs = require("node:fs");
8
7
  let node_path = require("node:path");
9
8
  //#region src/motion-wasm/wasm-motion-detector.ts
@@ -136,13 +135,6 @@ var DEFAULT_CONFIG = {
136
135
  };
137
136
  var MotionWasmAddon = class MotionWasmAddon extends require_dist.BaseAddon {
138
137
  detector = null;
139
- /**
140
- * CB5 shm passthrough — process-local, long-lived reader cache for
141
- * `analyze({ frameHandle })`. Opens each named shm segment once and reuses
142
- * the mapping; lazily created on first LOCAL handle, unmapped in
143
- * {@link onShutdown}. Never opened/closed per-call.
144
- */
145
- frameHandleReaders = null;
146
138
  cameras = /* @__PURE__ */ new Map();
147
139
  deviceConfigCache = /* @__PURE__ */ new Map();
148
140
  static DEVICE_CONFIG_TTL_MS = 6e4;
@@ -196,38 +188,16 @@ var MotionWasmAddon = class MotionWasmAddon extends require_dist.BaseAddon {
196
188
  * Per-device state keyed by the numeric deviceId (stringified internally
197
189
  * so the pipeline-step sentinel shares the same Map).
198
190
  *
199
- * CB5: pixels arrive either inline (`frame`) or as a zero-pixel shm
200
- * `FrameHandle`. A LOCAL handle is read back zero-copy here; a foreign /
201
- * recycled / unmappable handle yields a null read and an empty result (the
202
- * runner ships `frame` as the fallback, queue-depth gated).
191
+ * Pixels arrive inline (`frame`). The `frameHandle` input is DORMANT since
192
+ * the shm-ring removal (2026-07-16): the runner always ships inline gray
193
+ * pixels now. A handle can only arrive under version skew (an old runner
194
+ * against a new provider); with no shm passthrough there is no way to
195
+ * resolve its pixels, so it degrades to an empty result. The field stays
196
+ * defined so no cap-surface change is needed.
203
197
  */
204
198
  async analyze({ deviceId, frame, frameHandle }) {
205
- const resolved = frame ?? (frameHandle ? this.resolveFrameHandle(frameHandle) : null);
206
- if (!resolved) return this.emptyMotionResult(frameHandle);
207
- return this.analyzeInternal(String(deviceId), resolved);
208
- }
209
- /** This node's cluster id (suffix-stripped), for local-vs-foreign gating. */
210
- ownNodeId() {
211
- const raw = this.ctx.kernel?.localNodeId ?? "hub";
212
- return raw.includes("/") ? raw.split("/")[0] : raw;
213
- }
214
- /**
215
- * CB5 — resolve a shm `FrameHandle` to gray pixels zero-copy. Returns null
216
- * for a FOREIGN handle (segment on another node — the runner only sends
217
- * local handles), a recycled ring slot, or an unmappable segment.
218
- */
219
- resolveFrameHandle(handle) {
220
- if (handle.nodeId !== this.ownNodeId()) return null;
221
- if (!this.frameHandleReaders) this.frameHandleReaders = new _camstack_shm_ring.FrameRingReaderCache(this.ctx.logger);
222
- const decoded = this.frameHandleReaders.read(handle);
223
- if (!decoded) return null;
224
- return {
225
- data: decoded.data,
226
- width: decoded.width,
227
- height: decoded.height,
228
- format: decoded.format,
229
- timestamp: decoded.timestamp
230
- };
199
+ if (!frame) return this.emptyMotionResult(frameHandle);
200
+ return this.analyzeInternal(String(deviceId), frame);
231
201
  }
232
202
  /** Zeroed motion result for a missed `frameHandle` read (dropped frame). */
233
203
  emptyMotionResult(handle) {
@@ -401,8 +371,6 @@ var MotionWasmAddon = class MotionWasmAddon extends require_dist.BaseAddon {
401
371
  this.deviceConfigCache.clear();
402
372
  for (const id of this.proxies.keys()) this.releaseProxy(id);
403
373
  this.detector = null;
404
- this.frameHandleReaders?.close();
405
- this.frameHandleReaders = null;
406
374
  }
407
375
  deviceSettingsSchema() {
408
376
  return this.schema({ sections: [{
@@ -1,5 +1,4 @@
1
- import { B as DeviceType, E as motionDetectionCapability, L as BaseAddon, U as hydrateSchema, x as evaluateZoneRules } from "../dist-RWGGPwVx.mjs";
2
- import { FrameRingReaderCache } from "@camstack/shm-ring";
1
+ import { B as DeviceType, E as motionDetectionCapability, L as BaseAddon, U as hydrateSchema, x as evaluateZoneRules } from "../dist-CL531uVA.mjs";
3
2
  import { readFileSync } from "node:fs";
4
3
  import { join } from "node:path";
5
4
  //#region src/motion-wasm/wasm-motion-detector.ts
@@ -132,13 +131,6 @@ var DEFAULT_CONFIG = {
132
131
  };
133
132
  var MotionWasmAddon = class MotionWasmAddon extends BaseAddon {
134
133
  detector = null;
135
- /**
136
- * CB5 shm passthrough — process-local, long-lived reader cache for
137
- * `analyze({ frameHandle })`. Opens each named shm segment once and reuses
138
- * the mapping; lazily created on first LOCAL handle, unmapped in
139
- * {@link onShutdown}. Never opened/closed per-call.
140
- */
141
- frameHandleReaders = null;
142
134
  cameras = /* @__PURE__ */ new Map();
143
135
  deviceConfigCache = /* @__PURE__ */ new Map();
144
136
  static DEVICE_CONFIG_TTL_MS = 6e4;
@@ -192,38 +184,16 @@ var MotionWasmAddon = class MotionWasmAddon extends BaseAddon {
192
184
  * Per-device state keyed by the numeric deviceId (stringified internally
193
185
  * so the pipeline-step sentinel shares the same Map).
194
186
  *
195
- * CB5: pixels arrive either inline (`frame`) or as a zero-pixel shm
196
- * `FrameHandle`. A LOCAL handle is read back zero-copy here; a foreign /
197
- * recycled / unmappable handle yields a null read and an empty result (the
198
- * runner ships `frame` as the fallback, queue-depth gated).
187
+ * Pixels arrive inline (`frame`). The `frameHandle` input is DORMANT since
188
+ * the shm-ring removal (2026-07-16): the runner always ships inline gray
189
+ * pixels now. A handle can only arrive under version skew (an old runner
190
+ * against a new provider); with no shm passthrough there is no way to
191
+ * resolve its pixels, so it degrades to an empty result. The field stays
192
+ * defined so no cap-surface change is needed.
199
193
  */
200
194
  async analyze({ deviceId, frame, frameHandle }) {
201
- const resolved = frame ?? (frameHandle ? this.resolveFrameHandle(frameHandle) : null);
202
- if (!resolved) return this.emptyMotionResult(frameHandle);
203
- return this.analyzeInternal(String(deviceId), resolved);
204
- }
205
- /** This node's cluster id (suffix-stripped), for local-vs-foreign gating. */
206
- ownNodeId() {
207
- const raw = this.ctx.kernel?.localNodeId ?? "hub";
208
- return raw.includes("/") ? raw.split("/")[0] : raw;
209
- }
210
- /**
211
- * CB5 — resolve a shm `FrameHandle` to gray pixels zero-copy. Returns null
212
- * for a FOREIGN handle (segment on another node — the runner only sends
213
- * local handles), a recycled ring slot, or an unmappable segment.
214
- */
215
- resolveFrameHandle(handle) {
216
- if (handle.nodeId !== this.ownNodeId()) return null;
217
- if (!this.frameHandleReaders) this.frameHandleReaders = new FrameRingReaderCache(this.ctx.logger);
218
- const decoded = this.frameHandleReaders.read(handle);
219
- if (!decoded) return null;
220
- return {
221
- data: decoded.data,
222
- width: decoded.width,
223
- height: decoded.height,
224
- format: decoded.format,
225
- timestamp: decoded.timestamp
226
- };
195
+ if (!frame) return this.emptyMotionResult(frameHandle);
196
+ return this.analyzeInternal(String(deviceId), frame);
227
197
  }
228
198
  /** Zeroed motion result for a missed `frameHandle` read (dropped frame). */
229
199
  emptyMotionResult(handle) {
@@ -397,8 +367,6 @@ var MotionWasmAddon = class MotionWasmAddon extends BaseAddon {
397
367
  this.deviceConfigCache.clear();
398
368
  for (const id of this.proxies.keys()) this.releaseProxy(id);
399
369
  this.detector = null;
400
- this.frameHandleReaders?.close();
401
- this.frameHandleReaders = null;
402
370
  }
403
371
  deviceSettingsSchema() {
404
372
  return this.schema({ sections: [{