@camstack/addon-provider-reolink 1.2.110 → 1.2.111

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