@camstack/addon-import-alexa 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
@@ -7785,6 +7785,157 @@ var CameraSwitchGroupSchema = object({
7785
7785
  /** Unix ms when the group was composed server-side. */
7786
7786
  fetchedAt: number()
7787
7787
  });
7788
+ /**
7789
+ * What the gate decided about a birth, from the CALLER's point of view.
7790
+ *
7791
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7792
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7793
+ * The third member is the one the gate's own type cannot express, because
7794
+ * exhaustion is a property of how long the caller waited.
7795
+ */
7796
+ var BirthDecisionVerdictSchema = _enum([
7797
+ "confirmed",
7798
+ "suppressed",
7799
+ "exhausted-fallback"
7800
+ ]);
7801
+ /** One birth decision, as it is kept. */
7802
+ var BirthDecisionRecordSchema = object({
7803
+ id: string(),
7804
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7805
+ at: number().int(),
7806
+ /** The camera. Required: every question here is asked per-camera. */
7807
+ deviceId: number().int(),
7808
+ /**
7809
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7810
+ * birth has no track at all, and a confirmed one is expected to age out long
7811
+ * before this row does. Named `sourceTrackId` so the retention model's
7812
+ * ownership derivation (`collection-classification.ts`, which keys on a
7813
+ * column literally called `trackId`) cannot reach it.
7814
+ */
7815
+ sourceTrackId: string(),
7816
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7817
+ className: string(),
7818
+ verdict: BirthDecisionVerdictSchema,
7819
+ /**
7820
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7821
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7822
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7823
+ * "unknown": it says the gate took no measurement because it was off, which
7824
+ * is a different population and must never be averaged in with the rest.
7825
+ */
7826
+ reason: string().nullable(),
7827
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7828
+ attempts: number().int(),
7829
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7830
+ deferredForMs: number().int(),
7831
+ /**
7832
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7833
+ *
7834
+ * `true` when the frame the verdict was taken on carried no matched
7835
+ * detection for this track — the tracker was coasting a frozen box and the
7836
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7837
+ * straight out of `result.tracked` without checking, so this is reachable
7838
+ * today; the question is the RATE, per camera, and whether refusing those
7839
+ * frames would have cost real tracks (cross-read against `verdict` and
7840
+ * `decidedByBirthEvidence`).
7841
+ */
7842
+ decidedOnCoastedFrame: boolean(),
7843
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7844
+ birthEvidenceAvailable: boolean(),
7845
+ /**
7846
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7847
+ * deciding are different: the carried crop is confirm-only, so a candidate
7848
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7849
+ * crop of a later instant. A coasted decision backed by carried evidence is
7850
+ * a real observation of the birth instant; one without it is not.
7851
+ */
7852
+ decidedByBirthEvidence: boolean(),
7853
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7854
+ * found — deliberately not 0, which would be a measurement that never was. */
7855
+ bestScore: number().nullable(),
7856
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7857
+ appliedMinConfidence: number().nullable(),
7858
+ /**
7859
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7860
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7861
+ */
7862
+ firstSeen: number().int().nullable(),
7863
+ /**
7864
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7865
+ * or `null` when there is none, it is older than
7866
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7867
+ */
7868
+ motionOnsetAt: number().int().nullable(),
7869
+ /**
7870
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7871
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7872
+ *
7873
+ * **Why motion onset and not something else.** Two other proxies were
7874
+ * considered and rejected:
7875
+ * - *the recording/pipeline session start*: for a camera on
7876
+ * `detectionMode: 'always'` the session opens at process start, hours
7877
+ * before any subject. It measures nothing.
7878
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7879
+ * `firstSeen` IS the first detection of that object, so for the track that
7880
+ * OPENS a burst — the only one the operator is complaining about — the two
7881
+ * are the same instant and the latency is 0 by construction.
7882
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7883
+ * mechanism from the object detector, so it is the only one that can precede
7884
+ * it. It is also already maintained per-device at frame rate on this very
7885
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7886
+ * it free — and, decisively, the frame path and the motion path are gated to
7887
+ * the SAME designated post-processing node, so the mirror is never empty for
7888
+ * a camera whose births land here.
7889
+ *
7890
+ * **Error bars, all of them.**
7891
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7892
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7893
+ * latency without bound. Mitigated, never removed, by
7894
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7895
+ * candidate for "this burst is this subject", and even then it is a
7896
+ * candidate, not a fact.
7897
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7898
+ * intensity threshold. A subject entering slowly at the far edge of the
7899
+ * frame can clear the detector's confidence floor BEFORE it clears the
7900
+ * motion floor, making this negative. Negatives are stored as-is and
7901
+ * never clamped — clamping would fabricate the distribution's left tail,
7902
+ * which is the half that says the proxy is unreliable.
7903
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7904
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7905
+ * therefore comparable WITHIN a camera and not across cameras of
7906
+ * different motion sources. The motion source is deliberately not copied
7907
+ * here — it belongs to the addon that owns the device (D224) and this is
7908
+ * a write on the frame path — so group by `deviceId`, which is how the
7909
+ * question is always asked anyway.
7910
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7911
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7912
+ * past it this is `null`.
7913
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7914
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7915
+ * camera nobody has a reference instant for.
7916
+ *
7917
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7918
+ * as such. It is not a per-track fact and must never be shown as one.
7919
+ */
7920
+ birthLatencyMs: number().int().nullable(),
7921
+ /**
7922
+ * How many births this device has already decided since that motion onset.
7923
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7924
+ * this subject. `null` when there is no usable onset.
7925
+ */
7926
+ birthIndexInBurst: number().int().nullable()
7927
+ });
7928
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7929
+ var BirthDecisionQueryInputSchema = object({
7930
+ /** Restrict to a single camera; omit for every row. */
7931
+ deviceId: number().int().optional(),
7932
+ /** Only decisions at or after this epoch ms. */
7933
+ since: number().int().optional(),
7934
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7935
+ verdict: BirthDecisionVerdictSchema.optional(),
7936
+ /** Max rows returned, newest-first. */
7937
+ limit: number().int().min(1).max(5e3).optional()
7938
+ });
7788
7939
  /** One archived note — the operator's words plus enough context to find what
7789
7940
  * they were looking at, after the track itself is gone. */
7790
7941
  var ArchivedDebugNoteSchema = object({
@@ -20362,7 +20513,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20362
20513
  deviceId: number(),
20363
20514
  trackId: string(),
20364
20515
  flags: TrackFlagsPatchSchema
20365
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20516
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20366
20517
  kind: "query",
20367
20518
  auth: "admin"
20368
20519
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20804,6 +20955,22 @@ var occupancyRecheckFramesField = {
20804
20955
  step: 1
20805
20956
  };
20806
20957
  /**
20958
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20959
+ *
20960
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20961
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20962
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20963
+ * spare for live. `0` turns the burst off entirely (the history is still
20964
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20965
+ * discarded — the pre-D411 behaviour).
20966
+ */
20967
+ var preRollInferenceFramesField = {
20968
+ min: 0,
20969
+ max: 30,
20970
+ default: 12,
20971
+ step: 1
20972
+ };
20973
+ /**
20807
20974
  * Source enum for motion signals fed to the runner. Extensible — add
20808
20975
  * new variants here when new motion-trigger paths are wired in
20809
20976
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -21044,6 +21211,31 @@ var RunnerCameraConfigSchema = object({
21044
21211
  * to every occupancy rule until something moved in front of it. The churn is
21045
21212
  * now paid on the interval instead — see `occupancyRecheckSecField`.
21046
21213
  */
21214
+ /**
21215
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21216
+ * at session open — instead of decoding it and throwing it away.
21217
+ *
21218
+ * DEFAULT `true`, and the default is the argument. This is not a new
21219
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21220
+ * already served, already decoded and already paid for on every on-motion
21221
+ * detection session that asks for history. What shipped was a last-moment
21222
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21223
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21224
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21225
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21226
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21227
+ * was decoded, and was freed.
21228
+ *
21229
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21230
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21231
+ * late. What makes ON safe is not a switch but the BOUND —
21232
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21233
+ * the last inference permit — so the switch exists for the camera where the
21234
+ * history is worthless (a doorbell whose subject is always already at the
21235
+ * door), not as a hedge against the feature.
21236
+ */
21237
+ preRollInferenceEnabled: boolean().default(true),
21238
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
21047
21239
  occupancyRecheckEnabled: boolean().default(true),
21048
21240
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
21049
21241
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -21072,7 +21264,7 @@ var RunnerCameraConfigSchema = object({
21072
21264
  */
21073
21265
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
21074
21266
  });
21075
- 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;
21267
+ 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;
21076
21268
  /**
21077
21269
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
21078
21270
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37779,6 +37971,12 @@ Object.freeze({
37779
37971
  addonId: null,
37780
37972
  access: "view"
37781
37973
  },
37974
+ "pipelineAnalytics.listBirthDecisions": {
37975
+ capName: "pipeline-analytics",
37976
+ capScope: "device",
37977
+ addonId: null,
37978
+ access: "view"
37979
+ },
37782
37980
  "pipelineAnalytics.listEventKinds": {
37783
37981
  capName: "pipeline-analytics",
37784
37982
  capScope: "device",
@@ -41571,6 +41769,11 @@ Object.freeze({
41571
41769
  form: "single",
41572
41770
  optional: true
41573
41771
  }],
41772
+ "pipelineAnalytics.listBirthDecisions": [{
41773
+ name: "deviceId",
41774
+ form: "single",
41775
+ optional: true
41776
+ }],
41574
41777
  "pipelineAnalytics.listEventKinds": [{
41575
41778
  name: "deviceId",
41576
41779
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7785,6 +7785,157 @@ var CameraSwitchGroupSchema = object({
7785
7785
  /** Unix ms when the group was composed server-side. */
7786
7786
  fetchedAt: number()
7787
7787
  });
7788
+ /**
7789
+ * What the gate decided about a birth, from the CALLER's point of view.
7790
+ *
7791
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7792
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7793
+ * The third member is the one the gate's own type cannot express, because
7794
+ * exhaustion is a property of how long the caller waited.
7795
+ */
7796
+ var BirthDecisionVerdictSchema = _enum([
7797
+ "confirmed",
7798
+ "suppressed",
7799
+ "exhausted-fallback"
7800
+ ]);
7801
+ /** One birth decision, as it is kept. */
7802
+ var BirthDecisionRecordSchema = object({
7803
+ id: string(),
7804
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7805
+ at: number().int(),
7806
+ /** The camera. Required: every question here is asked per-camera. */
7807
+ deviceId: number().int(),
7808
+ /**
7809
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7810
+ * birth has no track at all, and a confirmed one is expected to age out long
7811
+ * before this row does. Named `sourceTrackId` so the retention model's
7812
+ * ownership derivation (`collection-classification.ts`, which keys on a
7813
+ * column literally called `trackId`) cannot reach it.
7814
+ */
7815
+ sourceTrackId: string(),
7816
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7817
+ className: string(),
7818
+ verdict: BirthDecisionVerdictSchema,
7819
+ /**
7820
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7821
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7822
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7823
+ * "unknown": it says the gate took no measurement because it was off, which
7824
+ * is a different population and must never be averaged in with the rest.
7825
+ */
7826
+ reason: string().nullable(),
7827
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7828
+ attempts: number().int(),
7829
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7830
+ deferredForMs: number().int(),
7831
+ /**
7832
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7833
+ *
7834
+ * `true` when the frame the verdict was taken on carried no matched
7835
+ * detection for this track — the tracker was coasting a frozen box and the
7836
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7837
+ * straight out of `result.tracked` without checking, so this is reachable
7838
+ * today; the question is the RATE, per camera, and whether refusing those
7839
+ * frames would have cost real tracks (cross-read against `verdict` and
7840
+ * `decidedByBirthEvidence`).
7841
+ */
7842
+ decidedOnCoastedFrame: boolean(),
7843
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7844
+ birthEvidenceAvailable: boolean(),
7845
+ /**
7846
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7847
+ * deciding are different: the carried crop is confirm-only, so a candidate
7848
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7849
+ * crop of a later instant. A coasted decision backed by carried evidence is
7850
+ * a real observation of the birth instant; one without it is not.
7851
+ */
7852
+ decidedByBirthEvidence: boolean(),
7853
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7854
+ * found — deliberately not 0, which would be a measurement that never was. */
7855
+ bestScore: number().nullable(),
7856
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7857
+ appliedMinConfidence: number().nullable(),
7858
+ /**
7859
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7860
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7861
+ */
7862
+ firstSeen: number().int().nullable(),
7863
+ /**
7864
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7865
+ * or `null` when there is none, it is older than
7866
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7867
+ */
7868
+ motionOnsetAt: number().int().nullable(),
7869
+ /**
7870
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7871
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7872
+ *
7873
+ * **Why motion onset and not something else.** Two other proxies were
7874
+ * considered and rejected:
7875
+ * - *the recording/pipeline session start*: for a camera on
7876
+ * `detectionMode: 'always'` the session opens at process start, hours
7877
+ * before any subject. It measures nothing.
7878
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7879
+ * `firstSeen` IS the first detection of that object, so for the track that
7880
+ * OPENS a burst — the only one the operator is complaining about — the two
7881
+ * are the same instant and the latency is 0 by construction.
7882
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7883
+ * mechanism from the object detector, so it is the only one that can precede
7884
+ * it. It is also already maintained per-device at frame rate on this very
7885
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7886
+ * it free — and, decisively, the frame path and the motion path are gated to
7887
+ * the SAME designated post-processing node, so the mirror is never empty for
7888
+ * a camera whose births land here.
7889
+ *
7890
+ * **Error bars, all of them.**
7891
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7892
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7893
+ * latency without bound. Mitigated, never removed, by
7894
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7895
+ * candidate for "this burst is this subject", and even then it is a
7896
+ * candidate, not a fact.
7897
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7898
+ * intensity threshold. A subject entering slowly at the far edge of the
7899
+ * frame can clear the detector's confidence floor BEFORE it clears the
7900
+ * motion floor, making this negative. Negatives are stored as-is and
7901
+ * never clamped — clamping would fabricate the distribution's left tail,
7902
+ * which is the half that says the proxy is unreliable.
7903
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7904
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7905
+ * therefore comparable WITHIN a camera and not across cameras of
7906
+ * different motion sources. The motion source is deliberately not copied
7907
+ * here — it belongs to the addon that owns the device (D224) and this is
7908
+ * a write on the frame path — so group by `deviceId`, which is how the
7909
+ * question is always asked anyway.
7910
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7911
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7912
+ * past it this is `null`.
7913
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7914
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7915
+ * camera nobody has a reference instant for.
7916
+ *
7917
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7918
+ * as such. It is not a per-track fact and must never be shown as one.
7919
+ */
7920
+ birthLatencyMs: number().int().nullable(),
7921
+ /**
7922
+ * How many births this device has already decided since that motion onset.
7923
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7924
+ * this subject. `null` when there is no usable onset.
7925
+ */
7926
+ birthIndexInBurst: number().int().nullable()
7927
+ });
7928
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7929
+ var BirthDecisionQueryInputSchema = object({
7930
+ /** Restrict to a single camera; omit for every row. */
7931
+ deviceId: number().int().optional(),
7932
+ /** Only decisions at or after this epoch ms. */
7933
+ since: number().int().optional(),
7934
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7935
+ verdict: BirthDecisionVerdictSchema.optional(),
7936
+ /** Max rows returned, newest-first. */
7937
+ limit: number().int().min(1).max(5e3).optional()
7938
+ });
7788
7939
  /** One archived note — the operator's words plus enough context to find what
7789
7940
  * they were looking at, after the track itself is gone. */
7790
7941
  var ArchivedDebugNoteSchema = object({
@@ -20362,7 +20513,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20362
20513
  deviceId: number(),
20363
20514
  trackId: string(),
20364
20515
  flags: TrackFlagsPatchSchema
20365
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20516
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20366
20517
  kind: "query",
20367
20518
  auth: "admin"
20368
20519
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -20804,6 +20955,22 @@ var occupancyRecheckFramesField = {
20804
20955
  step: 1
20805
20956
  };
20806
20957
  /**
20958
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
20959
+ *
20960
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
20961
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
20962
+ * fleet measures — one-shot, and only ever taken while a permit would still be
20963
+ * spare for live. `0` turns the burst off entirely (the history is still
20964
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
20965
+ * discarded — the pre-D411 behaviour).
20966
+ */
20967
+ var preRollInferenceFramesField = {
20968
+ min: 0,
20969
+ max: 30,
20970
+ default: 12,
20971
+ step: 1
20972
+ };
20973
+ /**
20807
20974
  * Source enum for motion signals fed to the runner. Extensible — add
20808
20975
  * new variants here when new motion-trigger paths are wired in
20809
20976
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -21044,6 +21211,31 @@ var RunnerCameraConfigSchema = object({
21044
21211
  * to every occupancy rule until something moved in front of it. The churn is
21045
21212
  * now paid on the interval instead — see `occupancyRecheckSecField`.
21046
21213
  */
21214
+ /**
21215
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
21216
+ * at session open — instead of decoding it and throwing it away.
21217
+ *
21218
+ * DEFAULT `true`, and the default is the argument. This is not a new
21219
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
21220
+ * already served, already decoded and already paid for on every on-motion
21221
+ * detection session that asks for history. What shipped was a last-moment
21222
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
21223
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
21224
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
21225
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
21226
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
21227
+ * was decoded, and was freed.
21228
+ *
21229
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
21230
+ * setting whose absence looks exactly like a camera that noticed the cyclist
21231
+ * late. What makes ON safe is not a switch but the BOUND —
21232
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
21233
+ * the last inference permit — so the switch exists for the camera where the
21234
+ * history is worthless (a doorbell whose subject is always already at the
21235
+ * door), not as a hedge against the feature.
21236
+ */
21237
+ preRollInferenceEnabled: boolean().default(true),
21238
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
21047
21239
  occupancyRecheckEnabled: boolean().default(true),
21048
21240
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
21049
21241
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -21072,7 +21264,7 @@ var RunnerCameraConfigSchema = object({
21072
21264
  */
21073
21265
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
21074
21266
  });
21075
- 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;
21267
+ 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;
21076
21268
  /**
21077
21269
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
21078
21270
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -37779,6 +37971,12 @@ Object.freeze({
37779
37971
  addonId: null,
37780
37972
  access: "view"
37781
37973
  },
37974
+ "pipelineAnalytics.listBirthDecisions": {
37975
+ capName: "pipeline-analytics",
37976
+ capScope: "device",
37977
+ addonId: null,
37978
+ access: "view"
37979
+ },
37782
37980
  "pipelineAnalytics.listEventKinds": {
37783
37981
  capName: "pipeline-analytics",
37784
37982
  capScope: "device",
@@ -41571,6 +41769,11 @@ Object.freeze({
41571
41769
  form: "single",
41572
41770
  optional: true
41573
41771
  }],
41772
+ "pipelineAnalytics.listBirthDecisions": [{
41773
+ name: "deviceId",
41774
+ form: "single",
41775
+ optional: true
41776
+ }],
41574
41777
  "pipelineAnalytics.listEventKinds": [{
41575
41778
  name: "deviceId",
41576
41779
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.86",
3
+ "version": "0.2.88",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",