@camstack/addon-provider-dreame 0.2.87 → 0.2.89

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
@@ -60300,6 +60300,157 @@ var CameraSwitchGroupSchema = object({
60300
60300
  /** Unix ms when the group was composed server-side. */
60301
60301
  fetchedAt: number()
60302
60302
  });
60303
+ /**
60304
+ * What the gate decided about a birth, from the CALLER's point of view.
60305
+ *
60306
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
60307
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
60308
+ * The third member is the one the gate's own type cannot express, because
60309
+ * exhaustion is a property of how long the caller waited.
60310
+ */
60311
+ var BirthDecisionVerdictSchema = _enum([
60312
+ "confirmed",
60313
+ "suppressed",
60314
+ "exhausted-fallback"
60315
+ ]);
60316
+ /** One birth decision, as it is kept. */
60317
+ var BirthDecisionRecordSchema = object({
60318
+ id: string(),
60319
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
60320
+ at: number().int(),
60321
+ /** The camera. Required: every question here is asked per-camera. */
60322
+ deviceId: number().int(),
60323
+ /**
60324
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
60325
+ * birth has no track at all, and a confirmed one is expected to age out long
60326
+ * before this row does. Named `sourceTrackId` so the retention model's
60327
+ * ownership derivation (`collection-classification.ts`, which keys on a
60328
+ * column literally called `trackId`) cannot reach it.
60329
+ */
60330
+ sourceTrackId: string(),
60331
+ /** The candidate's claimed class. The miss rate is asked per class too. */
60332
+ className: string(),
60333
+ verdict: BirthDecisionVerdictSchema,
60334
+ /**
60335
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
60336
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
60337
+ * when the gate is DISABLED and every birth is waved through. `null` is not
60338
+ * "unknown": it says the gate took no measurement because it was off, which
60339
+ * is a different population and must never be averaged in with the rest.
60340
+ */
60341
+ reason: string().nullable(),
60342
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
60343
+ attempts: number().int(),
60344
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
60345
+ deferredForMs: number().int(),
60346
+ /**
60347
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
60348
+ *
60349
+ * `true` when the frame the verdict was taken on carried no matched
60350
+ * detection for this track — the tracker was coasting a frozen box and the
60351
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
60352
+ * straight out of `result.tracked` without checking, so this is reachable
60353
+ * today; the question is the RATE, per camera, and whether refusing those
60354
+ * frames would have cost real tracks (cross-read against `verdict` and
60355
+ * `decidedByBirthEvidence`).
60356
+ */
60357
+ decidedOnCoastedFrame: boolean(),
60358
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
60359
+ birthEvidenceAvailable: boolean(),
60360
+ /**
60361
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
60362
+ * deciding are different: the carried crop is confirm-only, so a candidate
60363
+ * can hold evidence, be found inconclusive on it, and be decided by a native
60364
+ * crop of a later instant. A coasted decision backed by carried evidence is
60365
+ * a real observation of the birth instant; one without it is not.
60366
+ */
60367
+ decidedByBirthEvidence: boolean(),
60368
+ /** Best class-compatible crop score, or `null` when nothing compatible was
60369
+ * found — deliberately not 0, which would be a measurement that never was. */
60370
+ bestScore: number().nullable(),
60371
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
60372
+ appliedMinConfidence: number().nullable(),
60373
+ /**
60374
+ * The track's own `firstSeen` — the candidate's first frame, which is where
60375
+ * the timeline starts. `null` for a suppressed birth, which has no track.
60376
+ */
60377
+ firstSeen: number().int().nullable(),
60378
+ /**
60379
+ * The device's most recent motion RISING EDGE at the moment of the decision,
60380
+ * or `null` when there is none, it is older than
60381
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
60382
+ */
60383
+ motionOnsetAt: number().int().nullable(),
60384
+ /**
60385
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
60386
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
60387
+ *
60388
+ * **Why motion onset and not something else.** Two other proxies were
60389
+ * considered and rejected:
60390
+ * - *the recording/pipeline session start*: for a camera on
60391
+ * `detectionMode: 'always'` the session opens at process start, hours
60392
+ * before any subject. It measures nothing.
60393
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
60394
+ * `firstSeen` IS the first detection of that object, so for the track that
60395
+ * OPENS a burst — the only one the operator is complaining about — the two
60396
+ * are the same instant and the latency is 0 by construction.
60397
+ * Motion onset is the only in-process signal produced by a DIFFERENT
60398
+ * mechanism from the object detector, so it is the only one that can precede
60399
+ * it. It is also already maintained per-device at frame rate on this very
60400
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
60401
+ * it free — and, decisively, the frame path and the motion path are gated to
60402
+ * the SAME designated post-processing node, so the mirror is never empty for
60403
+ * a camera whose births land here.
60404
+ *
60405
+ * **Error bars, all of them.**
60406
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
60407
+ * wall or a branch, and only later joined by the person, OVERSTATES the
60408
+ * latency without bound. Mitigated, never removed, by
60409
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
60410
+ * candidate for "this burst is this subject", and even then it is a
60411
+ * candidate, not a fact.
60412
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
60413
+ * intensity threshold. A subject entering slowly at the far edge of the
60414
+ * frame can clear the detector's confidence floor BEFORE it clears the
60415
+ * motion floor, making this negative. Negatives are stored as-is and
60416
+ * never clamped — clamping would fabricate the distribution's left tail,
60417
+ * which is the half that says the proxy is unreliable.
60418
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
60419
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
60420
+ * therefore comparable WITHIN a camera and not across cameras of
60421
+ * different motion sources. The motion source is deliberately not copied
60422
+ * here — it belongs to the addon that owns the device (D224) and this is
60423
+ * a write on the frame path — so group by `deviceId`, which is how the
60424
+ * question is always asked anyway.
60425
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
60426
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
60427
+ * past it this is `null`.
60428
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
60429
+ * reporting, or nothing since boot: `null`. Which is the truth about a
60430
+ * camera nobody has a reference instant for.
60431
+ *
60432
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
60433
+ * as such. It is not a per-track fact and must never be shown as one.
60434
+ */
60435
+ birthLatencyMs: number().int().nullable(),
60436
+ /**
60437
+ * How many births this device has already decided since that motion onset.
60438
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
60439
+ * this subject. `null` when there is no usable onset.
60440
+ */
60441
+ birthIndexInBurst: number().int().nullable()
60442
+ });
60443
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
60444
+ var BirthDecisionQueryInputSchema = object({
60445
+ /** Restrict to a single camera; omit for every row. */
60446
+ deviceId: number().int().optional(),
60447
+ /** Only decisions at or after this epoch ms. */
60448
+ since: number().int().optional(),
60449
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
60450
+ verdict: BirthDecisionVerdictSchema.optional(),
60451
+ /** Max rows returned, newest-first. */
60452
+ limit: number().int().min(1).max(5e3).optional()
60453
+ });
60303
60454
  /** One archived note — the operator's words plus enough context to find what
60304
60455
  * they were looking at, after the track itself is gone. */
60305
60456
  var ArchivedDebugNoteSchema = object({
@@ -72809,7 +72960,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
72809
72960
  deviceId: number(),
72810
72961
  trackId: string(),
72811
72962
  flags: TrackFlagsPatchSchema
72812
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
72963
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
72813
72964
  kind: "query",
72814
72965
  auth: "admin"
72815
72966
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -73251,6 +73402,22 @@ var occupancyRecheckFramesField = {
73251
73402
  step: 1
73252
73403
  };
73253
73404
  /**
73405
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
73406
+ *
73407
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
73408
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
73409
+ * fleet measures — one-shot, and only ever taken while a permit would still be
73410
+ * spare for live. `0` turns the burst off entirely (the history is still
73411
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
73412
+ * discarded — the pre-D411 behaviour).
73413
+ */
73414
+ var preRollInferenceFramesField = {
73415
+ min: 0,
73416
+ max: 30,
73417
+ default: 12,
73418
+ step: 1
73419
+ };
73420
+ /**
73254
73421
  * Source enum for motion signals fed to the runner. Extensible — add
73255
73422
  * new variants here when new motion-trigger paths are wired in
73256
73423
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -73491,6 +73658,31 @@ var RunnerCameraConfigSchema = object({
73491
73658
  * to every occupancy rule until something moved in front of it. The churn is
73492
73659
  * now paid on the interval instead — see `occupancyRecheckSecField`.
73493
73660
  */
73661
+ /**
73662
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
73663
+ * at session open — instead of decoding it and throwing it away.
73664
+ *
73665
+ * DEFAULT `true`, and the default is the argument. This is not a new
73666
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
73667
+ * already served, already decoded and already paid for on every on-motion
73668
+ * detection session that asks for history. What shipped was a last-moment
73669
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
73670
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
73671
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
73672
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
73673
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
73674
+ * was decoded, and was freed.
73675
+ *
73676
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
73677
+ * setting whose absence looks exactly like a camera that noticed the cyclist
73678
+ * late. What makes ON safe is not a switch but the BOUND —
73679
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
73680
+ * the last inference permit — so the switch exists for the camera where the
73681
+ * history is worthless (a doorbell whose subject is always already at the
73682
+ * door), not as a hedge against the feature.
73683
+ */
73684
+ preRollInferenceEnabled: boolean().default(true),
73685
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
73494
73686
  occupancyRecheckEnabled: boolean().default(true),
73495
73687
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
73496
73688
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -73519,7 +73711,7 @@ var RunnerCameraConfigSchema = object({
73519
73711
  */
73520
73712
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
73521
73713
  });
73522
- 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;
73714
+ 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;
73523
73715
  /**
73524
73716
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
73525
73717
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -90382,6 +90574,12 @@ Object.freeze({
90382
90574
  addonId: null,
90383
90575
  access: "view"
90384
90576
  },
90577
+ "pipelineAnalytics.listBirthDecisions": {
90578
+ capName: "pipeline-analytics",
90579
+ capScope: "device",
90580
+ addonId: null,
90581
+ access: "view"
90582
+ },
90385
90583
  "pipelineAnalytics.listEventKinds": {
90386
90584
  capName: "pipeline-analytics",
90387
90585
  capScope: "device",
@@ -94174,6 +94372,11 @@ Object.freeze({
94174
94372
  form: "single",
94175
94373
  optional: true
94176
94374
  }],
94375
+ "pipelineAnalytics.listBirthDecisions": [{
94376
+ name: "deviceId",
94377
+ form: "single",
94378
+ optional: true
94379
+ }],
94177
94380
  "pipelineAnalytics.listEventKinds": [{
94178
94381
  name: "deviceId",
94179
94382
  form: "single",
package/dist/addon.mjs CHANGED
@@ -60297,6 +60297,157 @@ var CameraSwitchGroupSchema = object({
60297
60297
  /** Unix ms when the group was composed server-side. */
60298
60298
  fetchedAt: number()
60299
60299
  });
60300
+ /**
60301
+ * What the gate decided about a birth, from the CALLER's point of view.
60302
+ *
60303
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
60304
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
60305
+ * The third member is the one the gate's own type cannot express, because
60306
+ * exhaustion is a property of how long the caller waited.
60307
+ */
60308
+ var BirthDecisionVerdictSchema = _enum([
60309
+ "confirmed",
60310
+ "suppressed",
60311
+ "exhausted-fallback"
60312
+ ]);
60313
+ /** One birth decision, as it is kept. */
60314
+ var BirthDecisionRecordSchema = object({
60315
+ id: string(),
60316
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
60317
+ at: number().int(),
60318
+ /** The camera. Required: every question here is asked per-camera. */
60319
+ deviceId: number().int(),
60320
+ /**
60321
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
60322
+ * birth has no track at all, and a confirmed one is expected to age out long
60323
+ * before this row does. Named `sourceTrackId` so the retention model's
60324
+ * ownership derivation (`collection-classification.ts`, which keys on a
60325
+ * column literally called `trackId`) cannot reach it.
60326
+ */
60327
+ sourceTrackId: string(),
60328
+ /** The candidate's claimed class. The miss rate is asked per class too. */
60329
+ className: string(),
60330
+ verdict: BirthDecisionVerdictSchema,
60331
+ /**
60332
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
60333
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
60334
+ * when the gate is DISABLED and every birth is waved through. `null` is not
60335
+ * "unknown": it says the gate took no measurement because it was off, which
60336
+ * is a different population and must never be averaged in with the rest.
60337
+ */
60338
+ reason: string().nullable(),
60339
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
60340
+ attempts: number().int(),
60341
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
60342
+ deferredForMs: number().int(),
60343
+ /**
60344
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
60345
+ *
60346
+ * `true` when the frame the verdict was taken on carried no matched
60347
+ * detection for this track — the tracker was coasting a frozen box and the
60348
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
60349
+ * straight out of `result.tracked` without checking, so this is reachable
60350
+ * today; the question is the RATE, per camera, and whether refusing those
60351
+ * frames would have cost real tracks (cross-read against `verdict` and
60352
+ * `decidedByBirthEvidence`).
60353
+ */
60354
+ decidedOnCoastedFrame: boolean(),
60355
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
60356
+ birthEvidenceAvailable: boolean(),
60357
+ /**
60358
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
60359
+ * deciding are different: the carried crop is confirm-only, so a candidate
60360
+ * can hold evidence, be found inconclusive on it, and be decided by a native
60361
+ * crop of a later instant. A coasted decision backed by carried evidence is
60362
+ * a real observation of the birth instant; one without it is not.
60363
+ */
60364
+ decidedByBirthEvidence: boolean(),
60365
+ /** Best class-compatible crop score, or `null` when nothing compatible was
60366
+ * found — deliberately not 0, which would be a measurement that never was. */
60367
+ bestScore: number().nullable(),
60368
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
60369
+ appliedMinConfidence: number().nullable(),
60370
+ /**
60371
+ * The track's own `firstSeen` — the candidate's first frame, which is where
60372
+ * the timeline starts. `null` for a suppressed birth, which has no track.
60373
+ */
60374
+ firstSeen: number().int().nullable(),
60375
+ /**
60376
+ * The device's most recent motion RISING EDGE at the moment of the decision,
60377
+ * or `null` when there is none, it is older than
60378
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
60379
+ */
60380
+ motionOnsetAt: number().int().nullable(),
60381
+ /**
60382
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
60383
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
60384
+ *
60385
+ * **Why motion onset and not something else.** Two other proxies were
60386
+ * considered and rejected:
60387
+ * - *the recording/pipeline session start*: for a camera on
60388
+ * `detectionMode: 'always'` the session opens at process start, hours
60389
+ * before any subject. It measures nothing.
60390
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
60391
+ * `firstSeen` IS the first detection of that object, so for the track that
60392
+ * OPENS a burst — the only one the operator is complaining about — the two
60393
+ * are the same instant and the latency is 0 by construction.
60394
+ * Motion onset is the only in-process signal produced by a DIFFERENT
60395
+ * mechanism from the object detector, so it is the only one that can precede
60396
+ * it. It is also already maintained per-device at frame rate on this very
60397
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
60398
+ * it free — and, decisively, the frame path and the motion path are gated to
60399
+ * the SAME designated post-processing node, so the mirror is never empty for
60400
+ * a camera whose births land here.
60401
+ *
60402
+ * **Error bars, all of them.**
60403
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
60404
+ * wall or a branch, and only later joined by the person, OVERSTATES the
60405
+ * latency without bound. Mitigated, never removed, by
60406
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
60407
+ * candidate for "this burst is this subject", and even then it is a
60408
+ * candidate, not a fact.
60409
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
60410
+ * intensity threshold. A subject entering slowly at the far edge of the
60411
+ * frame can clear the detector's confidence floor BEFORE it clears the
60412
+ * motion floor, making this negative. Negatives are stored as-is and
60413
+ * never clamped — clamping would fabricate the distribution's left tail,
60414
+ * which is the half that says the proxy is unreliable.
60415
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
60416
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
60417
+ * therefore comparable WITHIN a camera and not across cameras of
60418
+ * different motion sources. The motion source is deliberately not copied
60419
+ * here — it belongs to the addon that owns the device (D224) and this is
60420
+ * a write on the frame path — so group by `deviceId`, which is how the
60421
+ * question is always asked anyway.
60422
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
60423
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
60424
+ * past it this is `null`.
60425
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
60426
+ * reporting, or nothing since boot: `null`. Which is the truth about a
60427
+ * camera nobody has a reference instant for.
60428
+ *
60429
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
60430
+ * as such. It is not a per-track fact and must never be shown as one.
60431
+ */
60432
+ birthLatencyMs: number().int().nullable(),
60433
+ /**
60434
+ * How many births this device has already decided since that motion onset.
60435
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
60436
+ * this subject. `null` when there is no usable onset.
60437
+ */
60438
+ birthIndexInBurst: number().int().nullable()
60439
+ });
60440
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
60441
+ var BirthDecisionQueryInputSchema = object({
60442
+ /** Restrict to a single camera; omit for every row. */
60443
+ deviceId: number().int().optional(),
60444
+ /** Only decisions at or after this epoch ms. */
60445
+ since: number().int().optional(),
60446
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
60447
+ verdict: BirthDecisionVerdictSchema.optional(),
60448
+ /** Max rows returned, newest-first. */
60449
+ limit: number().int().min(1).max(5e3).optional()
60450
+ });
60300
60451
  /** One archived note — the operator's words plus enough context to find what
60301
60452
  * they were looking at, after the track itself is gone. */
60302
60453
  var ArchivedDebugNoteSchema = object({
@@ -72806,7 +72957,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
72806
72957
  deviceId: number(),
72807
72958
  trackId: string(),
72808
72959
  flags: TrackFlagsPatchSchema
72809
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
72960
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
72810
72961
  kind: "query",
72811
72962
  auth: "admin"
72812
72963
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -73248,6 +73399,22 @@ var occupancyRecheckFramesField = {
73248
73399
  step: 1
73249
73400
  };
73250
73401
  /**
73402
+ * Frames one PRE-ROLL catch-up burst may send to inference at session open.
73403
+ *
73404
+ * The default of 12 over a ~4 s retained window is one frame per ~333 ms of
73405
+ * footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
73406
+ * fleet measures — one-shot, and only ever taken while a permit would still be
73407
+ * spare for live. `0` turns the burst off entirely (the history is still
73408
+ * decoded, because that is how the dial reaches a decodable GOP, and is then
73409
+ * discarded — the pre-D411 behaviour).
73410
+ */
73411
+ var preRollInferenceFramesField = {
73412
+ min: 0,
73413
+ max: 30,
73414
+ default: 12,
73415
+ step: 1
73416
+ };
73417
+ /**
73251
73418
  * Source enum for motion signals fed to the runner. Extensible — add
73252
73419
  * new variants here when new motion-trigger paths are wired in
73253
73420
  * (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
@@ -73488,6 +73655,31 @@ var RunnerCameraConfigSchema = object({
73488
73655
  * to every occupancy rule until something moved in front of it. The churn is
73489
73656
  * now paid on the interval instead — see `occupancyRecheckSecField`.
73490
73657
  */
73658
+ /**
73659
+ * Infer the session's PRE-ROLL — the retained history the restreamer replays
73660
+ * at session open — instead of decoding it and throwing it away.
73661
+ *
73662
+ * DEFAULT `true`, and the default is the argument. This is not a new
73663
+ * capability being offered cautiously: the pre-roll is ALREADY requested,
73664
+ * already served, already decoded and already paid for on every on-motion
73665
+ * detection session that asks for history. What shipped was a last-moment
73666
+ * discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
73667
+ * arriving inside a few hundred ms of wall clock looks to it like one frame's
73668
+ * worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
73669
+ * recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
73670
+ * 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
73671
+ * was decoded, and was freed.
73672
+ *
73673
+ * Shipping that as opt-in would ship the bug: an operator cannot discover a
73674
+ * setting whose absence looks exactly like a camera that noticed the cyclist
73675
+ * late. What makes ON safe is not a switch but the BOUND —
73676
+ * `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
73677
+ * the last inference permit — so the switch exists for the camera where the
73678
+ * history is worthless (a doorbell whose subject is always already at the
73679
+ * door), not as a hedge against the feature.
73680
+ */
73681
+ preRollInferenceEnabled: boolean().default(true),
73682
+ preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
73491
73683
  occupancyRecheckEnabled: boolean().default(true),
73492
73684
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
73493
73685
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
@@ -73516,7 +73708,7 @@ var RunnerCameraConfigSchema = object({
73516
73708
  */
73517
73709
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
73518
73710
  });
73519
- 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;
73711
+ 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;
73520
73712
  /**
73521
73713
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
73522
73714
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -90379,6 +90571,12 @@ Object.freeze({
90379
90571
  addonId: null,
90380
90572
  access: "view"
90381
90573
  },
90574
+ "pipelineAnalytics.listBirthDecisions": {
90575
+ capName: "pipeline-analytics",
90576
+ capScope: "device",
90577
+ addonId: null,
90578
+ access: "view"
90579
+ },
90382
90580
  "pipelineAnalytics.listEventKinds": {
90383
90581
  capName: "pipeline-analytics",
90384
90582
  capScope: "device",
@@ -94171,6 +94369,11 @@ Object.freeze({
94171
94369
  form: "single",
94172
94370
  optional: true
94173
94371
  }],
94372
+ "pipelineAnalytics.listBirthDecisions": [{
94373
+ name: "deviceId",
94374
+ form: "single",
94375
+ optional: true
94376
+ }],
94174
94377
  "pipelineAnalytics.listEventKinds": [{
94175
94378
  name: "deviceId",
94176
94379
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.87",
3
+ "version": "0.2.89",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",