@camstack/addon-export-alexa 1.2.93 → 1.2.95

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.
@@ -7795,6 +7795,157 @@ var CameraSwitchGroupSchema = object({
7795
7795
  /** Unix ms when the group was composed server-side. */
7796
7796
  fetchedAt: number()
7797
7797
  });
7798
+ /**
7799
+ * What the gate decided about a birth, from the CALLER's point of view.
7800
+ *
7801
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7802
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7803
+ * The third member is the one the gate's own type cannot express, because
7804
+ * exhaustion is a property of how long the caller waited.
7805
+ */
7806
+ var BirthDecisionVerdictSchema = _enum([
7807
+ "confirmed",
7808
+ "suppressed",
7809
+ "exhausted-fallback"
7810
+ ]);
7811
+ /** One birth decision, as it is kept. */
7812
+ var BirthDecisionRecordSchema = object({
7813
+ id: string(),
7814
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7815
+ at: number().int(),
7816
+ /** The camera. Required: every question here is asked per-camera. */
7817
+ deviceId: number().int(),
7818
+ /**
7819
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7820
+ * birth has no track at all, and a confirmed one is expected to age out long
7821
+ * before this row does. Named `sourceTrackId` so the retention model's
7822
+ * ownership derivation (`collection-classification.ts`, which keys on a
7823
+ * column literally called `trackId`) cannot reach it.
7824
+ */
7825
+ sourceTrackId: string(),
7826
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7827
+ className: string(),
7828
+ verdict: BirthDecisionVerdictSchema,
7829
+ /**
7830
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7831
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7832
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7833
+ * "unknown": it says the gate took no measurement because it was off, which
7834
+ * is a different population and must never be averaged in with the rest.
7835
+ */
7836
+ reason: string().nullable(),
7837
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7838
+ attempts: number().int(),
7839
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7840
+ deferredForMs: number().int(),
7841
+ /**
7842
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7843
+ *
7844
+ * `true` when the frame the verdict was taken on carried no matched
7845
+ * detection for this track — the tracker was coasting a frozen box and the
7846
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7847
+ * straight out of `result.tracked` without checking, so this is reachable
7848
+ * today; the question is the RATE, per camera, and whether refusing those
7849
+ * frames would have cost real tracks (cross-read against `verdict` and
7850
+ * `decidedByBirthEvidence`).
7851
+ */
7852
+ decidedOnCoastedFrame: boolean(),
7853
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7854
+ birthEvidenceAvailable: boolean(),
7855
+ /**
7856
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7857
+ * deciding are different: the carried crop is confirm-only, so a candidate
7858
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7859
+ * crop of a later instant. A coasted decision backed by carried evidence is
7860
+ * a real observation of the birth instant; one without it is not.
7861
+ */
7862
+ decidedByBirthEvidence: boolean(),
7863
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7864
+ * found — deliberately not 0, which would be a measurement that never was. */
7865
+ bestScore: number().nullable(),
7866
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7867
+ appliedMinConfidence: number().nullable(),
7868
+ /**
7869
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7870
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7871
+ */
7872
+ firstSeen: number().int().nullable(),
7873
+ /**
7874
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7875
+ * or `null` when there is none, it is older than
7876
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7877
+ */
7878
+ motionOnsetAt: number().int().nullable(),
7879
+ /**
7880
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7881
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7882
+ *
7883
+ * **Why motion onset and not something else.** Two other proxies were
7884
+ * considered and rejected:
7885
+ * - *the recording/pipeline session start*: for a camera on
7886
+ * `detectionMode: 'always'` the session opens at process start, hours
7887
+ * before any subject. It measures nothing.
7888
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7889
+ * `firstSeen` IS the first detection of that object, so for the track that
7890
+ * OPENS a burst — the only one the operator is complaining about — the two
7891
+ * are the same instant and the latency is 0 by construction.
7892
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7893
+ * mechanism from the object detector, so it is the only one that can precede
7894
+ * it. It is also already maintained per-device at frame rate on this very
7895
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7896
+ * it free — and, decisively, the frame path and the motion path are gated to
7897
+ * the SAME designated post-processing node, so the mirror is never empty for
7898
+ * a camera whose births land here.
7899
+ *
7900
+ * **Error bars, all of them.**
7901
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7902
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7903
+ * latency without bound. Mitigated, never removed, by
7904
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7905
+ * candidate for "this burst is this subject", and even then it is a
7906
+ * candidate, not a fact.
7907
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7908
+ * intensity threshold. A subject entering slowly at the far edge of the
7909
+ * frame can clear the detector's confidence floor BEFORE it clears the
7910
+ * motion floor, making this negative. Negatives are stored as-is and
7911
+ * never clamped — clamping would fabricate the distribution's left tail,
7912
+ * which is the half that says the proxy is unreliable.
7913
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7914
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7915
+ * therefore comparable WITHIN a camera and not across cameras of
7916
+ * different motion sources. The motion source is deliberately not copied
7917
+ * here — it belongs to the addon that owns the device (D224) and this is
7918
+ * a write on the frame path — so group by `deviceId`, which is how the
7919
+ * question is always asked anyway.
7920
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7921
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7922
+ * past it this is `null`.
7923
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7924
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7925
+ * camera nobody has a reference instant for.
7926
+ *
7927
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7928
+ * as such. It is not a per-track fact and must never be shown as one.
7929
+ */
7930
+ birthLatencyMs: number().int().nullable(),
7931
+ /**
7932
+ * How many births this device has already decided since that motion onset.
7933
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7934
+ * this subject. `null` when there is no usable onset.
7935
+ */
7936
+ birthIndexInBurst: number().int().nullable()
7937
+ });
7938
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7939
+ var BirthDecisionQueryInputSchema = object({
7940
+ /** Restrict to a single camera; omit for every row. */
7941
+ deviceId: number().int().optional(),
7942
+ /** Only decisions at or after this epoch ms. */
7943
+ since: number().int().optional(),
7944
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7945
+ verdict: BirthDecisionVerdictSchema.optional(),
7946
+ /** Max rows returned, newest-first. */
7947
+ limit: number().int().min(1).max(5e3).optional()
7948
+ });
7798
7949
  /** One archived note — the operator's words plus enough context to find what
7799
7950
  * they were looking at, after the track itself is gone. */
7800
7951
  var ArchivedDebugNoteSchema = object({
@@ -20062,7 +20213,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20062
20213
  deviceId: number(),
20063
20214
  trackId: string(),
20064
20215
  flags: TrackFlagsPatchSchema
20065
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20216
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20066
20217
  kind: "query",
20067
20218
  auth: "admin"
20068
20219
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20504,6 +20655,22 @@ var occupancyRecheckFramesField = {
20504
20655
  step: 1
20505
20656
  };
20506
20657
  /**
20658
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20659
+ *
20660
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20661
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20662
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20663
+ * spare for live. `0` turns the burst off entirely (the history is still
20664
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20665
+ * discarded — the pre-D411 behaviour).
20666
+ */
20667
+ var preRollInferenceFramesField = {
20668
+ min: 0,
20669
+ max: 30,
20670
+ default: 12,
20671
+ step: 1
20672
+ };
20673
+ /**
20507
20674
  * Source enum for motion signals fed to the runner. Extensible — add
20508
20675
  * new variants here when new motion-trigger paths are wired in
20509
20676
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20744,6 +20911,31 @@ var RunnerCameraConfigSchema = object({
20744
20911
  * to every occupancy rule until something moved in front of it. The churn is
20745
20912
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20746
20913
  */
20914
+ /**
20915
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
20916
+ * at session open — instead of decoding it and throwing it away.
20917
+ *
20918
+ * DEFAULT `true`, and the default is the argument. This is not a new
20919
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
20920
+ * already served, already decoded and already paid for on every on-motion
20921
+ * detection session that asks for history. What shipped was a last-moment
20922
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
20923
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
20924
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
20925
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
20926
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
20927
+ * was decoded, and was freed.
20928
+ *
20929
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
20930
+ * setting whose absence looks exactly like a camera that noticed the cyclist
20931
+ * late. What makes ON safe is not a switch but the BOUND —
20932
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
20933
+ * the last inference permit — so the switch exists for the camera where the
20934
+ * history is worthless (a doorbell whose subject is always already at the
20935
+ * door), not as a hedge against the feature.
20936
+ */
20937
+ preRollInferenceEnabled: boolean().default(true),
20938
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20747
20939
  occupancyRecheckEnabled: boolean().default(true),
20748
20940
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20749
20941
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20772,7 +20964,7 @@ var RunnerCameraConfigSchema = object({
20772
20964
  */
20773
20965
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20774
20966
  });
20775
- 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;
20967
+ 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;
20776
20968
  /**
20777
20969
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20778
20970
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -33466,6 +33658,12 @@ Object.freeze({
33466
33658
  addonId: null,
33467
33659
  access: "view"
33468
33660
  },
33661
+ "pipelineAnalytics.listBirthDecisions": {
33662
+ capName: "pipeline-analytics",
33663
+ capScope: "device",
33664
+ addonId: null,
33665
+ access: "view"
33666
+ },
33469
33667
  "pipelineAnalytics.listEventKinds": {
33470
33668
  capName: "pipeline-analytics",
33471
33669
  capScope: "device",
@@ -37258,6 +37456,11 @@ Object.freeze({
37258
37456
  form: "single",
37259
37457
  optional: true
37260
37458
  }],
37459
+ "pipelineAnalytics.listBirthDecisions": [{
37460
+ name: "deviceId",
37461
+ form: "single",
37462
+ optional: true
37463
+ }],
37261
37464
  "pipelineAnalytics.listEventKinds": [{
37262
37465
  name: "deviceId",
37263
37466
  form: "single",
@@ -7768,6 +7768,157 @@ var CameraSwitchGroupSchema = object({
7768
7768
  /** Unix ms when the group was composed server-side. */
7769
7769
  fetchedAt: number()
7770
7770
  });
7771
+ /**
7772
+ * What the gate decided about a birth, from the CALLER's point of view.
7773
+ *
7774
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7775
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7776
+ * The third member is the one the gate's own type cannot express, because
7777
+ * exhaustion is a property of how long the caller waited.
7778
+ */
7779
+ var BirthDecisionVerdictSchema = _enum([
7780
+ "confirmed",
7781
+ "suppressed",
7782
+ "exhausted-fallback"
7783
+ ]);
7784
+ /** One birth decision, as it is kept. */
7785
+ var BirthDecisionRecordSchema = object({
7786
+ id: string(),
7787
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7788
+ at: number().int(),
7789
+ /** The camera. Required: every question here is asked per-camera. */
7790
+ deviceId: number().int(),
7791
+ /**
7792
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7793
+ * birth has no track at all, and a confirmed one is expected to age out long
7794
+ * before this row does. Named `sourceTrackId` so the retention model's
7795
+ * ownership derivation (`collection-classification.ts`, which keys on a
7796
+ * column literally called `trackId`) cannot reach it.
7797
+ */
7798
+ sourceTrackId: string(),
7799
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7800
+ className: string(),
7801
+ verdict: BirthDecisionVerdictSchema,
7802
+ /**
7803
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7804
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7805
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7806
+ * "unknown": it says the gate took no measurement because it was off, which
7807
+ * is a different population and must never be averaged in with the rest.
7808
+ */
7809
+ reason: string().nullable(),
7810
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7811
+ attempts: number().int(),
7812
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7813
+ deferredForMs: number().int(),
7814
+ /**
7815
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7816
+ *
7817
+ * `true` when the frame the verdict was taken on carried no matched
7818
+ * detection for this track — the tracker was coasting a frozen box and the
7819
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7820
+ * straight out of `result.tracked` without checking, so this is reachable
7821
+ * today; the question is the RATE, per camera, and whether refusing those
7822
+ * frames would have cost real tracks (cross-read against `verdict` and
7823
+ * `decidedByBirthEvidence`).
7824
+ */
7825
+ decidedOnCoastedFrame: boolean(),
7826
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7827
+ birthEvidenceAvailable: boolean(),
7828
+ /**
7829
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7830
+ * deciding are different: the carried crop is confirm-only, so a candidate
7831
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7832
+ * crop of a later instant. A coasted decision backed by carried evidence is
7833
+ * a real observation of the birth instant; one without it is not.
7834
+ */
7835
+ decidedByBirthEvidence: boolean(),
7836
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7837
+ * found — deliberately not 0, which would be a measurement that never was. */
7838
+ bestScore: number().nullable(),
7839
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7840
+ appliedMinConfidence: number().nullable(),
7841
+ /**
7842
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7843
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7844
+ */
7845
+ firstSeen: number().int().nullable(),
7846
+ /**
7847
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7848
+ * or `null` when there is none, it is older than
7849
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7850
+ */
7851
+ motionOnsetAt: number().int().nullable(),
7852
+ /**
7853
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7854
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7855
+ *
7856
+ * **Why motion onset and not something else.** Two other proxies were
7857
+ * considered and rejected:
7858
+ * - *the recording/pipeline session start*: for a camera on
7859
+ * `detectionMode: 'always'` the session opens at process start, hours
7860
+ * before any subject. It measures nothing.
7861
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7862
+ * `firstSeen` IS the first detection of that object, so for the track that
7863
+ * OPENS a burst — the only one the operator is complaining about — the two
7864
+ * are the same instant and the latency is 0 by construction.
7865
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7866
+ * mechanism from the object detector, so it is the only one that can precede
7867
+ * it. It is also already maintained per-device at frame rate on this very
7868
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7869
+ * it free — and, decisively, the frame path and the motion path are gated to
7870
+ * the SAME designated post-processing node, so the mirror is never empty for
7871
+ * a camera whose births land here.
7872
+ *
7873
+ * **Error bars, all of them.**
7874
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7875
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7876
+ * latency without bound. Mitigated, never removed, by
7877
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7878
+ * candidate for "this burst is this subject", and even then it is a
7879
+ * candidate, not a fact.
7880
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7881
+ * intensity threshold. A subject entering slowly at the far edge of the
7882
+ * frame can clear the detector's confidence floor BEFORE it clears the
7883
+ * motion floor, making this negative. Negatives are stored as-is and
7884
+ * never clamped — clamping would fabricate the distribution's left tail,
7885
+ * which is the half that says the proxy is unreliable.
7886
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7887
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7888
+ * therefore comparable WITHIN a camera and not across cameras of
7889
+ * different motion sources. The motion source is deliberately not copied
7890
+ * here — it belongs to the addon that owns the device (D224) and this is
7891
+ * a write on the frame path — so group by `deviceId`, which is how the
7892
+ * question is always asked anyway.
7893
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7894
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7895
+ * past it this is `null`.
7896
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7897
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7898
+ * camera nobody has a reference instant for.
7899
+ *
7900
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7901
+ * as such. It is not a per-track fact and must never be shown as one.
7902
+ */
7903
+ birthLatencyMs: number().int().nullable(),
7904
+ /**
7905
+ * How many births this device has already decided since that motion onset.
7906
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7907
+ * this subject. `null` when there is no usable onset.
7908
+ */
7909
+ birthIndexInBurst: number().int().nullable()
7910
+ });
7911
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7912
+ var BirthDecisionQueryInputSchema = object({
7913
+ /** Restrict to a single camera; omit for every row. */
7914
+ deviceId: number().int().optional(),
7915
+ /** Only decisions at or after this epoch ms. */
7916
+ since: number().int().optional(),
7917
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7918
+ verdict: BirthDecisionVerdictSchema.optional(),
7919
+ /** Max rows returned, newest-first. */
7920
+ limit: number().int().min(1).max(5e3).optional()
7921
+ });
7771
7922
  /** One archived note — the operator's words plus enough context to find what
7772
7923
  * they were looking at, after the track itself is gone. */
7773
7924
  var ArchivedDebugNoteSchema = object({
@@ -20035,7 +20186,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20035
20186
  deviceId: number(),
20036
20187
  trackId: string(),
20037
20188
  flags: TrackFlagsPatchSchema
20038
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20189
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20039
20190
  kind: "query",
20040
20191
  auth: "admin"
20041
20192
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20477,6 +20628,22 @@ var occupancyRecheckFramesField = {
20477
20628
  step: 1
20478
20629
  };
20479
20630
  /**
20631
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20632
+ *
20633
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20634
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20635
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20636
+ * spare for live. `0` turns the burst off entirely (the history is still
20637
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20638
+ * discarded — the pre-D411 behaviour).
20639
+ */
20640
+ var preRollInferenceFramesField = {
20641
+ min: 0,
20642
+ max: 30,
20643
+ default: 12,
20644
+ step: 1
20645
+ };
20646
+ /**
20480
20647
  * Source enum for motion signals fed to the runner. Extensible — add
20481
20648
  * new variants here when new motion-trigger paths are wired in
20482
20649
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -20717,6 +20884,31 @@ var RunnerCameraConfigSchema = object({
20717
20884
  * to every occupancy rule until something moved in front of it. The churn is
20718
20885
  * now paid on the interval instead — see `occupancyRecheckSecField`.
20719
20886
  */
20887
+ /**
20888
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
20889
+ * at session open — instead of decoding it and throwing it away.
20890
+ *
20891
+ * DEFAULT `true`, and the default is the argument. This is not a new
20892
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
20893
+ * already served, already decoded and already paid for on every on-motion
20894
+ * detection session that asks for history. What shipped was a last-moment
20895
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
20896
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
20897
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
20898
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
20899
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
20900
+ * was decoded, and was freed.
20901
+ *
20902
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
20903
+ * setting whose absence looks exactly like a camera that noticed the cyclist
20904
+ * late. What makes ON safe is not a switch but the BOUND —
20905
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
20906
+ * the last inference permit — so the switch exists for the camera where the
20907
+ * history is worthless (a doorbell whose subject is always already at the
20908
+ * door), not as a hedge against the feature.
20909
+ */
20910
+ preRollInferenceEnabled: boolean().default(true),
20911
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
20720
20912
  occupancyRecheckEnabled: boolean().default(true),
20721
20913
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
20722
20914
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -20745,7 +20937,7 @@ var RunnerCameraConfigSchema = object({
20745
20937
  */
20746
20938
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
20747
20939
  });
20748
- 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;
20940
+ 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;
20749
20941
  /**
20750
20942
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
20751
20943
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -33439,6 +33631,12 @@ Object.freeze({
33439
33631
  addonId: null,
33440
33632
  access: "view"
33441
33633
  },
33634
+ "pipelineAnalytics.listBirthDecisions": {
33635
+ capName: "pipeline-analytics",
33636
+ capScope: "device",
33637
+ addonId: null,
33638
+ access: "view"
33639
+ },
33442
33640
  "pipelineAnalytics.listEventKinds": {
33443
33641
  capName: "pipeline-analytics",
33444
33642
  capScope: "device",
@@ -37231,6 +37429,11 @@ Object.freeze({
37231
37429
  form: "single",
37232
37430
  optional: true
37233
37431
  }],
37432
+ "pipelineAnalytics.listBirthDecisions": [{
37433
+ name: "deviceId",
37434
+ form: "single",
37435
+ optional: true
37436
+ }],
37234
37437
  "pipelineAnalytics.listEventKinds": [{
37235
37438
  name: "deviceId",
37236
37439
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.93",
3
+ "version": "1.2.95",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",