@camstack/addon-provider-dreo 0.2.87 → 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
@@ -7663,6 +7663,157 @@ var CameraSwitchGroupSchema = object({
7663
7663
  /** Unix ms when the group was composed server-side. */
7664
7664
  fetchedAt: number()
7665
7665
  });
7666
+ /**
7667
+ * What the gate decided about a birth, from the CALLER's point of view.
7668
+ *
7669
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7670
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7671
+ * The third member is the one the gate's own type cannot express, because
7672
+ * exhaustion is a property of how long the caller waited.
7673
+ */
7674
+ var BirthDecisionVerdictSchema = _enum([
7675
+ "confirmed",
7676
+ "suppressed",
7677
+ "exhausted-fallback"
7678
+ ]);
7679
+ /** One birth decision, as it is kept. */
7680
+ var BirthDecisionRecordSchema = object({
7681
+ id: string(),
7682
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7683
+ at: number().int(),
7684
+ /** The camera. Required: every question here is asked per-camera. */
7685
+ deviceId: number().int(),
7686
+ /**
7687
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7688
+ * birth has no track at all, and a confirmed one is expected to age out long
7689
+ * before this row does. Named `sourceTrackId` so the retention model's
7690
+ * ownership derivation (`collection-classification.ts`, which keys on a
7691
+ * column literally called `trackId`) cannot reach it.
7692
+ */
7693
+ sourceTrackId: string(),
7694
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7695
+ className: string(),
7696
+ verdict: BirthDecisionVerdictSchema,
7697
+ /**
7698
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7699
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7700
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7701
+ * "unknown": it says the gate took no measurement because it was off, which
7702
+ * is a different population and must never be averaged in with the rest.
7703
+ */
7704
+ reason: string().nullable(),
7705
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7706
+ attempts: number().int(),
7707
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7708
+ deferredForMs: number().int(),
7709
+ /**
7710
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7711
+ *
7712
+ * `true` when the frame the verdict was taken on carried no matched
7713
+ * detection for this track — the tracker was coasting a frozen box and the
7714
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7715
+ * straight out of `result.tracked` without checking, so this is reachable
7716
+ * today; the question is the RATE, per camera, and whether refusing those
7717
+ * frames would have cost real tracks (cross-read against `verdict` and
7718
+ * `decidedByBirthEvidence`).
7719
+ */
7720
+ decidedOnCoastedFrame: boolean(),
7721
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7722
+ birthEvidenceAvailable: boolean(),
7723
+ /**
7724
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7725
+ * deciding are different: the carried crop is confirm-only, so a candidate
7726
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7727
+ * crop of a later instant. A coasted decision backed by carried evidence is
7728
+ * a real observation of the birth instant; one without it is not.
7729
+ */
7730
+ decidedByBirthEvidence: boolean(),
7731
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7732
+ * found — deliberately not 0, which would be a measurement that never was. */
7733
+ bestScore: number().nullable(),
7734
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7735
+ appliedMinConfidence: number().nullable(),
7736
+ /**
7737
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7738
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7739
+ */
7740
+ firstSeen: number().int().nullable(),
7741
+ /**
7742
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7743
+ * or `null` when there is none, it is older than
7744
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7745
+ */
7746
+ motionOnsetAt: number().int().nullable(),
7747
+ /**
7748
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7749
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7750
+ *
7751
+ * **Why motion onset and not something else.** Two other proxies were
7752
+ * considered and rejected:
7753
+ * - *the recording/pipeline session start*: for a camera on
7754
+ * `detectionMode: 'always'` the session opens at process start, hours
7755
+ * before any subject. It measures nothing.
7756
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7757
+ * `firstSeen` IS the first detection of that object, so for the track that
7758
+ * OPENS a burst — the only one the operator is complaining about — the two
7759
+ * are the same instant and the latency is 0 by construction.
7760
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7761
+ * mechanism from the object detector, so it is the only one that can precede
7762
+ * it. It is also already maintained per-device at frame rate on this very
7763
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7764
+ * it free — and, decisively, the frame path and the motion path are gated to
7765
+ * the SAME designated post-processing node, so the mirror is never empty for
7766
+ * a camera whose births land here.
7767
+ *
7768
+ * **Error bars, all of them.**
7769
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7770
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7771
+ * latency without bound. Mitigated, never removed, by
7772
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7773
+ * candidate for "this burst is this subject", and even then it is a
7774
+ * candidate, not a fact.
7775
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7776
+ * intensity threshold. A subject entering slowly at the far edge of the
7777
+ * frame can clear the detector's confidence floor BEFORE it clears the
7778
+ * motion floor, making this negative. Negatives are stored as-is and
7779
+ * never clamped — clamping would fabricate the distribution's left tail,
7780
+ * which is the half that says the proxy is unreliable.
7781
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7782
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7783
+ * therefore comparable WITHIN a camera and not across cameras of
7784
+ * different motion sources. The motion source is deliberately not copied
7785
+ * here — it belongs to the addon that owns the device (D224) and this is
7786
+ * a write on the frame path — so group by `deviceId`, which is how the
7787
+ * question is always asked anyway.
7788
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7789
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7790
+ * past it this is `null`.
7791
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7792
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7793
+ * camera nobody has a reference instant for.
7794
+ *
7795
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7796
+ * as such. It is not a per-track fact and must never be shown as one.
7797
+ */
7798
+ birthLatencyMs: number().int().nullable(),
7799
+ /**
7800
+ * How many births this device has already decided since that motion onset.
7801
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7802
+ * this subject. `null` when there is no usable onset.
7803
+ */
7804
+ birthIndexInBurst: number().int().nullable()
7805
+ });
7806
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7807
+ var BirthDecisionQueryInputSchema = object({
7808
+ /** Restrict to a single camera; omit for every row. */
7809
+ deviceId: number().int().optional(),
7810
+ /** Only decisions at or after this epoch ms. */
7811
+ since: number().int().optional(),
7812
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7813
+ verdict: BirthDecisionVerdictSchema.optional(),
7814
+ /** Max rows returned, newest-first. */
7815
+ limit: number().int().min(1).max(5e3).optional()
7816
+ });
7666
7817
  /** One archived note — the operator's words plus enough context to find what
7667
7818
  * they were looking at, after the track itself is gone. */
7668
7819
  var ArchivedDebugNoteSchema = object({
@@ -20172,7 +20323,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20172
20323
  deviceId: number(),
20173
20324
  trackId: string(),
20174
20325
  flags: TrackFlagsPatchSchema
20175
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20326
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20176
20327
  kind: "query",
20177
20328
  auth: "admin"
20178
20329
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -37580,6 +37731,12 @@ Object.freeze({
37580
37731
  addonId: null,
37581
37732
  access: "view"
37582
37733
  },
37734
+ "pipelineAnalytics.listBirthDecisions": {
37735
+ capName: "pipeline-analytics",
37736
+ capScope: "device",
37737
+ addonId: null,
37738
+ access: "view"
37739
+ },
37583
37740
  "pipelineAnalytics.listEventKinds": {
37584
37741
  capName: "pipeline-analytics",
37585
37742
  capScope: "device",
@@ -41372,6 +41529,11 @@ Object.freeze({
41372
41529
  form: "single",
41373
41530
  optional: true
41374
41531
  }],
41532
+ "pipelineAnalytics.listBirthDecisions": [{
41533
+ name: "deviceId",
41534
+ form: "single",
41535
+ optional: true
41536
+ }],
41375
41537
  "pipelineAnalytics.listEventKinds": [{
41376
41538
  name: "deviceId",
41377
41539
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7664,6 +7664,157 @@ var CameraSwitchGroupSchema = object({
7664
7664
  /** Unix ms when the group was composed server-side. */
7665
7665
  fetchedAt: number()
7666
7666
  });
7667
+ /**
7668
+ * What the gate decided about a birth, from the CALLER's point of view.
7669
+ *
7670
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7671
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7672
+ * The third member is the one the gate's own type cannot express, because
7673
+ * exhaustion is a property of how long the caller waited.
7674
+ */
7675
+ var BirthDecisionVerdictSchema = _enum([
7676
+ "confirmed",
7677
+ "suppressed",
7678
+ "exhausted-fallback"
7679
+ ]);
7680
+ /** One birth decision, as it is kept. */
7681
+ var BirthDecisionRecordSchema = object({
7682
+ id: string(),
7683
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7684
+ at: number().int(),
7685
+ /** The camera. Required: every question here is asked per-camera. */
7686
+ deviceId: number().int(),
7687
+ /**
7688
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7689
+ * birth has no track at all, and a confirmed one is expected to age out long
7690
+ * before this row does. Named `sourceTrackId` so the retention model's
7691
+ * ownership derivation (`collection-classification.ts`, which keys on a
7692
+ * column literally called `trackId`) cannot reach it.
7693
+ */
7694
+ sourceTrackId: string(),
7695
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7696
+ className: string(),
7697
+ verdict: BirthDecisionVerdictSchema,
7698
+ /**
7699
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7700
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7701
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7702
+ * "unknown": it says the gate took no measurement because it was off, which
7703
+ * is a different population and must never be averaged in with the rest.
7704
+ */
7705
+ reason: string().nullable(),
7706
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7707
+ attempts: number().int(),
7708
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7709
+ deferredForMs: number().int(),
7710
+ /**
7711
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7712
+ *
7713
+ * `true` when the frame the verdict was taken on carried no matched
7714
+ * detection for this track — the tracker was coasting a frozen box and the
7715
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7716
+ * straight out of `result.tracked` without checking, so this is reachable
7717
+ * today; the question is the RATE, per camera, and whether refusing those
7718
+ * frames would have cost real tracks (cross-read against `verdict` and
7719
+ * `decidedByBirthEvidence`).
7720
+ */
7721
+ decidedOnCoastedFrame: boolean(),
7722
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7723
+ birthEvidenceAvailable: boolean(),
7724
+ /**
7725
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7726
+ * deciding are different: the carried crop is confirm-only, so a candidate
7727
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7728
+ * crop of a later instant. A coasted decision backed by carried evidence is
7729
+ * a real observation of the birth instant; one without it is not.
7730
+ */
7731
+ decidedByBirthEvidence: boolean(),
7732
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7733
+ * found — deliberately not 0, which would be a measurement that never was. */
7734
+ bestScore: number().nullable(),
7735
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7736
+ appliedMinConfidence: number().nullable(),
7737
+ /**
7738
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7739
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7740
+ */
7741
+ firstSeen: number().int().nullable(),
7742
+ /**
7743
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7744
+ * or `null` when there is none, it is older than
7745
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7746
+ */
7747
+ motionOnsetAt: number().int().nullable(),
7748
+ /**
7749
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7750
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7751
+ *
7752
+ * **Why motion onset and not something else.** Two other proxies were
7753
+ * considered and rejected:
7754
+ * - *the recording/pipeline session start*: for a camera on
7755
+ * `detectionMode: 'always'` the session opens at process start, hours
7756
+ * before any subject. It measures nothing.
7757
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7758
+ * `firstSeen` IS the first detection of that object, so for the track that
7759
+ * OPENS a burst — the only one the operator is complaining about — the two
7760
+ * are the same instant and the latency is 0 by construction.
7761
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7762
+ * mechanism from the object detector, so it is the only one that can precede
7763
+ * it. It is also already maintained per-device at frame rate on this very
7764
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7765
+ * it free — and, decisively, the frame path and the motion path are gated to
7766
+ * the SAME designated post-processing node, so the mirror is never empty for
7767
+ * a camera whose births land here.
7768
+ *
7769
+ * **Error bars, all of them.**
7770
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7771
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7772
+ * latency without bound. Mitigated, never removed, by
7773
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7774
+ * candidate for "this burst is this subject", and even then it is a
7775
+ * candidate, not a fact.
7776
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7777
+ * intensity threshold. A subject entering slowly at the far edge of the
7778
+ * frame can clear the detector's confidence floor BEFORE it clears the
7779
+ * motion floor, making this negative. Negatives are stored as-is and
7780
+ * never clamped — clamping would fabricate the distribution's left tail,
7781
+ * which is the half that says the proxy is unreliable.
7782
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7783
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7784
+ * therefore comparable WITHIN a camera and not across cameras of
7785
+ * different motion sources. The motion source is deliberately not copied
7786
+ * here — it belongs to the addon that owns the device (D224) and this is
7787
+ * a write on the frame path — so group by `deviceId`, which is how the
7788
+ * question is always asked anyway.
7789
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7790
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7791
+ * past it this is `null`.
7792
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7793
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7794
+ * camera nobody has a reference instant for.
7795
+ *
7796
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7797
+ * as such. It is not a per-track fact and must never be shown as one.
7798
+ */
7799
+ birthLatencyMs: number().int().nullable(),
7800
+ /**
7801
+ * How many births this device has already decided since that motion onset.
7802
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7803
+ * this subject. `null` when there is no usable onset.
7804
+ */
7805
+ birthIndexInBurst: number().int().nullable()
7806
+ });
7807
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7808
+ var BirthDecisionQueryInputSchema = object({
7809
+ /** Restrict to a single camera; omit for every row. */
7810
+ deviceId: number().int().optional(),
7811
+ /** Only decisions at or after this epoch ms. */
7812
+ since: number().int().optional(),
7813
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7814
+ verdict: BirthDecisionVerdictSchema.optional(),
7815
+ /** Max rows returned, newest-first. */
7816
+ limit: number().int().min(1).max(5e3).optional()
7817
+ });
7667
7818
  /** One archived note — the operator's words plus enough context to find what
7668
7819
  * they were looking at, after the track itself is gone. */
7669
7820
  var ArchivedDebugNoteSchema = object({
@@ -20173,7 +20324,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20173
20324
  deviceId: number(),
20174
20325
  trackId: string(),
20175
20326
  flags: TrackFlagsPatchSchema
20176
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20327
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20177
20328
  kind: "query",
20178
20329
  auth: "admin"
20179
20330
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -37581,6 +37732,12 @@ Object.freeze({
37581
37732
  addonId: null,
37582
37733
  access: "view"
37583
37734
  },
37735
+ "pipelineAnalytics.listBirthDecisions": {
37736
+ capName: "pipeline-analytics",
37737
+ capScope: "device",
37738
+ addonId: null,
37739
+ access: "view"
37740
+ },
37584
37741
  "pipelineAnalytics.listEventKinds": {
37585
37742
  capName: "pipeline-analytics",
37586
37743
  capScope: "device",
@@ -41373,6 +41530,11 @@ Object.freeze({
41373
41530
  form: "single",
41374
41531
  optional: true
41375
41532
  }],
41533
+ "pipelineAnalytics.listBirthDecisions": [{
41534
+ name: "deviceId",
41535
+ form: "single",
41536
+ optional: true
41537
+ }],
41376
41538
  "pipelineAnalytics.listEventKinds": [{
41377
41539
  name: "deviceId",
41378
41540
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.87",
3
+ "version": "0.2.88",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",