@camstack/addon-pipeline 1.2.44 → 1.2.46

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 (38) hide show
  1. package/dist/audio-analyzer/index.js +1 -1
  2. package/dist/audio-analyzer/index.mjs +1 -1
  3. package/dist/detection-pipeline/index.js +44 -13
  4. package/dist/detection-pipeline/index.mjs +44 -13
  5. package/dist/{dist-BuFE5rOK.js → dist-CPfFUIl9.js} +1086 -135
  6. package/dist/{dist-DOu93i_g.mjs → dist-CUj9mdhh.mjs} +1081 -136
  7. package/dist/{event-loop-stall-monitor-L08yG6bB.js → event-loop-stall-monitor-BGbgcrEN.js} +20 -7
  8. package/dist/{event-loop-stall-monitor-CShgQE6l.mjs → event-loop-stall-monitor-md__iwWh.mjs} +20 -7
  9. package/dist/motion-wasm/index.js +1 -1
  10. package/dist/motion-wasm/index.mjs +1 -1
  11. package/dist/pipeline-runner/index.js +15 -6
  12. package/dist/pipeline-runner/index.mjs +15 -6
  13. package/dist/recorder/index.js +1 -1
  14. package/dist/recorder/index.mjs +1 -1
  15. package/dist/session-decode/decode-worker-child.js +1 -1
  16. package/dist/session-decode/decode-worker-child.mjs +1 -1
  17. package/dist/stream-broker/_stub.js +2 -2
  18. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DiXoZnou.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-aUWVCncO.mjs} +2 -2
  19. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DN2e2GJL.mjs +26 -0
  20. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B_hakWAb.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-2D_L2y3g.mjs} +1 -1
  21. package/dist/stream-broker/{hostInit-khRXMnjl.mjs → hostInit-CRwWRwJH.mjs} +2 -2
  22. package/dist/stream-broker/index.js +996 -431
  23. package/dist/stream-broker/index.mjs +992 -428
  24. package/dist/stream-broker/remoteEntry.js +1 -1
  25. package/dist/{worker-protocol-BOXlUhWO.mjs → worker-protocol-CD0M9YD7.mjs} +1 -1
  26. package/dist/{worker-protocol-VURr0nUh.js → worker-protocol-hdTR-F5q.js} +1 -1
  27. package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-DHZuYYjH.js → MaskShapeCanvas-DI4BY7W2-C8eGXtf-.js} +1 -1
  28. package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-jFDOzPCD.js → MotionZonesSettings-NcxxQN8r-vvEcAgxS.js} +1 -1
  29. package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-BPBXgIX8.js → PrivacyMaskSettings-APgPLF7p-BLhx7VI-.js} +1 -1
  30. package/embed-dist/assets/{index-4CtQAybX.js → index-DvOgpqcE.js} +12 -12
  31. package/embed-dist/assets/index-ICnBEqOy.css +2 -0
  32. package/embed-dist/index.html +2 -2
  33. package/package.json +1 -1
  34. package/python/postprocessors/__init__.py +2 -0
  35. package/python/postprocessors/rfdetr.py +161 -0
  36. package/python/postprocessors/test_rfdetr.py +193 -0
  37. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BRc-m6W-.mjs +0 -26
  38. package/embed-dist/assets/index-DC63og2c.css +0 -2
@@ -3,7 +3,7 @@ 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-BuFE5rOK.js");
6
+ const require_dist = require("../dist-CPfFUIl9.js");
7
7
  const require_node_topology_platform = require("../node-topology-platform-CFZ7F4xW.js");
8
8
  const require_model_download_service_D8B_4ktF = require("../model-download-service-D8B-4ktF-7-YxE9Wx.js");
9
9
  let node_fs = require("node:fs");
@@ -1,5 +1,5 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { H as mapAudioLabelToMacro, T as audioAnalyzerCapability, it as BaseAddon, lt as hydrateSchema, m as HF_BASE_URL, n as AUDIO_BACKEND_CHOICES, rt as errMsg, s as DEFAULT_AUDIO_ANALYZER_CONFIG, w as audioAnalysisCapability } from "../dist-DOu93i_g.mjs";
2
+ import { $ as errMsg, C as audioAnalysisCapability, R as mapAudioLabelToMacro, at as BaseAddon, n as AUDIO_BACKEND_CHOICES, o as DEFAULT_AUDIO_ANALYZER_CONFIG, p as HF_BASE_URL, ut as hydrateSchema, w as audioAnalyzerCapability } from "../dist-CUj9mdhh.mjs";
3
3
  import { t as pickNodePlatformArch } from "../node-topology-platform-BkR_k6WT.mjs";
4
4
  import { i as downloadFile } from "../model-download-service-D8B-4ktF-BB7oZL3y.mjs";
5
5
  import * as fs from "node:fs";
@@ -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-BuFE5rOK.js");
7
- const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-L08yG6bB.js");
6
+ const require_dist = require("../dist-CPfFUIl9.js");
7
+ const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-BGbgcrEN.js");
8
8
  const require_lazy_sharp = require("../lazy-sharp-CcYuXtsa.js");
9
9
  const require_node_topology_platform = require("../node-topology-platform-CFZ7F4xW.js");
10
10
  const require_model_download_service_D8B_4ktF = require("../model-download-service-D8B-4ktF-7-YxE9Wx.js");
@@ -2214,6 +2214,7 @@ var VALID_KINDS = new Set([
2214
2214
  var KNOWN_POSTPROCESSORS = new Set([
2215
2215
  "yolo",
2216
2216
  "ssd",
2217
+ "rfdetr",
2217
2218
  "yolo-seg",
2218
2219
  "scrfd",
2219
2220
  "arcface",
@@ -3257,7 +3258,10 @@ function applyChildOutput(parent, childStep, output, stepLatencyMs, ctx) {
3257
3258
  const winner = output.classifications[0];
3258
3259
  if (winner && passesClass(winner) && winner.score >= minConfidence) parent.ownLabels.push({
3259
3260
  label: winner.class,
3260
- score: winner.score
3261
+ score: winner.score,
3262
+ ...childStep.definition.labelTier !== void 0 ? { tier: childStep.definition.labelTier } : {},
3263
+ stepId: childStep.stepId,
3264
+ modelId: childStep.modelId
3261
3265
  });
3262
3266
  const allAlternates = (output.alternates && output.alternates.length > 0 ? output.alternates : output.classifications).filter(passesClass).map((cls) => ({
3263
3267
  label: cls.class,
@@ -3277,7 +3281,10 @@ function applyChildOutput(parent, childStep, output, stepLatencyMs, ctx) {
3277
3281
  case "text":
3278
3282
  if (output.text.trim().length > 0) parent.ownLabels.push({
3279
3283
  label: output.text,
3280
- score: output.confidence
3284
+ score: output.confidence,
3285
+ ...childStep.definition.labelTier !== void 0 ? { tier: childStep.definition.labelTier } : {},
3286
+ stepId: childStep.stepId,
3287
+ modelId: childStep.modelId
3281
3288
  });
3282
3289
  break;
3283
3290
  case "mask":
@@ -3324,7 +3331,10 @@ function buildFrameResult(input) {
3324
3331
  for (const child of children) for (const childLabel of child.ownLabels) labels.push({
3325
3332
  label: childLabel.label,
3326
3333
  score: childLabel.score,
3327
- detectionId: child.id
3334
+ detectionId: child.id,
3335
+ ...childLabel.tier !== void 0 ? { tier: childLabel.tier } : {},
3336
+ ...childLabel.stepId !== void 0 ? { stepId: childLabel.stepId } : {},
3337
+ ...childLabel.modelId !== void 0 ? { modelId: childLabel.modelId } : {}
3328
3338
  });
3329
3339
  let embedding = m.embedding;
3330
3340
  let embeddingModelId = m.embeddingModelId;
@@ -3367,6 +3377,7 @@ function buildFrameResult(input) {
3367
3377
  modelIds: Object.keys(m.modelIds).length > 0 ? { ...m.modelIds } : void 0,
3368
3378
  extractMode: m.extractMode,
3369
3379
  originalClass: m.originalClass,
3380
+ originalClassTier: m.originalClassTier,
3370
3381
  alternateLabels: Object.keys(m.alternateLabels).length > 0 ? { ...m.alternateLabels } : void 0,
3371
3382
  mask: m.mask,
3372
3383
  maskWidth: m.maskWidth,
@@ -3434,6 +3445,7 @@ function toMutableRootDetection(det, rootStep, idGen, rootStepLatencyMs) {
3434
3445
  kind: "first-level",
3435
3446
  macroClass: det.class,
3436
3447
  originalClass: det.class,
3448
+ ...rootStep.definition.labelTier !== void 0 ? { originalClassTier: rootStep.definition.labelTier } : {},
3437
3449
  score: det.score,
3438
3450
  bbox: [...det.bbox],
3439
3451
  ownLabels: [],
@@ -4902,14 +4914,33 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
4902
4914
  });
4903
4915
  }
4904
4916
  /**
4905
- * Authoritative platform-probe reconcile: query the probe provider
4906
- * DIRECTLY over the cap plane. The RPC resolves only once the async
4907
- * probe has completed (`getCapabilities` awaits the probe promise), so
4908
- * a successful answer proves readiness independent of the (lossy)
4909
- * `system.ready-state` event stream. Mirrors the local-node branch of
4910
- * `resolveProbeHardware` — an unpinned `getCapabilities` routes to this
4911
- * node's own in-process provider (agent parent / hub). Bounded by
4917
+ * Authoritative platform-probe reconcile: query THIS NODE's probe provider
4918
+ * DIRECTLY over the cap plane. The RPC resolves only once the async probe
4919
+ * has completed (`getCapabilities` awaits the probe promise), so a
4920
+ * successful answer proves readiness independent of the (lossy)
4921
+ * `system.ready-state` event stream. Bounded by
4912
4922
  * {@link PROBE_DIRECT_RPC_TIMEOUT_MS}; `false` on any failure.
4923
+ *
4924
+ * PINNED, always. The previous version issued an UNPINNED `getCapabilities`
4925
+ * and its docblock claimed that "routes to this node's own in-process
4926
+ * provider (agent parent / hub)". On an agent that is false and always has
4927
+ * been: a forked child's unowned cap call reaches the agent's
4928
+ * `onUnownedCall`, which has no `CapRouteResolver` and no outbound
4929
+ * in-process lookup, so it goes straight to `forwardToHub` → the HUB's
4930
+ * platform-probe singleton. Every "readiness reconciled via direct probe
4931
+ * RPC (ready event lost)" line ever logged on an agent therefore proved the
4932
+ * HUB's probe had finished — not the local node's.
4933
+ *
4934
+ * That false positive is not cosmetic. It is a readiness gate answering yes
4935
+ * on another machine's evidence, and it is exactly the log line that made a
4936
+ * node with NO platform-probe addon at all (little-unraid, 2026-08-07: its
4937
+ * `@camstack/system` package had been renamed out of `/data/addons`) look
4938
+ * like a node with a lossy event path. The pin makes the answer local: an
4939
+ * inline `nodeId` is the routing pin that survives the forked-addon → parent
4940
+ * UDS hop (`parent-unowned-call.ts`), the same mechanism the orchestrator's
4941
+ * `probeNodeInferenceDevices` already uses. A node whose own probe cannot be
4942
+ * reached now reports NOT ready — which is the truth, and which routes to
4943
+ * the conservative-floor WARN that says so.
4913
4944
  */
4914
4945
  async probePlatformReadinessDirect() {
4915
4946
  const api = this.addonCtx?.api;
@@ -4919,7 +4950,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
4919
4950
  const bound = new Promise((resolve) => {
4920
4951
  timer = setTimeout(() => resolve(null), PROBE_DIRECT_RPC_TIMEOUT_MS);
4921
4952
  });
4922
- return await Promise.race([api.platformProbe.getCapabilities.query(), bound]) !== null;
4953
+ return await Promise.race([api.platformProbe.getCapabilities.query({ nodeId: this.localProbeNodeId() }), bound]) !== null;
4923
4954
  } catch {
4924
4955
  return false;
4925
4956
  } finally {
@@ -1,6 +1,6 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { A as defaultDeviceFor$1, Dt as string, L as enumerateInferenceDevices, Ot as union, P as detectionPipelineCapability, Q as runtimeDevices$1, R as evaluateZoneRules, S as YAMNET_TO_MACRO, Tt as object, _t as sleep, ct as createEvent, it as BaseAddon, kt as EventCategory, lt as hydrateSchema, mt as parseJsonUnknown, pt as nodePin, q as pipelineExecutorCapability, rt as errMsg, t as APPLE_SA_TO_MACRO, tt as supportedRuntimes$1, u as DEVICE_BACKEND_TO_FORMAT, yt as array } from "../dist-DOu93i_g.mjs";
3
- import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, n as startEventLoopStallMonitor, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep } from "../event-loop-stall-monitor-CShgQE6l.mjs";
2
+ import { $ as errMsg, At as EventCategory, Et as object, F as enumerateInferenceDevices, I as evaluateZoneRules, J as runtimeDevices$1, M as detectionPipelineCapability, O as defaultDeviceFor$1, Ot as string, U as pipelineExecutorCapability, Z as supportedRuntimes$1, at as BaseAddon, bt as array, ht as parseJsonUnknown, kt as union, l as DEVICE_BACKEND_TO_FORMAT, lt as createEvent, mt as nodePin, t as APPLE_SA_TO_MACRO, ut as hydrateSchema, vt as sleep, x as YAMNET_TO_MACRO } from "../dist-CUj9mdhh.mjs";
3
+ import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, n as startEventLoopStallMonitor, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep } from "../event-loop-stall-monitor-md__iwWh.mjs";
4
4
  import { t as getSharp } from "../lazy-sharp-B-mb8uWx.mjs";
5
5
  import { t as pickNodePlatformArch } from "../node-topology-platform-BkR_k6WT.mjs";
6
6
  import { a as ensureModel, o as isModelDownloaded, r as deleteModelFromDisk } from "../model-download-service-D8B-4ktF-BB7oZL3y.mjs";
@@ -2206,6 +2206,7 @@ var VALID_KINDS = new Set([
2206
2206
  var KNOWN_POSTPROCESSORS = new Set([
2207
2207
  "yolo",
2208
2208
  "ssd",
2209
+ "rfdetr",
2209
2210
  "yolo-seg",
2210
2211
  "scrfd",
2211
2212
  "arcface",
@@ -3249,7 +3250,10 @@ function applyChildOutput(parent, childStep, output, stepLatencyMs, ctx) {
3249
3250
  const winner = output.classifications[0];
3250
3251
  if (winner && passesClass(winner) && winner.score >= minConfidence) parent.ownLabels.push({
3251
3252
  label: winner.class,
3252
- score: winner.score
3253
+ score: winner.score,
3254
+ ...childStep.definition.labelTier !== void 0 ? { tier: childStep.definition.labelTier } : {},
3255
+ stepId: childStep.stepId,
3256
+ modelId: childStep.modelId
3253
3257
  });
3254
3258
  const allAlternates = (output.alternates && output.alternates.length > 0 ? output.alternates : output.classifications).filter(passesClass).map((cls) => ({
3255
3259
  label: cls.class,
@@ -3269,7 +3273,10 @@ function applyChildOutput(parent, childStep, output, stepLatencyMs, ctx) {
3269
3273
  case "text":
3270
3274
  if (output.text.trim().length > 0) parent.ownLabels.push({
3271
3275
  label: output.text,
3272
- score: output.confidence
3276
+ score: output.confidence,
3277
+ ...childStep.definition.labelTier !== void 0 ? { tier: childStep.definition.labelTier } : {},
3278
+ stepId: childStep.stepId,
3279
+ modelId: childStep.modelId
3273
3280
  });
3274
3281
  break;
3275
3282
  case "mask":
@@ -3316,7 +3323,10 @@ function buildFrameResult(input) {
3316
3323
  for (const child of children) for (const childLabel of child.ownLabels) labels.push({
3317
3324
  label: childLabel.label,
3318
3325
  score: childLabel.score,
3319
- detectionId: child.id
3326
+ detectionId: child.id,
3327
+ ...childLabel.tier !== void 0 ? { tier: childLabel.tier } : {},
3328
+ ...childLabel.stepId !== void 0 ? { stepId: childLabel.stepId } : {},
3329
+ ...childLabel.modelId !== void 0 ? { modelId: childLabel.modelId } : {}
3320
3330
  });
3321
3331
  let embedding = m.embedding;
3322
3332
  let embeddingModelId = m.embeddingModelId;
@@ -3359,6 +3369,7 @@ function buildFrameResult(input) {
3359
3369
  modelIds: Object.keys(m.modelIds).length > 0 ? { ...m.modelIds } : void 0,
3360
3370
  extractMode: m.extractMode,
3361
3371
  originalClass: m.originalClass,
3372
+ originalClassTier: m.originalClassTier,
3362
3373
  alternateLabels: Object.keys(m.alternateLabels).length > 0 ? { ...m.alternateLabels } : void 0,
3363
3374
  mask: m.mask,
3364
3375
  maskWidth: m.maskWidth,
@@ -3426,6 +3437,7 @@ function toMutableRootDetection(det, rootStep, idGen, rootStepLatencyMs) {
3426
3437
  kind: "first-level",
3427
3438
  macroClass: det.class,
3428
3439
  originalClass: det.class,
3440
+ ...rootStep.definition.labelTier !== void 0 ? { originalClassTier: rootStep.definition.labelTier } : {},
3429
3441
  score: det.score,
3430
3442
  bbox: [...det.bbox],
3431
3443
  ownLabels: [],
@@ -4894,14 +4906,33 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
4894
4906
  });
4895
4907
  }
4896
4908
  /**
4897
- * Authoritative platform-probe reconcile: query the probe provider
4898
- * DIRECTLY over the cap plane. The RPC resolves only once the async
4899
- * probe has completed (`getCapabilities` awaits the probe promise), so
4900
- * a successful answer proves readiness independent of the (lossy)
4901
- * `system.ready-state` event stream. Mirrors the local-node branch of
4902
- * `resolveProbeHardware` — an unpinned `getCapabilities` routes to this
4903
- * node's own in-process provider (agent parent / hub). Bounded by
4909
+ * Authoritative platform-probe reconcile: query THIS NODE's probe provider
4910
+ * DIRECTLY over the cap plane. The RPC resolves only once the async probe
4911
+ * has completed (`getCapabilities` awaits the probe promise), so a
4912
+ * successful answer proves readiness independent of the (lossy)
4913
+ * `system.ready-state` event stream. Bounded by
4904
4914
  * {@link PROBE_DIRECT_RPC_TIMEOUT_MS}; `false` on any failure.
4915
+ *
4916
+ * PINNED, always. The previous version issued an UNPINNED `getCapabilities`
4917
+ * and its docblock claimed that "routes to this node's own in-process
4918
+ * provider (agent parent / hub)". On an agent that is false and always has
4919
+ * been: a forked child's unowned cap call reaches the agent's
4920
+ * `onUnownedCall`, which has no `CapRouteResolver` and no outbound
4921
+ * in-process lookup, so it goes straight to `forwardToHub` → the HUB's
4922
+ * platform-probe singleton. Every "readiness reconciled via direct probe
4923
+ * RPC (ready event lost)" line ever logged on an agent therefore proved the
4924
+ * HUB's probe had finished — not the local node's.
4925
+ *
4926
+ * That false positive is not cosmetic. It is a readiness gate answering yes
4927
+ * on another machine's evidence, and it is exactly the log line that made a
4928
+ * node with NO platform-probe addon at all (little-unraid, 2026-08-07: its
4929
+ * `@camstack/system` package had been renamed out of `/data/addons`) look
4930
+ * like a node with a lossy event path. The pin makes the answer local: an
4931
+ * inline `nodeId` is the routing pin that survives the forked-addon → parent
4932
+ * UDS hop (`parent-unowned-call.ts`), the same mechanism the orchestrator's
4933
+ * `probeNodeInferenceDevices` already uses. A node whose own probe cannot be
4934
+ * reached now reports NOT ready — which is the truth, and which routes to
4935
+ * the conservative-floor WARN that says so.
4905
4936
  */
4906
4937
  async probePlatformReadinessDirect() {
4907
4938
  const api = this.addonCtx?.api;
@@ -4911,7 +4942,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
4911
4942
  const bound = new Promise((resolve) => {
4912
4943
  timer = setTimeout(() => resolve(null), PROBE_DIRECT_RPC_TIMEOUT_MS);
4913
4944
  });
4914
- return await Promise.race([api.platformProbe.getCapabilities.query(), bound]) !== null;
4945
+ return await Promise.race([api.platformProbe.getCapabilities.query({ nodeId: this.localProbeNodeId() }), bound]) !== null;
4915
4946
  } catch {
4916
4947
  return false;
4917
4948
  } finally {