@camstack/addon-provider-wyze 0.2.91 → 0.2.92

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
@@ -7659,6 +7659,157 @@ var CameraSwitchGroupSchema = object({
7659
7659
  /** Unix ms when the group was composed server-side. */
7660
7660
  fetchedAt: number()
7661
7661
  });
7662
+ /**
7663
+ * What the gate decided about a birth, from the CALLER's point of view.
7664
+ *
7665
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7666
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7667
+ * The third member is the one the gate's own type cannot express, because
7668
+ * exhaustion is a property of how long the caller waited.
7669
+ */
7670
+ var BirthDecisionVerdictSchema = _enum([
7671
+ "confirmed",
7672
+ "suppressed",
7673
+ "exhausted-fallback"
7674
+ ]);
7675
+ /** One birth decision, as it is kept. */
7676
+ var BirthDecisionRecordSchema = object({
7677
+ id: string(),
7678
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7679
+ at: number().int(),
7680
+ /** The camera. Required: every question here is asked per-camera. */
7681
+ deviceId: number().int(),
7682
+ /**
7683
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7684
+ * birth has no track at all, and a confirmed one is expected to age out long
7685
+ * before this row does. Named `sourceTrackId` so the retention model's
7686
+ * ownership derivation (`collection-classification.ts`, which keys on a
7687
+ * column literally called `trackId`) cannot reach it.
7688
+ */
7689
+ sourceTrackId: string(),
7690
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7691
+ className: string(),
7692
+ verdict: BirthDecisionVerdictSchema,
7693
+ /**
7694
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7695
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7696
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7697
+ * "unknown": it says the gate took no measurement because it was off, which
7698
+ * is a different population and must never be averaged in with the rest.
7699
+ */
7700
+ reason: string().nullable(),
7701
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7702
+ attempts: number().int(),
7703
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7704
+ deferredForMs: number().int(),
7705
+ /**
7706
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7707
+ *
7708
+ * `true` when the frame the verdict was taken on carried no matched
7709
+ * detection for this track — the tracker was coasting a frozen box and the
7710
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7711
+ * straight out of `result.tracked` without checking, so this is reachable
7712
+ * today; the question is the RATE, per camera, and whether refusing those
7713
+ * frames would have cost real tracks (cross-read against `verdict` and
7714
+ * `decidedByBirthEvidence`).
7715
+ */
7716
+ decidedOnCoastedFrame: boolean(),
7717
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7718
+ birthEvidenceAvailable: boolean(),
7719
+ /**
7720
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7721
+ * deciding are different: the carried crop is confirm-only, so a candidate
7722
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7723
+ * crop of a later instant. A coasted decision backed by carried evidence is
7724
+ * a real observation of the birth instant; one without it is not.
7725
+ */
7726
+ decidedByBirthEvidence: boolean(),
7727
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7728
+ * found — deliberately not 0, which would be a measurement that never was. */
7729
+ bestScore: number().nullable(),
7730
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7731
+ appliedMinConfidence: number().nullable(),
7732
+ /**
7733
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7734
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7735
+ */
7736
+ firstSeen: number().int().nullable(),
7737
+ /**
7738
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7739
+ * or `null` when there is none, it is older than
7740
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7741
+ */
7742
+ motionOnsetAt: number().int().nullable(),
7743
+ /**
7744
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7745
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7746
+ *
7747
+ * **Why motion onset and not something else.** Two other proxies were
7748
+ * considered and rejected:
7749
+ * - *the recording/pipeline session start*: for a camera on
7750
+ * `detectionMode: 'always'` the session opens at process start, hours
7751
+ * before any subject. It measures nothing.
7752
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7753
+ * `firstSeen` IS the first detection of that object, so for the track that
7754
+ * OPENS a burst — the only one the operator is complaining about — the two
7755
+ * are the same instant and the latency is 0 by construction.
7756
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7757
+ * mechanism from the object detector, so it is the only one that can precede
7758
+ * it. It is also already maintained per-device at frame rate on this very
7759
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7760
+ * it free — and, decisively, the frame path and the motion path are gated to
7761
+ * the SAME designated post-processing node, so the mirror is never empty for
7762
+ * a camera whose births land here.
7763
+ *
7764
+ * **Error bars, all of them.**
7765
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7766
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7767
+ * latency without bound. Mitigated, never removed, by
7768
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7769
+ * candidate for "this burst is this subject", and even then it is a
7770
+ * candidate, not a fact.
7771
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7772
+ * intensity threshold. A subject entering slowly at the far edge of the
7773
+ * frame can clear the detector's confidence floor BEFORE it clears the
7774
+ * motion floor, making this negative. Negatives are stored as-is and
7775
+ * never clamped — clamping would fabricate the distribution's left tail,
7776
+ * which is the half that says the proxy is unreliable.
7777
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7778
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7779
+ * therefore comparable WITHIN a camera and not across cameras of
7780
+ * different motion sources. The motion source is deliberately not copied
7781
+ * here — it belongs to the addon that owns the device (D224) and this is
7782
+ * a write on the frame path — so group by `deviceId`, which is how the
7783
+ * question is always asked anyway.
7784
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7785
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7786
+ * past it this is `null`.
7787
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7788
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7789
+ * camera nobody has a reference instant for.
7790
+ *
7791
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7792
+ * as such. It is not a per-track fact and must never be shown as one.
7793
+ */
7794
+ birthLatencyMs: number().int().nullable(),
7795
+ /**
7796
+ * How many births this device has already decided since that motion onset.
7797
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7798
+ * this subject. `null` when there is no usable onset.
7799
+ */
7800
+ birthIndexInBurst: number().int().nullable()
7801
+ });
7802
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7803
+ var BirthDecisionQueryInputSchema = object({
7804
+ /** Restrict to a single camera; omit for every row. */
7805
+ deviceId: number().int().optional(),
7806
+ /** Only decisions at or after this epoch ms. */
7807
+ since: number().int().optional(),
7808
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7809
+ verdict: BirthDecisionVerdictSchema.optional(),
7810
+ /** Max rows returned, newest-first. */
7811
+ limit: number().int().min(1).max(5e3).optional()
7812
+ });
7662
7813
  /** One archived note — the operator's words plus enough context to find what
7663
7814
  * they were looking at, after the track itself is gone. */
7664
7815
  var ArchivedDebugNoteSchema = object({
@@ -20168,7 +20319,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20168
20319
  deviceId: number(),
20169
20320
  trackId: string(),
20170
20321
  flags: TrackFlagsPatchSchema
20171
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20322
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20172
20323
  kind: "query",
20173
20324
  auth: "admin"
20174
20325
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -37680,6 +37831,12 @@ Object.freeze({
37680
37831
  addonId: null,
37681
37832
  access: "view"
37682
37833
  },
37834
+ "pipelineAnalytics.listBirthDecisions": {
37835
+ capName: "pipeline-analytics",
37836
+ capScope: "device",
37837
+ addonId: null,
37838
+ access: "view"
37839
+ },
37683
37840
  "pipelineAnalytics.listEventKinds": {
37684
37841
  capName: "pipeline-analytics",
37685
37842
  capScope: "device",
@@ -41472,6 +41629,11 @@ Object.freeze({
41472
41629
  form: "single",
41473
41630
  optional: true
41474
41631
  }],
41632
+ "pipelineAnalytics.listBirthDecisions": [{
41633
+ name: "deviceId",
41634
+ form: "single",
41635
+ optional: true
41636
+ }],
41475
41637
  "pipelineAnalytics.listEventKinds": [{
41476
41638
  name: "deviceId",
41477
41639
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7638,6 +7638,157 @@ var CameraSwitchGroupSchema = object({
7638
7638
  /** Unix ms when the group was composed server-side. */
7639
7639
  fetchedAt: number()
7640
7640
  });
7641
+ /**
7642
+ * What the gate decided about a birth, from the CALLER's point of view.
7643
+ *
7644
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7645
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7646
+ * The third member is the one the gate's own type cannot express, because
7647
+ * exhaustion is a property of how long the caller waited.
7648
+ */
7649
+ var BirthDecisionVerdictSchema = _enum([
7650
+ "confirmed",
7651
+ "suppressed",
7652
+ "exhausted-fallback"
7653
+ ]);
7654
+ /** One birth decision, as it is kept. */
7655
+ var BirthDecisionRecordSchema = object({
7656
+ id: string(),
7657
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7658
+ at: number().int(),
7659
+ /** The camera. Required: every question here is asked per-camera. */
7660
+ deviceId: number().int(),
7661
+ /**
7662
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7663
+ * birth has no track at all, and a confirmed one is expected to age out long
7664
+ * before this row does. Named `sourceTrackId` so the retention model's
7665
+ * ownership derivation (`collection-classification.ts`, which keys on a
7666
+ * column literally called `trackId`) cannot reach it.
7667
+ */
7668
+ sourceTrackId: string(),
7669
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7670
+ className: string(),
7671
+ verdict: BirthDecisionVerdictSchema,
7672
+ /**
7673
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7674
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7675
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7676
+ * "unknown": it says the gate took no measurement because it was off, which
7677
+ * is a different population and must never be averaged in with the rest.
7678
+ */
7679
+ reason: string().nullable(),
7680
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7681
+ attempts: number().int(),
7682
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7683
+ deferredForMs: number().int(),
7684
+ /**
7685
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7686
+ *
7687
+ * `true` when the frame the verdict was taken on carried no matched
7688
+ * detection for this track — the tracker was coasting a frozen box and the
7689
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7690
+ * straight out of `result.tracked` without checking, so this is reachable
7691
+ * today; the question is the RATE, per camera, and whether refusing those
7692
+ * frames would have cost real tracks (cross-read against `verdict` and
7693
+ * `decidedByBirthEvidence`).
7694
+ */
7695
+ decidedOnCoastedFrame: boolean(),
7696
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7697
+ birthEvidenceAvailable: boolean(),
7698
+ /**
7699
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7700
+ * deciding are different: the carried crop is confirm-only, so a candidate
7701
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7702
+ * crop of a later instant. A coasted decision backed by carried evidence is
7703
+ * a real observation of the birth instant; one without it is not.
7704
+ */
7705
+ decidedByBirthEvidence: boolean(),
7706
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7707
+ * found — deliberately not 0, which would be a measurement that never was. */
7708
+ bestScore: number().nullable(),
7709
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7710
+ appliedMinConfidence: number().nullable(),
7711
+ /**
7712
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7713
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7714
+ */
7715
+ firstSeen: number().int().nullable(),
7716
+ /**
7717
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7718
+ * or `null` when there is none, it is older than
7719
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7720
+ */
7721
+ motionOnsetAt: number().int().nullable(),
7722
+ /**
7723
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7724
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7725
+ *
7726
+ * **Why motion onset and not something else.** Two other proxies were
7727
+ * considered and rejected:
7728
+ * - *the recording/pipeline session start*: for a camera on
7729
+ * `detectionMode: 'always'` the session opens at process start, hours
7730
+ * before any subject. It measures nothing.
7731
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7732
+ * `firstSeen` IS the first detection of that object, so for the track that
7733
+ * OPENS a burst — the only one the operator is complaining about — the two
7734
+ * are the same instant and the latency is 0 by construction.
7735
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7736
+ * mechanism from the object detector, so it is the only one that can precede
7737
+ * it. It is also already maintained per-device at frame rate on this very
7738
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7739
+ * it free — and, decisively, the frame path and the motion path are gated to
7740
+ * the SAME designated post-processing node, so the mirror is never empty for
7741
+ * a camera whose births land here.
7742
+ *
7743
+ * **Error bars, all of them.**
7744
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7745
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7746
+ * latency without bound. Mitigated, never removed, by
7747
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7748
+ * candidate for "this burst is this subject", and even then it is a
7749
+ * candidate, not a fact.
7750
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7751
+ * intensity threshold. A subject entering slowly at the far edge of the
7752
+ * frame can clear the detector's confidence floor BEFORE it clears the
7753
+ * motion floor, making this negative. Negatives are stored as-is and
7754
+ * never clamped — clamping would fabricate the distribution's left tail,
7755
+ * which is the half that says the proxy is unreliable.
7756
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7757
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7758
+ * therefore comparable WITHIN a camera and not across cameras of
7759
+ * different motion sources. The motion source is deliberately not copied
7760
+ * here — it belongs to the addon that owns the device (D224) and this is
7761
+ * a write on the frame path — so group by `deviceId`, which is how the
7762
+ * question is always asked anyway.
7763
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7764
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7765
+ * past it this is `null`.
7766
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7767
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7768
+ * camera nobody has a reference instant for.
7769
+ *
7770
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7771
+ * as such. It is not a per-track fact and must never be shown as one.
7772
+ */
7773
+ birthLatencyMs: number().int().nullable(),
7774
+ /**
7775
+ * How many births this device has already decided since that motion onset.
7776
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7777
+ * this subject. `null` when there is no usable onset.
7778
+ */
7779
+ birthIndexInBurst: number().int().nullable()
7780
+ });
7781
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7782
+ var BirthDecisionQueryInputSchema = object({
7783
+ /** Restrict to a single camera; omit for every row. */
7784
+ deviceId: number().int().optional(),
7785
+ /** Only decisions at or after this epoch ms. */
7786
+ since: number().int().optional(),
7787
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7788
+ verdict: BirthDecisionVerdictSchema.optional(),
7789
+ /** Max rows returned, newest-first. */
7790
+ limit: number().int().min(1).max(5e3).optional()
7791
+ });
7641
7792
  /** One archived note — the operator's words plus enough context to find what
7642
7793
  * they were looking at, after the track itself is gone. */
7643
7794
  var ArchivedDebugNoteSchema = object({
@@ -20147,7 +20298,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20147
20298
  deviceId: number(),
20148
20299
  trackId: string(),
20149
20300
  flags: TrackFlagsPatchSchema
20150
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20301
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20151
20302
  kind: "query",
20152
20303
  auth: "admin"
20153
20304
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -37659,6 +37810,12 @@ Object.freeze({
37659
37810
  addonId: null,
37660
37811
  access: "view"
37661
37812
  },
37813
+ "pipelineAnalytics.listBirthDecisions": {
37814
+ capName: "pipeline-analytics",
37815
+ capScope: "device",
37816
+ addonId: null,
37817
+ access: "view"
37818
+ },
37662
37819
  "pipelineAnalytics.listEventKinds": {
37663
37820
  capName: "pipeline-analytics",
37664
37821
  capScope: "device",
@@ -41451,6 +41608,11 @@ Object.freeze({
41451
41608
  form: "single",
41452
41609
  optional: true
41453
41610
  }],
41611
+ "pipelineAnalytics.listBirthDecisions": [{
41612
+ name: "deviceId",
41613
+ form: "single",
41614
+ optional: true
41615
+ }],
41454
41616
  "pipelineAnalytics.listEventKinds": [{
41455
41617
  name: "deviceId",
41456
41618
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.91",
3
+ "version": "0.2.92",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",