@camstack/addon-provider-petkit 0.2.32 → 0.2.33

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
@@ -29530,17 +29530,60 @@ var SetSiteLocationInputSchema = object({
29530
29530
  longitude: number().min(-180).max(180)
29531
29531
  }).nullable();
29532
29532
  /**
29533
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
29533
+ * The TRANSPORT a call arrived on.
29534
+ *
29535
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
29536
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
29537
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
29538
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
29539
+ * checkable rather than asserted.
29540
+ *
29541
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
29542
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
29543
+ * connection; the viewer talks to the hub over `wsLink`
29544
+ * exclusively, so this is the plane the HTTP census could not see.
29545
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
29546
+ * never touches a socket and therefore never touched a census.
29547
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
29548
+ * that is exactly what its `0` asserts: every plane the hub has can name
29549
+ * itself. It is an output bucket, never a knob — a call that arrives on a
29550
+ * plane nobody instrumented lands here instead of vanishing from the total.
29551
+ */
29552
+ var TransportPlaneSchema = _enum([
29553
+ "http",
29554
+ "ws",
29555
+ "mesh",
29556
+ "unknown"
29557
+ ]);
29558
+ /**
29559
+ * Calls per plane. Every key is always present, `0` included — an absent plane
29560
+ * reads as "not instrumented", which is the one thing this census must never
29561
+ * make an operator wonder about.
29562
+ */
29563
+ var TransportPlaneCountsSchema = object({
29564
+ http: number(),
29565
+ ws: number(),
29566
+ mesh: number(),
29567
+ unknown: number()
29568
+ });
29569
+ /**
29570
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
29534
29571
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
29535
29572
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
29536
29573
  * already prints - never a token, never an `Authorization` header.
29574
+ *
29575
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
29576
+ * and lives for hours, so folding it into a call count makes one long-lived
29577
+ * stream look like a storm.
29537
29578
  */
29538
29579
  var RequestCensusGroupSchema = object({
29580
+ plane: TransportPlaneSchema,
29539
29581
  procedure: string(),
29540
29582
  userAgent: string(),
29541
29583
  ip: string(),
29542
29584
  principal: string(),
29543
29585
  calls: number(),
29586
+ subscriptions: number(),
29544
29587
  perMin: number()
29545
29588
  });
29546
29589
  /**
@@ -29553,6 +29596,14 @@ var RequestCensusGroupSchema = object({
29553
29596
  var RequestCensusProcedureSchema = object({
29554
29597
  procedure: string(),
29555
29598
  calls: number(),
29599
+ /**
29600
+ * The same total, split by transport. THIS is the row that answers the
29601
+ * question the census exists for: one look at `deviceManager.listAll` says
29602
+ * which plane carried the 4 960, without joining two log lines by eye.
29603
+ */
29604
+ planes: TransportPlaneCountsSchema,
29605
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
29606
+ subscriptions: number(),
29556
29607
  perMin: number()
29557
29608
  });
29558
29609
  /**
@@ -29580,14 +29631,45 @@ var RequestCensusStatusSchema = object({
29580
29631
  */
29581
29632
  procedureCalls: number(),
29582
29633
  /**
29634
+ * `procedureCalls` split by transport. The four keys sum to
29635
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
29636
+ * `planesExplainTotal` is that identity, checked rather than assumed.
29637
+ */
29638
+ planes: TransportPlaneCountsSchema,
29639
+ /**
29640
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
29641
+ * on no plane at all - which is a RESULT (a plane is missing from the
29642
+ * instrument), not a failure, and it has to be visible to be read as one.
29643
+ */
29644
+ planesExplainTotal: boolean(),
29645
+ /**
29583
29646
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
29584
- * transport resolves one context per connection - but the number that says
29585
- * whether a plane this census cannot see was busy while HTTP was quiet.
29647
+ * adapter resolves one context per connection - kept because a plane's call
29648
+ * count of zero against 37 open connections says something different from a
29649
+ * plane with no connections at all.
29586
29650
  */
29587
29651
  wsConnections: number(),
29652
+ /**
29653
+ * Client frames the WS plane looked at. `wsMessages` far above
29654
+ * `planes.ws + subscriptions` means most traffic is not operations
29655
+ * (keepalives, connection params) - which is itself an answer.
29656
+ */
29657
+ wsMessages: number(),
29658
+ /**
29659
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
29660
+ * purpose: one live-events stream opened at boot and held for six hours is
29661
+ * one subscription, and counting it as a call would let a quiet plane
29662
+ * masquerade as the storm.
29663
+ */
29664
+ subscriptions: number(),
29665
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
29666
+ subscriptionStops: number(),
29588
29667
  distinctGroups: number(),
29589
- /** Calls counted in the totals whose group attribution was shed at the
29590
- * cardinality bound. */
29668
+ /**
29669
+ * Operations counted in the totals whose CALLER attribution was shed at the
29670
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
29671
+ * which transport they arrived on, they just lost their group row.
29672
+ */
29591
29673
  unattributedCalls: number(),
29592
29674
  procedures: array(RequestCensusProcedureSchema).readonly(),
29593
29675
  groups: array(RequestCensusGroupSchema).readonly()
package/dist/addon.mjs CHANGED
@@ -29529,17 +29529,60 @@ var SetSiteLocationInputSchema = object({
29529
29529
  longitude: number().min(-180).max(180)
29530
29530
  }).nullable();
29531
29531
  /**
29532
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
29532
+ * The TRANSPORT a call arrived on.
29533
+ *
29534
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
29535
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
29536
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
29537
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
29538
+ * checkable rather than asserted.
29539
+ *
29540
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
29541
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
29542
+ * connection; the viewer talks to the hub over `wsLink`
29543
+ * exclusively, so this is the plane the HTTP census could not see.
29544
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
29545
+ * never touches a socket and therefore never touched a census.
29546
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
29547
+ * that is exactly what its `0` asserts: every plane the hub has can name
29548
+ * itself. It is an output bucket, never a knob — a call that arrives on a
29549
+ * plane nobody instrumented lands here instead of vanishing from the total.
29550
+ */
29551
+ var TransportPlaneSchema = _enum([
29552
+ "http",
29553
+ "ws",
29554
+ "mesh",
29555
+ "unknown"
29556
+ ]);
29557
+ /**
29558
+ * Calls per plane. Every key is always present, `0` included — an absent plane
29559
+ * reads as "not instrumented", which is the one thing this census must never
29560
+ * make an operator wonder about.
29561
+ */
29562
+ var TransportPlaneCountsSchema = object({
29563
+ http: number(),
29564
+ ws: number(),
29565
+ mesh: number(),
29566
+ unknown: number()
29567
+ });
29568
+ /**
29569
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
29533
29570
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
29534
29571
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
29535
29572
  * already prints - never a token, never an `Authorization` header.
29573
+ *
29574
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
29575
+ * and lives for hours, so folding it into a call count makes one long-lived
29576
+ * stream look like a storm.
29536
29577
  */
29537
29578
  var RequestCensusGroupSchema = object({
29579
+ plane: TransportPlaneSchema,
29538
29580
  procedure: string(),
29539
29581
  userAgent: string(),
29540
29582
  ip: string(),
29541
29583
  principal: string(),
29542
29584
  calls: number(),
29585
+ subscriptions: number(),
29543
29586
  perMin: number()
29544
29587
  });
29545
29588
  /**
@@ -29552,6 +29595,14 @@ var RequestCensusGroupSchema = object({
29552
29595
  var RequestCensusProcedureSchema = object({
29553
29596
  procedure: string(),
29554
29597
  calls: number(),
29598
+ /**
29599
+ * The same total, split by transport. THIS is the row that answers the
29600
+ * question the census exists for: one look at `deviceManager.listAll` says
29601
+ * which plane carried the 4 960, without joining two log lines by eye.
29602
+ */
29603
+ planes: TransportPlaneCountsSchema,
29604
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
29605
+ subscriptions: number(),
29555
29606
  perMin: number()
29556
29607
  });
29557
29608
  /**
@@ -29579,14 +29630,45 @@ var RequestCensusStatusSchema = object({
29579
29630
  */
29580
29631
  procedureCalls: number(),
29581
29632
  /**
29633
+ * `procedureCalls` split by transport. The four keys sum to
29634
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
29635
+ * `planesExplainTotal` is that identity, checked rather than assumed.
29636
+ */
29637
+ planes: TransportPlaneCountsSchema,
29638
+ /**
29639
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
29640
+ * on no plane at all - which is a RESULT (a plane is missing from the
29641
+ * instrument), not a failure, and it has to be visible to be read as one.
29642
+ */
29643
+ planesExplainTotal: boolean(),
29644
+ /**
29582
29645
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
29583
- * transport resolves one context per connection - but the number that says
29584
- * whether a plane this census cannot see was busy while HTTP was quiet.
29646
+ * adapter resolves one context per connection - kept because a plane's call
29647
+ * count of zero against 37 open connections says something different from a
29648
+ * plane with no connections at all.
29585
29649
  */
29586
29650
  wsConnections: number(),
29651
+ /**
29652
+ * Client frames the WS plane looked at. `wsMessages` far above
29653
+ * `planes.ws + subscriptions` means most traffic is not operations
29654
+ * (keepalives, connection params) - which is itself an answer.
29655
+ */
29656
+ wsMessages: number(),
29657
+ /**
29658
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
29659
+ * purpose: one live-events stream opened at boot and held for six hours is
29660
+ * one subscription, and counting it as a call would let a quiet plane
29661
+ * masquerade as the storm.
29662
+ */
29663
+ subscriptions: number(),
29664
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
29665
+ subscriptionStops: number(),
29587
29666
  distinctGroups: number(),
29588
- /** Calls counted in the totals whose group attribution was shed at the
29589
- * cardinality bound. */
29667
+ /**
29668
+ * Operations counted in the totals whose CALLER attribution was shed at the
29669
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
29670
+ * which transport they arrived on, they just lost their group row.
29671
+ */
29590
29672
  unattributedCalls: number(),
29591
29673
  procedures: array(RequestCensusProcedureSchema).readonly(),
29592
29674
  groups: array(RequestCensusGroupSchema).readonly()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",