@camstack/addon-pipeline 1.2.211 → 1.2.213

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 (37) hide show
  1. package/dist/audio-analyzer/index.js +2 -2
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/{default-detection-model-D8hFmT9l.mjs → default-detection-model-B-PccVsO.mjs} +1 -1
  4. package/dist/{default-detection-model-CEYugFUJ.js → default-detection-model-BZTjgdod.js} +1 -1
  5. package/dist/detection-pipeline/index.js +5 -5
  6. package/dist/detection-pipeline/index.mjs +4 -4
  7. package/dist/{dist-DK6-zO7x.mjs → dist-CsI90TVi.mjs} +203 -1
  8. package/dist/{dist-CUXv3nM4.js → dist-CyfP2nFh.js} +203 -1
  9. package/dist/{lazy-sharp-Ca-p84kZ.js → lazy-sharp-BawPy_a9.js} +1 -1
  10. package/dist/motion-wasm/index.js +2 -2
  11. package/dist/motion-wasm/index.mjs +1 -1
  12. package/dist/{node-lEon32fI.mjs → node-6Pb_t1Fm.mjs} +1 -1
  13. package/dist/{node-ilPrc4jE.js → node-CkBqyM-0.js} +1 -1
  14. package/dist/pipeline-runner/index.js +5 -5
  15. package/dist/pipeline-runner/index.mjs +4 -4
  16. package/dist/{process-memory-DOO9f9DJ.js → process-memory-B8yoOaEl.js} +1 -1
  17. package/dist/{process-memory-lVh4PjqW.mjs → process-memory-B_-QzMHn.mjs} +1 -1
  18. package/dist/recorder/index.js +2 -2
  19. package/dist/recorder/index.mjs +2 -2
  20. package/dist/{segment-demux-js-CN6-LCW8.mjs → segment-demux-js-CBvM6zIM.mjs} +1 -1
  21. package/dist/{segment-demux-js-faN4iTWU.js → segment-demux-js-oOpXzk2J.js} +1 -1
  22. package/dist/session-decode/decode-worker-child.js +2 -2
  23. package/dist/session-decode/decode-worker-child.mjs +1 -1
  24. package/dist/stream-broker/_stub.js +2 -2
  25. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CPuuAsb3.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Cf0O5S13.mjs} +3 -3
  26. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-0MF-KL1v.mjs +26 -0
  27. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Bwjk7xok.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Uxkwkgy5.mjs} +1 -1
  28. package/dist/stream-broker/demux-worker-child.js +1 -1
  29. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  30. package/dist/stream-broker/{hostInit-Cm3y239A.mjs → hostInit-3eT4CIOk.mjs} +3 -3
  31. package/dist/stream-broker/index.js +3 -3
  32. package/dist/stream-broker/index.mjs +3 -3
  33. package/dist/stream-broker/remoteEntry.js +1 -1
  34. package/dist/{worker-protocol-BsSbB10U.js → worker-protocol-CYopQrkK.js} +1 -1
  35. package/dist/{worker-protocol-B5g5_XF5.mjs → worker-protocol-DNqdtZzZ.mjs} +1 -1
  36. package/package.json +1 -1
  37. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CrzkEz67.mjs +0 -26
@@ -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-CUXv3nM4.js");
6
- const require_process_memory = require("../process-memory-DOO9f9DJ.js");
5
+ const require_dist = require("../dist-CyfP2nFh.js");
6
+ const require_process_memory = require("../process-memory-B8yoOaEl.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-DK6-zO7x.mjs";
3
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-lVh4PjqW.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-CsI90TVi.mjs";
3
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-B_-QzMHn.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-DK6-zO7x.mjs";
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-CsI90TVi.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  //#region src/detection-pipeline/pipeline/landmark-precision-gate.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CUXv3nM4.js");
1
+ const require_dist = require("./dist-CyfP2nFh.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  //#region src/detection-pipeline/pipeline/landmark-precision-gate.ts
4
4
  /**
@@ -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-CUXv3nM4.js");
6
- const require_node = require("../node-ilPrc4jE.js");
7
- const require_default_detection_model = require("../default-detection-model-CEYugFUJ.js");
8
- const require_lazy_sharp = require("../lazy-sharp-Ca-p84kZ.js");
5
+ const require_dist = require("../dist-CyfP2nFh.js");
6
+ const require_node = require("../node-CkBqyM-0.js");
7
+ const require_default_detection_model = require("../default-detection-model-BZTjgdod.js");
8
+ const require_lazy_sharp = require("../lazy-sharp-BawPy_a9.js");
9
9
  const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
10
- const require_process_memory = require("../process-memory-DOO9f9DJ.js");
10
+ const require_process_memory = require("../process-memory-B8yoOaEl.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-DK6-zO7x.mjs";
3
- import { o as readProcessCost } from "../node-lEon32fI.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-D8hFmT9l.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-CsI90TVi.mjs";
3
+ import { o as readProcessCost } from "../node-6Pb_t1Fm.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-B-PccVsO.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-lVh4PjqW.mjs";
7
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-B_-QzMHn.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";
@@ -8607,6 +8607,186 @@ var CameraSwitchGroupSchema = object({
8607
8607
  fetchedAt: number()
8608
8608
  });
8609
8609
  /**
8610
+ * What the gate decided about a birth, from the CALLER's point of view.
8611
+ *
8612
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
8613
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
8614
+ * The third member is the one the gate's own type cannot express, because
8615
+ * exhaustion is a property of how long the caller waited.
8616
+ */
8617
+ var BirthDecisionVerdictSchema = _enum([
8618
+ "confirmed",
8619
+ "suppressed",
8620
+ "exhausted-fallback"
8621
+ ]);
8622
+ /** One birth decision, as it is kept. */
8623
+ var BirthDecisionRecordSchema = object({
8624
+ id: string(),
8625
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
8626
+ at: number().int(),
8627
+ /** The camera. Required: every question here is asked per-camera. */
8628
+ deviceId: number().int(),
8629
+ /**
8630
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
8631
+ * birth has no track at all, and a confirmed one is expected to age out long
8632
+ * before this row does. Named `sourceTrackId` so the retention model's
8633
+ * ownership derivation (`collection-classification.ts`, which keys on a
8634
+ * column literally called `trackId`) cannot reach it.
8635
+ */
8636
+ sourceTrackId: string(),
8637
+ /** The candidate's claimed class. The miss rate is asked per class too. */
8638
+ className: string(),
8639
+ verdict: BirthDecisionVerdictSchema,
8640
+ /**
8641
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
8642
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
8643
+ * when the gate is DISABLED and every birth is waved through. `null` is not
8644
+ * "unknown": it says the gate took no measurement because it was off, which
8645
+ * is a different population and must never be averaged in with the rest.
8646
+ */
8647
+ reason: string().nullable(),
8648
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
8649
+ attempts: number().int(),
8650
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
8651
+ deferredForMs: number().int(),
8652
+ /**
8653
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
8654
+ *
8655
+ * `true` when the frame the verdict was taken on carried no matched
8656
+ * detection for this track — the tracker was coasting a frozen box and the
8657
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
8658
+ * straight out of `result.tracked` without checking, so this is reachable
8659
+ * today; the question is the RATE, per camera, and whether refusing those
8660
+ * frames would have cost real tracks (cross-read against `verdict` and
8661
+ * `decidedByBirthEvidence`).
8662
+ */
8663
+ decidedOnCoastedFrame: boolean(),
8664
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
8665
+ birthEvidenceAvailable: boolean(),
8666
+ /**
8667
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
8668
+ * deciding are different: the carried crop is confirm-only, so a candidate
8669
+ * can hold evidence, be found inconclusive on it, and be decided by a native
8670
+ * crop of a later instant. A coasted decision backed by carried evidence is
8671
+ * a real observation of the birth instant; one without it is not.
8672
+ */
8673
+ decidedByBirthEvidence: boolean(),
8674
+ /** Best class-compatible crop score, or `null` when nothing compatible was
8675
+ * found — deliberately not 0, which would be a measurement that never was. */
8676
+ bestScore: number().nullable(),
8677
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
8678
+ appliedMinConfidence: number().nullable(),
8679
+ /**
8680
+ * The track's own `firstSeen` — the candidate's first frame, which is where
8681
+ * the timeline starts. `null` for a suppressed birth, which has no track.
8682
+ */
8683
+ firstSeen: number().int().nullable(),
8684
+ /**
8685
+ * The device's most recent motion RISING EDGE at the moment of the decision,
8686
+ * or `null` when there is none, it is older than
8687
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
8688
+ */
8689
+ motionOnsetAt: number().int().nullable(),
8690
+ /**
8691
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
8692
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
8693
+ *
8694
+ * **Why motion onset and not something else.** Two other proxies were
8695
+ * considered and rejected:
8696
+ * - *the recording/pipeline session start*: for a camera on
8697
+ * `detectionMode: 'always'` the session opens at process start, hours
8698
+ * before any subject. It measures nothing.
8699
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
8700
+ * `firstSeen` IS the first detection of that object, so for the track that
8701
+ * OPENS a burst — the only one the operator is complaining about — the two
8702
+ * are the same instant and the latency is 0 by construction.
8703
+ * Motion onset is the only in-process signal produced by a DIFFERENT
8704
+ * mechanism from the object detector, so it is the only one that can precede
8705
+ * it. It is also already maintained per-device at frame rate on this very
8706
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
8707
+ * it free — and, decisively, the frame path and the motion path are gated to
8708
+ * the SAME designated post-processing node, so the mirror is never empty for
8709
+ * a camera whose births land here.
8710
+ *
8711
+ * **Error bars, all of them.**
8712
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
8713
+ * wall or a branch, and only later joined by the person, OVERSTATES the
8714
+ * latency without bound. Mitigated, never removed, by
8715
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
8716
+ * candidate for "this burst is this subject", and even then it is a
8717
+ * candidate, not a fact.
8718
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
8719
+ * intensity threshold. A subject entering slowly at the far edge of the
8720
+ * frame can clear the detector's confidence floor BEFORE it clears the
8721
+ * motion floor, making this negative. Negatives are stored as-is and
8722
+ * never clamped — clamping would fabricate the distribution's left tail,
8723
+ * which is the half that says the proxy is unreliable.
8724
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
8725
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
8726
+ * therefore comparable WITHIN a camera and not across cameras of
8727
+ * different motion sources. The motion source is deliberately not copied
8728
+ * here — it belongs to the addon that owns the device (D224) and this is
8729
+ * a write on the frame path — so group by `deviceId`, which is how the
8730
+ * question is always asked anyway.
8731
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
8732
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
8733
+ * past it this is `null`.
8734
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
8735
+ * reporting, or nothing since boot: `null`. Which is the truth about a
8736
+ * camera nobody has a reference instant for.
8737
+ *
8738
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
8739
+ * as such. It is not a per-track fact and must never be shown as one.
8740
+ */
8741
+ birthLatencyMs: number().int().nullable(),
8742
+ /**
8743
+ * How many births this device has already decided since that motion onset.
8744
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
8745
+ * this subject. `null` when there is no usable onset.
8746
+ */
8747
+ birthIndexInBurst: number().int().nullable()
8748
+ });
8749
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
8750
+ var BirthDecisionQueryInputSchema = object({
8751
+ /** Restrict to a single camera; omit for every row. */
8752
+ deviceId: number().int().optional(),
8753
+ /** Only decisions at or after this epoch ms. */
8754
+ since: number().int().optional(),
8755
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
8756
+ verdict: BirthDecisionVerdictSchema.optional(),
8757
+ /** Max rows returned, newest-first. */
8758
+ limit: number().int().min(1).max(5e3).optional()
8759
+ });
8760
+ /** One archived note — the operator's words plus enough context to find what
8761
+ * they were looking at, after the track itself is gone. */
8762
+ var ArchivedDebugNoteSchema = object({
8763
+ /** Archive row id. Derived from `(sourceTrackId, note)`, so re-archiving the
8764
+ * same sentence about the same track lands on the row already there. */
8765
+ id: string(),
8766
+ /** The operator's own words, verbatim. */
8767
+ note: string(),
8768
+ /** The camera. Required — every question here is asked per-camera. */
8769
+ deviceId: number().int(),
8770
+ /** The track the note was written on. PROVENANCE, not ownership: the track
8771
+ * is expected to be gone, and this row is not a reference to it. */
8772
+ sourceTrackId: string(),
8773
+ /** Epoch ms the note was moved here, i.e. when the operator reviewed it. */
8774
+ archivedAt: number().int(),
8775
+ /** The track's `firstSeen`, when the row still knew it; `null` otherwise. */
8776
+ trackStartedAt: number().int().nullable(),
8777
+ /** The track's detector class (`person`, `car`, …); `null` when unknown. */
8778
+ trackClass: string().nullable(),
8779
+ /** The track's display label at review time; `null` when it had none. */
8780
+ trackLabel: string().nullable()
8781
+ });
8782
+ /** Query input for `listArchivedDebugNotes` — newest first, one camera or all. */
8783
+ var ArchivedDebugNoteQueryInputSchema = object({
8784
+ /** Restrict to a single camera; omit for every row. */
8785
+ deviceId: number().int().optional(),
8786
+ /** Max rows returned, newest-first. */
8787
+ limit: number().int().min(1).max(1e3).optional()
8788
+ });
8789
+ /**
8610
8790
  * Ops-log — the durable, append-only operations audit shared by the
8611
8791
  * recordings and events management surfaces.
8612
8792
  *
@@ -22436,7 +22616,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22436
22616
  deviceId: number(),
22437
22617
  trackId: string(),
22438
22618
  flags: TrackFlagsPatchSchema
22439
- }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
22619
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22440
22620
  kind: "query",
22441
22621
  auth: "admin"
22442
22622
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -36579,6 +36759,18 @@ Object.freeze({
36579
36759
  addonId: null,
36580
36760
  access: "view"
36581
36761
  },
36762
+ "pipelineAnalytics.listArchivedDebugNotes": {
36763
+ capName: "pipeline-analytics",
36764
+ capScope: "device",
36765
+ addonId: null,
36766
+ access: "view"
36767
+ },
36768
+ "pipelineAnalytics.listBirthDecisions": {
36769
+ capName: "pipeline-analytics",
36770
+ capScope: "device",
36771
+ addonId: null,
36772
+ access: "view"
36773
+ },
36582
36774
  "pipelineAnalytics.listEventKinds": {
36583
36775
  capName: "pipeline-analytics",
36584
36776
  capScope: "device",
@@ -40366,6 +40558,16 @@ Object.freeze({
40366
40558
  form: "array",
40367
40559
  optional: true
40368
40560
  }],
40561
+ "pipelineAnalytics.listArchivedDebugNotes": [{
40562
+ name: "deviceId",
40563
+ form: "single",
40564
+ optional: true
40565
+ }],
40566
+ "pipelineAnalytics.listBirthDecisions": [{
40567
+ name: "deviceId",
40568
+ form: "single",
40569
+ optional: true
40570
+ }],
40369
40571
  "pipelineAnalytics.listEventKinds": [{
40370
40572
  name: "deviceId",
40371
40573
  form: "single",
@@ -8630,6 +8630,186 @@ var CameraSwitchGroupSchema = object({
8630
8630
  fetchedAt: number()
8631
8631
  });
8632
8632
  /**
8633
+ * What the gate decided about a birth, from the CALLER's point of view.
8634
+ *
8635
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
8636
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
8637
+ * The third member is the one the gate's own type cannot express, because
8638
+ * exhaustion is a property of how long the caller waited.
8639
+ */
8640
+ var BirthDecisionVerdictSchema = _enum([
8641
+ "confirmed",
8642
+ "suppressed",
8643
+ "exhausted-fallback"
8644
+ ]);
8645
+ /** One birth decision, as it is kept. */
8646
+ var BirthDecisionRecordSchema = object({
8647
+ id: string(),
8648
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
8649
+ at: number().int(),
8650
+ /** The camera. Required: every question here is asked per-camera. */
8651
+ deviceId: number().int(),
8652
+ /**
8653
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
8654
+ * birth has no track at all, and a confirmed one is expected to age out long
8655
+ * before this row does. Named `sourceTrackId` so the retention model's
8656
+ * ownership derivation (`collection-classification.ts`, which keys on a
8657
+ * column literally called `trackId`) cannot reach it.
8658
+ */
8659
+ sourceTrackId: string(),
8660
+ /** The candidate's claimed class. The miss rate is asked per class too. */
8661
+ className: string(),
8662
+ verdict: BirthDecisionVerdictSchema,
8663
+ /**
8664
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
8665
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
8666
+ * when the gate is DISABLED and every birth is waved through. `null` is not
8667
+ * "unknown": it says the gate took no measurement because it was off, which
8668
+ * is a different population and must never be averaged in with the rest.
8669
+ */
8670
+ reason: string().nullable(),
8671
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
8672
+ attempts: number().int(),
8673
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
8674
+ deferredForMs: number().int(),
8675
+ /**
8676
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
8677
+ *
8678
+ * `true` when the frame the verdict was taken on carried no matched
8679
+ * detection for this track — the tracker was coasting a frozen box and the
8680
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
8681
+ * straight out of `result.tracked` without checking, so this is reachable
8682
+ * today; the question is the RATE, per camera, and whether refusing those
8683
+ * frames would have cost real tracks (cross-read against `verdict` and
8684
+ * `decidedByBirthEvidence`).
8685
+ */
8686
+ decidedOnCoastedFrame: boolean(),
8687
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
8688
+ birthEvidenceAvailable: boolean(),
8689
+ /**
8690
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
8691
+ * deciding are different: the carried crop is confirm-only, so a candidate
8692
+ * can hold evidence, be found inconclusive on it, and be decided by a native
8693
+ * crop of a later instant. A coasted decision backed by carried evidence is
8694
+ * a real observation of the birth instant; one without it is not.
8695
+ */
8696
+ decidedByBirthEvidence: boolean(),
8697
+ /** Best class-compatible crop score, or `null` when nothing compatible was
8698
+ * found — deliberately not 0, which would be a measurement that never was. */
8699
+ bestScore: number().nullable(),
8700
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
8701
+ appliedMinConfidence: number().nullable(),
8702
+ /**
8703
+ * The track's own `firstSeen` — the candidate's first frame, which is where
8704
+ * the timeline starts. `null` for a suppressed birth, which has no track.
8705
+ */
8706
+ firstSeen: number().int().nullable(),
8707
+ /**
8708
+ * The device's most recent motion RISING EDGE at the moment of the decision,
8709
+ * or `null` when there is none, it is older than
8710
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
8711
+ */
8712
+ motionOnsetAt: number().int().nullable(),
8713
+ /**
8714
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
8715
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
8716
+ *
8717
+ * **Why motion onset and not something else.** Two other proxies were
8718
+ * considered and rejected:
8719
+ * - *the recording/pipeline session start*: for a camera on
8720
+ * `detectionMode: 'always'` the session opens at process start, hours
8721
+ * before any subject. It measures nothing.
8722
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
8723
+ * `firstSeen` IS the first detection of that object, so for the track that
8724
+ * OPENS a burst — the only one the operator is complaining about — the two
8725
+ * are the same instant and the latency is 0 by construction.
8726
+ * Motion onset is the only in-process signal produced by a DIFFERENT
8727
+ * mechanism from the object detector, so it is the only one that can precede
8728
+ * it. It is also already maintained per-device at frame rate on this very
8729
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
8730
+ * it free — and, decisively, the frame path and the motion path are gated to
8731
+ * the SAME designated post-processing node, so the mirror is never empty for
8732
+ * a camera whose births land here.
8733
+ *
8734
+ * **Error bars, all of them.**
8735
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
8736
+ * wall or a branch, and only later joined by the person, OVERSTATES the
8737
+ * latency without bound. Mitigated, never removed, by
8738
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
8739
+ * candidate for "this burst is this subject", and even then it is a
8740
+ * candidate, not a fact.
8741
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
8742
+ * intensity threshold. A subject entering slowly at the far edge of the
8743
+ * frame can clear the detector's confidence floor BEFORE it clears the
8744
+ * motion floor, making this negative. Negatives are stored as-is and
8745
+ * never clamped — clamping would fabricate the distribution's left tail,
8746
+ * which is the half that says the proxy is unreliable.
8747
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
8748
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
8749
+ * therefore comparable WITHIN a camera and not across cameras of
8750
+ * different motion sources. The motion source is deliberately not copied
8751
+ * here — it belongs to the addon that owns the device (D224) and this is
8752
+ * a write on the frame path — so group by `deviceId`, which is how the
8753
+ * question is always asked anyway.
8754
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
8755
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
8756
+ * past it this is `null`.
8757
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
8758
+ * reporting, or nothing since boot: `null`. Which is the truth about a
8759
+ * camera nobody has a reference instant for.
8760
+ *
8761
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
8762
+ * as such. It is not a per-track fact and must never be shown as one.
8763
+ */
8764
+ birthLatencyMs: number().int().nullable(),
8765
+ /**
8766
+ * How many births this device has already decided since that motion onset.
8767
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
8768
+ * this subject. `null` when there is no usable onset.
8769
+ */
8770
+ birthIndexInBurst: number().int().nullable()
8771
+ });
8772
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
8773
+ var BirthDecisionQueryInputSchema = object({
8774
+ /** Restrict to a single camera; omit for every row. */
8775
+ deviceId: number().int().optional(),
8776
+ /** Only decisions at or after this epoch ms. */
8777
+ since: number().int().optional(),
8778
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
8779
+ verdict: BirthDecisionVerdictSchema.optional(),
8780
+ /** Max rows returned, newest-first. */
8781
+ limit: number().int().min(1).max(5e3).optional()
8782
+ });
8783
+ /** One archived note — the operator's words plus enough context to find what
8784
+ * they were looking at, after the track itself is gone. */
8785
+ var ArchivedDebugNoteSchema = object({
8786
+ /** Archive row id. Derived from `(sourceTrackId, note)`, so re-archiving the
8787
+ * same sentence about the same track lands on the row already there. */
8788
+ id: string(),
8789
+ /** The operator's own words, verbatim. */
8790
+ note: string(),
8791
+ /** The camera. Required — every question here is asked per-camera. */
8792
+ deviceId: number().int(),
8793
+ /** The track the note was written on. PROVENANCE, not ownership: the track
8794
+ * is expected to be gone, and this row is not a reference to it. */
8795
+ sourceTrackId: string(),
8796
+ /** Epoch ms the note was moved here, i.e. when the operator reviewed it. */
8797
+ archivedAt: number().int(),
8798
+ /** The track's `firstSeen`, when the row still knew it; `null` otherwise. */
8799
+ trackStartedAt: number().int().nullable(),
8800
+ /** The track's detector class (`person`, `car`, …); `null` when unknown. */
8801
+ trackClass: string().nullable(),
8802
+ /** The track's display label at review time; `null` when it had none. */
8803
+ trackLabel: string().nullable()
8804
+ });
8805
+ /** Query input for `listArchivedDebugNotes` — newest first, one camera or all. */
8806
+ var ArchivedDebugNoteQueryInputSchema = object({
8807
+ /** Restrict to a single camera; omit for every row. */
8808
+ deviceId: number().int().optional(),
8809
+ /** Max rows returned, newest-first. */
8810
+ limit: number().int().min(1).max(1e3).optional()
8811
+ });
8812
+ /**
8633
8813
  * Ops-log — the durable, append-only operations audit shared by the
8634
8814
  * recordings and events management surfaces.
8635
8815
  *
@@ -22459,7 +22639,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22459
22639
  deviceId: number(),
22460
22640
  trackId: string(),
22461
22641
  flags: TrackFlagsPatchSchema
22462
- }), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
22642
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22463
22643
  kind: "query",
22464
22644
  auth: "admin"
22465
22645
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -36602,6 +36782,18 @@ Object.freeze({
36602
36782
  addonId: null,
36603
36783
  access: "view"
36604
36784
  },
36785
+ "pipelineAnalytics.listArchivedDebugNotes": {
36786
+ capName: "pipeline-analytics",
36787
+ capScope: "device",
36788
+ addonId: null,
36789
+ access: "view"
36790
+ },
36791
+ "pipelineAnalytics.listBirthDecisions": {
36792
+ capName: "pipeline-analytics",
36793
+ capScope: "device",
36794
+ addonId: null,
36795
+ access: "view"
36796
+ },
36605
36797
  "pipelineAnalytics.listEventKinds": {
36606
36798
  capName: "pipeline-analytics",
36607
36799
  capScope: "device",
@@ -40389,6 +40581,16 @@ Object.freeze({
40389
40581
  form: "array",
40390
40582
  optional: true
40391
40583
  }],
40584
+ "pipelineAnalytics.listArchivedDebugNotes": [{
40585
+ name: "deviceId",
40586
+ form: "single",
40587
+ optional: true
40588
+ }],
40589
+ "pipelineAnalytics.listBirthDecisions": [{
40590
+ name: "deviceId",
40591
+ form: "single",
40592
+ optional: true
40593
+ }],
40392
40594
  "pipelineAnalytics.listEventKinds": [{
40393
40595
  name: "deviceId",
40394
40596
  form: "single",
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CUXv3nM4.js");
1
+ const require_dist = require("./dist-CyfP2nFh.js");
2
2
  let node_path = require("node:path");
3
3
  node_path = require_dist.__toESM(node_path);
4
4
  let node_url = require("node:url");
@@ -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-CUXv3nM4.js");
6
- const require_lazy_sharp = require("../lazy-sharp-Ca-p84kZ.js");
5
+ const require_dist = require("../dist-CyfP2nFh.js");
6
+ const require_lazy_sharp = require("../lazy-sharp-BawPy_a9.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
9
9
  //#region src/motion-wasm/region-grouping.ts
@@ -1,4 +1,4 @@
1
- import { Jt as hydrateSchema, Kt as DeviceType, Ut as BaseAddon, X as evaluateZoneRules, ft as motionDetectionCapability } from "../dist-DK6-zO7x.mjs";
1
+ import { Jt as hydrateSchema, Kt as DeviceType, Ut as BaseAddon, X as evaluateZoneRules, ft as motionDetectionCapability } from "../dist-CsI90TVi.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-DK6-zO7x.mjs";
1
+ import { It as errMsg, Rt as Fmp4BoxSplitter, Vt as isSoftwareDecode, zt as buildFfmpegArgs } from "./dist-CsI90TVi.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { realpathSync } from "node:fs";
4
4
  import path from "node:path";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CUXv3nM4.js");
1
+ const require_dist = require("./dist-CyfP2nFh.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  let node_fs = require("node:fs");
4
4
  node_fs = require_dist.__toESM(node_fs, 1);
@@ -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-CUXv3nM4.js");
6
- const require_node = require("../node-ilPrc4jE.js");
7
- const require_default_detection_model = require("../default-detection-model-CEYugFUJ.js");
8
- const require_worker_protocol = require("../worker-protocol-BsSbB10U.js");
5
+ const require_dist = require("../dist-CyfP2nFh.js");
6
+ const require_node = require("../node-CkBqyM-0.js");
7
+ const require_default_detection_model = require("../default-detection-model-BZTjgdod.js");
8
+ const require_worker_protocol = require("../worker-protocol-CYopQrkK.js");
9
9
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
10
- const require_lazy_sharp = require("../lazy-sharp-Ca-p84kZ.js");
10
+ const require_lazy_sharp = require("../lazy-sharp-BawPy_a9.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");
@@ -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-DK6-zO7x.mjs";
2
- import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-lEon32fI.mjs";
3
- import { i as resolveFrameViewGeometry, l as getStepDefinition, r as localFrameRegistry } from "../default-detection-model-D8hFmT9l.mjs";
4
- import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-B5g5_XF5.mjs";
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-CsI90TVi.mjs";
2
+ import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-6Pb_t1Fm.mjs";
3
+ import { i as resolveFrameViewGeometry, l as getStepDefinition, r as localFrameRegistry } from "../default-detection-model-B-PccVsO.mjs";
4
+ import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-DNqdtZzZ.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";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CUXv3nM4.js");
1
+ const require_dist = require("./dist-CyfP2nFh.js");
2
2
  let node_fs = require("node:fs");
3
3
  node_fs = require_dist.__toESM(node_fs);
4
4
  let node_child_process = require("node:child_process");
@@ -1,4 +1,4 @@
1
- import { mt as parseProcStatus } from "./dist-DK6-zO7x.mjs";
1
+ import { mt as parseProcStatus } from "./dist-CsI90TVi.mjs";
2
2
  import * as fs from "node:fs";
3
3
  import { execFile } from "node:child_process";
4
4
  //#region src/shared/node-topology-platform.ts
@@ -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-CUXv3nM4.js");
6
- const require_node = require("../node-ilPrc4jE.js");
5
+ const require_dist = require("../dist-CyfP2nFh.js");
6
+ const require_node = require("../node-CkBqyM-0.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");