@camstack/addon-notifiers 1.2.91 → 1.2.93

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
@@ -7760,6 +7760,157 @@ var CameraSwitchGroupSchema = object({
7760
7760
  /** Unix ms when the group was composed server-side. */
7761
7761
  fetchedAt: number()
7762
7762
  });
7763
+ /**
7764
+ * What the gate decided about a birth, from the CALLER's point of view.
7765
+ *
7766
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7767
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7768
+ * The third member is the one the gate's own type cannot express, because
7769
+ * exhaustion is a property of how long the caller waited.
7770
+ */
7771
+ var BirthDecisionVerdictSchema = _enum([
7772
+ "confirmed",
7773
+ "suppressed",
7774
+ "exhausted-fallback"
7775
+ ]);
7776
+ /** One birth decision, as it is kept. */
7777
+ var BirthDecisionRecordSchema = object({
7778
+ id: string(),
7779
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7780
+ at: number().int(),
7781
+ /** The camera. Required: every question here is asked per-camera. */
7782
+ deviceId: number().int(),
7783
+ /**
7784
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7785
+ * birth has no track at all, and a confirmed one is expected to age out long
7786
+ * before this row does. Named `sourceTrackId` so the retention model's
7787
+ * ownership derivation (`collection-classification.ts`, which keys on a
7788
+ * column literally called `trackId`) cannot reach it.
7789
+ */
7790
+ sourceTrackId: string(),
7791
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7792
+ className: string(),
7793
+ verdict: BirthDecisionVerdictSchema,
7794
+ /**
7795
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7796
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7797
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7798
+ * "unknown": it says the gate took no measurement because it was off, which
7799
+ * is a different population and must never be averaged in with the rest.
7800
+ */
7801
+ reason: string().nullable(),
7802
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7803
+ attempts: number().int(),
7804
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7805
+ deferredForMs: number().int(),
7806
+ /**
7807
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7808
+ *
7809
+ * `true` when the frame the verdict was taken on carried no matched
7810
+ * detection for this track — the tracker was coasting a frozen box and the
7811
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7812
+ * straight out of `result.tracked` without checking, so this is reachable
7813
+ * today; the question is the RATE, per camera, and whether refusing those
7814
+ * frames would have cost real tracks (cross-read against `verdict` and
7815
+ * `decidedByBirthEvidence`).
7816
+ */
7817
+ decidedOnCoastedFrame: boolean(),
7818
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7819
+ birthEvidenceAvailable: boolean(),
7820
+ /**
7821
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7822
+ * deciding are different: the carried crop is confirm-only, so a candidate
7823
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7824
+ * crop of a later instant. A coasted decision backed by carried evidence is
7825
+ * a real observation of the birth instant; one without it is not.
7826
+ */
7827
+ decidedByBirthEvidence: boolean(),
7828
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7829
+ * found — deliberately not 0, which would be a measurement that never was. */
7830
+ bestScore: number().nullable(),
7831
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7832
+ appliedMinConfidence: number().nullable(),
7833
+ /**
7834
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7835
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7836
+ */
7837
+ firstSeen: number().int().nullable(),
7838
+ /**
7839
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7840
+ * or `null` when there is none, it is older than
7841
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7842
+ */
7843
+ motionOnsetAt: number().int().nullable(),
7844
+ /**
7845
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7846
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7847
+ *
7848
+ * **Why motion onset and not something else.** Two other proxies were
7849
+ * considered and rejected:
7850
+ * - *the recording/pipeline session start*: for a camera on
7851
+ * `detectionMode: 'always'` the session opens at process start, hours
7852
+ * before any subject. It measures nothing.
7853
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7854
+ * `firstSeen` IS the first detection of that object, so for the track that
7855
+ * OPENS a burst — the only one the operator is complaining about — the two
7856
+ * are the same instant and the latency is 0 by construction.
7857
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7858
+ * mechanism from the object detector, so it is the only one that can precede
7859
+ * it. It is also already maintained per-device at frame rate on this very
7860
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7861
+ * it free — and, decisively, the frame path and the motion path are gated to
7862
+ * the SAME designated post-processing node, so the mirror is never empty for
7863
+ * a camera whose births land here.
7864
+ *
7865
+ * **Error bars, all of them.**
7866
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7867
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7868
+ * latency without bound. Mitigated, never removed, by
7869
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7870
+ * candidate for "this burst is this subject", and even then it is a
7871
+ * candidate, not a fact.
7872
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7873
+ * intensity threshold. A subject entering slowly at the far edge of the
7874
+ * frame can clear the detector's confidence floor BEFORE it clears the
7875
+ * motion floor, making this negative. Negatives are stored as-is and
7876
+ * never clamped — clamping would fabricate the distribution's left tail,
7877
+ * which is the half that says the proxy is unreliable.
7878
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7879
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7880
+ * therefore comparable WITHIN a camera and not across cameras of
7881
+ * different motion sources. The motion source is deliberately not copied
7882
+ * here — it belongs to the addon that owns the device (D224) and this is
7883
+ * a write on the frame path — so group by `deviceId`, which is how the
7884
+ * question is always asked anyway.
7885
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7886
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7887
+ * past it this is `null`.
7888
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7889
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7890
+ * camera nobody has a reference instant for.
7891
+ *
7892
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7893
+ * as such. It is not a per-track fact and must never be shown as one.
7894
+ */
7895
+ birthLatencyMs: number().int().nullable(),
7896
+ /**
7897
+ * How many births this device has already decided since that motion onset.
7898
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7899
+ * this subject. `null` when there is no usable onset.
7900
+ */
7901
+ birthIndexInBurst: number().int().nullable()
7902
+ });
7903
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7904
+ var BirthDecisionQueryInputSchema = object({
7905
+ /** Restrict to a single camera; omit for every row. */
7906
+ deviceId: number().int().optional(),
7907
+ /** Only decisions at or after this epoch ms. */
7908
+ since: number().int().optional(),
7909
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7910
+ verdict: BirthDecisionVerdictSchema.optional(),
7911
+ /** Max rows returned, newest-first. */
7912
+ limit: number().int().min(1).max(5e3).optional()
7913
+ });
7763
7914
  /** One archived note — the operator's words plus enough context to find what
7764
7915
  * they were looking at, after the track itself is gone. */
7765
7916
  var ArchivedDebugNoteSchema = object({
@@ -19939,7 +20090,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19939
20090
  deviceId: number(),
19940
20091
  trackId: string(),
19941
20092
  flags: TrackFlagsPatchSchema
19942
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20093
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
19943
20094
  kind: "query",
19944
20095
  auth: "admin"
19945
20096
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20381,6 +20532,22 @@ var occupancyRecheckFramesField = {
20381
20532
  step: 1
20382
20533
  };
20383
20534
  /**
20535
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20536
+ *
20537
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20538
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20539
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20540
+ * spare for live. `0` turns the burst off entirely (the history is still
20541
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20542
+ * discarded — the pre-D411 behaviour).
20543
+ */
20544
+ var preRollInferenceFramesField = {
20545
+ min: 0,
20546
+ max: 30,
20547
+ default: 12,
20548
+ step: 1
20549
+ };
20550
+ /**
20384
20551
  * Source enum for motion signals fed to the runner. Extensible — add
20385
20552
  * new variants here when new motion-trigger paths are wired in
20386
20553
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20621,6 +20788,31 @@ var RunnerCameraConfigSchema = object({
20621
20788
  * to every occupancy rule until something moved in front of it. The churn is
20622
20789
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20623
20790
  */
20791
+ /**
20792
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
20793
+ * at session open — instead of decoding it and throwing it away.
20794
+ *
20795
+ * DEFAULT `true`, and the default is the argument. This is not a new
20796
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
20797
+ * already served, already decoded and already paid for on every on-motion
20798
+ * detection session that asks for history. What shipped was a last-moment
20799
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
20800
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
20801
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
20802
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
20803
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
20804
+ * was decoded, and was freed.
20805
+ *
20806
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
20807
+ * setting whose absence looks exactly like a camera that noticed the cyclist
20808
+ * late. What makes ON safe is not a switch but the BOUND —
20809
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
20810
+ * the last inference permit — so the switch exists for the camera where the
20811
+ * history is worthless (a doorbell whose subject is always already at the
20812
+ * door), not as a hedge against the feature.
20813
+ */
20814
+ preRollInferenceEnabled: boolean().default(true),
20815
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20624
20816
  occupancyRecheckEnabled: boolean().default(true),
20625
20817
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20626
20818
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20649,7 +20841,7 @@ var RunnerCameraConfigSchema = object({
20649
20841
  */
20650
20842
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20651
20843
  });
20652
- 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;
20844
+ 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;
20653
20845
  /**
20654
20846
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20655
20847
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -33343,6 +33535,12 @@ Object.freeze({
33343
33535
  addonId: null,
33344
33536
  access: "view"
33345
33537
  },
33538
+ "pipelineAnalytics.listBirthDecisions": {
33539
+ capName: "pipeline-analytics",
33540
+ capScope: "device",
33541
+ addonId: null,
33542
+ access: "view"
33543
+ },
33346
33544
  "pipelineAnalytics.listEventKinds": {
33347
33545
  capName: "pipeline-analytics",
33348
33546
  capScope: "device",
@@ -37135,6 +37333,11 @@ Object.freeze({
37135
37333
  form: "single",
37136
37334
  optional: true
37137
37335
  }],
37336
+ "pipelineAnalytics.listBirthDecisions": [{
37337
+ name: "deviceId",
37338
+ form: "single",
37339
+ optional: true
37340
+ }],
37138
37341
  "pipelineAnalytics.listEventKinds": [{
37139
37342
  name: "deviceId",
37140
37343
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7733,6 +7733,157 @@ var CameraSwitchGroupSchema = object({
7733
7733
  /** Unix ms when the group was composed server-side. */
7734
7734
  fetchedAt: number()
7735
7735
  });
7736
+ /**
7737
+ * What the gate decided about a birth, from the CALLER's point of view.
7738
+ *
7739
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7740
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7741
+ * The third member is the one the gate's own type cannot express, because
7742
+ * exhaustion is a property of how long the caller waited.
7743
+ */
7744
+ var BirthDecisionVerdictSchema = _enum([
7745
+ "confirmed",
7746
+ "suppressed",
7747
+ "exhausted-fallback"
7748
+ ]);
7749
+ /** One birth decision, as it is kept. */
7750
+ var BirthDecisionRecordSchema = object({
7751
+ id: string(),
7752
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7753
+ at: number().int(),
7754
+ /** The camera. Required: every question here is asked per-camera. */
7755
+ deviceId: number().int(),
7756
+ /**
7757
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7758
+ * birth has no track at all, and a confirmed one is expected to age out long
7759
+ * before this row does. Named `sourceTrackId` so the retention model's
7760
+ * ownership derivation (`collection-classification.ts`, which keys on a
7761
+ * column literally called `trackId`) cannot reach it.
7762
+ */
7763
+ sourceTrackId: string(),
7764
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7765
+ className: string(),
7766
+ verdict: BirthDecisionVerdictSchema,
7767
+ /**
7768
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7769
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7770
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7771
+ * "unknown": it says the gate took no measurement because it was off, which
7772
+ * is a different population and must never be averaged in with the rest.
7773
+ */
7774
+ reason: string().nullable(),
7775
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7776
+ attempts: number().int(),
7777
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7778
+ deferredForMs: number().int(),
7779
+ /**
7780
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7781
+ *
7782
+ * `true` when the frame the verdict was taken on carried no matched
7783
+ * detection for this track — the tracker was coasting a frozen box and the
7784
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7785
+ * straight out of `result.tracked` without checking, so this is reachable
7786
+ * today; the question is the RATE, per camera, and whether refusing those
7787
+ * frames would have cost real tracks (cross-read against `verdict` and
7788
+ * `decidedByBirthEvidence`).
7789
+ */
7790
+ decidedOnCoastedFrame: boolean(),
7791
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7792
+ birthEvidenceAvailable: boolean(),
7793
+ /**
7794
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7795
+ * deciding are different: the carried crop is confirm-only, so a candidate
7796
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7797
+ * crop of a later instant. A coasted decision backed by carried evidence is
7798
+ * a real observation of the birth instant; one without it is not.
7799
+ */
7800
+ decidedByBirthEvidence: boolean(),
7801
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7802
+ * found — deliberately not 0, which would be a measurement that never was. */
7803
+ bestScore: number().nullable(),
7804
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7805
+ appliedMinConfidence: number().nullable(),
7806
+ /**
7807
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7808
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7809
+ */
7810
+ firstSeen: number().int().nullable(),
7811
+ /**
7812
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7813
+ * or `null` when there is none, it is older than
7814
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7815
+ */
7816
+ motionOnsetAt: number().int().nullable(),
7817
+ /**
7818
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7819
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7820
+ *
7821
+ * **Why motion onset and not something else.** Two other proxies were
7822
+ * considered and rejected:
7823
+ * - *the recording/pipeline session start*: for a camera on
7824
+ * `detectionMode: 'always'` the session opens at process start, hours
7825
+ * before any subject. It measures nothing.
7826
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7827
+ * `firstSeen` IS the first detection of that object, so for the track that
7828
+ * OPENS a burst — the only one the operator is complaining about — the two
7829
+ * are the same instant and the latency is 0 by construction.
7830
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7831
+ * mechanism from the object detector, so it is the only one that can precede
7832
+ * it. It is also already maintained per-device at frame rate on this very
7833
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7834
+ * it free — and, decisively, the frame path and the motion path are gated to
7835
+ * the SAME designated post-processing node, so the mirror is never empty for
7836
+ * a camera whose births land here.
7837
+ *
7838
+ * **Error bars, all of them.**
7839
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7840
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7841
+ * latency without bound. Mitigated, never removed, by
7842
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7843
+ * candidate for "this burst is this subject", and even then it is a
7844
+ * candidate, not a fact.
7845
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7846
+ * intensity threshold. A subject entering slowly at the far edge of the
7847
+ * frame can clear the detector's confidence floor BEFORE it clears the
7848
+ * motion floor, making this negative. Negatives are stored as-is and
7849
+ * never clamped — clamping would fabricate the distribution's left tail,
7850
+ * which is the half that says the proxy is unreliable.
7851
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7852
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7853
+ * therefore comparable WITHIN a camera and not across cameras of
7854
+ * different motion sources. The motion source is deliberately not copied
7855
+ * here — it belongs to the addon that owns the device (D224) and this is
7856
+ * a write on the frame path — so group by `deviceId`, which is how the
7857
+ * question is always asked anyway.
7858
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7859
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7860
+ * past it this is `null`.
7861
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7862
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7863
+ * camera nobody has a reference instant for.
7864
+ *
7865
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7866
+ * as such. It is not a per-track fact and must never be shown as one.
7867
+ */
7868
+ birthLatencyMs: number().int().nullable(),
7869
+ /**
7870
+ * How many births this device has already decided since that motion onset.
7871
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7872
+ * this subject. `null` when there is no usable onset.
7873
+ */
7874
+ birthIndexInBurst: number().int().nullable()
7875
+ });
7876
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7877
+ var BirthDecisionQueryInputSchema = object({
7878
+ /** Restrict to a single camera; omit for every row. */
7879
+ deviceId: number().int().optional(),
7880
+ /** Only decisions at or after this epoch ms. */
7881
+ since: number().int().optional(),
7882
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7883
+ verdict: BirthDecisionVerdictSchema.optional(),
7884
+ /** Max rows returned, newest-first. */
7885
+ limit: number().int().min(1).max(5e3).optional()
7886
+ });
7736
7887
  /** One archived note — the operator's words plus enough context to find what
7737
7888
  * they were looking at, after the track itself is gone. */
7738
7889
  var ArchivedDebugNoteSchema = object({
@@ -19912,7 +20063,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19912
20063
  deviceId: number(),
19913
20064
  trackId: string(),
19914
20065
  flags: TrackFlagsPatchSchema
19915
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20066
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
19916
20067
  kind: "query",
19917
20068
  auth: "admin"
19918
20069
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20354,6 +20505,22 @@ var occupancyRecheckFramesField = {
20354
20505
  step: 1
20355
20506
  };
20356
20507
  /**
20508
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20509
+ *
20510
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20511
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20512
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20513
+ * spare for live. `0` turns the burst off entirely (the history is still
20514
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20515
+ * discarded — the pre-D411 behaviour).
20516
+ */
20517
+ var preRollInferenceFramesField = {
20518
+ min: 0,
20519
+ max: 30,
20520
+ default: 12,
20521
+ step: 1
20522
+ };
20523
+ /**
20357
20524
  * Source enum for motion signals fed to the runner. Extensible — add
20358
20525
  * new variants here when new motion-trigger paths are wired in
20359
20526
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20594,6 +20761,31 @@ var RunnerCameraConfigSchema = object({
20594
20761
  * to every occupancy rule until something moved in front of it. The churn is
20595
20762
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20596
20763
  */
20764
+ /**
20765
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
20766
+ * at session open — instead of decoding it and throwing it away.
20767
+ *
20768
+ * DEFAULT `true`, and the default is the argument. This is not a new
20769
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
20770
+ * already served, already decoded and already paid for on every on-motion
20771
+ * detection session that asks for history. What shipped was a last-moment
20772
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
20773
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
20774
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
20775
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
20776
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
20777
+ * was decoded, and was freed.
20778
+ *
20779
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
20780
+ * setting whose absence looks exactly like a camera that noticed the cyclist
20781
+ * late. What makes ON safe is not a switch but the BOUND —
20782
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
20783
+ * the last inference permit — so the switch exists for the camera where the
20784
+ * history is worthless (a doorbell whose subject is always already at the
20785
+ * door), not as a hedge against the feature.
20786
+ */
20787
+ preRollInferenceEnabled: boolean().default(true),
20788
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20597
20789
  occupancyRecheckEnabled: boolean().default(true),
20598
20790
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20599
20791
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20622,7 +20814,7 @@ var RunnerCameraConfigSchema = object({
20622
20814
  */
20623
20815
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20624
20816
  });
20625
- 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;
20817
+ 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;
20626
20818
  /**
20627
20819
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20628
20820
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -33316,6 +33508,12 @@ Object.freeze({
33316
33508
  addonId: null,
33317
33509
  access: "view"
33318
33510
  },
33511
+ "pipelineAnalytics.listBirthDecisions": {
33512
+ capName: "pipeline-analytics",
33513
+ capScope: "device",
33514
+ addonId: null,
33515
+ access: "view"
33516
+ },
33319
33517
  "pipelineAnalytics.listEventKinds": {
33320
33518
  capName: "pipeline-analytics",
33321
33519
  capScope: "device",
@@ -37108,6 +37306,11 @@ Object.freeze({
37108
37306
  form: "single",
37109
37307
  optional: true
37110
37308
  }],
37309
+ "pipelineAnalytics.listBirthDecisions": [{
37310
+ name: "deviceId",
37311
+ form: "single",
37312
+ optional: true
37313
+ }],
37111
37314
  "pipelineAnalytics.listEventKinds": [{
37112
37315
  name: "deviceId",
37113
37316
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-notifiers",
3
- "version": "1.2.91",
3
+ "version": "1.2.93",
4
4
  "description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
5
5
  "keywords": [
6
6
  "camstack",