@camstack/addon-provider-homematic 1.2.88 → 1.2.90

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
@@ -7636,6 +7636,157 @@ var CameraSwitchGroupSchema = object({
7636
7636
  /** Unix ms when the group was composed server-side. */
7637
7637
  fetchedAt: number()
7638
7638
  });
7639
+ /**
7640
+ * What the gate decided about a birth, from the CALLER's point of view.
7641
+ *
7642
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7643
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7644
+ * The third member is the one the gate's own type cannot express, because
7645
+ * exhaustion is a property of how long the caller waited.
7646
+ */
7647
+ var BirthDecisionVerdictSchema = _enum([
7648
+ "confirmed",
7649
+ "suppressed",
7650
+ "exhausted-fallback"
7651
+ ]);
7652
+ /** One birth decision, as it is kept. */
7653
+ var BirthDecisionRecordSchema = object({
7654
+ id: string(),
7655
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7656
+ at: number().int(),
7657
+ /** The camera. Required: every question here is asked per-camera. */
7658
+ deviceId: number().int(),
7659
+ /**
7660
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7661
+ * birth has no track at all, and a confirmed one is expected to age out long
7662
+ * before this row does. Named `sourceTrackId` so the retention model's
7663
+ * ownership derivation (`collection-classification.ts`, which keys on a
7664
+ * column literally called `trackId`) cannot reach it.
7665
+ */
7666
+ sourceTrackId: string(),
7667
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7668
+ className: string(),
7669
+ verdict: BirthDecisionVerdictSchema,
7670
+ /**
7671
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7672
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7673
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7674
+ * "unknown": it says the gate took no measurement because it was off, which
7675
+ * is a different population and must never be averaged in with the rest.
7676
+ */
7677
+ reason: string().nullable(),
7678
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7679
+ attempts: number().int(),
7680
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7681
+ deferredForMs: number().int(),
7682
+ /**
7683
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7684
+ *
7685
+ * `true` when the frame the verdict was taken on carried no matched
7686
+ * detection for this track — the tracker was coasting a frozen box and the
7687
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7688
+ * straight out of `result.tracked` without checking, so this is reachable
7689
+ * today; the question is the RATE, per camera, and whether refusing those
7690
+ * frames would have cost real tracks (cross-read against `verdict` and
7691
+ * `decidedByBirthEvidence`).
7692
+ */
7693
+ decidedOnCoastedFrame: boolean(),
7694
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7695
+ birthEvidenceAvailable: boolean(),
7696
+ /**
7697
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7698
+ * deciding are different: the carried crop is confirm-only, so a candidate
7699
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7700
+ * crop of a later instant. A coasted decision backed by carried evidence is
7701
+ * a real observation of the birth instant; one without it is not.
7702
+ */
7703
+ decidedByBirthEvidence: boolean(),
7704
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7705
+ * found — deliberately not 0, which would be a measurement that never was. */
7706
+ bestScore: number().nullable(),
7707
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7708
+ appliedMinConfidence: number().nullable(),
7709
+ /**
7710
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7711
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7712
+ */
7713
+ firstSeen: number().int().nullable(),
7714
+ /**
7715
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7716
+ * or `null` when there is none, it is older than
7717
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7718
+ */
7719
+ motionOnsetAt: number().int().nullable(),
7720
+ /**
7721
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7722
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7723
+ *
7724
+ * **Why motion onset and not something else.** Two other proxies were
7725
+ * considered and rejected:
7726
+ * - *the recording/pipeline session start*: for a camera on
7727
+ * `detectionMode: 'always'` the session opens at process start, hours
7728
+ * before any subject. It measures nothing.
7729
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7730
+ * `firstSeen` IS the first detection of that object, so for the track that
7731
+ * OPENS a burst — the only one the operator is complaining about — the two
7732
+ * are the same instant and the latency is 0 by construction.
7733
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7734
+ * mechanism from the object detector, so it is the only one that can precede
7735
+ * it. It is also already maintained per-device at frame rate on this very
7736
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7737
+ * it free — and, decisively, the frame path and the motion path are gated to
7738
+ * the SAME designated post-processing node, so the mirror is never empty for
7739
+ * a camera whose births land here.
7740
+ *
7741
+ * **Error bars, all of them.**
7742
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7743
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7744
+ * latency without bound. Mitigated, never removed, by
7745
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7746
+ * candidate for "this burst is this subject", and even then it is a
7747
+ * candidate, not a fact.
7748
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7749
+ * intensity threshold. A subject entering slowly at the far edge of the
7750
+ * frame can clear the detector's confidence floor BEFORE it clears the
7751
+ * motion floor, making this negative. Negatives are stored as-is and
7752
+ * never clamped — clamping would fabricate the distribution's left tail,
7753
+ * which is the half that says the proxy is unreliable.
7754
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7755
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7756
+ * therefore comparable WITHIN a camera and not across cameras of
7757
+ * different motion sources. The motion source is deliberately not copied
7758
+ * here — it belongs to the addon that owns the device (D224) and this is
7759
+ * a write on the frame path — so group by `deviceId`, which is how the
7760
+ * question is always asked anyway.
7761
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7762
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7763
+ * past it this is `null`.
7764
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7765
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7766
+ * camera nobody has a reference instant for.
7767
+ *
7768
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7769
+ * as such. It is not a per-track fact and must never be shown as one.
7770
+ */
7771
+ birthLatencyMs: number().int().nullable(),
7772
+ /**
7773
+ * How many births this device has already decided since that motion onset.
7774
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7775
+ * this subject. `null` when there is no usable onset.
7776
+ */
7777
+ birthIndexInBurst: number().int().nullable()
7778
+ });
7779
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7780
+ var BirthDecisionQueryInputSchema = object({
7781
+ /** Restrict to a single camera; omit for every row. */
7782
+ deviceId: number().int().optional(),
7783
+ /** Only decisions at or after this epoch ms. */
7784
+ since: number().int().optional(),
7785
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7786
+ verdict: BirthDecisionVerdictSchema.optional(),
7787
+ /** Max rows returned, newest-first. */
7788
+ limit: number().int().min(1).max(5e3).optional()
7789
+ });
7639
7790
  /** One archived note — the operator's words plus enough context to find what
7640
7791
  * they were looking at, after the track itself is gone. */
7641
7792
  var ArchivedDebugNoteSchema = object({
@@ -20194,7 +20345,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20194
20345
  deviceId: number(),
20195
20346
  trackId: string(),
20196
20347
  flags: TrackFlagsPatchSchema
20197
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20348
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20198
20349
  kind: "query",
20199
20350
  auth: "admin"
20200
20351
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20636,6 +20787,22 @@ var occupancyRecheckFramesField = {
20636
20787
  step: 1
20637
20788
  };
20638
20789
  /**
20790
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20791
+ *
20792
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20793
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20794
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20795
+ * spare for live. `0` turns the burst off entirely (the history is still
20796
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20797
+ * discarded — the pre-D411 behaviour).
20798
+ */
20799
+ var preRollInferenceFramesField = {
20800
+ min: 0,
20801
+ max: 30,
20802
+ default: 12,
20803
+ step: 1
20804
+ };
20805
+ /**
20639
20806
  * Source enum for motion signals fed to the runner. Extensible — add
20640
20807
  * new variants here when new motion-trigger paths are wired in
20641
20808
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20876,6 +21043,31 @@ var RunnerCameraConfigSchema = object({
20876
21043
  * to every occupancy rule until something moved in front of it. The churn is
20877
21044
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20878
21045
  */
21046
+ /**
21047
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21048
+ * at session open — instead of decoding it and throwing it away.
21049
+ *
21050
+ * DEFAULT `true`, and the default is the argument. This is not a new
21051
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21052
+ * already served, already decoded and already paid for on every on-motion
21053
+ * detection session that asks for history. What shipped was a last-moment
21054
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21055
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21056
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21057
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21058
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21059
+ * was decoded, and was freed.
21060
+ *
21061
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21062
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21063
+ * late. What makes ON safe is not a switch but the BOUND —
21064
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21065
+ * the last inference permit — so the switch exists for the camera where the
21066
+ * history is worthless (a doorbell whose subject is always already at the
21067
+ * door), not as a hedge against the feature.
21068
+ */
21069
+ preRollInferenceEnabled: boolean().default(true),
21070
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20879
21071
  occupancyRecheckEnabled: boolean().default(true),
20880
21072
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20881
21073
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20904,7 +21096,7 @@ var RunnerCameraConfigSchema = object({
20904
21096
  */
20905
21097
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20906
21098
  });
20907
- 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;
21099
+ 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;
20908
21100
  /**
20909
21101
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20910
21102
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37594,6 +37786,12 @@ Object.freeze({
37594
37786
  addonId: null,
37595
37787
  access: "view"
37596
37788
  },
37789
+ "pipelineAnalytics.listBirthDecisions": {
37790
+ capName: "pipeline-analytics",
37791
+ capScope: "device",
37792
+ addonId: null,
37793
+ access: "view"
37794
+ },
37597
37795
  "pipelineAnalytics.listEventKinds": {
37598
37796
  capName: "pipeline-analytics",
37599
37797
  capScope: "device",
@@ -41386,6 +41584,11 @@ Object.freeze({
41386
41584
  form: "single",
41387
41585
  optional: true
41388
41586
  }],
41587
+ "pipelineAnalytics.listBirthDecisions": [{
41588
+ name: "deviceId",
41589
+ form: "single",
41590
+ optional: true
41591
+ }],
41389
41592
  "pipelineAnalytics.listEventKinds": [{
41390
41593
  name: "deviceId",
41391
41594
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7637,6 +7637,157 @@ var CameraSwitchGroupSchema = object({
7637
7637
  /** Unix ms when the group was composed server-side. */
7638
7638
  fetchedAt: number()
7639
7639
  });
7640
+ /**
7641
+ * What the gate decided about a birth, from the CALLER's point of view.
7642
+ *
7643
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7644
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7645
+ * The third member is the one the gate's own type cannot express, because
7646
+ * exhaustion is a property of how long the caller waited.
7647
+ */
7648
+ var BirthDecisionVerdictSchema = _enum([
7649
+ "confirmed",
7650
+ "suppressed",
7651
+ "exhausted-fallback"
7652
+ ]);
7653
+ /** One birth decision, as it is kept. */
7654
+ var BirthDecisionRecordSchema = object({
7655
+ id: string(),
7656
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7657
+ at: number().int(),
7658
+ /** The camera. Required: every question here is asked per-camera. */
7659
+ deviceId: number().int(),
7660
+ /**
7661
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7662
+ * birth has no track at all, and a confirmed one is expected to age out long
7663
+ * before this row does. Named `sourceTrackId` so the retention model's
7664
+ * ownership derivation (`collection-classification.ts`, which keys on a
7665
+ * column literally called `trackId`) cannot reach it.
7666
+ */
7667
+ sourceTrackId: string(),
7668
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7669
+ className: string(),
7670
+ verdict: BirthDecisionVerdictSchema,
7671
+ /**
7672
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7673
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7674
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7675
+ * "unknown": it says the gate took no measurement because it was off, which
7676
+ * is a different population and must never be averaged in with the rest.
7677
+ */
7678
+ reason: string().nullable(),
7679
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7680
+ attempts: number().int(),
7681
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7682
+ deferredForMs: number().int(),
7683
+ /**
7684
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7685
+ *
7686
+ * `true` when the frame the verdict was taken on carried no matched
7687
+ * detection for this track — the tracker was coasting a frozen box and the
7688
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7689
+ * straight out of `result.tracked` without checking, so this is reachable
7690
+ * today; the question is the RATE, per camera, and whether refusing those
7691
+ * frames would have cost real tracks (cross-read against `verdict` and
7692
+ * `decidedByBirthEvidence`).
7693
+ */
7694
+ decidedOnCoastedFrame: boolean(),
7695
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7696
+ birthEvidenceAvailable: boolean(),
7697
+ /**
7698
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7699
+ * deciding are different: the carried crop is confirm-only, so a candidate
7700
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7701
+ * crop of a later instant. A coasted decision backed by carried evidence is
7702
+ * a real observation of the birth instant; one without it is not.
7703
+ */
7704
+ decidedByBirthEvidence: boolean(),
7705
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7706
+ * found — deliberately not 0, which would be a measurement that never was. */
7707
+ bestScore: number().nullable(),
7708
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7709
+ appliedMinConfidence: number().nullable(),
7710
+ /**
7711
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7712
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7713
+ */
7714
+ firstSeen: number().int().nullable(),
7715
+ /**
7716
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7717
+ * or `null` when there is none, it is older than
7718
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7719
+ */
7720
+ motionOnsetAt: number().int().nullable(),
7721
+ /**
7722
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7723
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7724
+ *
7725
+ * **Why motion onset and not something else.** Two other proxies were
7726
+ * considered and rejected:
7727
+ * - *the recording/pipeline session start*: for a camera on
7728
+ * `detectionMode: 'always'` the session opens at process start, hours
7729
+ * before any subject. It measures nothing.
7730
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7731
+ * `firstSeen` IS the first detection of that object, so for the track that
7732
+ * OPENS a burst — the only one the operator is complaining about — the two
7733
+ * are the same instant and the latency is 0 by construction.
7734
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7735
+ * mechanism from the object detector, so it is the only one that can precede
7736
+ * it. It is also already maintained per-device at frame rate on this very
7737
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7738
+ * it free — and, decisively, the frame path and the motion path are gated to
7739
+ * the SAME designated post-processing node, so the mirror is never empty for
7740
+ * a camera whose births land here.
7741
+ *
7742
+ * **Error bars, all of them.**
7743
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7744
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7745
+ * latency without bound. Mitigated, never removed, by
7746
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7747
+ * candidate for "this burst is this subject", and even then it is a
7748
+ * candidate, not a fact.
7749
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7750
+ * intensity threshold. A subject entering slowly at the far edge of the
7751
+ * frame can clear the detector's confidence floor BEFORE it clears the
7752
+ * motion floor, making this negative. Negatives are stored as-is and
7753
+ * never clamped — clamping would fabricate the distribution's left tail,
7754
+ * which is the half that says the proxy is unreliable.
7755
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7756
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7757
+ * therefore comparable WITHIN a camera and not across cameras of
7758
+ * different motion sources. The motion source is deliberately not copied
7759
+ * here — it belongs to the addon that owns the device (D224) and this is
7760
+ * a write on the frame path — so group by `deviceId`, which is how the
7761
+ * question is always asked anyway.
7762
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7763
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7764
+ * past it this is `null`.
7765
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7766
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7767
+ * camera nobody has a reference instant for.
7768
+ *
7769
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7770
+ * as such. It is not a per-track fact and must never be shown as one.
7771
+ */
7772
+ birthLatencyMs: number().int().nullable(),
7773
+ /**
7774
+ * How many births this device has already decided since that motion onset.
7775
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7776
+ * this subject. `null` when there is no usable onset.
7777
+ */
7778
+ birthIndexInBurst: number().int().nullable()
7779
+ });
7780
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7781
+ var BirthDecisionQueryInputSchema = object({
7782
+ /** Restrict to a single camera; omit for every row. */
7783
+ deviceId: number().int().optional(),
7784
+ /** Only decisions at or after this epoch ms. */
7785
+ since: number().int().optional(),
7786
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7787
+ verdict: BirthDecisionVerdictSchema.optional(),
7788
+ /** Max rows returned, newest-first. */
7789
+ limit: number().int().min(1).max(5e3).optional()
7790
+ });
7640
7791
  /** One archived note — the operator's words plus enough context to find what
7641
7792
  * they were looking at, after the track itself is gone. */
7642
7793
  var ArchivedDebugNoteSchema = object({
@@ -20195,7 +20346,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20195
20346
  deviceId: number(),
20196
20347
  trackId: string(),
20197
20348
  flags: TrackFlagsPatchSchema
20198
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20349
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20199
20350
  kind: "query",
20200
20351
  auth: "admin"
20201
20352
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20637,6 +20788,22 @@ var occupancyRecheckFramesField = {
20637
20788
  step: 1
20638
20789
  };
20639
20790
  /**
20791
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20792
+ *
20793
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20794
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20795
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20796
+ * spare for live. `0` turns the burst off entirely (the history is still
20797
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20798
+ * discarded — the pre-D411 behaviour).
20799
+ */
20800
+ var preRollInferenceFramesField = {
20801
+ min: 0,
20802
+ max: 30,
20803
+ default: 12,
20804
+ step: 1
20805
+ };
20806
+ /**
20640
20807
  * Source enum for motion signals fed to the runner. Extensible — add
20641
20808
  * new variants here when new motion-trigger paths are wired in
20642
20809
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20877,6 +21044,31 @@ var RunnerCameraConfigSchema = object({
20877
21044
  * to every occupancy rule until something moved in front of it. The churn is
20878
21045
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20879
21046
  */
21047
+ /**
21048
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21049
+ * at session open — instead of decoding it and throwing it away.
21050
+ *
21051
+ * DEFAULT `true`, and the default is the argument. This is not a new
21052
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21053
+ * already served, already decoded and already paid for on every on-motion
21054
+ * detection session that asks for history. What shipped was a last-moment
21055
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21056
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21057
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21058
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21059
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21060
+ * was decoded, and was freed.
21061
+ *
21062
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21063
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21064
+ * late. What makes ON safe is not a switch but the BOUND —
21065
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21066
+ * the last inference permit — so the switch exists for the camera where the
21067
+ * history is worthless (a doorbell whose subject is always already at the
21068
+ * door), not as a hedge against the feature.
21069
+ */
21070
+ preRollInferenceEnabled: boolean().default(true),
21071
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20880
21072
  occupancyRecheckEnabled: boolean().default(true),
20881
21073
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20882
21074
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20905,7 +21097,7 @@ var RunnerCameraConfigSchema = object({
20905
21097
  */
20906
21098
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20907
21099
  });
20908
- 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;
21100
+ 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;
20909
21101
  /**
20910
21102
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20911
21103
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37595,6 +37787,12 @@ Object.freeze({
37595
37787
  addonId: null,
37596
37788
  access: "view"
37597
37789
  },
37790
+ "pipelineAnalytics.listBirthDecisions": {
37791
+ capName: "pipeline-analytics",
37792
+ capScope: "device",
37793
+ addonId: null,
37794
+ access: "view"
37795
+ },
37598
37796
  "pipelineAnalytics.listEventKinds": {
37599
37797
  capName: "pipeline-analytics",
37600
37798
  capScope: "device",
@@ -41387,6 +41585,11 @@ Object.freeze({
41387
41585
  form: "single",
41388
41586
  optional: true
41389
41587
  }],
41588
+ "pipelineAnalytics.listBirthDecisions": [{
41589
+ name: "deviceId",
41590
+ form: "single",
41591
+ optional: true
41592
+ }],
41390
41593
  "pipelineAnalytics.listEventKinds": [{
41391
41594
  name: "deviceId",
41392
41595
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.88",
3
+ "version": "1.2.90",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",