@camstack/addon-import-alexa 0.2.31 → 0.2.32

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
@@ -28663,17 +28663,60 @@ var SetSiteLocationInputSchema = object({
28663
28663
  longitude: number().min(-180).max(180)
28664
28664
  }).nullable();
28665
28665
  /**
28666
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28666
+ * The TRANSPORT a call arrived on.
28667
+ *
28668
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28669
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28670
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28671
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28672
+ * checkable rather than asserted.
28673
+ *
28674
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28675
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28676
+ * connection; the viewer talks to the hub over `wsLink`
28677
+ * exclusively, so this is the plane the HTTP census could not see.
28678
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28679
+ * never touches a socket and therefore never touched a census.
28680
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28681
+ * that is exactly what its `0` asserts: every plane the hub has can name
28682
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28683
+ * plane nobody instrumented lands here instead of vanishing from the total.
28684
+ */
28685
+ var TransportPlaneSchema = _enum([
28686
+ "http",
28687
+ "ws",
28688
+ "mesh",
28689
+ "unknown"
28690
+ ]);
28691
+ /**
28692
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28693
+ * reads as "not instrumented", which is the one thing this census must never
28694
+ * make an operator wonder about.
28695
+ */
28696
+ var TransportPlaneCountsSchema = object({
28697
+ http: number(),
28698
+ ws: number(),
28699
+ mesh: number(),
28700
+ unknown: number()
28701
+ });
28702
+ /**
28703
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28667
28704
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28668
28705
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28669
28706
  * already prints - never a token, never an `Authorization` header.
28707
+ *
28708
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28709
+ * and lives for hours, so folding it into a call count makes one long-lived
28710
+ * stream look like a storm.
28670
28711
  */
28671
28712
  var RequestCensusGroupSchema = object({
28713
+ plane: TransportPlaneSchema,
28672
28714
  procedure: string(),
28673
28715
  userAgent: string(),
28674
28716
  ip: string(),
28675
28717
  principal: string(),
28676
28718
  calls: number(),
28719
+ subscriptions: number(),
28677
28720
  perMin: number()
28678
28721
  });
28679
28722
  /**
@@ -28686,6 +28729,14 @@ var RequestCensusGroupSchema = object({
28686
28729
  var RequestCensusProcedureSchema = object({
28687
28730
  procedure: string(),
28688
28731
  calls: number(),
28732
+ /**
28733
+ * The same total, split by transport. THIS is the row that answers the
28734
+ * question the census exists for: one look at `deviceManager.listAll` says
28735
+ * which plane carried the 4 960, without joining two log lines by eye.
28736
+ */
28737
+ planes: TransportPlaneCountsSchema,
28738
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28739
+ subscriptions: number(),
28689
28740
  perMin: number()
28690
28741
  });
28691
28742
  /**
@@ -28713,14 +28764,45 @@ var RequestCensusStatusSchema = object({
28713
28764
  */
28714
28765
  procedureCalls: number(),
28715
28766
  /**
28767
+ * `procedureCalls` split by transport. The four keys sum to
28768
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28769
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28770
+ */
28771
+ planes: TransportPlaneCountsSchema,
28772
+ /**
28773
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28774
+ * on no plane at all - which is a RESULT (a plane is missing from the
28775
+ * instrument), not a failure, and it has to be visible to be read as one.
28776
+ */
28777
+ planesExplainTotal: boolean(),
28778
+ /**
28716
28779
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28717
- * transport resolves one context per connection - but the number that says
28718
- * whether a plane this census cannot see was busy while HTTP was quiet.
28780
+ * adapter resolves one context per connection - kept because a plane's call
28781
+ * count of zero against 37 open connections says something different from a
28782
+ * plane with no connections at all.
28719
28783
  */
28720
28784
  wsConnections: number(),
28785
+ /**
28786
+ * Client frames the WS plane looked at. `wsMessages` far above
28787
+ * `planes.ws + subscriptions` means most traffic is not operations
28788
+ * (keepalives, connection params) - which is itself an answer.
28789
+ */
28790
+ wsMessages: number(),
28791
+ /**
28792
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28793
+ * purpose: one live-events stream opened at boot and held for six hours is
28794
+ * one subscription, and counting it as a call would let a quiet plane
28795
+ * masquerade as the storm.
28796
+ */
28797
+ subscriptions: number(),
28798
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28799
+ subscriptionStops: number(),
28721
28800
  distinctGroups: number(),
28722
- /** Calls counted in the totals whose group attribution was shed at the
28723
- * cardinality bound. */
28801
+ /**
28802
+ * Operations counted in the totals whose CALLER attribution was shed at the
28803
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28804
+ * which transport they arrived on, they just lost their group row.
28805
+ */
28724
28806
  unattributedCalls: number(),
28725
28807
  procedures: array(RequestCensusProcedureSchema).readonly(),
28726
28808
  groups: array(RequestCensusGroupSchema).readonly()
package/dist/addon.mjs CHANGED
@@ -28663,17 +28663,60 @@ var SetSiteLocationInputSchema = object({
28663
28663
  longitude: number().min(-180).max(180)
28664
28664
  }).nullable();
28665
28665
  /**
28666
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28666
+ * The TRANSPORT a call arrived on.
28667
+ *
28668
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28669
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28670
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28671
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28672
+ * checkable rather than asserted.
28673
+ *
28674
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28675
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28676
+ * connection; the viewer talks to the hub over `wsLink`
28677
+ * exclusively, so this is the plane the HTTP census could not see.
28678
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28679
+ * never touches a socket and therefore never touched a census.
28680
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28681
+ * that is exactly what its `0` asserts: every plane the hub has can name
28682
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28683
+ * plane nobody instrumented lands here instead of vanishing from the total.
28684
+ */
28685
+ var TransportPlaneSchema = _enum([
28686
+ "http",
28687
+ "ws",
28688
+ "mesh",
28689
+ "unknown"
28690
+ ]);
28691
+ /**
28692
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28693
+ * reads as "not instrumented", which is the one thing this census must never
28694
+ * make an operator wonder about.
28695
+ */
28696
+ var TransportPlaneCountsSchema = object({
28697
+ http: number(),
28698
+ ws: number(),
28699
+ mesh: number(),
28700
+ unknown: number()
28701
+ });
28702
+ /**
28703
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28667
28704
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28668
28705
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28669
28706
  * already prints - never a token, never an `Authorization` header.
28707
+ *
28708
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28709
+ * and lives for hours, so folding it into a call count makes one long-lived
28710
+ * stream look like a storm.
28670
28711
  */
28671
28712
  var RequestCensusGroupSchema = object({
28713
+ plane: TransportPlaneSchema,
28672
28714
  procedure: string(),
28673
28715
  userAgent: string(),
28674
28716
  ip: string(),
28675
28717
  principal: string(),
28676
28718
  calls: number(),
28719
+ subscriptions: number(),
28677
28720
  perMin: number()
28678
28721
  });
28679
28722
  /**
@@ -28686,6 +28729,14 @@ var RequestCensusGroupSchema = object({
28686
28729
  var RequestCensusProcedureSchema = object({
28687
28730
  procedure: string(),
28688
28731
  calls: number(),
28732
+ /**
28733
+ * The same total, split by transport. THIS is the row that answers the
28734
+ * question the census exists for: one look at `deviceManager.listAll` says
28735
+ * which plane carried the 4 960, without joining two log lines by eye.
28736
+ */
28737
+ planes: TransportPlaneCountsSchema,
28738
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28739
+ subscriptions: number(),
28689
28740
  perMin: number()
28690
28741
  });
28691
28742
  /**
@@ -28713,14 +28764,45 @@ var RequestCensusStatusSchema = object({
28713
28764
  */
28714
28765
  procedureCalls: number(),
28715
28766
  /**
28767
+ * `procedureCalls` split by transport. The four keys sum to
28768
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28769
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28770
+ */
28771
+ planes: TransportPlaneCountsSchema,
28772
+ /**
28773
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28774
+ * on no plane at all - which is a RESULT (a plane is missing from the
28775
+ * instrument), not a failure, and it has to be visible to be read as one.
28776
+ */
28777
+ planesExplainTotal: boolean(),
28778
+ /**
28716
28779
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28717
- * transport resolves one context per connection - but the number that says
28718
- * whether a plane this census cannot see was busy while HTTP was quiet.
28780
+ * adapter resolves one context per connection - kept because a plane's call
28781
+ * count of zero against 37 open connections says something different from a
28782
+ * plane with no connections at all.
28719
28783
  */
28720
28784
  wsConnections: number(),
28785
+ /**
28786
+ * Client frames the WS plane looked at. `wsMessages` far above
28787
+ * `planes.ws + subscriptions` means most traffic is not operations
28788
+ * (keepalives, connection params) - which is itself an answer.
28789
+ */
28790
+ wsMessages: number(),
28791
+ /**
28792
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28793
+ * purpose: one live-events stream opened at boot and held for six hours is
28794
+ * one subscription, and counting it as a call would let a quiet plane
28795
+ * masquerade as the storm.
28796
+ */
28797
+ subscriptions: number(),
28798
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28799
+ subscriptionStops: number(),
28721
28800
  distinctGroups: number(),
28722
- /** Calls counted in the totals whose group attribution was shed at the
28723
- * cardinality bound. */
28801
+ /**
28802
+ * Operations counted in the totals whose CALLER attribution was shed at the
28803
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28804
+ * which transport they arrived on, they just lost their group row.
28805
+ */
28724
28806
  unattributedCalls: number(),
28725
28807
  procedures: array(RequestCensusProcedureSchema).readonly(),
28726
28808
  groups: array(RequestCensusGroupSchema).readonly()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",