@camstack/addon-export-google 0.1.51 → 0.1.52

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.
@@ -7820,6 +7820,157 @@ var CameraSwitchGroupSchema = object({
7820
7820
  /** Unix ms when the group was composed server-side. */
7821
7821
  fetchedAt: number()
7822
7822
  });
7823
+ /**
7824
+ * What the gate decided about a birth, from the CALLER's point of view.
7825
+ *
7826
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7827
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7828
+ * The third member is the one the gate's own type cannot express, because
7829
+ * exhaustion is a property of how long the caller waited.
7830
+ */
7831
+ var BirthDecisionVerdictSchema = _enum([
7832
+ "confirmed",
7833
+ "suppressed",
7834
+ "exhausted-fallback"
7835
+ ]);
7836
+ /** One birth decision, as it is kept. */
7837
+ var BirthDecisionRecordSchema = object({
7838
+ id: string(),
7839
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7840
+ at: number().int(),
7841
+ /** The camera. Required: every question here is asked per-camera. */
7842
+ deviceId: number().int(),
7843
+ /**
7844
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7845
+ * birth has no track at all, and a confirmed one is expected to age out long
7846
+ * before this row does. Named `sourceTrackId` so the retention model's
7847
+ * ownership derivation (`collection-classification.ts`, which keys on a
7848
+ * column literally called `trackId`) cannot reach it.
7849
+ */
7850
+ sourceTrackId: string(),
7851
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7852
+ className: string(),
7853
+ verdict: BirthDecisionVerdictSchema,
7854
+ /**
7855
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7856
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7857
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7858
+ * "unknown": it says the gate took no measurement because it was off, which
7859
+ * is a different population and must never be averaged in with the rest.
7860
+ */
7861
+ reason: string().nullable(),
7862
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7863
+ attempts: number().int(),
7864
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7865
+ deferredForMs: number().int(),
7866
+ /**
7867
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7868
+ *
7869
+ * `true` when the frame the verdict was taken on carried no matched
7870
+ * detection for this track — the tracker was coasting a frozen box and the
7871
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7872
+ * straight out of `result.tracked` without checking, so this is reachable
7873
+ * today; the question is the RATE, per camera, and whether refusing those
7874
+ * frames would have cost real tracks (cross-read against `verdict` and
7875
+ * `decidedByBirthEvidence`).
7876
+ */
7877
+ decidedOnCoastedFrame: boolean(),
7878
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7879
+ birthEvidenceAvailable: boolean(),
7880
+ /**
7881
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7882
+ * deciding are different: the carried crop is confirm-only, so a candidate
7883
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7884
+ * crop of a later instant. A coasted decision backed by carried evidence is
7885
+ * a real observation of the birth instant; one without it is not.
7886
+ */
7887
+ decidedByBirthEvidence: boolean(),
7888
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7889
+ * found — deliberately not 0, which would be a measurement that never was. */
7890
+ bestScore: number().nullable(),
7891
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7892
+ appliedMinConfidence: number().nullable(),
7893
+ /**
7894
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7895
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7896
+ */
7897
+ firstSeen: number().int().nullable(),
7898
+ /**
7899
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7900
+ * or `null` when there is none, it is older than
7901
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7902
+ */
7903
+ motionOnsetAt: number().int().nullable(),
7904
+ /**
7905
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7906
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7907
+ *
7908
+ * **Why motion onset and not something else.** Two other proxies were
7909
+ * considered and rejected:
7910
+ * - *the recording/pipeline session start*: for a camera on
7911
+ * `detectionMode: 'always'` the session opens at process start, hours
7912
+ * before any subject. It measures nothing.
7913
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7914
+ * `firstSeen` IS the first detection of that object, so for the track that
7915
+ * OPENS a burst — the only one the operator is complaining about — the two
7916
+ * are the same instant and the latency is 0 by construction.
7917
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7918
+ * mechanism from the object detector, so it is the only one that can precede
7919
+ * it. It is also already maintained per-device at frame rate on this very
7920
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7921
+ * it free — and, decisively, the frame path and the motion path are gated to
7922
+ * the SAME designated post-processing node, so the mirror is never empty for
7923
+ * a camera whose births land here.
7924
+ *
7925
+ * **Error bars, all of them.**
7926
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7927
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7928
+ * latency without bound. Mitigated, never removed, by
7929
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7930
+ * candidate for "this burst is this subject", and even then it is a
7931
+ * candidate, not a fact.
7932
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7933
+ * intensity threshold. A subject entering slowly at the far edge of the
7934
+ * frame can clear the detector's confidence floor BEFORE it clears the
7935
+ * motion floor, making this negative. Negatives are stored as-is and
7936
+ * never clamped — clamping would fabricate the distribution's left tail,
7937
+ * which is the half that says the proxy is unreliable.
7938
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7939
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7940
+ * therefore comparable WITHIN a camera and not across cameras of
7941
+ * different motion sources. The motion source is deliberately not copied
7942
+ * here — it belongs to the addon that owns the device (D224) and this is
7943
+ * a write on the frame path — so group by `deviceId`, which is how the
7944
+ * question is always asked anyway.
7945
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7946
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7947
+ * past it this is `null`.
7948
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7949
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7950
+ * camera nobody has a reference instant for.
7951
+ *
7952
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7953
+ * as such. It is not a per-track fact and must never be shown as one.
7954
+ */
7955
+ birthLatencyMs: number().int().nullable(),
7956
+ /**
7957
+ * How many births this device has already decided since that motion onset.
7958
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7959
+ * this subject. `null` when there is no usable onset.
7960
+ */
7961
+ birthIndexInBurst: number().int().nullable()
7962
+ });
7963
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7964
+ var BirthDecisionQueryInputSchema = object({
7965
+ /** Restrict to a single camera; omit for every row. */
7966
+ deviceId: number().int().optional(),
7967
+ /** Only decisions at or after this epoch ms. */
7968
+ since: number().int().optional(),
7969
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7970
+ verdict: BirthDecisionVerdictSchema.optional(),
7971
+ /** Max rows returned, newest-first. */
7972
+ limit: number().int().min(1).max(5e3).optional()
7973
+ });
7823
7974
  /** One archived note — the operator's words plus enough context to find what
7824
7975
  * they were looking at, after the track itself is gone. */
7825
7976
  var ArchivedDebugNoteSchema = object({
@@ -20033,7 +20184,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20033
20184
  deviceId: number(),
20034
20185
  trackId: string(),
20035
20186
  flags: TrackFlagsPatchSchema
20036
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20187
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20037
20188
  kind: "query",
20038
20189
  auth: "admin"
20039
20190
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -33456,6 +33607,12 @@ Object.freeze({
33456
33607
  addonId: null,
33457
33608
  access: "view"
33458
33609
  },
33610
+ "pipelineAnalytics.listBirthDecisions": {
33611
+ capName: "pipeline-analytics",
33612
+ capScope: "device",
33613
+ addonId: null,
33614
+ access: "view"
33615
+ },
33459
33616
  "pipelineAnalytics.listEventKinds": {
33460
33617
  capName: "pipeline-analytics",
33461
33618
  capScope: "device",
@@ -37248,6 +37405,11 @@ Object.freeze({
37248
37405
  form: "single",
37249
37406
  optional: true
37250
37407
  }],
37408
+ "pipelineAnalytics.listBirthDecisions": [{
37409
+ name: "deviceId",
37410
+ form: "single",
37411
+ optional: true
37412
+ }],
37251
37413
  "pipelineAnalytics.listEventKinds": [{
37252
37414
  name: "deviceId",
37253
37415
  form: "single",
@@ -7816,6 +7816,157 @@ var CameraSwitchGroupSchema = object({
7816
7816
  /** Unix ms when the group was composed server-side. */
7817
7817
  fetchedAt: number()
7818
7818
  });
7819
+ /**
7820
+ * What the gate decided about a birth, from the CALLER's point of view.
7821
+ *
7822
+ * Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
7823
+ * at all — it is a deferral, and the row is written when the deferral ENDS.
7824
+ * The third member is the one the gate's own type cannot express, because
7825
+ * exhaustion is a property of how long the caller waited.
7826
+ */
7827
+ var BirthDecisionVerdictSchema = _enum([
7828
+ "confirmed",
7829
+ "suppressed",
7830
+ "exhausted-fallback"
7831
+ ]);
7832
+ /** One birth decision, as it is kept. */
7833
+ var BirthDecisionRecordSchema = object({
7834
+ id: string(),
7835
+ /** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
7836
+ at: number().int(),
7837
+ /** The camera. Required: every question here is asked per-camera. */
7838
+ deviceId: number().int(),
7839
+ /**
7840
+ * The track the decision was about. PROVENANCE, not ownership — a suppressed
7841
+ * birth has no track at all, and a confirmed one is expected to age out long
7842
+ * before this row does. Named `sourceTrackId` so the retention model's
7843
+ * ownership derivation (`collection-classification.ts`, which keys on a
7844
+ * column literally called `trackId`) cannot reach it.
7845
+ */
7846
+ sourceTrackId: string(),
7847
+ /** The candidate's claimed class. The miss rate is asked per class too. */
7848
+ className: string(),
7849
+ verdict: BirthDecisionVerdictSchema,
7850
+ /**
7851
+ * The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
7852
+ * `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
7853
+ * when the gate is DISABLED and every birth is waved through. `null` is not
7854
+ * "unknown": it says the gate took no measurement because it was off, which
7855
+ * is a different population and must never be averaged in with the rest.
7856
+ */
7857
+ reason: string().nullable(),
7858
+ /** Deferral attempts this birth used. 0 = decided on its first look. */
7859
+ attempts: number().int(),
7860
+ /** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
7861
+ deferredForMs: number().int(),
7862
+ /**
7863
+ * THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
7864
+ *
7865
+ * `true` when the frame the verdict was taken on carried no matched
7866
+ * detection for this track — the tracker was coasting a frozen box and the
7867
+ * subject was not observed. The deferred-birth re-offer pulls the candidate
7868
+ * straight out of `result.tracked` without checking, so this is reachable
7869
+ * today; the question is the RATE, per camera, and whether refusing those
7870
+ * frames would have cost real tracks (cross-read against `verdict` and
7871
+ * `decidedByBirthEvidence`).
7872
+ */
7873
+ decidedOnCoastedFrame: boolean(),
7874
+ /** Were D379 birth-instant pixels in hand when this candidate was submitted? */
7875
+ birthEvidenceAvailable: boolean(),
7876
+ /**
7877
+ * Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
7878
+ * deciding are different: the carried crop is confirm-only, so a candidate
7879
+ * can hold evidence, be found inconclusive on it, and be decided by a native
7880
+ * crop of a later instant. A coasted decision backed by carried evidence is
7881
+ * a real observation of the birth instant; one without it is not.
7882
+ */
7883
+ decidedByBirthEvidence: boolean(),
7884
+ /** Best class-compatible crop score, or `null` when nothing compatible was
7885
+ * found — deliberately not 0, which would be a measurement that never was. */
7886
+ bestScore: number().nullable(),
7887
+ /** The bar this candidate actually faced (the phantom-cell hook may raise it). */
7888
+ appliedMinConfidence: number().nullable(),
7889
+ /**
7890
+ * The track's own `firstSeen` — the candidate's first frame, which is where
7891
+ * the timeline starts. `null` for a suppressed birth, which has no track.
7892
+ */
7893
+ firstSeen: number().int().nullable(),
7894
+ /**
7895
+ * The device's most recent motion RISING EDGE at the moment of the decision,
7896
+ * or `null` when there is none, it is older than
7897
+ * {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
7898
+ */
7899
+ motionOnsetAt: number().int().nullable(),
7900
+ /**
7901
+ * `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
7902
+ * AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
7903
+ *
7904
+ * **Why motion onset and not something else.** Two other proxies were
7905
+ * considered and rejected:
7906
+ * - *the recording/pipeline session start*: for a camera on
7907
+ * `detectionMode: 'always'` the session opens at process start, hours
7908
+ * before any subject. It measures nothing.
7909
+ * - *the first detection on the device in this burst*: CIRCULAR. A track's
7910
+ * `firstSeen` IS the first detection of that object, so for the track that
7911
+ * OPENS a burst — the only one the operator is complaining about — the two
7912
+ * are the same instant and the latency is 0 by construction.
7913
+ * Motion onset is the only in-process signal produced by a DIFFERENT
7914
+ * mechanism from the object detector, so it is the only one that can precede
7915
+ * it. It is also already maintained per-device at frame rate on this very
7916
+ * node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
7917
+ * it free — and, decisively, the frame path and the motion path are gated to
7918
+ * the SAME designated post-processing node, so the mirror is never empty for
7919
+ * a camera whose births land here.
7920
+ *
7921
+ * **Error bars, all of them.**
7922
+ * 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
7923
+ * wall or a branch, and only later joined by the person, OVERSTATES the
7924
+ * latency without bound. Mitigated, never removed, by
7925
+ * {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
7926
+ * candidate for "this burst is this subject", and even then it is a
7927
+ * candidate, not a fact.
7928
+ * 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
7929
+ * intensity threshold. A subject entering slowly at the far edge of the
7930
+ * frame can clear the detector's confidence floor BEFORE it clears the
7931
+ * motion floor, making this negative. Negatives are stored as-is and
7932
+ * never clamped — clamping would fabricate the distribution's left tail,
7933
+ * which is the half that says the proxy is unreliable.
7934
+ * 3. *Onboard motion carries firmware latency of unknown, per-model offset*
7935
+ * (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
7936
+ * therefore comparable WITHIN a camera and not across cameras of
7937
+ * different motion sources. The motion source is deliberately not copied
7938
+ * here — it belongs to the addon that owns the device (D224) and this is
7939
+ * a write on the frame path — so group by `deviceId`, which is how the
7940
+ * question is always asked anyway.
7941
+ * 4. *Continuous motion.* On a busy scene the burst never closes and the
7942
+ * onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
7943
+ * past it this is `null`.
7944
+ * 5. *No motion signal at all* — analyzer off, onboard-only camera not
7945
+ * reporting, or nothing since boot: `null`. Which is the truth about a
7946
+ * camera nobody has a reference instant for.
7947
+ *
7948
+ * So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
7949
+ * as such. It is not a per-track fact and must never be shown as one.
7950
+ */
7951
+ birthLatencyMs: number().int().nullable(),
7952
+ /**
7953
+ * How many births this device has already decided since that motion onset.
7954
+ * 0 = the first, i.e. the only index at which the burst plausibly belongs to
7955
+ * this subject. `null` when there is no usable onset.
7956
+ */
7957
+ birthIndexInBurst: number().int().nullable()
7958
+ });
7959
+ /** Query input for `listBirthDecisions` — newest first, one camera or all. */
7960
+ var BirthDecisionQueryInputSchema = object({
7961
+ /** Restrict to a single camera; omit for every row. */
7962
+ deviceId: number().int().optional(),
7963
+ /** Only decisions at or after this epoch ms. */
7964
+ since: number().int().optional(),
7965
+ /** Restrict to one verdict — the miss rate is read one population at a time. */
7966
+ verdict: BirthDecisionVerdictSchema.optional(),
7967
+ /** Max rows returned, newest-first. */
7968
+ limit: number().int().min(1).max(5e3).optional()
7969
+ });
7819
7970
  /** One archived note — the operator's words plus enough context to find what
7820
7971
  * they were looking at, after the track itself is gone. */
7821
7972
  var ArchivedDebugNoteSchema = object({
@@ -20029,7 +20180,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20029
20180
  deviceId: number(),
20030
20181
  trackId: string(),
20031
20182
  flags: TrackFlagsPatchSchema
20032
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20183
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
20033
20184
  kind: "query",
20034
20185
  auth: "admin"
20035
20186
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -33452,6 +33603,12 @@ Object.freeze({
33452
33603
  addonId: null,
33453
33604
  access: "view"
33454
33605
  },
33606
+ "pipelineAnalytics.listBirthDecisions": {
33607
+ capName: "pipeline-analytics",
33608
+ capScope: "device",
33609
+ addonId: null,
33610
+ access: "view"
33611
+ },
33455
33612
  "pipelineAnalytics.listEventKinds": {
33456
33613
  capName: "pipeline-analytics",
33457
33614
  capScope: "device",
@@ -37244,6 +37401,11 @@ Object.freeze({
37244
37401
  form: "single",
37245
37402
  optional: true
37246
37403
  }],
37404
+ "pipelineAnalytics.listBirthDecisions": [{
37405
+ name: "deviceId",
37406
+ form: "single",
37407
+ optional: true
37408
+ }],
37247
37409
  "pipelineAnalytics.listEventKinds": [{
37248
37410
  name: "deviceId",
37249
37411
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-google",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "description": "Google Home export — hub-side smart-home fulfillment (SYNC / QUERY / EXECUTE / DISCONNECT) for the non-camera fleet, served over the hub's own OAuth account link. No Google credential is stored, sent or required.",
5
5
  "keywords": [
6
6
  "camstack",