@camstack/addon-provider-gree 0.2.86 → 0.2.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -7630,6 +7630,157 @@ var CameraSwitchGroupSchema = object({
7630
7630
  /** Unix ms when the group was composed server-side. */
7631
7631
  fetchedAt: number()
7632
7632
  });
7633
+ /**
7634
+ * What the gate decided about a birth, from the CALLER's point of view.
7635
+ *
7636
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7637
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7638
+ * The third member is the one the gate's own type cannot express, because
7639
+ * exhaustion is a property of how long the caller waited.
7640
+ */
7641
+ var BirthDecisionVerdictSchema = _enum([
7642
+ "confirmed",
7643
+ "suppressed",
7644
+ "exhausted-fallback"
7645
+ ]);
7646
+ /** One birth decision, as it is kept. */
7647
+ var BirthDecisionRecordSchema = object({
7648
+ id: string(),
7649
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7650
+ at: number().int(),
7651
+ /** The camera. Required: every question here is asked per-camera. */
7652
+ deviceId: number().int(),
7653
+ /**
7654
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7655
+ * birth has no track at all, and a confirmed one is expected to age out long
7656
+ * before this row does. Named `sourceTrackId` so the retention model's
7657
+ * ownership derivation (`collection-classification.ts`, which keys on a
7658
+ * column literally called `trackId`) cannot reach it.
7659
+ */
7660
+ sourceTrackId: string(),
7661
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7662
+ className: string(),
7663
+ verdict: BirthDecisionVerdictSchema,
7664
+ /**
7665
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7666
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7667
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7668
+ * "unknown": it says the gate took no measurement because it was off, which
7669
+ * is a different population and must never be averaged in with the rest.
7670
+ */
7671
+ reason: string().nullable(),
7672
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7673
+ attempts: number().int(),
7674
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7675
+ deferredForMs: number().int(),
7676
+ /**
7677
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7678
+ *
7679
+ * `true` when the frame the verdict was taken on carried no matched
7680
+ * detection for this track — the tracker was coasting a frozen box and the
7681
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7682
+ * straight out of `result.tracked` without checking, so this is reachable
7683
+ * today; the question is the RATE, per camera, and whether refusing those
7684
+ * frames would have cost real tracks (cross-read against `verdict` and
7685
+ * `decidedByBirthEvidence`).
7686
+ */
7687
+ decidedOnCoastedFrame: boolean(),
7688
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7689
+ birthEvidenceAvailable: boolean(),
7690
+ /**
7691
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7692
+ * deciding are different: the carried crop is confirm-only, so a candidate
7693
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7694
+ * crop of a later instant. A coasted decision backed by carried evidence is
7695
+ * a real observation of the birth instant; one without it is not.
7696
+ */
7697
+ decidedByBirthEvidence: boolean(),
7698
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7699
+ * found — deliberately not 0, which would be a measurement that never was. */
7700
+ bestScore: number().nullable(),
7701
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7702
+ appliedMinConfidence: number().nullable(),
7703
+ /**
7704
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7705
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7706
+ */
7707
+ firstSeen: number().int().nullable(),
7708
+ /**
7709
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7710
+ * or `null` when there is none, it is older than
7711
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7712
+ */
7713
+ motionOnsetAt: number().int().nullable(),
7714
+ /**
7715
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7716
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7717
+ *
7718
+ * **Why motion onset and not something else.** Two other proxies were
7719
+ * considered and rejected:
7720
+ * - *the recording/pipeline session start*: for a camera on
7721
+ * `detectionMode: 'always'` the session opens at process start, hours
7722
+ * before any subject. It measures nothing.
7723
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7724
+ * `firstSeen` IS the first detection of that object, so for the track that
7725
+ * OPENS a burst — the only one the operator is complaining about — the two
7726
+ * are the same instant and the latency is 0 by construction.
7727
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7728
+ * mechanism from the object detector, so it is the only one that can precede
7729
+ * it. It is also already maintained per-device at frame rate on this very
7730
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7731
+ * it free — and, decisively, the frame path and the motion path are gated to
7732
+ * the SAME designated post-processing node, so the mirror is never empty for
7733
+ * a camera whose births land here.
7734
+ *
7735
+ * **Error bars, all of them.**
7736
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7737
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7738
+ * latency without bound. Mitigated, never removed, by
7739
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7740
+ * candidate for "this burst is this subject", and even then it is a
7741
+ * candidate, not a fact.
7742
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7743
+ * intensity threshold. A subject entering slowly at the far edge of the
7744
+ * frame can clear the detector's confidence floor BEFORE it clears the
7745
+ * motion floor, making this negative. Negatives are stored as-is and
7746
+ * never clamped — clamping would fabricate the distribution's left tail,
7747
+ * which is the half that says the proxy is unreliable.
7748
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7749
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7750
+ * therefore comparable WITHIN a camera and not across cameras of
7751
+ * different motion sources. The motion source is deliberately not copied
7752
+ * here — it belongs to the addon that owns the device (D224) and this is
7753
+ * a write on the frame path — so group by `deviceId`, which is how the
7754
+ * question is always asked anyway.
7755
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7756
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7757
+ * past it this is `null`.
7758
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7759
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7760
+ * camera nobody has a reference instant for.
7761
+ *
7762
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7763
+ * as such. It is not a per-track fact and must never be shown as one.
7764
+ */
7765
+ birthLatencyMs: number().int().nullable(),
7766
+ /**
7767
+ * How many births this device has already decided since that motion onset.
7768
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7769
+ * this subject. `null` when there is no usable onset.
7770
+ */
7771
+ birthIndexInBurst: number().int().nullable()
7772
+ });
7773
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7774
+ var BirthDecisionQueryInputSchema = object({
7775
+ /** Restrict to a single camera; omit for every row. */
7776
+ deviceId: number().int().optional(),
7777
+ /** Only decisions at or after this epoch ms. */
7778
+ since: number().int().optional(),
7779
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7780
+ verdict: BirthDecisionVerdictSchema.optional(),
7781
+ /** Max rows returned, newest-first. */
7782
+ limit: number().int().min(1).max(5e3).optional()
7783
+ });
7633
7784
  /** One archived note — the operator's words plus enough context to find what
7634
7785
  * they were looking at, after the track itself is gone. */
7635
7786
  var ArchivedDebugNoteSchema = object({
@@ -20122,7 +20273,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20122
20273
  deviceId: number(),
20123
20274
  trackId: string(),
20124
20275
  flags: TrackFlagsPatchSchema
20125
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20276
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20126
20277
  kind: "query",
20127
20278
  auth: "admin"
20128
20279
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20564,6 +20715,22 @@ var occupancyRecheckFramesField = {
20564
20715
  step: 1
20565
20716
  };
20566
20717
  /**
20718
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20719
+ *
20720
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20721
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20722
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20723
+ * spare for live. `0` turns the burst off entirely (the history is still
20724
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20725
+ * discarded — the pre-D411 behaviour).
20726
+ */
20727
+ var preRollInferenceFramesField = {
20728
+ min: 0,
20729
+ max: 30,
20730
+ default: 12,
20731
+ step: 1
20732
+ };
20733
+ /**
20567
20734
  * Source enum for motion signals fed to the runner. Extensible — add
20568
20735
  * new variants here when new motion-trigger paths are wired in
20569
20736
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20804,6 +20971,31 @@ var RunnerCameraConfigSchema = object({
20804
20971
  * to every occupancy rule until something moved in front of it. The churn is
20805
20972
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20806
20973
  */
20974
+ /**
20975
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
20976
+ * at session open — instead of decoding it and throwing it away.
20977
+ *
20978
+ * DEFAULT `true`, and the default is the argument. This is not a new
20979
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
20980
+ * already served, already decoded and already paid for on every on-motion
20981
+ * detection session that asks for history. What shipped was a last-moment
20982
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
20983
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
20984
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
20985
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
20986
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
20987
+ * was decoded, and was freed.
20988
+ *
20989
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
20990
+ * setting whose absence looks exactly like a camera that noticed the cyclist
20991
+ * late. What makes ON safe is not a switch but the BOUND —
20992
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
20993
+ * the last inference permit — so the switch exists for the camera where the
20994
+ * history is worthless (a doorbell whose subject is always already at the
20995
+ * door), not as a hedge against the feature.
20996
+ */
20997
+ preRollInferenceEnabled: boolean().default(true),
20998
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20807
20999
  occupancyRecheckEnabled: boolean().default(true),
20808
21000
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20809
21001
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20832,7 +21024,7 @@ var RunnerCameraConfigSchema = object({
20832
21024
  */
20833
21025
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20834
21026
  });
20835
- 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;
21027
+ 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;
20836
21028
  /**
20837
21029
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20838
21030
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37522,6 +37714,12 @@ Object.freeze({
37522
37714
  addonId: null,
37523
37715
  access: "view"
37524
37716
  },
37717
+ "pipelineAnalytics.listBirthDecisions": {
37718
+ capName: "pipeline-analytics",
37719
+ capScope: "device",
37720
+ addonId: null,
37721
+ access: "view"
37722
+ },
37525
37723
  "pipelineAnalytics.listEventKinds": {
37526
37724
  capName: "pipeline-analytics",
37527
37725
  capScope: "device",
@@ -41314,6 +41512,11 @@ Object.freeze({
41314
41512
  form: "single",
41315
41513
  optional: true
41316
41514
  }],
41515
+ "pipelineAnalytics.listBirthDecisions": [{
41516
+ name: "deviceId",
41517
+ form: "single",
41518
+ optional: true
41519
+ }],
41317
41520
  "pipelineAnalytics.listEventKinds": [{
41318
41521
  name: "deviceId",
41319
41522
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7629,6 +7629,157 @@ var CameraSwitchGroupSchema = object({
7629
7629
  /** Unix ms when the group was composed server-side. */
7630
7630
  fetchedAt: number()
7631
7631
  });
7632
+ /**
7633
+ * What the gate decided about a birth, from the CALLER's point of view.
7634
+ *
7635
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7636
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7637
+ * The third member is the one the gate's own type cannot express, because
7638
+ * exhaustion is a property of how long the caller waited.
7639
+ */
7640
+ var BirthDecisionVerdictSchema = _enum([
7641
+ "confirmed",
7642
+ "suppressed",
7643
+ "exhausted-fallback"
7644
+ ]);
7645
+ /** One birth decision, as it is kept. */
7646
+ var BirthDecisionRecordSchema = object({
7647
+ id: string(),
7648
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7649
+ at: number().int(),
7650
+ /** The camera. Required: every question here is asked per-camera. */
7651
+ deviceId: number().int(),
7652
+ /**
7653
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7654
+ * birth has no track at all, and a confirmed one is expected to age out long
7655
+ * before this row does. Named `sourceTrackId` so the retention model's
7656
+ * ownership derivation (`collection-classification.ts`, which keys on a
7657
+ * column literally called `trackId`) cannot reach it.
7658
+ */
7659
+ sourceTrackId: string(),
7660
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7661
+ className: string(),
7662
+ verdict: BirthDecisionVerdictSchema,
7663
+ /**
7664
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7665
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7666
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7667
+ * "unknown": it says the gate took no measurement because it was off, which
7668
+ * is a different population and must never be averaged in with the rest.
7669
+ */
7670
+ reason: string().nullable(),
7671
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7672
+ attempts: number().int(),
7673
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7674
+ deferredForMs: number().int(),
7675
+ /**
7676
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7677
+ *
7678
+ * `true` when the frame the verdict was taken on carried no matched
7679
+ * detection for this track — the tracker was coasting a frozen box and the
7680
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7681
+ * straight out of `result.tracked` without checking, so this is reachable
7682
+ * today; the question is the RATE, per camera, and whether refusing those
7683
+ * frames would have cost real tracks (cross-read against `verdict` and
7684
+ * `decidedByBirthEvidence`).
7685
+ */
7686
+ decidedOnCoastedFrame: boolean(),
7687
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7688
+ birthEvidenceAvailable: boolean(),
7689
+ /**
7690
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7691
+ * deciding are different: the carried crop is confirm-only, so a candidate
7692
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7693
+ * crop of a later instant. A coasted decision backed by carried evidence is
7694
+ * a real observation of the birth instant; one without it is not.
7695
+ */
7696
+ decidedByBirthEvidence: boolean(),
7697
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7698
+ * found — deliberately not 0, which would be a measurement that never was. */
7699
+ bestScore: number().nullable(),
7700
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7701
+ appliedMinConfidence: number().nullable(),
7702
+ /**
7703
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7704
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7705
+ */
7706
+ firstSeen: number().int().nullable(),
7707
+ /**
7708
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7709
+ * or `null` when there is none, it is older than
7710
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7711
+ */
7712
+ motionOnsetAt: number().int().nullable(),
7713
+ /**
7714
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7715
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7716
+ *
7717
+ * **Why motion onset and not something else.** Two other proxies were
7718
+ * considered and rejected:
7719
+ * - *the recording/pipeline session start*: for a camera on
7720
+ * `detectionMode: 'always'` the session opens at process start, hours
7721
+ * before any subject. It measures nothing.
7722
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7723
+ * `firstSeen` IS the first detection of that object, so for the track that
7724
+ * OPENS a burst — the only one the operator is complaining about — the two
7725
+ * are the same instant and the latency is 0 by construction.
7726
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7727
+ * mechanism from the object detector, so it is the only one that can precede
7728
+ * it. It is also already maintained per-device at frame rate on this very
7729
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7730
+ * it free — and, decisively, the frame path and the motion path are gated to
7731
+ * the SAME designated post-processing node, so the mirror is never empty for
7732
+ * a camera whose births land here.
7733
+ *
7734
+ * **Error bars, all of them.**
7735
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7736
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7737
+ * latency without bound. Mitigated, never removed, by
7738
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7739
+ * candidate for "this burst is this subject", and even then it is a
7740
+ * candidate, not a fact.
7741
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7742
+ * intensity threshold. A subject entering slowly at the far edge of the
7743
+ * frame can clear the detector's confidence floor BEFORE it clears the
7744
+ * motion floor, making this negative. Negatives are stored as-is and
7745
+ * never clamped — clamping would fabricate the distribution's left tail,
7746
+ * which is the half that says the proxy is unreliable.
7747
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7748
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7749
+ * therefore comparable WITHIN a camera and not across cameras of
7750
+ * different motion sources. The motion source is deliberately not copied
7751
+ * here — it belongs to the addon that owns the device (D224) and this is
7752
+ * a write on the frame path — so group by `deviceId`, which is how the
7753
+ * question is always asked anyway.
7754
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7755
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7756
+ * past it this is `null`.
7757
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7758
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7759
+ * camera nobody has a reference instant for.
7760
+ *
7761
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7762
+ * as such. It is not a per-track fact and must never be shown as one.
7763
+ */
7764
+ birthLatencyMs: number().int().nullable(),
7765
+ /**
7766
+ * How many births this device has already decided since that motion onset.
7767
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7768
+ * this subject. `null` when there is no usable onset.
7769
+ */
7770
+ birthIndexInBurst: number().int().nullable()
7771
+ });
7772
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7773
+ var BirthDecisionQueryInputSchema = object({
7774
+ /** Restrict to a single camera; omit for every row. */
7775
+ deviceId: number().int().optional(),
7776
+ /** Only decisions at or after this epoch ms. */
7777
+ since: number().int().optional(),
7778
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7779
+ verdict: BirthDecisionVerdictSchema.optional(),
7780
+ /** Max rows returned, newest-first. */
7781
+ limit: number().int().min(1).max(5e3).optional()
7782
+ });
7632
7783
  /** One archived note — the operator's words plus enough context to find what
7633
7784
  * they were looking at, after the track itself is gone. */
7634
7785
  var ArchivedDebugNoteSchema = object({
@@ -20121,7 +20272,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20121
20272
  deviceId: number(),
20122
20273
  trackId: string(),
20123
20274
  flags: TrackFlagsPatchSchema
20124
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20275
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20125
20276
  kind: "query",
20126
20277
  auth: "admin"
20127
20278
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20563,6 +20714,22 @@ var occupancyRecheckFramesField = {
20563
20714
  step: 1
20564
20715
  };
20565
20716
  /**
20717
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20718
+ *
20719
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20720
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20721
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20722
+ * spare for live. `0` turns the burst off entirely (the history is still
20723
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20724
+ * discarded — the pre-D411 behaviour).
20725
+ */
20726
+ var preRollInferenceFramesField = {
20727
+ min: 0,
20728
+ max: 30,
20729
+ default: 12,
20730
+ step: 1
20731
+ };
20732
+ /**
20566
20733
  * Source enum for motion signals fed to the runner. Extensible — add
20567
20734
  * new variants here when new motion-trigger paths are wired in
20568
20735
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20803,6 +20970,31 @@ var RunnerCameraConfigSchema = object({
20803
20970
  * to every occupancy rule until something moved in front of it. The churn is
20804
20971
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20805
20972
  */
20973
+ /**
20974
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
20975
+ * at session open — instead of decoding it and throwing it away.
20976
+ *
20977
+ * DEFAULT `true`, and the default is the argument. This is not a new
20978
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
20979
+ * already served, already decoded and already paid for on every on-motion
20980
+ * detection session that asks for history. What shipped was a last-moment
20981
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
20982
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
20983
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
20984
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
20985
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
20986
+ * was decoded, and was freed.
20987
+ *
20988
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
20989
+ * setting whose absence looks exactly like a camera that noticed the cyclist
20990
+ * late. What makes ON safe is not a switch but the BOUND —
20991
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
20992
+ * the last inference permit — so the switch exists for the camera where the
20993
+ * history is worthless (a doorbell whose subject is always already at the
20994
+ * door), not as a hedge against the feature.
20995
+ */
20996
+ preRollInferenceEnabled: boolean().default(true),
20997
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20806
20998
  occupancyRecheckEnabled: boolean().default(true),
20807
20999
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20808
21000
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20831,7 +21023,7 @@ var RunnerCameraConfigSchema = object({
20831
21023
  */
20832
21024
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20833
21025
  });
20834
- 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;
21026
+ 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;
20835
21027
  /**
20836
21028
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20837
21029
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37521,6 +37713,12 @@ Object.freeze({
37521
37713
  addonId: null,
37522
37714
  access: "view"
37523
37715
  },
37716
+ "pipelineAnalytics.listBirthDecisions": {
37717
+ capName: "pipeline-analytics",
37718
+ capScope: "device",
37719
+ addonId: null,
37720
+ access: "view"
37721
+ },
37524
37722
  "pipelineAnalytics.listEventKinds": {
37525
37723
  capName: "pipeline-analytics",
37526
37724
  capScope: "device",
@@ -41313,6 +41511,11 @@ Object.freeze({
41313
41511
  form: "single",
41314
41512
  optional: true
41315
41513
  }],
41514
+ "pipelineAnalytics.listBirthDecisions": [{
41515
+ name: "deviceId",
41516
+ form: "single",
41517
+ optional: true
41518
+ }],
41316
41519
  "pipelineAnalytics.listEventKinds": [{
41317
41520
  name: "deviceId",
41318
41521
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-gree",
3
- "version": "0.2.86",
3
+ "version": "0.2.88",
4
4
  "description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
5
5
  "keywords": [
6
6
  "camstack",