@camstack/addon-provider-reolink 1.2.110 → 1.2.112

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/addon.js CHANGED
@@ -7665,6 +7665,157 @@ var CameraSwitchGroupSchema = object({
7665
7665
  /** Unix ms when the group was composed server-side. */
7666
7666
  fetchedAt: number()
7667
7667
  });
7668
+ /**
7669
+ * What the gate decided about a birth, from the CALLER's point of view.
7670
+ *
7671
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7672
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7673
+ * The third member is the one the gate's own type cannot express, because
7674
+ * exhaustion is a property of how long the caller waited.
7675
+ */
7676
+ var BirthDecisionVerdictSchema = _enum([
7677
+ "confirmed",
7678
+ "suppressed",
7679
+ "exhausted-fallback"
7680
+ ]);
7681
+ /** One birth decision, as it is kept. */
7682
+ var BirthDecisionRecordSchema = object({
7683
+ id: string(),
7684
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7685
+ at: number().int(),
7686
+ /** The camera. Required: every question here is asked per-camera. */
7687
+ deviceId: number().int(),
7688
+ /**
7689
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7690
+ * birth has no track at all, and a confirmed one is expected to age out long
7691
+ * before this row does. Named `sourceTrackId` so the retention model's
7692
+ * ownership derivation (`collection-classification.ts`, which keys on a
7693
+ * column literally called `trackId`) cannot reach it.
7694
+ */
7695
+ sourceTrackId: string(),
7696
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7697
+ className: string(),
7698
+ verdict: BirthDecisionVerdictSchema,
7699
+ /**
7700
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7701
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7702
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7703
+ * "unknown": it says the gate took no measurement because it was off, which
7704
+ * is a different population and must never be averaged in with the rest.
7705
+ */
7706
+ reason: string().nullable(),
7707
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7708
+ attempts: number().int(),
7709
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7710
+ deferredForMs: number().int(),
7711
+ /**
7712
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7713
+ *
7714
+ * `true` when the frame the verdict was taken on carried no matched
7715
+ * detection for this track — the tracker was coasting a frozen box and the
7716
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7717
+ * straight out of `result.tracked` without checking, so this is reachable
7718
+ * today; the question is the RATE, per camera, and whether refusing those
7719
+ * frames would have cost real tracks (cross-read against `verdict` and
7720
+ * `decidedByBirthEvidence`).
7721
+ */
7722
+ decidedOnCoastedFrame: boolean(),
7723
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7724
+ birthEvidenceAvailable: boolean(),
7725
+ /**
7726
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7727
+ * deciding are different: the carried crop is confirm-only, so a candidate
7728
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7729
+ * crop of a later instant. A coasted decision backed by carried evidence is
7730
+ * a real observation of the birth instant; one without it is not.
7731
+ */
7732
+ decidedByBirthEvidence: boolean(),
7733
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7734
+ * found — deliberately not 0, which would be a measurement that never was. */
7735
+ bestScore: number().nullable(),
7736
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7737
+ appliedMinConfidence: number().nullable(),
7738
+ /**
7739
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7740
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7741
+ */
7742
+ firstSeen: number().int().nullable(),
7743
+ /**
7744
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7745
+ * or `null` when there is none, it is older than
7746
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7747
+ */
7748
+ motionOnsetAt: number().int().nullable(),
7749
+ /**
7750
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7751
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7752
+ *
7753
+ * **Why motion onset and not something else.** Two other proxies were
7754
+ * considered and rejected:
7755
+ * - *the recording/pipeline session start*: for a camera on
7756
+ * `detectionMode: 'always'` the session opens at process start, hours
7757
+ * before any subject. It measures nothing.
7758
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7759
+ * `firstSeen` IS the first detection of that object, so for the track that
7760
+ * OPENS a burst — the only one the operator is complaining about — the two
7761
+ * are the same instant and the latency is 0 by construction.
7762
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7763
+ * mechanism from the object detector, so it is the only one that can precede
7764
+ * it. It is also already maintained per-device at frame rate on this very
7765
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7766
+ * it free — and, decisively, the frame path and the motion path are gated to
7767
+ * the SAME designated post-processing node, so the mirror is never empty for
7768
+ * a camera whose births land here.
7769
+ *
7770
+ * **Error bars, all of them.**
7771
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7772
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7773
+ * latency without bound. Mitigated, never removed, by
7774
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7775
+ * candidate for "this burst is this subject", and even then it is a
7776
+ * candidate, not a fact.
7777
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7778
+ * intensity threshold. A subject entering slowly at the far edge of the
7779
+ * frame can clear the detector's confidence floor BEFORE it clears the
7780
+ * motion floor, making this negative. Negatives are stored as-is and
7781
+ * never clamped — clamping would fabricate the distribution's left tail,
7782
+ * which is the half that says the proxy is unreliable.
7783
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7784
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7785
+ * therefore comparable WITHIN a camera and not across cameras of
7786
+ * different motion sources. The motion source is deliberately not copied
7787
+ * here — it belongs to the addon that owns the device (D224) and this is
7788
+ * a write on the frame path — so group by `deviceId`, which is how the
7789
+ * question is always asked anyway.
7790
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7791
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7792
+ * past it this is `null`.
7793
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7794
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7795
+ * camera nobody has a reference instant for.
7796
+ *
7797
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7798
+ * as such. It is not a per-track fact and must never be shown as one.
7799
+ */
7800
+ birthLatencyMs: number().int().nullable(),
7801
+ /**
7802
+ * How many births this device has already decided since that motion onset.
7803
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7804
+ * this subject. `null` when there is no usable onset.
7805
+ */
7806
+ birthIndexInBurst: number().int().nullable()
7807
+ });
7808
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7809
+ var BirthDecisionQueryInputSchema = object({
7810
+ /** Restrict to a single camera; omit for every row. */
7811
+ deviceId: number().int().optional(),
7812
+ /** Only decisions at or after this epoch ms. */
7813
+ since: number().int().optional(),
7814
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7815
+ verdict: BirthDecisionVerdictSchema.optional(),
7816
+ /** Max rows returned, newest-first. */
7817
+ limit: number().int().min(1).max(5e3).optional()
7818
+ });
7668
7819
  /** One archived note — the operator's words plus enough context to find what
7669
7820
  * they were looking at, after the track itself is gone. */
7670
7821
  var ArchivedDebugNoteSchema = object({
@@ -20763,7 +20914,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20763
20914
  deviceId: number(),
20764
20915
  trackId: string(),
20765
20916
  flags: TrackFlagsPatchSchema
20766
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20917
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20767
20918
  kind: "query",
20768
20919
  auth: "admin"
20769
20920
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -21205,6 +21356,22 @@ var occupancyRecheckFramesField = {
21205
21356
  step: 1
21206
21357
  };
21207
21358
  /**
21359
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
21360
+ *
21361
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
21362
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
21363
+ * fleet measures — one-shot, and only ever taken while a permit would still be
21364
+ * spare for live. `0` turns the burst off entirely (the history is still
21365
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
21366
+ * discarded — the pre-D411 behaviour).
21367
+ */
21368
+ var preRollInferenceFramesField = {
21369
+ min: 0,
21370
+ max: 30,
21371
+ default: 12,
21372
+ step: 1
21373
+ };
21374
+ /**
21208
21375
  * Source enum for motion signals fed to the runner. Extensible — add
21209
21376
  * new variants here when new motion-trigger paths are wired in
21210
21377
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -21445,6 +21612,31 @@ var RunnerCameraConfigSchema = object({
21445
21612
  * to every occupancy rule until something moved in front of it. The churn is
21446
21613
  * now paid on the interval instead — see `occupancyRecheckSecField`.
21447
21614
  */
21615
+ /**
21616
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21617
+ * at session open — instead of decoding it and throwing it away.
21618
+ *
21619
+ * DEFAULT `true`, and the default is the argument. This is not a new
21620
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21621
+ * already served, already decoded and already paid for on every on-motion
21622
+ * detection session that asks for history. What shipped was a last-moment
21623
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21624
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21625
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21626
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21627
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21628
+ * was decoded, and was freed.
21629
+ *
21630
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21631
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21632
+ * late. What makes ON safe is not a switch but the BOUND —
21633
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21634
+ * the last inference permit — so the switch exists for the camera where the
21635
+ * history is worthless (a doorbell whose subject is always already at the
21636
+ * door), not as a hedge against the feature.
21637
+ */
21638
+ preRollInferenceEnabled: boolean().default(true),
21639
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
21448
21640
  occupancyRecheckEnabled: boolean().default(true),
21449
21641
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
21450
21642
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -21473,7 +21665,7 @@ var RunnerCameraConfigSchema = object({
21473
21665
  */
21474
21666
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
21475
21667
  });
21476
- motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
21668
+ motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, preRollInferenceFramesField.min, preRollInferenceFramesField.max, preRollInferenceFramesField.step, preRollInferenceFramesField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
21477
21669
  /**
21478
21670
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
21479
21671
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -38750,6 +38942,12 @@ Object.freeze({
38750
38942
  addonId: null,
38751
38943
  access: "view"
38752
38944
  },
38945
+ "pipelineAnalytics.listBirthDecisions": {
38946
+ capName: "pipeline-analytics",
38947
+ capScope: "device",
38948
+ addonId: null,
38949
+ access: "view"
38950
+ },
38753
38951
  "pipelineAnalytics.listEventKinds": {
38754
38952
  capName: "pipeline-analytics",
38755
38953
  capScope: "device",
@@ -42542,6 +42740,11 @@ Object.freeze({
42542
42740
  form: "single",
42543
42741
  optional: true
42544
42742
  }],
42743
+ "pipelineAnalytics.listBirthDecisions": [{
42744
+ name: "deviceId",
42745
+ form: "single",
42746
+ optional: true
42747
+ }],
42545
42748
  "pipelineAnalytics.listEventKinds": [{
42546
42749
  name: "deviceId",
42547
42750
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7660,6 +7660,157 @@ var CameraSwitchGroupSchema = object({
7660
7660
  /** Unix ms when the group was composed server-side. */
7661
7661
  fetchedAt: number()
7662
7662
  });
7663
+ /**
7664
+ * What the gate decided about a birth, from the CALLER's point of view.
7665
+ *
7666
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7667
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7668
+ * The third member is the one the gate's own type cannot express, because
7669
+ * exhaustion is a property of how long the caller waited.
7670
+ */
7671
+ var BirthDecisionVerdictSchema = _enum([
7672
+ "confirmed",
7673
+ "suppressed",
7674
+ "exhausted-fallback"
7675
+ ]);
7676
+ /** One birth decision, as it is kept. */
7677
+ var BirthDecisionRecordSchema = object({
7678
+ id: string(),
7679
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7680
+ at: number().int(),
7681
+ /** The camera. Required: every question here is asked per-camera. */
7682
+ deviceId: number().int(),
7683
+ /**
7684
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7685
+ * birth has no track at all, and a confirmed one is expected to age out long
7686
+ * before this row does. Named `sourceTrackId` so the retention model's
7687
+ * ownership derivation (`collection-classification.ts`, which keys on a
7688
+ * column literally called `trackId`) cannot reach it.
7689
+ */
7690
+ sourceTrackId: string(),
7691
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7692
+ className: string(),
7693
+ verdict: BirthDecisionVerdictSchema,
7694
+ /**
7695
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7696
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7697
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7698
+ * "unknown": it says the gate took no measurement because it was off, which
7699
+ * is a different population and must never be averaged in with the rest.
7700
+ */
7701
+ reason: string().nullable(),
7702
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7703
+ attempts: number().int(),
7704
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7705
+ deferredForMs: number().int(),
7706
+ /**
7707
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7708
+ *
7709
+ * `true` when the frame the verdict was taken on carried no matched
7710
+ * detection for this track — the tracker was coasting a frozen box and the
7711
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7712
+ * straight out of `result.tracked` without checking, so this is reachable
7713
+ * today; the question is the RATE, per camera, and whether refusing those
7714
+ * frames would have cost real tracks (cross-read against `verdict` and
7715
+ * `decidedByBirthEvidence`).
7716
+ */
7717
+ decidedOnCoastedFrame: boolean(),
7718
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7719
+ birthEvidenceAvailable: boolean(),
7720
+ /**
7721
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7722
+ * deciding are different: the carried crop is confirm-only, so a candidate
7723
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7724
+ * crop of a later instant. A coasted decision backed by carried evidence is
7725
+ * a real observation of the birth instant; one without it is not.
7726
+ */
7727
+ decidedByBirthEvidence: boolean(),
7728
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7729
+ * found — deliberately not 0, which would be a measurement that never was. */
7730
+ bestScore: number().nullable(),
7731
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7732
+ appliedMinConfidence: number().nullable(),
7733
+ /**
7734
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7735
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7736
+ */
7737
+ firstSeen: number().int().nullable(),
7738
+ /**
7739
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7740
+ * or `null` when there is none, it is older than
7741
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7742
+ */
7743
+ motionOnsetAt: number().int().nullable(),
7744
+ /**
7745
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7746
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7747
+ *
7748
+ * **Why motion onset and not something else.** Two other proxies were
7749
+ * considered and rejected:
7750
+ * - *the recording/pipeline session start*: for a camera on
7751
+ * `detectionMode: 'always'` the session opens at process start, hours
7752
+ * before any subject. It measures nothing.
7753
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7754
+ * `firstSeen` IS the first detection of that object, so for the track that
7755
+ * OPENS a burst — the only one the operator is complaining about — the two
7756
+ * are the same instant and the latency is 0 by construction.
7757
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7758
+ * mechanism from the object detector, so it is the only one that can precede
7759
+ * it. It is also already maintained per-device at frame rate on this very
7760
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7761
+ * it free — and, decisively, the frame path and the motion path are gated to
7762
+ * the SAME designated post-processing node, so the mirror is never empty for
7763
+ * a camera whose births land here.
7764
+ *
7765
+ * **Error bars, all of them.**
7766
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7767
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7768
+ * latency without bound. Mitigated, never removed, by
7769
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7770
+ * candidate for "this burst is this subject", and even then it is a
7771
+ * candidate, not a fact.
7772
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7773
+ * intensity threshold. A subject entering slowly at the far edge of the
7774
+ * frame can clear the detector's confidence floor BEFORE it clears the
7775
+ * motion floor, making this negative. Negatives are stored as-is and
7776
+ * never clamped — clamping would fabricate the distribution's left tail,
7777
+ * which is the half that says the proxy is unreliable.
7778
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7779
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7780
+ * therefore comparable WITHIN a camera and not across cameras of
7781
+ * different motion sources. The motion source is deliberately not copied
7782
+ * here — it belongs to the addon that owns the device (D224) and this is
7783
+ * a write on the frame path — so group by `deviceId`, which is how the
7784
+ * question is always asked anyway.
7785
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7786
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7787
+ * past it this is `null`.
7788
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7789
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7790
+ * camera nobody has a reference instant for.
7791
+ *
7792
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7793
+ * as such. It is not a per-track fact and must never be shown as one.
7794
+ */
7795
+ birthLatencyMs: number().int().nullable(),
7796
+ /**
7797
+ * How many births this device has already decided since that motion onset.
7798
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7799
+ * this subject. `null` when there is no usable onset.
7800
+ */
7801
+ birthIndexInBurst: number().int().nullable()
7802
+ });
7803
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7804
+ var BirthDecisionQueryInputSchema = object({
7805
+ /** Restrict to a single camera; omit for every row. */
7806
+ deviceId: number().int().optional(),
7807
+ /** Only decisions at or after this epoch ms. */
7808
+ since: number().int().optional(),
7809
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7810
+ verdict: BirthDecisionVerdictSchema.optional(),
7811
+ /** Max rows returned, newest-first. */
7812
+ limit: number().int().min(1).max(5e3).optional()
7813
+ });
7663
7814
  /** One archived note — the operator's words plus enough context to find what
7664
7815
  * they were looking at, after the track itself is gone. */
7665
7816
  var ArchivedDebugNoteSchema = object({
@@ -20758,7 +20909,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20758
20909
  deviceId: number(),
20759
20910
  trackId: string(),
20760
20911
  flags: TrackFlagsPatchSchema
20761
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20912
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20762
20913
  kind: "query",
20763
20914
  auth: "admin"
20764
20915
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -21200,6 +21351,22 @@ var occupancyRecheckFramesField = {
21200
21351
  step: 1
21201
21352
  };
21202
21353
  /**
21354
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
21355
+ *
21356
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
21357
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
21358
+ * fleet measures — one-shot, and only ever taken while a permit would still be
21359
+ * spare for live. `0` turns the burst off entirely (the history is still
21360
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
21361
+ * discarded — the pre-D411 behaviour).
21362
+ */
21363
+ var preRollInferenceFramesField = {
21364
+ min: 0,
21365
+ max: 30,
21366
+ default: 12,
21367
+ step: 1
21368
+ };
21369
+ /**
21203
21370
  * Source enum for motion signals fed to the runner. Extensible — add
21204
21371
  * new variants here when new motion-trigger paths are wired in
21205
21372
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -21440,6 +21607,31 @@ var RunnerCameraConfigSchema = object({
21440
21607
  * to every occupancy rule until something moved in front of it. The churn is
21441
21608
  * now paid on the interval instead — see `occupancyRecheckSecField`.
21442
21609
  */
21610
+ /**
21611
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21612
+ * at session open — instead of decoding it and throwing it away.
21613
+ *
21614
+ * DEFAULT `true`, and the default is the argument. This is not a new
21615
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21616
+ * already served, already decoded and already paid for on every on-motion
21617
+ * detection session that asks for history. What shipped was a last-moment
21618
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21619
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21620
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21621
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21622
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21623
+ * was decoded, and was freed.
21624
+ *
21625
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21626
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21627
+ * late. What makes ON safe is not a switch but the BOUND —
21628
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21629
+ * the last inference permit — so the switch exists for the camera where the
21630
+ * history is worthless (a doorbell whose subject is always already at the
21631
+ * door), not as a hedge against the feature.
21632
+ */
21633
+ preRollInferenceEnabled: boolean().default(true),
21634
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
21443
21635
  occupancyRecheckEnabled: boolean().default(true),
21444
21636
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
21445
21637
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -21468,7 +21660,7 @@ var RunnerCameraConfigSchema = object({
21468
21660
  */
21469
21661
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
21470
21662
  });
21471
- motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
21663
+ motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, preRollInferenceFramesField.min, preRollInferenceFramesField.max, preRollInferenceFramesField.step, preRollInferenceFramesField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
21472
21664
  /**
21473
21665
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
21474
21666
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -38745,6 +38937,12 @@ Object.freeze({
38745
38937
  addonId: null,
38746
38938
  access: "view"
38747
38939
  },
38940
+ "pipelineAnalytics.listBirthDecisions": {
38941
+ capName: "pipeline-analytics",
38942
+ capScope: "device",
38943
+ addonId: null,
38944
+ access: "view"
38945
+ },
38748
38946
  "pipelineAnalytics.listEventKinds": {
38749
38947
  capName: "pipeline-analytics",
38750
38948
  capScope: "device",
@@ -42537,6 +42735,11 @@ Object.freeze({
42537
42735
  form: "single",
42538
42736
  optional: true
42539
42737
  }],
42738
+ "pipelineAnalytics.listBirthDecisions": [{
42739
+ name: "deviceId",
42740
+ form: "single",
42741
+ optional: true
42742
+ }],
42540
42743
  "pipelineAnalytics.listEventKinds": [{
42541
42744
  name: "deviceId",
42542
42745
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.2.110",
3
+ "version": "1.2.112",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",