@camstack/addon-matter-broker 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
@@ -28500,17 +28500,60 @@ var SetSiteLocationInputSchema = object({
28500
28500
  longitude: number().min(-180).max(180)
28501
28501
  }).nullable();
28502
28502
  /**
28503
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28503
+ * The TRANSPORT a call arrived on.
28504
+ *
28505
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28506
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28507
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28508
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28509
+ * checkable rather than asserted.
28510
+ *
28511
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28512
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28513
+ * connection; the viewer talks to the hub over `wsLink`
28514
+ * exclusively, so this is the plane the HTTP census could not see.
28515
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28516
+ * never touches a socket and therefore never touched a census.
28517
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28518
+ * that is exactly what its `0` asserts: every plane the hub has can name
28519
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28520
+ * plane nobody instrumented lands here instead of vanishing from the total.
28521
+ */
28522
+ var TransportPlaneSchema = _enum([
28523
+ "http",
28524
+ "ws",
28525
+ "mesh",
28526
+ "unknown"
28527
+ ]);
28528
+ /**
28529
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28530
+ * reads as "not instrumented", which is the one thing this census must never
28531
+ * make an operator wonder about.
28532
+ */
28533
+ var TransportPlaneCountsSchema = object({
28534
+ http: number(),
28535
+ ws: number(),
28536
+ mesh: number(),
28537
+ unknown: number()
28538
+ });
28539
+ /**
28540
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28504
28541
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28505
28542
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28506
28543
  * already prints - never a token, never an `Authorization` header.
28544
+ *
28545
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28546
+ * and lives for hours, so folding it into a call count makes one long-lived
28547
+ * stream look like a storm.
28507
28548
  */
28508
28549
  var RequestCensusGroupSchema = object({
28550
+ plane: TransportPlaneSchema,
28509
28551
  procedure: string$2(),
28510
28552
  userAgent: string$2(),
28511
28553
  ip: string$2(),
28512
28554
  principal: string$2(),
28513
28555
  calls: number(),
28556
+ subscriptions: number(),
28514
28557
  perMin: number()
28515
28558
  });
28516
28559
  /**
@@ -28523,6 +28566,14 @@ var RequestCensusGroupSchema = object({
28523
28566
  var RequestCensusProcedureSchema = object({
28524
28567
  procedure: string$2(),
28525
28568
  calls: number(),
28569
+ /**
28570
+ * The same total, split by transport. THIS is the row that answers the
28571
+ * question the census exists for: one look at `deviceManager.listAll` says
28572
+ * which plane carried the 4 960, without joining two log lines by eye.
28573
+ */
28574
+ planes: TransportPlaneCountsSchema,
28575
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28576
+ subscriptions: number(),
28526
28577
  perMin: number()
28527
28578
  });
28528
28579
  /**
@@ -28550,14 +28601,45 @@ var RequestCensusStatusSchema = object({
28550
28601
  */
28551
28602
  procedureCalls: number(),
28552
28603
  /**
28604
+ * `procedureCalls` split by transport. The four keys sum to
28605
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28606
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28607
+ */
28608
+ planes: TransportPlaneCountsSchema,
28609
+ /**
28610
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28611
+ * on no plane at all - which is a RESULT (a plane is missing from the
28612
+ * instrument), not a failure, and it has to be visible to be read as one.
28613
+ */
28614
+ planesExplainTotal: boolean(),
28615
+ /**
28553
28616
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28554
- * transport resolves one context per connection - but the number that says
28555
- * whether a plane this census cannot see was busy while HTTP was quiet.
28617
+ * adapter resolves one context per connection - kept because a plane's call
28618
+ * count of zero against 37 open connections says something different from a
28619
+ * plane with no connections at all.
28556
28620
  */
28557
28621
  wsConnections: number(),
28622
+ /**
28623
+ * Client frames the WS plane looked at. `wsMessages` far above
28624
+ * `planes.ws + subscriptions` means most traffic is not operations
28625
+ * (keepalives, connection params) - which is itself an answer.
28626
+ */
28627
+ wsMessages: number(),
28628
+ /**
28629
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28630
+ * purpose: one live-events stream opened at boot and held for six hours is
28631
+ * one subscription, and counting it as a call would let a quiet plane
28632
+ * masquerade as the storm.
28633
+ */
28634
+ subscriptions: number(),
28635
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28636
+ subscriptionStops: number(),
28558
28637
  distinctGroups: number(),
28559
- /** Calls counted in the totals whose group attribution was shed at the
28560
- * cardinality bound. */
28638
+ /**
28639
+ * Operations counted in the totals whose CALLER attribution was shed at the
28640
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28641
+ * which transport they arrived on, they just lost their group row.
28642
+ */
28561
28643
  unattributedCalls: number(),
28562
28644
  procedures: array(RequestCensusProcedureSchema).readonly(),
28563
28645
  groups: array(RequestCensusGroupSchema).readonly()
package/dist/addon.mjs CHANGED
@@ -28498,17 +28498,60 @@ var SetSiteLocationInputSchema = object({
28498
28498
  longitude: number().min(-180).max(180)
28499
28499
  }).nullable();
28500
28500
  /**
28501
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28501
+ * The TRANSPORT a call arrived on.
28502
+ *
28503
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28504
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28505
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28506
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28507
+ * checkable rather than asserted.
28508
+ *
28509
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28510
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28511
+ * connection; the viewer talks to the hub over `wsLink`
28512
+ * exclusively, so this is the plane the HTTP census could not see.
28513
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28514
+ * never touches a socket and therefore never touched a census.
28515
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28516
+ * that is exactly what its `0` asserts: every plane the hub has can name
28517
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28518
+ * plane nobody instrumented lands here instead of vanishing from the total.
28519
+ */
28520
+ var TransportPlaneSchema = _enum([
28521
+ "http",
28522
+ "ws",
28523
+ "mesh",
28524
+ "unknown"
28525
+ ]);
28526
+ /**
28527
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28528
+ * reads as "not instrumented", which is the one thing this census must never
28529
+ * make an operator wonder about.
28530
+ */
28531
+ var TransportPlaneCountsSchema = object({
28532
+ http: number(),
28533
+ ws: number(),
28534
+ mesh: number(),
28535
+ unknown: number()
28536
+ });
28537
+ /**
28538
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28502
28539
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28503
28540
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28504
28541
  * already prints - never a token, never an `Authorization` header.
28542
+ *
28543
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28544
+ * and lives for hours, so folding it into a call count makes one long-lived
28545
+ * stream look like a storm.
28505
28546
  */
28506
28547
  var RequestCensusGroupSchema = object({
28548
+ plane: TransportPlaneSchema,
28507
28549
  procedure: string$2(),
28508
28550
  userAgent: string$2(),
28509
28551
  ip: string$2(),
28510
28552
  principal: string$2(),
28511
28553
  calls: number(),
28554
+ subscriptions: number(),
28512
28555
  perMin: number()
28513
28556
  });
28514
28557
  /**
@@ -28521,6 +28564,14 @@ var RequestCensusGroupSchema = object({
28521
28564
  var RequestCensusProcedureSchema = object({
28522
28565
  procedure: string$2(),
28523
28566
  calls: number(),
28567
+ /**
28568
+ * The same total, split by transport. THIS is the row that answers the
28569
+ * question the census exists for: one look at `deviceManager.listAll` says
28570
+ * which plane carried the 4 960, without joining two log lines by eye.
28571
+ */
28572
+ planes: TransportPlaneCountsSchema,
28573
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28574
+ subscriptions: number(),
28524
28575
  perMin: number()
28525
28576
  });
28526
28577
  /**
@@ -28548,14 +28599,45 @@ var RequestCensusStatusSchema = object({
28548
28599
  */
28549
28600
  procedureCalls: number(),
28550
28601
  /**
28602
+ * `procedureCalls` split by transport. The four keys sum to
28603
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28604
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28605
+ */
28606
+ planes: TransportPlaneCountsSchema,
28607
+ /**
28608
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28609
+ * on no plane at all - which is a RESULT (a plane is missing from the
28610
+ * instrument), not a failure, and it has to be visible to be read as one.
28611
+ */
28612
+ planesExplainTotal: boolean(),
28613
+ /**
28551
28614
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28552
- * transport resolves one context per connection - but the number that says
28553
- * whether a plane this census cannot see was busy while HTTP was quiet.
28615
+ * adapter resolves one context per connection - kept because a plane's call
28616
+ * count of zero against 37 open connections says something different from a
28617
+ * plane with no connections at all.
28554
28618
  */
28555
28619
  wsConnections: number(),
28620
+ /**
28621
+ * Client frames the WS plane looked at. `wsMessages` far above
28622
+ * `planes.ws + subscriptions` means most traffic is not operations
28623
+ * (keepalives, connection params) - which is itself an answer.
28624
+ */
28625
+ wsMessages: number(),
28626
+ /**
28627
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28628
+ * purpose: one live-events stream opened at boot and held for six hours is
28629
+ * one subscription, and counting it as a call would let a quiet plane
28630
+ * masquerade as the storm.
28631
+ */
28632
+ subscriptions: number(),
28633
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28634
+ subscriptionStops: number(),
28556
28635
  distinctGroups: number(),
28557
- /** Calls counted in the totals whose group attribution was shed at the
28558
- * cardinality bound. */
28636
+ /**
28637
+ * Operations counted in the totals whose CALLER attribution was shed at the
28638
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28639
+ * which transport they arrived on, they just lost their group row.
28640
+ */
28559
28641
  unattributedCalls: number(),
28560
28642
  procedures: array(RequestCensusProcedureSchema).readonly(),
28561
28643
  groups: array(RequestCensusGroupSchema).readonly()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-matter-broker",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",