@camstack/addon-provider-rtsp 1.2.87 → 1.2.89

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
@@ -7651,6 +7651,157 @@ var CameraSwitchGroupSchema = object({
7651
7651
  /** Unix ms when the group was composed server-side. */
7652
7652
  fetchedAt: number()
7653
7653
  });
7654
+ /**
7655
+ * What the gate decided about a birth, from the CALLER's point of view.
7656
+ *
7657
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7658
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7659
+ * The third member is the one the gate's own type cannot express, because
7660
+ * exhaustion is a property of how long the caller waited.
7661
+ */
7662
+ var BirthDecisionVerdictSchema = _enum([
7663
+ "confirmed",
7664
+ "suppressed",
7665
+ "exhausted-fallback"
7666
+ ]);
7667
+ /** One birth decision, as it is kept. */
7668
+ var BirthDecisionRecordSchema = object({
7669
+ id: string(),
7670
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7671
+ at: number().int(),
7672
+ /** The camera. Required: every question here is asked per-camera. */
7673
+ deviceId: number().int(),
7674
+ /**
7675
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7676
+ * birth has no track at all, and a confirmed one is expected to age out long
7677
+ * before this row does. Named `sourceTrackId` so the retention model's
7678
+ * ownership derivation (`collection-classification.ts`, which keys on a
7679
+ * column literally called `trackId`) cannot reach it.
7680
+ */
7681
+ sourceTrackId: string(),
7682
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7683
+ className: string(),
7684
+ verdict: BirthDecisionVerdictSchema,
7685
+ /**
7686
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7687
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7688
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7689
+ * "unknown": it says the gate took no measurement because it was off, which
7690
+ * is a different population and must never be averaged in with the rest.
7691
+ */
7692
+ reason: string().nullable(),
7693
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7694
+ attempts: number().int(),
7695
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7696
+ deferredForMs: number().int(),
7697
+ /**
7698
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7699
+ *
7700
+ * `true` when the frame the verdict was taken on carried no matched
7701
+ * detection for this track — the tracker was coasting a frozen box and the
7702
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7703
+ * straight out of `result.tracked` without checking, so this is reachable
7704
+ * today; the question is the RATE, per camera, and whether refusing those
7705
+ * frames would have cost real tracks (cross-read against `verdict` and
7706
+ * `decidedByBirthEvidence`).
7707
+ */
7708
+ decidedOnCoastedFrame: boolean(),
7709
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7710
+ birthEvidenceAvailable: boolean(),
7711
+ /**
7712
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7713
+ * deciding are different: the carried crop is confirm-only, so a candidate
7714
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7715
+ * crop of a later instant. A coasted decision backed by carried evidence is
7716
+ * a real observation of the birth instant; one without it is not.
7717
+ */
7718
+ decidedByBirthEvidence: boolean(),
7719
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7720
+ * found — deliberately not 0, which would be a measurement that never was. */
7721
+ bestScore: number().nullable(),
7722
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7723
+ appliedMinConfidence: number().nullable(),
7724
+ /**
7725
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7726
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7727
+ */
7728
+ firstSeen: number().int().nullable(),
7729
+ /**
7730
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7731
+ * or `null` when there is none, it is older than
7732
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7733
+ */
7734
+ motionOnsetAt: number().int().nullable(),
7735
+ /**
7736
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7737
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7738
+ *
7739
+ * **Why motion onset and not something else.** Two other proxies were
7740
+ * considered and rejected:
7741
+ * - *the recording/pipeline session start*: for a camera on
7742
+ * `detectionMode: 'always'` the session opens at process start, hours
7743
+ * before any subject. It measures nothing.
7744
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7745
+ * `firstSeen` IS the first detection of that object, so for the track that
7746
+ * OPENS a burst — the only one the operator is complaining about — the two
7747
+ * are the same instant and the latency is 0 by construction.
7748
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7749
+ * mechanism from the object detector, so it is the only one that can precede
7750
+ * it. It is also already maintained per-device at frame rate on this very
7751
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7752
+ * it free — and, decisively, the frame path and the motion path are gated to
7753
+ * the SAME designated post-processing node, so the mirror is never empty for
7754
+ * a camera whose births land here.
7755
+ *
7756
+ * **Error bars, all of them.**
7757
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7758
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7759
+ * latency without bound. Mitigated, never removed, by
7760
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7761
+ * candidate for "this burst is this subject", and even then it is a
7762
+ * candidate, not a fact.
7763
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7764
+ * intensity threshold. A subject entering slowly at the far edge of the
7765
+ * frame can clear the detector's confidence floor BEFORE it clears the
7766
+ * motion floor, making this negative. Negatives are stored as-is and
7767
+ * never clamped — clamping would fabricate the distribution's left tail,
7768
+ * which is the half that says the proxy is unreliable.
7769
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7770
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7771
+ * therefore comparable WITHIN a camera and not across cameras of
7772
+ * different motion sources. The motion source is deliberately not copied
7773
+ * here — it belongs to the addon that owns the device (D224) and this is
7774
+ * a write on the frame path — so group by `deviceId`, which is how the
7775
+ * question is always asked anyway.
7776
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7777
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7778
+ * past it this is `null`.
7779
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7780
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7781
+ * camera nobody has a reference instant for.
7782
+ *
7783
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7784
+ * as such. It is not a per-track fact and must never be shown as one.
7785
+ */
7786
+ birthLatencyMs: number().int().nullable(),
7787
+ /**
7788
+ * How many births this device has already decided since that motion onset.
7789
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7790
+ * this subject. `null` when there is no usable onset.
7791
+ */
7792
+ birthIndexInBurst: number().int().nullable()
7793
+ });
7794
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7795
+ var BirthDecisionQueryInputSchema = object({
7796
+ /** Restrict to a single camera; omit for every row. */
7797
+ deviceId: number().int().optional(),
7798
+ /** Only decisions at or after this epoch ms. */
7799
+ since: number().int().optional(),
7800
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7801
+ verdict: BirthDecisionVerdictSchema.optional(),
7802
+ /** Max rows returned, newest-first. */
7803
+ limit: number().int().min(1).max(5e3).optional()
7804
+ });
7654
7805
  /** One archived note — the operator's words plus enough context to find what
7655
7806
  * they were looking at, after the track itself is gone. */
7656
7807
  var ArchivedDebugNoteSchema = object({
@@ -20175,7 +20326,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20175
20326
  deviceId: number(),
20176
20327
  trackId: string(),
20177
20328
  flags: TrackFlagsPatchSchema
20178
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20329
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20179
20330
  kind: "query",
20180
20331
  auth: "admin"
20181
20332
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20617,6 +20768,22 @@ var occupancyRecheckFramesField = {
20617
20768
  step: 1
20618
20769
  };
20619
20770
  /**
20771
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20772
+ *
20773
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20774
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20775
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20776
+ * spare for live. `0` turns the burst off entirely (the history is still
20777
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20778
+ * discarded — the pre-D411 behaviour).
20779
+ */
20780
+ var preRollInferenceFramesField = {
20781
+ min: 0,
20782
+ max: 30,
20783
+ default: 12,
20784
+ step: 1
20785
+ };
20786
+ /**
20620
20787
  * Source enum for motion signals fed to the runner. Extensible — add
20621
20788
  * new variants here when new motion-trigger paths are wired in
20622
20789
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20857,6 +21024,31 @@ var RunnerCameraConfigSchema = object({
20857
21024
  * to every occupancy rule until something moved in front of it. The churn is
20858
21025
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20859
21026
  */
21027
+ /**
21028
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21029
+ * at session open — instead of decoding it and throwing it away.
21030
+ *
21031
+ * DEFAULT `true`, and the default is the argument. This is not a new
21032
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21033
+ * already served, already decoded and already paid for on every on-motion
21034
+ * detection session that asks for history. What shipped was a last-moment
21035
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21036
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21037
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21038
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21039
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21040
+ * was decoded, and was freed.
21041
+ *
21042
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21043
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21044
+ * late. What makes ON safe is not a switch but the BOUND —
21045
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21046
+ * the last inference permit — so the switch exists for the camera where the
21047
+ * history is worthless (a doorbell whose subject is always already at the
21048
+ * door), not as a hedge against the feature.
21049
+ */
21050
+ preRollInferenceEnabled: boolean().default(true),
21051
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20860
21052
  occupancyRecheckEnabled: boolean().default(true),
20861
21053
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20862
21054
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20885,7 +21077,7 @@ var RunnerCameraConfigSchema = object({
20885
21077
  */
20886
21078
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20887
21079
  });
20888
- 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;
21080
+ 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;
20889
21081
  /**
20890
21082
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20891
21083
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37753,6 +37945,12 @@ Object.freeze({
37753
37945
  addonId: null,
37754
37946
  access: "view"
37755
37947
  },
37948
+ "pipelineAnalytics.listBirthDecisions": {
37949
+ capName: "pipeline-analytics",
37950
+ capScope: "device",
37951
+ addonId: null,
37952
+ access: "view"
37953
+ },
37756
37954
  "pipelineAnalytics.listEventKinds": {
37757
37955
  capName: "pipeline-analytics",
37758
37956
  capScope: "device",
@@ -41545,6 +41743,11 @@ Object.freeze({
41545
41743
  form: "single",
41546
41744
  optional: true
41547
41745
  }],
41746
+ "pipelineAnalytics.listBirthDecisions": [{
41747
+ name: "deviceId",
41748
+ form: "single",
41749
+ optional: true
41750
+ }],
41548
41751
  "pipelineAnalytics.listEventKinds": [{
41549
41752
  name: "deviceId",
41550
41753
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7627,6 +7627,157 @@ var CameraSwitchGroupSchema = object({
7627
7627
  /** Unix ms when the group was composed server-side. */
7628
7628
  fetchedAt: number()
7629
7629
  });
7630
+ /**
7631
+ * What the gate decided about a birth, from the CALLER's point of view.
7632
+ *
7633
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7634
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7635
+ * The third member is the one the gate's own type cannot express, because
7636
+ * exhaustion is a property of how long the caller waited.
7637
+ */
7638
+ var BirthDecisionVerdictSchema = _enum([
7639
+ "confirmed",
7640
+ "suppressed",
7641
+ "exhausted-fallback"
7642
+ ]);
7643
+ /** One birth decision, as it is kept. */
7644
+ var BirthDecisionRecordSchema = object({
7645
+ id: string(),
7646
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7647
+ at: number().int(),
7648
+ /** The camera. Required: every question here is asked per-camera. */
7649
+ deviceId: number().int(),
7650
+ /**
7651
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7652
+ * birth has no track at all, and a confirmed one is expected to age out long
7653
+ * before this row does. Named `sourceTrackId` so the retention model's
7654
+ * ownership derivation (`collection-classification.ts`, which keys on a
7655
+ * column literally called `trackId`) cannot reach it.
7656
+ */
7657
+ sourceTrackId: string(),
7658
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7659
+ className: string(),
7660
+ verdict: BirthDecisionVerdictSchema,
7661
+ /**
7662
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7663
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7664
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7665
+ * "unknown": it says the gate took no measurement because it was off, which
7666
+ * is a different population and must never be averaged in with the rest.
7667
+ */
7668
+ reason: string().nullable(),
7669
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7670
+ attempts: number().int(),
7671
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7672
+ deferredForMs: number().int(),
7673
+ /**
7674
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7675
+ *
7676
+ * `true` when the frame the verdict was taken on carried no matched
7677
+ * detection for this track — the tracker was coasting a frozen box and the
7678
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7679
+ * straight out of `result.tracked` without checking, so this is reachable
7680
+ * today; the question is the RATE, per camera, and whether refusing those
7681
+ * frames would have cost real tracks (cross-read against `verdict` and
7682
+ * `decidedByBirthEvidence`).
7683
+ */
7684
+ decidedOnCoastedFrame: boolean(),
7685
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7686
+ birthEvidenceAvailable: boolean(),
7687
+ /**
7688
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7689
+ * deciding are different: the carried crop is confirm-only, so a candidate
7690
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7691
+ * crop of a later instant. A coasted decision backed by carried evidence is
7692
+ * a real observation of the birth instant; one without it is not.
7693
+ */
7694
+ decidedByBirthEvidence: boolean(),
7695
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7696
+ * found — deliberately not 0, which would be a measurement that never was. */
7697
+ bestScore: number().nullable(),
7698
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7699
+ appliedMinConfidence: number().nullable(),
7700
+ /**
7701
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7702
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7703
+ */
7704
+ firstSeen: number().int().nullable(),
7705
+ /**
7706
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7707
+ * or `null` when there is none, it is older than
7708
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7709
+ */
7710
+ motionOnsetAt: number().int().nullable(),
7711
+ /**
7712
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7713
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7714
+ *
7715
+ * **Why motion onset and not something else.** Two other proxies were
7716
+ * considered and rejected:
7717
+ * - *the recording/pipeline session start*: for a camera on
7718
+ * `detectionMode: 'always'` the session opens at process start, hours
7719
+ * before any subject. It measures nothing.
7720
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7721
+ * `firstSeen` IS the first detection of that object, so for the track that
7722
+ * OPENS a burst — the only one the operator is complaining about — the two
7723
+ * are the same instant and the latency is 0 by construction.
7724
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7725
+ * mechanism from the object detector, so it is the only one that can precede
7726
+ * it. It is also already maintained per-device at frame rate on this very
7727
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7728
+ * it free — and, decisively, the frame path and the motion path are gated to
7729
+ * the SAME designated post-processing node, so the mirror is never empty for
7730
+ * a camera whose births land here.
7731
+ *
7732
+ * **Error bars, all of them.**
7733
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7734
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7735
+ * latency without bound. Mitigated, never removed, by
7736
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7737
+ * candidate for "this burst is this subject", and even then it is a
7738
+ * candidate, not a fact.
7739
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7740
+ * intensity threshold. A subject entering slowly at the far edge of the
7741
+ * frame can clear the detector's confidence floor BEFORE it clears the
7742
+ * motion floor, making this negative. Negatives are stored as-is and
7743
+ * never clamped — clamping would fabricate the distribution's left tail,
7744
+ * which is the half that says the proxy is unreliable.
7745
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7746
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7747
+ * therefore comparable WITHIN a camera and not across cameras of
7748
+ * different motion sources. The motion source is deliberately not copied
7749
+ * here — it belongs to the addon that owns the device (D224) and this is
7750
+ * a write on the frame path — so group by `deviceId`, which is how the
7751
+ * question is always asked anyway.
7752
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7753
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7754
+ * past it this is `null`.
7755
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7756
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7757
+ * camera nobody has a reference instant for.
7758
+ *
7759
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7760
+ * as such. It is not a per-track fact and must never be shown as one.
7761
+ */
7762
+ birthLatencyMs: number().int().nullable(),
7763
+ /**
7764
+ * How many births this device has already decided since that motion onset.
7765
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7766
+ * this subject. `null` when there is no usable onset.
7767
+ */
7768
+ birthIndexInBurst: number().int().nullable()
7769
+ });
7770
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7771
+ var BirthDecisionQueryInputSchema = object({
7772
+ /** Restrict to a single camera; omit for every row. */
7773
+ deviceId: number().int().optional(),
7774
+ /** Only decisions at or after this epoch ms. */
7775
+ since: number().int().optional(),
7776
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7777
+ verdict: BirthDecisionVerdictSchema.optional(),
7778
+ /** Max rows returned, newest-first. */
7779
+ limit: number().int().min(1).max(5e3).optional()
7780
+ });
7630
7781
  /** One archived note — the operator's words plus enough context to find what
7631
7782
  * they were looking at, after the track itself is gone. */
7632
7783
  var ArchivedDebugNoteSchema = object({
@@ -20151,7 +20302,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20151
20302
  deviceId: number(),
20152
20303
  trackId: string(),
20153
20304
  flags: TrackFlagsPatchSchema
20154
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20305
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20155
20306
  kind: "query",
20156
20307
  auth: "admin"
20157
20308
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20593,6 +20744,22 @@ var occupancyRecheckFramesField = {
20593
20744
  step: 1
20594
20745
  };
20595
20746
  /**
20747
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20748
+ *
20749
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20750
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20751
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20752
+ * spare for live. `0` turns the burst off entirely (the history is still
20753
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20754
+ * discarded — the pre-D411 behaviour).
20755
+ */
20756
+ var preRollInferenceFramesField = {
20757
+ min: 0,
20758
+ max: 30,
20759
+ default: 12,
20760
+ step: 1
20761
+ };
20762
+ /**
20596
20763
  * Source enum for motion signals fed to the runner. Extensible — add
20597
20764
  * new variants here when new motion-trigger paths are wired in
20598
20765
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20833,6 +21000,31 @@ var RunnerCameraConfigSchema = object({
20833
21000
  * to every occupancy rule until something moved in front of it. The churn is
20834
21001
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20835
21002
  */
21003
+ /**
21004
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21005
+ * at session open — instead of decoding it and throwing it away.
21006
+ *
21007
+ * DEFAULT `true`, and the default is the argument. This is not a new
21008
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21009
+ * already served, already decoded and already paid for on every on-motion
21010
+ * detection session that asks for history. What shipped was a last-moment
21011
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21012
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21013
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21014
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21015
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21016
+ * was decoded, and was freed.
21017
+ *
21018
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21019
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21020
+ * late. What makes ON safe is not a switch but the BOUND —
21021
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21022
+ * the last inference permit — so the switch exists for the camera where the
21023
+ * history is worthless (a doorbell whose subject is always already at the
21024
+ * door), not as a hedge against the feature.
21025
+ */
21026
+ preRollInferenceEnabled: boolean().default(true),
21027
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20836
21028
  occupancyRecheckEnabled: boolean().default(true),
20837
21029
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20838
21030
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20861,7 +21053,7 @@ var RunnerCameraConfigSchema = object({
20861
21053
  */
20862
21054
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20863
21055
  });
20864
- 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;
21056
+ 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;
20865
21057
  /**
20866
21058
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20867
21059
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37729,6 +37921,12 @@ Object.freeze({
37729
37921
  addonId: null,
37730
37922
  access: "view"
37731
37923
  },
37924
+ "pipelineAnalytics.listBirthDecisions": {
37925
+ capName: "pipeline-analytics",
37926
+ capScope: "device",
37927
+ addonId: null,
37928
+ access: "view"
37929
+ },
37732
37930
  "pipelineAnalytics.listEventKinds": {
37733
37931
  capName: "pipeline-analytics",
37734
37932
  capScope: "device",
@@ -41521,6 +41719,11 @@ Object.freeze({
41521
41719
  form: "single",
41522
41720
  optional: true
41523
41721
  }],
41722
+ "pipelineAnalytics.listBirthDecisions": [{
41723
+ name: "deviceId",
41724
+ form: "single",
41725
+ optional: true
41726
+ }],
41524
41727
  "pipelineAnalytics.listEventKinds": [{
41525
41728
  name: "deviceId",
41526
41729
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.2.87",
3
+ "version": "1.2.89",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",