@camstack/addon-notifiers 1.2.91 → 1.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
@@ -7760,6 +7760,157 @@ var CameraSwitchGroupSchema = object({
7760
7760
  /** Unix ms when the group was composed server-side. */
7761
7761
  fetchedAt: number()
7762
7762
  });
7763
+ /**
7764
+ * What the gate decided about a birth, from the CALLER's point of view.
7765
+ *
7766
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7767
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7768
+ * The third member is the one the gate's own type cannot express, because
7769
+ * exhaustion is a property of how long the caller waited.
7770
+ */
7771
+ var BirthDecisionVerdictSchema = _enum([
7772
+ "confirmed",
7773
+ "suppressed",
7774
+ "exhausted-fallback"
7775
+ ]);
7776
+ /** One birth decision, as it is kept. */
7777
+ var BirthDecisionRecordSchema = object({
7778
+ id: string(),
7779
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7780
+ at: number().int(),
7781
+ /** The camera. Required: every question here is asked per-camera. */
7782
+ deviceId: number().int(),
7783
+ /**
7784
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7785
+ * birth has no track at all, and a confirmed one is expected to age out long
7786
+ * before this row does. Named `sourceTrackId` so the retention model's
7787
+ * ownership derivation (`collection-classification.ts`, which keys on a
7788
+ * column literally called `trackId`) cannot reach it.
7789
+ */
7790
+ sourceTrackId: string(),
7791
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7792
+ className: string(),
7793
+ verdict: BirthDecisionVerdictSchema,
7794
+ /**
7795
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7796
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7797
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7798
+ * "unknown": it says the gate took no measurement because it was off, which
7799
+ * is a different population and must never be averaged in with the rest.
7800
+ */
7801
+ reason: string().nullable(),
7802
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7803
+ attempts: number().int(),
7804
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7805
+ deferredForMs: number().int(),
7806
+ /**
7807
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7808
+ *
7809
+ * `true` when the frame the verdict was taken on carried no matched
7810
+ * detection for this track — the tracker was coasting a frozen box and the
7811
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7812
+ * straight out of `result.tracked` without checking, so this is reachable
7813
+ * today; the question is the RATE, per camera, and whether refusing those
7814
+ * frames would have cost real tracks (cross-read against `verdict` and
7815
+ * `decidedByBirthEvidence`).
7816
+ */
7817
+ decidedOnCoastedFrame: boolean(),
7818
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7819
+ birthEvidenceAvailable: boolean(),
7820
+ /**
7821
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7822
+ * deciding are different: the carried crop is confirm-only, so a candidate
7823
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7824
+ * crop of a later instant. A coasted decision backed by carried evidence is
7825
+ * a real observation of the birth instant; one without it is not.
7826
+ */
7827
+ decidedByBirthEvidence: boolean(),
7828
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7829
+ * found — deliberately not 0, which would be a measurement that never was. */
7830
+ bestScore: number().nullable(),
7831
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7832
+ appliedMinConfidence: number().nullable(),
7833
+ /**
7834
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7835
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7836
+ */
7837
+ firstSeen: number().int().nullable(),
7838
+ /**
7839
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7840
+ * or `null` when there is none, it is older than
7841
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7842
+ */
7843
+ motionOnsetAt: number().int().nullable(),
7844
+ /**
7845
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7846
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7847
+ *
7848
+ * **Why motion onset and not something else.** Two other proxies were
7849
+ * considered and rejected:
7850
+ * - *the recording/pipeline session start*: for a camera on
7851
+ * `detectionMode: 'always'` the session opens at process start, hours
7852
+ * before any subject. It measures nothing.
7853
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7854
+ * `firstSeen` IS the first detection of that object, so for the track that
7855
+ * OPENS a burst — the only one the operator is complaining about — the two
7856
+ * are the same instant and the latency is 0 by construction.
7857
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7858
+ * mechanism from the object detector, so it is the only one that can precede
7859
+ * it. It is also already maintained per-device at frame rate on this very
7860
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7861
+ * it free — and, decisively, the frame path and the motion path are gated to
7862
+ * the SAME designated post-processing node, so the mirror is never empty for
7863
+ * a camera whose births land here.
7864
+ *
7865
+ * **Error bars, all of them.**
7866
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7867
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7868
+ * latency without bound. Mitigated, never removed, by
7869
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7870
+ * candidate for "this burst is this subject", and even then it is a
7871
+ * candidate, not a fact.
7872
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7873
+ * intensity threshold. A subject entering slowly at the far edge of the
7874
+ * frame can clear the detector's confidence floor BEFORE it clears the
7875
+ * motion floor, making this negative. Negatives are stored as-is and
7876
+ * never clamped — clamping would fabricate the distribution's left tail,
7877
+ * which is the half that says the proxy is unreliable.
7878
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7879
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7880
+ * therefore comparable WITHIN a camera and not across cameras of
7881
+ * different motion sources. The motion source is deliberately not copied
7882
+ * here — it belongs to the addon that owns the device (D224) and this is
7883
+ * a write on the frame path — so group by `deviceId`, which is how the
7884
+ * question is always asked anyway.
7885
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7886
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7887
+ * past it this is `null`.
7888
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7889
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7890
+ * camera nobody has a reference instant for.
7891
+ *
7892
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7893
+ * as such. It is not a per-track fact and must never be shown as one.
7894
+ */
7895
+ birthLatencyMs: number().int().nullable(),
7896
+ /**
7897
+ * How many births this device has already decided since that motion onset.
7898
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7899
+ * this subject. `null` when there is no usable onset.
7900
+ */
7901
+ birthIndexInBurst: number().int().nullable()
7902
+ });
7903
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7904
+ var BirthDecisionQueryInputSchema = object({
7905
+ /** Restrict to a single camera; omit for every row. */
7906
+ deviceId: number().int().optional(),
7907
+ /** Only decisions at or after this epoch ms. */
7908
+ since: number().int().optional(),
7909
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7910
+ verdict: BirthDecisionVerdictSchema.optional(),
7911
+ /** Max rows returned, newest-first. */
7912
+ limit: number().int().min(1).max(5e3).optional()
7913
+ });
7763
7914
  /** One archived note — the operator's words plus enough context to find what
7764
7915
  * they were looking at, after the track itself is gone. */
7765
7916
  var ArchivedDebugNoteSchema = object({
@@ -19939,7 +20090,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19939
20090
  deviceId: number(),
19940
20091
  trackId: string(),
19941
20092
  flags: TrackFlagsPatchSchema
19942
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20093
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
19943
20094
  kind: "query",
19944
20095
  auth: "admin"
19945
20096
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -33343,6 +33494,12 @@ Object.freeze({
33343
33494
  addonId: null,
33344
33495
  access: "view"
33345
33496
  },
33497
+ "pipelineAnalytics.listBirthDecisions": {
33498
+ capName: "pipeline-analytics",
33499
+ capScope: "device",
33500
+ addonId: null,
33501
+ access: "view"
33502
+ },
33346
33503
  "pipelineAnalytics.listEventKinds": {
33347
33504
  capName: "pipeline-analytics",
33348
33505
  capScope: "device",
@@ -37135,6 +37292,11 @@ Object.freeze({
37135
37292
  form: "single",
37136
37293
  optional: true
37137
37294
  }],
37295
+ "pipelineAnalytics.listBirthDecisions": [{
37296
+ name: "deviceId",
37297
+ form: "single",
37298
+ optional: true
37299
+ }],
37138
37300
  "pipelineAnalytics.listEventKinds": [{
37139
37301
  name: "deviceId",
37140
37302
  form: "single",
package/dist/addon.mjs CHANGED
@@ -7733,6 +7733,157 @@ var CameraSwitchGroupSchema = object({
7733
7733
  /** Unix ms when the group was composed server-side. */
7734
7734
  fetchedAt: number()
7735
7735
  });
7736
+ /**
7737
+ * What the gate decided about a birth, from the CALLER's point of view.
7738
+ *
7739
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7740
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7741
+ * The third member is the one the gate's own type cannot express, because
7742
+ * exhaustion is a property of how long the caller waited.
7743
+ */
7744
+ var BirthDecisionVerdictSchema = _enum([
7745
+ "confirmed",
7746
+ "suppressed",
7747
+ "exhausted-fallback"
7748
+ ]);
7749
+ /** One birth decision, as it is kept. */
7750
+ var BirthDecisionRecordSchema = object({
7751
+ id: string(),
7752
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7753
+ at: number().int(),
7754
+ /** The camera. Required: every question here is asked per-camera. */
7755
+ deviceId: number().int(),
7756
+ /**
7757
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7758
+ * birth has no track at all, and a confirmed one is expected to age out long
7759
+ * before this row does. Named `sourceTrackId` so the retention model's
7760
+ * ownership derivation (`collection-classification.ts`, which keys on a
7761
+ * column literally called `trackId`) cannot reach it.
7762
+ */
7763
+ sourceTrackId: string(),
7764
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7765
+ className: string(),
7766
+ verdict: BirthDecisionVerdictSchema,
7767
+ /**
7768
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7769
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7770
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7771
+ * "unknown": it says the gate took no measurement because it was off, which
7772
+ * is a different population and must never be averaged in with the rest.
7773
+ */
7774
+ reason: string().nullable(),
7775
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7776
+ attempts: number().int(),
7777
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7778
+ deferredForMs: number().int(),
7779
+ /**
7780
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7781
+ *
7782
+ * `true` when the frame the verdict was taken on carried no matched
7783
+ * detection for this track — the tracker was coasting a frozen box and the
7784
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7785
+ * straight out of `result.tracked` without checking, so this is reachable
7786
+ * today; the question is the RATE, per camera, and whether refusing those
7787
+ * frames would have cost real tracks (cross-read against `verdict` and
7788
+ * `decidedByBirthEvidence`).
7789
+ */
7790
+ decidedOnCoastedFrame: boolean(),
7791
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7792
+ birthEvidenceAvailable: boolean(),
7793
+ /**
7794
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7795
+ * deciding are different: the carried crop is confirm-only, so a candidate
7796
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7797
+ * crop of a later instant. A coasted decision backed by carried evidence is
7798
+ * a real observation of the birth instant; one without it is not.
7799
+ */
7800
+ decidedByBirthEvidence: boolean(),
7801
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7802
+ * found — deliberately not 0, which would be a measurement that never was. */
7803
+ bestScore: number().nullable(),
7804
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7805
+ appliedMinConfidence: number().nullable(),
7806
+ /**
7807
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7808
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7809
+ */
7810
+ firstSeen: number().int().nullable(),
7811
+ /**
7812
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7813
+ * or `null` when there is none, it is older than
7814
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7815
+ */
7816
+ motionOnsetAt: number().int().nullable(),
7817
+ /**
7818
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7819
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7820
+ *
7821
+ * **Why motion onset and not something else.** Two other proxies were
7822
+ * considered and rejected:
7823
+ * - *the recording/pipeline session start*: for a camera on
7824
+ * `detectionMode: 'always'` the session opens at process start, hours
7825
+ * before any subject. It measures nothing.
7826
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7827
+ * `firstSeen` IS the first detection of that object, so for the track that
7828
+ * OPENS a burst — the only one the operator is complaining about — the two
7829
+ * are the same instant and the latency is 0 by construction.
7830
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7831
+ * mechanism from the object detector, so it is the only one that can precede
7832
+ * it. It is also already maintained per-device at frame rate on this very
7833
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7834
+ * it free — and, decisively, the frame path and the motion path are gated to
7835
+ * the SAME designated post-processing node, so the mirror is never empty for
7836
+ * a camera whose births land here.
7837
+ *
7838
+ * **Error bars, all of them.**
7839
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7840
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7841
+ * latency without bound. Mitigated, never removed, by
7842
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7843
+ * candidate for "this burst is this subject", and even then it is a
7844
+ * candidate, not a fact.
7845
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7846
+ * intensity threshold. A subject entering slowly at the far edge of the
7847
+ * frame can clear the detector's confidence floor BEFORE it clears the
7848
+ * motion floor, making this negative. Negatives are stored as-is and
7849
+ * never clamped — clamping would fabricate the distribution's left tail,
7850
+ * which is the half that says the proxy is unreliable.
7851
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7852
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7853
+ * therefore comparable WITHIN a camera and not across cameras of
7854
+ * different motion sources. The motion source is deliberately not copied
7855
+ * here — it belongs to the addon that owns the device (D224) and this is
7856
+ * a write on the frame path — so group by `deviceId`, which is how the
7857
+ * question is always asked anyway.
7858
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7859
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7860
+ * past it this is `null`.
7861
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7862
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7863
+ * camera nobody has a reference instant for.
7864
+ *
7865
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7866
+ * as such. It is not a per-track fact and must never be shown as one.
7867
+ */
7868
+ birthLatencyMs: number().int().nullable(),
7869
+ /**
7870
+ * How many births this device has already decided since that motion onset.
7871
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7872
+ * this subject. `null` when there is no usable onset.
7873
+ */
7874
+ birthIndexInBurst: number().int().nullable()
7875
+ });
7876
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7877
+ var BirthDecisionQueryInputSchema = object({
7878
+ /** Restrict to a single camera; omit for every row. */
7879
+ deviceId: number().int().optional(),
7880
+ /** Only decisions at or after this epoch ms. */
7881
+ since: number().int().optional(),
7882
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7883
+ verdict: BirthDecisionVerdictSchema.optional(),
7884
+ /** Max rows returned, newest-first. */
7885
+ limit: number().int().min(1).max(5e3).optional()
7886
+ });
7736
7887
  /** One archived note — the operator's words plus enough context to find what
7737
7888
  * they were looking at, after the track itself is gone. */
7738
7889
  var ArchivedDebugNoteSchema = object({
@@ -19912,7 +20063,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19912
20063
  deviceId: number(),
19913
20064
  trackId: string(),
19914
20065
  flags: TrackFlagsPatchSchema
19915
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20066
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
19916
20067
  kind: "query",
19917
20068
  auth: "admin"
19918
20069
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -33316,6 +33467,12 @@ Object.freeze({
33316
33467
  addonId: null,
33317
33468
  access: "view"
33318
33469
  },
33470
+ "pipelineAnalytics.listBirthDecisions": {
33471
+ capName: "pipeline-analytics",
33472
+ capScope: "device",
33473
+ addonId: null,
33474
+ access: "view"
33475
+ },
33319
33476
  "pipelineAnalytics.listEventKinds": {
33320
33477
  capName: "pipeline-analytics",
33321
33478
  capScope: "device",
@@ -37108,6 +37265,11 @@ Object.freeze({
37108
37265
  form: "single",
37109
37266
  optional: true
37110
37267
  }],
37268
+ "pipelineAnalytics.listBirthDecisions": [{
37269
+ name: "deviceId",
37270
+ form: "single",
37271
+ optional: true
37272
+ }],
37111
37273
  "pipelineAnalytics.listEventKinds": [{
37112
37274
  name: "deviceId",
37113
37275
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-notifiers",
3
- "version": "1.2.91",
3
+ "version": "1.2.92",
4
4
  "description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
5
5
  "keywords": [
6
6
  "camstack",