@camstack/addon-terminal 0.1.37 → 0.1.38

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
@@ -28595,17 +28595,60 @@ var SetSiteLocationInputSchema = object({
28595
28595
  longitude: number().min(-180).max(180)
28596
28596
  }).nullable();
28597
28597
  /**
28598
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28598
+ * The TRANSPORT a call arrived on.
28599
+ *
28600
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28601
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28602
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28603
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28604
+ * checkable rather than asserted.
28605
+ *
28606
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28607
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28608
+ * connection; the viewer talks to the hub over `wsLink`
28609
+ * exclusively, so this is the plane the HTTP census could not see.
28610
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28611
+ * never touches a socket and therefore never touched a census.
28612
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28613
+ * that is exactly what its `0` asserts: every plane the hub has can name
28614
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28615
+ * plane nobody instrumented lands here instead of vanishing from the total.
28616
+ */
28617
+ var TransportPlaneSchema = _enum([
28618
+ "http",
28619
+ "ws",
28620
+ "mesh",
28621
+ "unknown"
28622
+ ]);
28623
+ /**
28624
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28625
+ * reads as "not instrumented", which is the one thing this census must never
28626
+ * make an operator wonder about.
28627
+ */
28628
+ var TransportPlaneCountsSchema = object({
28629
+ http: number(),
28630
+ ws: number(),
28631
+ mesh: number(),
28632
+ unknown: number()
28633
+ });
28634
+ /**
28635
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28599
28636
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28600
28637
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28601
28638
  * already prints - never a token, never an `Authorization` header.
28639
+ *
28640
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28641
+ * and lives for hours, so folding it into a call count makes one long-lived
28642
+ * stream look like a storm.
28602
28643
  */
28603
28644
  var RequestCensusGroupSchema = object({
28645
+ plane: TransportPlaneSchema,
28604
28646
  procedure: string(),
28605
28647
  userAgent: string(),
28606
28648
  ip: string(),
28607
28649
  principal: string(),
28608
28650
  calls: number(),
28651
+ subscriptions: number(),
28609
28652
  perMin: number()
28610
28653
  });
28611
28654
  /**
@@ -28618,6 +28661,14 @@ var RequestCensusGroupSchema = object({
28618
28661
  var RequestCensusProcedureSchema = object({
28619
28662
  procedure: string(),
28620
28663
  calls: number(),
28664
+ /**
28665
+ * The same total, split by transport. THIS is the row that answers the
28666
+ * question the census exists for: one look at `deviceManager.listAll` says
28667
+ * which plane carried the 4 960, without joining two log lines by eye.
28668
+ */
28669
+ planes: TransportPlaneCountsSchema,
28670
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28671
+ subscriptions: number(),
28621
28672
  perMin: number()
28622
28673
  });
28623
28674
  /**
@@ -28645,14 +28696,45 @@ var RequestCensusStatusSchema = object({
28645
28696
  */
28646
28697
  procedureCalls: number(),
28647
28698
  /**
28699
+ * `procedureCalls` split by transport. The four keys sum to
28700
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28701
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28702
+ */
28703
+ planes: TransportPlaneCountsSchema,
28704
+ /**
28705
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28706
+ * on no plane at all - which is a RESULT (a plane is missing from the
28707
+ * instrument), not a failure, and it has to be visible to be read as one.
28708
+ */
28709
+ planesExplainTotal: boolean(),
28710
+ /**
28648
28711
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28649
- * transport resolves one context per connection - but the number that says
28650
- * whether a plane this census cannot see was busy while HTTP was quiet.
28712
+ * adapter resolves one context per connection - kept because a plane's call
28713
+ * count of zero against 37 open connections says something different from a
28714
+ * plane with no connections at all.
28651
28715
  */
28652
28716
  wsConnections: number(),
28717
+ /**
28718
+ * Client frames the WS plane looked at. `wsMessages` far above
28719
+ * `planes.ws + subscriptions` means most traffic is not operations
28720
+ * (keepalives, connection params) - which is itself an answer.
28721
+ */
28722
+ wsMessages: number(),
28723
+ /**
28724
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28725
+ * purpose: one live-events stream opened at boot and held for six hours is
28726
+ * one subscription, and counting it as a call would let a quiet plane
28727
+ * masquerade as the storm.
28728
+ */
28729
+ subscriptions: number(),
28730
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28731
+ subscriptionStops: number(),
28653
28732
  distinctGroups: number(),
28654
- /** Calls counted in the totals whose group attribution was shed at the
28655
- * cardinality bound. */
28733
+ /**
28734
+ * Operations counted in the totals whose CALLER attribution was shed at the
28735
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28736
+ * which transport they arrived on, they just lost their group row.
28737
+ */
28656
28738
  unattributedCalls: number(),
28657
28739
  procedures: array(RequestCensusProcedureSchema).readonly(),
28658
28740
  groups: array(RequestCensusGroupSchema).readonly()
package/dist/addon.mjs CHANGED
@@ -28572,17 +28572,60 @@ var SetSiteLocationInputSchema = object({
28572
28572
  longitude: number().min(-180).max(180)
28573
28573
  }).nullable();
28574
28574
  /**
28575
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28575
+ * The TRANSPORT a call arrived on.
28576
+ *
28577
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28578
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28579
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28580
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28581
+ * checkable rather than asserted.
28582
+ *
28583
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28584
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28585
+ * connection; the viewer talks to the hub over `wsLink`
28586
+ * exclusively, so this is the plane the HTTP census could not see.
28587
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28588
+ * never touches a socket and therefore never touched a census.
28589
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28590
+ * that is exactly what its `0` asserts: every plane the hub has can name
28591
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28592
+ * plane nobody instrumented lands here instead of vanishing from the total.
28593
+ */
28594
+ var TransportPlaneSchema = _enum([
28595
+ "http",
28596
+ "ws",
28597
+ "mesh",
28598
+ "unknown"
28599
+ ]);
28600
+ /**
28601
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28602
+ * reads as "not instrumented", which is the one thing this census must never
28603
+ * make an operator wonder about.
28604
+ */
28605
+ var TransportPlaneCountsSchema = object({
28606
+ http: number(),
28607
+ ws: number(),
28608
+ mesh: number(),
28609
+ unknown: number()
28610
+ });
28611
+ /**
28612
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28576
28613
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28577
28614
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28578
28615
  * already prints - never a token, never an `Authorization` header.
28616
+ *
28617
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28618
+ * and lives for hours, so folding it into a call count makes one long-lived
28619
+ * stream look like a storm.
28579
28620
  */
28580
28621
  var RequestCensusGroupSchema = object({
28622
+ plane: TransportPlaneSchema,
28581
28623
  procedure: string(),
28582
28624
  userAgent: string(),
28583
28625
  ip: string(),
28584
28626
  principal: string(),
28585
28627
  calls: number(),
28628
+ subscriptions: number(),
28586
28629
  perMin: number()
28587
28630
  });
28588
28631
  /**
@@ -28595,6 +28638,14 @@ var RequestCensusGroupSchema = object({
28595
28638
  var RequestCensusProcedureSchema = object({
28596
28639
  procedure: string(),
28597
28640
  calls: number(),
28641
+ /**
28642
+ * The same total, split by transport. THIS is the row that answers the
28643
+ * question the census exists for: one look at `deviceManager.listAll` says
28644
+ * which plane carried the 4 960, without joining two log lines by eye.
28645
+ */
28646
+ planes: TransportPlaneCountsSchema,
28647
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28648
+ subscriptions: number(),
28598
28649
  perMin: number()
28599
28650
  });
28600
28651
  /**
@@ -28622,14 +28673,45 @@ var RequestCensusStatusSchema = object({
28622
28673
  */
28623
28674
  procedureCalls: number(),
28624
28675
  /**
28676
+ * `procedureCalls` split by transport. The four keys sum to
28677
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28678
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28679
+ */
28680
+ planes: TransportPlaneCountsSchema,
28681
+ /**
28682
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28683
+ * on no plane at all - which is a RESULT (a plane is missing from the
28684
+ * instrument), not a failure, and it has to be visible to be read as one.
28685
+ */
28686
+ planesExplainTotal: boolean(),
28687
+ /**
28625
28688
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28626
- * transport resolves one context per connection - but the number that says
28627
- * whether a plane this census cannot see was busy while HTTP was quiet.
28689
+ * adapter resolves one context per connection - kept because a plane's call
28690
+ * count of zero against 37 open connections says something different from a
28691
+ * plane with no connections at all.
28628
28692
  */
28629
28693
  wsConnections: number(),
28694
+ /**
28695
+ * Client frames the WS plane looked at. `wsMessages` far above
28696
+ * `planes.ws + subscriptions` means most traffic is not operations
28697
+ * (keepalives, connection params) - which is itself an answer.
28698
+ */
28699
+ wsMessages: number(),
28700
+ /**
28701
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28702
+ * purpose: one live-events stream opened at boot and held for six hours is
28703
+ * one subscription, and counting it as a call would let a quiet plane
28704
+ * masquerade as the storm.
28705
+ */
28706
+ subscriptions: number(),
28707
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28708
+ subscriptionStops: number(),
28630
28709
  distinctGroups: number(),
28631
- /** Calls counted in the totals whose group attribution was shed at the
28632
- * cardinality bound. */
28710
+ /**
28711
+ * Operations counted in the totals whose CALLER attribution was shed at the
28712
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28713
+ * which transport they arrived on, they just lost their group row.
28714
+ */
28633
28715
  unattributedCalls: number(),
28634
28716
  procedures: array(RequestCensusProcedureSchema).readonly(),
28635
28717
  groups: array(RequestCensusGroupSchema).readonly()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-terminal",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "Interactive terminal sessions (pty + xterm) as a CamStack addon",
5
5
  "keywords": [
6
6
  "camstack",