@camstack/addon-provider-dreo 0.2.87 → 0.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
@@ -7663,6 +7663,157 @@ var CameraSwitchGroupSchema = object({
7663
7663
  /** Unix ms when the group was composed server-side. */
7664
7664
  fetchedAt: number()
7665
7665
  });
7666
+ /**
7667
+ * What the gate decided about a birth, from the CALLER's point of view.
7668
+ *
7669
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7670
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7671
+ * The third member is the one the gate's own type cannot express, because
7672
+ * exhaustion is a property of how long the caller waited.
7673
+ */
7674
+ var BirthDecisionVerdictSchema = _enum([
7675
+ "confirmed",
7676
+ "suppressed",
7677
+ "exhausted-fallback"
7678
+ ]);
7679
+ /** One birth decision, as it is kept. */
7680
+ var BirthDecisionRecordSchema = object({
7681
+ id: string(),
7682
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7683
+ at: number().int(),
7684
+ /** The camera. Required: every question here is asked per-camera. */
7685
+ deviceId: number().int(),
7686
+ /**
7687
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7688
+ * birth has no track at all, and a confirmed one is expected to age out long
7689
+ * before this row does. Named `sourceTrackId` so the retention model's
7690
+ * ownership derivation (`collection-classification.ts`, which keys on a
7691
+ * column literally called `trackId`) cannot reach it.
7692
+ */
7693
+ sourceTrackId: string(),
7694
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7695
+ className: string(),
7696
+ verdict: BirthDecisionVerdictSchema,
7697
+ /**
7698
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7699
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7700
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7701
+ * "unknown": it says the gate took no measurement because it was off, which
7702
+ * is a different population and must never be averaged in with the rest.
7703
+ */
7704
+ reason: string().nullable(),
7705
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7706
+ attempts: number().int(),
7707
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7708
+ deferredForMs: number().int(),
7709
+ /**
7710
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7711
+ *
7712
+ * `true` when the frame the verdict was taken on carried no matched
7713
+ * detection for this track — the tracker was coasting a frozen box and the
7714
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7715
+ * straight out of `result.tracked` without checking, so this is reachable
7716
+ * today; the question is the RATE, per camera, and whether refusing those
7717
+ * frames would have cost real tracks (cross-read against `verdict` and
7718
+ * `decidedByBirthEvidence`).
7719
+ */
7720
+ decidedOnCoastedFrame: boolean(),
7721
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7722
+ birthEvidenceAvailable: boolean(),
7723
+ /**
7724
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7725
+ * deciding are different: the carried crop is confirm-only, so a candidate
7726
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7727
+ * crop of a later instant. A coasted decision backed by carried evidence is
7728
+ * a real observation of the birth instant; one without it is not.
7729
+ */
7730
+ decidedByBirthEvidence: boolean(),
7731
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7732
+ * found — deliberately not 0, which would be a measurement that never was. */
7733
+ bestScore: number().nullable(),
7734
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7735
+ appliedMinConfidence: number().nullable(),
7736
+ /**
7737
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7738
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7739
+ */
7740
+ firstSeen: number().int().nullable(),
7741
+ /**
7742
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7743
+ * or `null` when there is none, it is older than
7744
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7745
+ */
7746
+ motionOnsetAt: number().int().nullable(),
7747
+ /**
7748
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7749
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7750
+ *
7751
+ * **Why motion onset and not something else.** Two other proxies were
7752
+ * considered and rejected:
7753
+ * - *the recording/pipeline session start*: for a camera on
7754
+ * `detectionMode: 'always'` the session opens at process start, hours
7755
+ * before any subject. It measures nothing.
7756
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7757
+ * `firstSeen` IS the first detection of that object, so for the track that
7758
+ * OPENS a burst — the only one the operator is complaining about — the two
7759
+ * are the same instant and the latency is 0 by construction.
7760
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7761
+ * mechanism from the object detector, so it is the only one that can precede
7762
+ * it. It is also already maintained per-device at frame rate on this very
7763
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7764
+ * it free — and, decisively, the frame path and the motion path are gated to
7765
+ * the SAME designated post-processing node, so the mirror is never empty for
7766
+ * a camera whose births land here.
7767
+ *
7768
+ * **Error bars, all of them.**
7769
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7770
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7771
+ * latency without bound. Mitigated, never removed, by
7772
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7773
+ * candidate for "this burst is this subject", and even then it is a
7774
+ * candidate, not a fact.
7775
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7776
+ * intensity threshold. A subject entering slowly at the far edge of the
7777
+ * frame can clear the detector's confidence floor BEFORE it clears the
7778
+ * motion floor, making this negative. Negatives are stored as-is and
7779
+ * never clamped — clamping would fabricate the distribution's left tail,
7780
+ * which is the half that says the proxy is unreliable.
7781
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7782
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7783
+ * therefore comparable WITHIN a camera and not across cameras of
7784
+ * different motion sources. The motion source is deliberately not copied
7785
+ * here — it belongs to the addon that owns the device (D224) and this is
7786
+ * a write on the frame path — so group by `deviceId`, which is how the
7787
+ * question is always asked anyway.
7788
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7789
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7790
+ * past it this is `null`.
7791
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7792
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7793
+ * camera nobody has a reference instant for.
7794
+ *
7795
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7796
+ * as such. It is not a per-track fact and must never be shown as one.
7797
+ */
7798
+ birthLatencyMs: number().int().nullable(),
7799
+ /**
7800
+ * How many births this device has already decided since that motion onset.
7801
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7802
+ * this subject. `null` when there is no usable onset.
7803
+ */
7804
+ birthIndexInBurst: number().int().nullable()
7805
+ });
7806
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7807
+ var BirthDecisionQueryInputSchema = object({
7808
+ /** Restrict to a single camera; omit for every row. */
7809
+ deviceId: number().int().optional(),
7810
+ /** Only decisions at or after this epoch ms. */
7811
+ since: number().int().optional(),
7812
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7813
+ verdict: BirthDecisionVerdictSchema.optional(),
7814
+ /** Max rows returned, newest-first. */
7815
+ limit: number().int().min(1).max(5e3).optional()
7816
+ });
7666
7817
  /** One archived note — the operator's words plus enough context to find what
7667
7818
  * they were looking at, after the track itself is gone. */
7668
7819
  var ArchivedDebugNoteSchema = object({
@@ -20172,7 +20323,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20172
20323
  deviceId: number(),
20173
20324
  trackId: string(),
20174
20325
  flags: TrackFlagsPatchSchema
20175
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20326
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20176
20327
  kind: "query",
20177
20328
  auth: "admin"
20178
20329
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20614,6 +20765,22 @@ var occupancyRecheckFramesField = {
20614
20765
  step: 1
20615
20766
  };
20616
20767
  /**
20768
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20769
+ *
20770
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20771
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20772
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20773
+ * spare for live. `0` turns the burst off entirely (the history is still
20774
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20775
+ * discarded — the pre-D411 behaviour).
20776
+ */
20777
+ var preRollInferenceFramesField = {
20778
+ min: 0,
20779
+ max: 30,
20780
+ default: 12,
20781
+ step: 1
20782
+ };
20783
+ /**
20617
20784
  * Source enum for motion signals fed to the runner. Extensible — add
20618
20785
  * new variants here when new motion-trigger paths are wired in
20619
20786
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20854,6 +21021,31 @@ var RunnerCameraConfigSchema = object({
20854
21021
  * to every occupancy rule until something moved in front of it. The churn is
20855
21022
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20856
21023
  */
21024
+ /**
21025
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21026
+ * at session open — instead of decoding it and throwing it away.
21027
+ *
21028
+ * DEFAULT `true`, and the default is the argument. This is not a new
21029
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21030
+ * already served, already decoded and already paid for on every on-motion
21031
+ * detection session that asks for history. What shipped was a last-moment
21032
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21033
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21034
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21035
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21036
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21037
+ * was decoded, and was freed.
21038
+ *
21039
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21040
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21041
+ * late. What makes ON safe is not a switch but the BOUND —
21042
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21043
+ * the last inference permit — so the switch exists for the camera where the
21044
+ * history is worthless (a doorbell whose subject is always already at the
21045
+ * door), not as a hedge against the feature.
21046
+ */
21047
+ preRollInferenceEnabled: boolean().default(true),
21048
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20857
21049
  occupancyRecheckEnabled: boolean().default(true),
20858
21050
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20859
21051
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20882,7 +21074,7 @@ var RunnerCameraConfigSchema = object({
20882
21074
  */
20883
21075
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20884
21076
  });
20885
- 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;
21077
+ 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;
20886
21078
  /**
20887
21079
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20888
21080
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37580,6 +37772,12 @@ Object.freeze({
37580
37772
  addonId: null,
37581
37773
  access: "view"
37582
37774
  },
37775
+ "pipelineAnalytics.listBirthDecisions": {
37776
+ capName: "pipeline-analytics",
37777
+ capScope: "device",
37778
+ addonId: null,
37779
+ access: "view"
37780
+ },
37583
37781
  "pipelineAnalytics.listEventKinds": {
37584
37782
  capName: "pipeline-analytics",
37585
37783
  capScope: "device",
@@ -41372,6 +41570,11 @@ Object.freeze({
41372
41570
  form: "single",
41373
41571
  optional: true
41374
41572
  }],
41573
+ "pipelineAnalytics.listBirthDecisions": [{
41574
+ name: "deviceId",
41575
+ form: "single",
41576
+ optional: true
41577
+ }],
41375
41578
  "pipelineAnalytics.listEventKinds": [{
41376
41579
  name: "deviceId",
41377
41580
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7664,6 +7664,157 @@ var CameraSwitchGroupSchema = object({
7664
7664
  /** Unix ms when the group was composed server-side. */
7665
7665
  fetchedAt: number()
7666
7666
  });
7667
+ /**
7668
+ * What the gate decided about a birth, from the CALLER's point of view.
7669
+ *
7670
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7671
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7672
+ * The third member is the one the gate's own type cannot express, because
7673
+ * exhaustion is a property of how long the caller waited.
7674
+ */
7675
+ var BirthDecisionVerdictSchema = _enum([
7676
+ "confirmed",
7677
+ "suppressed",
7678
+ "exhausted-fallback"
7679
+ ]);
7680
+ /** One birth decision, as it is kept. */
7681
+ var BirthDecisionRecordSchema = object({
7682
+ id: string(),
7683
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7684
+ at: number().int(),
7685
+ /** The camera. Required: every question here is asked per-camera. */
7686
+ deviceId: number().int(),
7687
+ /**
7688
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7689
+ * birth has no track at all, and a confirmed one is expected to age out long
7690
+ * before this row does. Named `sourceTrackId` so the retention model's
7691
+ * ownership derivation (`collection-classification.ts`, which keys on a
7692
+ * column literally called `trackId`) cannot reach it.
7693
+ */
7694
+ sourceTrackId: string(),
7695
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7696
+ className: string(),
7697
+ verdict: BirthDecisionVerdictSchema,
7698
+ /**
7699
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7700
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7701
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7702
+ * "unknown": it says the gate took no measurement because it was off, which
7703
+ * is a different population and must never be averaged in with the rest.
7704
+ */
7705
+ reason: string().nullable(),
7706
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7707
+ attempts: number().int(),
7708
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7709
+ deferredForMs: number().int(),
7710
+ /**
7711
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7712
+ *
7713
+ * `true` when the frame the verdict was taken on carried no matched
7714
+ * detection for this track — the tracker was coasting a frozen box and the
7715
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7716
+ * straight out of `result.tracked` without checking, so this is reachable
7717
+ * today; the question is the RATE, per camera, and whether refusing those
7718
+ * frames would have cost real tracks (cross-read against `verdict` and
7719
+ * `decidedByBirthEvidence`).
7720
+ */
7721
+ decidedOnCoastedFrame: boolean(),
7722
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7723
+ birthEvidenceAvailable: boolean(),
7724
+ /**
7725
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7726
+ * deciding are different: the carried crop is confirm-only, so a candidate
7727
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7728
+ * crop of a later instant. A coasted decision backed by carried evidence is
7729
+ * a real observation of the birth instant; one without it is not.
7730
+ */
7731
+ decidedByBirthEvidence: boolean(),
7732
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7733
+ * found — deliberately not 0, which would be a measurement that never was. */
7734
+ bestScore: number().nullable(),
7735
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7736
+ appliedMinConfidence: number().nullable(),
7737
+ /**
7738
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7739
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7740
+ */
7741
+ firstSeen: number().int().nullable(),
7742
+ /**
7743
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7744
+ * or `null` when there is none, it is older than
7745
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7746
+ */
7747
+ motionOnsetAt: number().int().nullable(),
7748
+ /**
7749
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7750
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7751
+ *
7752
+ * **Why motion onset and not something else.** Two other proxies were
7753
+ * considered and rejected:
7754
+ * - *the recording/pipeline session start*: for a camera on
7755
+ * `detectionMode: 'always'` the session opens at process start, hours
7756
+ * before any subject. It measures nothing.
7757
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7758
+ * `firstSeen` IS the first detection of that object, so for the track that
7759
+ * OPENS a burst — the only one the operator is complaining about — the two
7760
+ * are the same instant and the latency is 0 by construction.
7761
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7762
+ * mechanism from the object detector, so it is the only one that can precede
7763
+ * it. It is also already maintained per-device at frame rate on this very
7764
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7765
+ * it free — and, decisively, the frame path and the motion path are gated to
7766
+ * the SAME designated post-processing node, so the mirror is never empty for
7767
+ * a camera whose births land here.
7768
+ *
7769
+ * **Error bars, all of them.**
7770
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7771
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7772
+ * latency without bound. Mitigated, never removed, by
7773
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7774
+ * candidate for "this burst is this subject", and even then it is a
7775
+ * candidate, not a fact.
7776
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7777
+ * intensity threshold. A subject entering slowly at the far edge of the
7778
+ * frame can clear the detector's confidence floor BEFORE it clears the
7779
+ * motion floor, making this negative. Negatives are stored as-is and
7780
+ * never clamped — clamping would fabricate the distribution's left tail,
7781
+ * which is the half that says the proxy is unreliable.
7782
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7783
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7784
+ * therefore comparable WITHIN a camera and not across cameras of
7785
+ * different motion sources. The motion source is deliberately not copied
7786
+ * here — it belongs to the addon that owns the device (D224) and this is
7787
+ * a write on the frame path — so group by `deviceId`, which is how the
7788
+ * question is always asked anyway.
7789
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7790
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7791
+ * past it this is `null`.
7792
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7793
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7794
+ * camera nobody has a reference instant for.
7795
+ *
7796
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7797
+ * as such. It is not a per-track fact and must never be shown as one.
7798
+ */
7799
+ birthLatencyMs: number().int().nullable(),
7800
+ /**
7801
+ * How many births this device has already decided since that motion onset.
7802
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7803
+ * this subject. `null` when there is no usable onset.
7804
+ */
7805
+ birthIndexInBurst: number().int().nullable()
7806
+ });
7807
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7808
+ var BirthDecisionQueryInputSchema = object({
7809
+ /** Restrict to a single camera; omit for every row. */
7810
+ deviceId: number().int().optional(),
7811
+ /** Only decisions at or after this epoch ms. */
7812
+ since: number().int().optional(),
7813
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7814
+ verdict: BirthDecisionVerdictSchema.optional(),
7815
+ /** Max rows returned, newest-first. */
7816
+ limit: number().int().min(1).max(5e3).optional()
7817
+ });
7667
7818
  /** One archived note — the operator's words plus enough context to find what
7668
7819
  * they were looking at, after the track itself is gone. */
7669
7820
  var ArchivedDebugNoteSchema = object({
@@ -20173,7 +20324,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20173
20324
  deviceId: number(),
20174
20325
  trackId: string(),
20175
20326
  flags: TrackFlagsPatchSchema
20176
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20327
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20177
20328
  kind: "query",
20178
20329
  auth: "admin"
20179
20330
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20615,6 +20766,22 @@ var occupancyRecheckFramesField = {
20615
20766
  step: 1
20616
20767
  };
20617
20768
  /**
20769
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20770
+ *
20771
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20772
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20773
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20774
+ * spare for live. `0` turns the burst off entirely (the history is still
20775
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20776
+ * discarded — the pre-D411 behaviour).
20777
+ */
20778
+ var preRollInferenceFramesField = {
20779
+ min: 0,
20780
+ max: 30,
20781
+ default: 12,
20782
+ step: 1
20783
+ };
20784
+ /**
20618
20785
  * Source enum for motion signals fed to the runner. Extensible — add
20619
20786
  * new variants here when new motion-trigger paths are wired in
20620
20787
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20855,6 +21022,31 @@ var RunnerCameraConfigSchema = object({
20855
21022
  * to every occupancy rule until something moved in front of it. The churn is
20856
21023
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20857
21024
  */
21025
+ /**
21026
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21027
+ * at session open — instead of decoding it and throwing it away.
21028
+ *
21029
+ * DEFAULT `true`, and the default is the argument. This is not a new
21030
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21031
+ * already served, already decoded and already paid for on every on-motion
21032
+ * detection session that asks for history. What shipped was a last-moment
21033
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21034
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21035
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21036
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21037
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21038
+ * was decoded, and was freed.
21039
+ *
21040
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21041
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21042
+ * late. What makes ON safe is not a switch but the BOUND —
21043
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21044
+ * the last inference permit — so the switch exists for the camera where the
21045
+ * history is worthless (a doorbell whose subject is always already at the
21046
+ * door), not as a hedge against the feature.
21047
+ */
21048
+ preRollInferenceEnabled: boolean().default(true),
21049
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20858
21050
  occupancyRecheckEnabled: boolean().default(true),
20859
21051
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20860
21052
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20883,7 +21075,7 @@ var RunnerCameraConfigSchema = object({
20883
21075
  */
20884
21076
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20885
21077
  });
20886
- 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;
21078
+ 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;
20887
21079
  /**
20888
21080
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20889
21081
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37581,6 +37773,12 @@ Object.freeze({
37581
37773
  addonId: null,
37582
37774
  access: "view"
37583
37775
  },
37776
+ "pipelineAnalytics.listBirthDecisions": {
37777
+ capName: "pipeline-analytics",
37778
+ capScope: "device",
37779
+ addonId: null,
37780
+ access: "view"
37781
+ },
37584
37782
  "pipelineAnalytics.listEventKinds": {
37585
37783
  capName: "pipeline-analytics",
37586
37784
  capScope: "device",
@@ -41373,6 +41571,11 @@ Object.freeze({
41373
41571
  form: "single",
41374
41572
  optional: true
41375
41573
  }],
41574
+ "pipelineAnalytics.listBirthDecisions": [{
41575
+ name: "deviceId",
41576
+ form: "single",
41577
+ optional: true
41578
+ }],
41376
41579
  "pipelineAnalytics.listEventKinds": [{
41377
41580
  name: "deviceId",
41378
41581
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.87",
3
+ "version": "0.2.89",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",