@camstack/addon-provider-rademacher 0.2.86 → 0.2.88

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
@@ -8612,6 +8612,157 @@ var CameraSwitchGroupSchema = object({
8612
8612
  /** Unix ms when the group was composed server-side. */
8613
8613
  fetchedAt: number()
8614
8614
  });
8615
+ /**
8616
+ * What the gate decided about a birth, from the CALLER's point of view.
8617
+ *
8618
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
8619
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
8620
+ * The third member is the one the gate's own type cannot express, because
8621
+ * exhaustion is a property of how long the caller waited.
8622
+ */
8623
+ var BirthDecisionVerdictSchema = _enum([
8624
+ "confirmed",
8625
+ "suppressed",
8626
+ "exhausted-fallback"
8627
+ ]);
8628
+ /** One birth decision, as it is kept. */
8629
+ var BirthDecisionRecordSchema = object({
8630
+ id: string(),
8631
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
8632
+ at: number().int(),
8633
+ /** The camera. Required: every question here is asked per-camera. */
8634
+ deviceId: number().int(),
8635
+ /**
8636
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
8637
+ * birth has no track at all, and a confirmed one is expected to age out long
8638
+ * before this row does. Named `sourceTrackId` so the retention model's
8639
+ * ownership derivation (`collection-classification.ts`, which keys on a
8640
+ * column literally called `trackId`) cannot reach it.
8641
+ */
8642
+ sourceTrackId: string(),
8643
+ /** The candidate's claimed class. The miss rate is asked per class too. */
8644
+ className: string(),
8645
+ verdict: BirthDecisionVerdictSchema,
8646
+ /**
8647
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
8648
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
8649
+ * when the gate is DISABLED and every birth is waved through. `null` is not
8650
+ * "unknown": it says the gate took no measurement because it was off, which
8651
+ * is a different population and must never be averaged in with the rest.
8652
+ */
8653
+ reason: string().nullable(),
8654
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
8655
+ attempts: number().int(),
8656
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
8657
+ deferredForMs: number().int(),
8658
+ /**
8659
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
8660
+ *
8661
+ * `true` when the frame the verdict was taken on carried no matched
8662
+ * detection for this track — the tracker was coasting a frozen box and the
8663
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
8664
+ * straight out of `result.tracked` without checking, so this is reachable
8665
+ * today; the question is the RATE, per camera, and whether refusing those
8666
+ * frames would have cost real tracks (cross-read against `verdict` and
8667
+ * `decidedByBirthEvidence`).
8668
+ */
8669
+ decidedOnCoastedFrame: boolean(),
8670
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
8671
+ birthEvidenceAvailable: boolean(),
8672
+ /**
8673
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
8674
+ * deciding are different: the carried crop is confirm-only, so a candidate
8675
+ * can hold evidence, be found inconclusive on it, and be decided by a native
8676
+ * crop of a later instant. A coasted decision backed by carried evidence is
8677
+ * a real observation of the birth instant; one without it is not.
8678
+ */
8679
+ decidedByBirthEvidence: boolean(),
8680
+ /** Best class-compatible crop score, or `null` when nothing compatible was
8681
+ * found — deliberately not 0, which would be a measurement that never was. */
8682
+ bestScore: number().nullable(),
8683
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
8684
+ appliedMinConfidence: number().nullable(),
8685
+ /**
8686
+ * The track's own `firstSeen` — the candidate's first frame, which is where
8687
+ * the timeline starts. `null` for a suppressed birth, which has no track.
8688
+ */
8689
+ firstSeen: number().int().nullable(),
8690
+ /**
8691
+ * The device's most recent motion RISING EDGE at the moment of the decision,
8692
+ * or `null` when there is none, it is older than
8693
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
8694
+ */
8695
+ motionOnsetAt: number().int().nullable(),
8696
+ /**
8697
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
8698
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
8699
+ *
8700
+ * **Why motion onset and not something else.** Two other proxies were
8701
+ * considered and rejected:
8702
+ * - *the recording/pipeline session start*: for a camera on
8703
+ * `detectionMode: 'always'` the session opens at process start, hours
8704
+ * before any subject. It measures nothing.
8705
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
8706
+ * `firstSeen` IS the first detection of that object, so for the track that
8707
+ * OPENS a burst — the only one the operator is complaining about — the two
8708
+ * are the same instant and the latency is 0 by construction.
8709
+ * Motion onset is the only in-process signal produced by a DIFFERENT
8710
+ * mechanism from the object detector, so it is the only one that can precede
8711
+ * it. It is also already maintained per-device at frame rate on this very
8712
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
8713
+ * it free — and, decisively, the frame path and the motion path are gated to
8714
+ * the SAME designated post-processing node, so the mirror is never empty for
8715
+ * a camera whose births land here.
8716
+ *
8717
+ * **Error bars, all of them.**
8718
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
8719
+ * wall or a branch, and only later joined by the person, OVERSTATES the
8720
+ * latency without bound. Mitigated, never removed, by
8721
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
8722
+ * candidate for "this burst is this subject", and even then it is a
8723
+ * candidate, not a fact.
8724
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
8725
+ * intensity threshold. A subject entering slowly at the far edge of the
8726
+ * frame can clear the detector's confidence floor BEFORE it clears the
8727
+ * motion floor, making this negative. Negatives are stored as-is and
8728
+ * never clamped — clamping would fabricate the distribution's left tail,
8729
+ * which is the half that says the proxy is unreliable.
8730
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
8731
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
8732
+ * therefore comparable WITHIN a camera and not across cameras of
8733
+ * different motion sources. The motion source is deliberately not copied
8734
+ * here — it belongs to the addon that owns the device (D224) and this is
8735
+ * a write on the frame path — so group by `deviceId`, which is how the
8736
+ * question is always asked anyway.
8737
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
8738
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
8739
+ * past it this is `null`.
8740
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
8741
+ * reporting, or nothing since boot: `null`. Which is the truth about a
8742
+ * camera nobody has a reference instant for.
8743
+ *
8744
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
8745
+ * as such. It is not a per-track fact and must never be shown as one.
8746
+ */
8747
+ birthLatencyMs: number().int().nullable(),
8748
+ /**
8749
+ * How many births this device has already decided since that motion onset.
8750
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
8751
+ * this subject. `null` when there is no usable onset.
8752
+ */
8753
+ birthIndexInBurst: number().int().nullable()
8754
+ });
8755
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
8756
+ var BirthDecisionQueryInputSchema = object({
8757
+ /** Restrict to a single camera; omit for every row. */
8758
+ deviceId: number().int().optional(),
8759
+ /** Only decisions at or after this epoch ms. */
8760
+ since: number().int().optional(),
8761
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
8762
+ verdict: BirthDecisionVerdictSchema.optional(),
8763
+ /** Max rows returned, newest-first. */
8764
+ limit: number().int().min(1).max(5e3).optional()
8765
+ });
8615
8766
  /** One archived note — the operator's words plus enough context to find what
8616
8767
  * they were looking at, after the track itself is gone. */
8617
8768
  var ArchivedDebugNoteSchema = object({
@@ -21104,7 +21255,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21104
21255
  deviceId: number(),
21105
21256
  trackId: string(),
21106
21257
  flags: TrackFlagsPatchSchema
21107
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
21258
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
21108
21259
  kind: "query",
21109
21260
  auth: "admin"
21110
21261
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -21546,6 +21697,22 @@ var occupancyRecheckFramesField = {
21546
21697
  step: 1
21547
21698
  };
21548
21699
  /**
21700
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
21701
+ *
21702
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
21703
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
21704
+ * fleet measures — one-shot, and only ever taken while a permit would still be
21705
+ * spare for live. `0` turns the burst off entirely (the history is still
21706
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
21707
+ * discarded — the pre-D411 behaviour).
21708
+ */
21709
+ var preRollInferenceFramesField = {
21710
+ min: 0,
21711
+ max: 30,
21712
+ default: 12,
21713
+ step: 1
21714
+ };
21715
+ /**
21549
21716
  * Source enum for motion signals fed to the runner. Extensible — add
21550
21717
  * new variants here when new motion-trigger paths are wired in
21551
21718
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -21786,6 +21953,31 @@ var RunnerCameraConfigSchema = object({
21786
21953
  * to every occupancy rule until something moved in front of it. The churn is
21787
21954
  * now paid on the interval instead — see `occupancyRecheckSecField`.
21788
21955
  */
21956
+ /**
21957
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21958
+ * at session open — instead of decoding it and throwing it away.
21959
+ *
21960
+ * DEFAULT `true`, and the default is the argument. This is not a new
21961
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21962
+ * already served, already decoded and already paid for on every on-motion
21963
+ * detection session that asks for history. What shipped was a last-moment
21964
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21965
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21966
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21967
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21968
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21969
+ * was decoded, and was freed.
21970
+ *
21971
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21972
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21973
+ * late. What makes ON safe is not a switch but the BOUND —
21974
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21975
+ * the last inference permit — so the switch exists for the camera where the
21976
+ * history is worthless (a doorbell whose subject is always already at the
21977
+ * door), not as a hedge against the feature.
21978
+ */
21979
+ preRollInferenceEnabled: boolean().default(true),
21980
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
21789
21981
  occupancyRecheckEnabled: boolean().default(true),
21790
21982
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
21791
21983
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -21814,7 +22006,7 @@ var RunnerCameraConfigSchema = object({
21814
22006
  */
21815
22007
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
21816
22008
  });
21817
- 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;
22009
+ 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;
21818
22010
  /**
21819
22011
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
21820
22012
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -38504,6 +38696,12 @@ Object.freeze({
38504
38696
  addonId: null,
38505
38697
  access: "view"
38506
38698
  },
38699
+ "pipelineAnalytics.listBirthDecisions": {
38700
+ capName: "pipeline-analytics",
38701
+ capScope: "device",
38702
+ addonId: null,
38703
+ access: "view"
38704
+ },
38507
38705
  "pipelineAnalytics.listEventKinds": {
38508
38706
  capName: "pipeline-analytics",
38509
38707
  capScope: "device",
@@ -42296,6 +42494,11 @@ Object.freeze({
42296
42494
  form: "single",
42297
42495
  optional: true
42298
42496
  }],
42497
+ "pipelineAnalytics.listBirthDecisions": [{
42498
+ name: "deviceId",
42499
+ form: "single",
42500
+ optional: true
42501
+ }],
42299
42502
  "pipelineAnalytics.listEventKinds": [{
42300
42503
  name: "deviceId",
42301
42504
  form: "single",
package/dist/addon.mjs CHANGED
@@ -8611,6 +8611,157 @@ var CameraSwitchGroupSchema = object({
8611
8611
  /** Unix ms when the group was composed server-side. */
8612
8612
  fetchedAt: number()
8613
8613
  });
8614
+ /**
8615
+ * What the gate decided about a birth, from the CALLER's point of view.
8616
+ *
8617
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
8618
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
8619
+ * The third member is the one the gate's own type cannot express, because
8620
+ * exhaustion is a property of how long the caller waited.
8621
+ */
8622
+ var BirthDecisionVerdictSchema = _enum([
8623
+ "confirmed",
8624
+ "suppressed",
8625
+ "exhausted-fallback"
8626
+ ]);
8627
+ /** One birth decision, as it is kept. */
8628
+ var BirthDecisionRecordSchema = object({
8629
+ id: string(),
8630
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
8631
+ at: number().int(),
8632
+ /** The camera. Required: every question here is asked per-camera. */
8633
+ deviceId: number().int(),
8634
+ /**
8635
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
8636
+ * birth has no track at all, and a confirmed one is expected to age out long
8637
+ * before this row does. Named `sourceTrackId` so the retention model's
8638
+ * ownership derivation (`collection-classification.ts`, which keys on a
8639
+ * column literally called `trackId`) cannot reach it.
8640
+ */
8641
+ sourceTrackId: string(),
8642
+ /** The candidate's claimed class. The miss rate is asked per class too. */
8643
+ className: string(),
8644
+ verdict: BirthDecisionVerdictSchema,
8645
+ /**
8646
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
8647
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
8648
+ * when the gate is DISABLED and every birth is waved through. `null` is not
8649
+ * "unknown": it says the gate took no measurement because it was off, which
8650
+ * is a different population and must never be averaged in with the rest.
8651
+ */
8652
+ reason: string().nullable(),
8653
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
8654
+ attempts: number().int(),
8655
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
8656
+ deferredForMs: number().int(),
8657
+ /**
8658
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
8659
+ *
8660
+ * `true` when the frame the verdict was taken on carried no matched
8661
+ * detection for this track — the tracker was coasting a frozen box and the
8662
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
8663
+ * straight out of `result.tracked` without checking, so this is reachable
8664
+ * today; the question is the RATE, per camera, and whether refusing those
8665
+ * frames would have cost real tracks (cross-read against `verdict` and
8666
+ * `decidedByBirthEvidence`).
8667
+ */
8668
+ decidedOnCoastedFrame: boolean(),
8669
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
8670
+ birthEvidenceAvailable: boolean(),
8671
+ /**
8672
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
8673
+ * deciding are different: the carried crop is confirm-only, so a candidate
8674
+ * can hold evidence, be found inconclusive on it, and be decided by a native
8675
+ * crop of a later instant. A coasted decision backed by carried evidence is
8676
+ * a real observation of the birth instant; one without it is not.
8677
+ */
8678
+ decidedByBirthEvidence: boolean(),
8679
+ /** Best class-compatible crop score, or `null` when nothing compatible was
8680
+ * found — deliberately not 0, which would be a measurement that never was. */
8681
+ bestScore: number().nullable(),
8682
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
8683
+ appliedMinConfidence: number().nullable(),
8684
+ /**
8685
+ * The track's own `firstSeen` — the candidate's first frame, which is where
8686
+ * the timeline starts. `null` for a suppressed birth, which has no track.
8687
+ */
8688
+ firstSeen: number().int().nullable(),
8689
+ /**
8690
+ * The device's most recent motion RISING EDGE at the moment of the decision,
8691
+ * or `null` when there is none, it is older than
8692
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
8693
+ */
8694
+ motionOnsetAt: number().int().nullable(),
8695
+ /**
8696
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
8697
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
8698
+ *
8699
+ * **Why motion onset and not something else.** Two other proxies were
8700
+ * considered and rejected:
8701
+ * - *the recording/pipeline session start*: for a camera on
8702
+ * `detectionMode: 'always'` the session opens at process start, hours
8703
+ * before any subject. It measures nothing.
8704
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
8705
+ * `firstSeen` IS the first detection of that object, so for the track that
8706
+ * OPENS a burst — the only one the operator is complaining about — the two
8707
+ * are the same instant and the latency is 0 by construction.
8708
+ * Motion onset is the only in-process signal produced by a DIFFERENT
8709
+ * mechanism from the object detector, so it is the only one that can precede
8710
+ * it. It is also already maintained per-device at frame rate on this very
8711
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
8712
+ * it free — and, decisively, the frame path and the motion path are gated to
8713
+ * the SAME designated post-processing node, so the mirror is never empty for
8714
+ * a camera whose births land here.
8715
+ *
8716
+ * **Error bars, all of them.**
8717
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
8718
+ * wall or a branch, and only later joined by the person, OVERSTATES the
8719
+ * latency without bound. Mitigated, never removed, by
8720
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
8721
+ * candidate for "this burst is this subject", and even then it is a
8722
+ * candidate, not a fact.
8723
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
8724
+ * intensity threshold. A subject entering slowly at the far edge of the
8725
+ * frame can clear the detector's confidence floor BEFORE it clears the
8726
+ * motion floor, making this negative. Negatives are stored as-is and
8727
+ * never clamped — clamping would fabricate the distribution's left tail,
8728
+ * which is the half that says the proxy is unreliable.
8729
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
8730
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
8731
+ * therefore comparable WITHIN a camera and not across cameras of
8732
+ * different motion sources. The motion source is deliberately not copied
8733
+ * here — it belongs to the addon that owns the device (D224) and this is
8734
+ * a write on the frame path — so group by `deviceId`, which is how the
8735
+ * question is always asked anyway.
8736
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
8737
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
8738
+ * past it this is `null`.
8739
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
8740
+ * reporting, or nothing since boot: `null`. Which is the truth about a
8741
+ * camera nobody has a reference instant for.
8742
+ *
8743
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
8744
+ * as such. It is not a per-track fact and must never be shown as one.
8745
+ */
8746
+ birthLatencyMs: number().int().nullable(),
8747
+ /**
8748
+ * How many births this device has already decided since that motion onset.
8749
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
8750
+ * this subject. `null` when there is no usable onset.
8751
+ */
8752
+ birthIndexInBurst: number().int().nullable()
8753
+ });
8754
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
8755
+ var BirthDecisionQueryInputSchema = object({
8756
+ /** Restrict to a single camera; omit for every row. */
8757
+ deviceId: number().int().optional(),
8758
+ /** Only decisions at or after this epoch ms. */
8759
+ since: number().int().optional(),
8760
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
8761
+ verdict: BirthDecisionVerdictSchema.optional(),
8762
+ /** Max rows returned, newest-first. */
8763
+ limit: number().int().min(1).max(5e3).optional()
8764
+ });
8614
8765
  /** One archived note — the operator's words plus enough context to find what
8615
8766
  * they were looking at, after the track itself is gone. */
8616
8767
  var ArchivedDebugNoteSchema = object({
@@ -21103,7 +21254,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21103
21254
  deviceId: number(),
21104
21255
  trackId: string(),
21105
21256
  flags: TrackFlagsPatchSchema
21106
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
21257
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
21107
21258
  kind: "query",
21108
21259
  auth: "admin"
21109
21260
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -21545,6 +21696,22 @@ var occupancyRecheckFramesField = {
21545
21696
  step: 1
21546
21697
  };
21547
21698
  /**
21699
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
21700
+ *
21701
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
21702
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
21703
+ * fleet measures — one-shot, and only ever taken while a permit would still be
21704
+ * spare for live. `0` turns the burst off entirely (the history is still
21705
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
21706
+ * discarded — the pre-D411 behaviour).
21707
+ */
21708
+ var preRollInferenceFramesField = {
21709
+ min: 0,
21710
+ max: 30,
21711
+ default: 12,
21712
+ step: 1
21713
+ };
21714
+ /**
21548
21715
  * Source enum for motion signals fed to the runner. Extensible — add
21549
21716
  * new variants here when new motion-trigger paths are wired in
21550
21717
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -21785,6 +21952,31 @@ var RunnerCameraConfigSchema = object({
21785
21952
  * to every occupancy rule until something moved in front of it. The churn is
21786
21953
  * now paid on the interval instead — see `occupancyRecheckSecField`.
21787
21954
  */
21955
+ /**
21956
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21957
+ * at session open — instead of decoding it and throwing it away.
21958
+ *
21959
+ * DEFAULT `true`, and the default is the argument. This is not a new
21960
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21961
+ * already served, already decoded and already paid for on every on-motion
21962
+ * detection session that asks for history. What shipped was a last-moment
21963
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21964
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21965
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21966
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21967
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21968
+ * was decoded, and was freed.
21969
+ *
21970
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21971
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21972
+ * late. What makes ON safe is not a switch but the BOUND —
21973
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21974
+ * the last inference permit — so the switch exists for the camera where the
21975
+ * history is worthless (a doorbell whose subject is always already at the
21976
+ * door), not as a hedge against the feature.
21977
+ */
21978
+ preRollInferenceEnabled: boolean().default(true),
21979
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
21788
21980
  occupancyRecheckEnabled: boolean().default(true),
21789
21981
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
21790
21982
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -21813,7 +22005,7 @@ var RunnerCameraConfigSchema = object({
21813
22005
  */
21814
22006
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
21815
22007
  });
21816
- 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;
22008
+ 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;
21817
22009
  /**
21818
22010
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
21819
22011
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -38503,6 +38695,12 @@ Object.freeze({
38503
38695
  addonId: null,
38504
38696
  access: "view"
38505
38697
  },
38698
+ "pipelineAnalytics.listBirthDecisions": {
38699
+ capName: "pipeline-analytics",
38700
+ capScope: "device",
38701
+ addonId: null,
38702
+ access: "view"
38703
+ },
38506
38704
  "pipelineAnalytics.listEventKinds": {
38507
38705
  capName: "pipeline-analytics",
38508
38706
  capScope: "device",
@@ -42295,6 +42493,11 @@ Object.freeze({
42295
42493
  form: "single",
42296
42494
  optional: true
42297
42495
  }],
42496
+ "pipelineAnalytics.listBirthDecisions": [{
42497
+ name: "deviceId",
42498
+ form: "single",
42499
+ optional: true
42500
+ }],
42298
42501
  "pipelineAnalytics.listEventKinds": [{
42299
42502
  name: "deviceId",
42300
42503
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rademacher",
3
- "version": "0.2.86",
3
+ "version": "0.2.88",
4
4
  "description": "Rademacher HomePilot device-provider addon for CamStack — wraps the @apocaliss92/noderademacher local-hub client (roller shutters over the cover cap)",
5
5
  "keywords": [
6
6
  "camstack",