@camstack/addon-provider-gree 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
@@ -28406,17 +28406,60 @@ var SetSiteLocationInputSchema = object({
28406
28406
  longitude: number().min(-180).max(180)
28407
28407
  }).nullable();
28408
28408
  /**
28409
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28409
+ * The TRANSPORT a call arrived on.
28410
+ *
28411
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28412
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28413
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28414
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28415
+ * checkable rather than asserted.
28416
+ *
28417
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28418
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28419
+ * connection; the viewer talks to the hub over `wsLink`
28420
+ * exclusively, so this is the plane the HTTP census could not see.
28421
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28422
+ * never touches a socket and therefore never touched a census.
28423
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28424
+ * that is exactly what its `0` asserts: every plane the hub has can name
28425
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28426
+ * plane nobody instrumented lands here instead of vanishing from the total.
28427
+ */
28428
+ var TransportPlaneSchema = _enum([
28429
+ "http",
28430
+ "ws",
28431
+ "mesh",
28432
+ "unknown"
28433
+ ]);
28434
+ /**
28435
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28436
+ * reads as "not instrumented", which is the one thing this census must never
28437
+ * make an operator wonder about.
28438
+ */
28439
+ var TransportPlaneCountsSchema = object({
28440
+ http: number(),
28441
+ ws: number(),
28442
+ mesh: number(),
28443
+ unknown: number()
28444
+ });
28445
+ /**
28446
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28410
28447
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28411
28448
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28412
28449
  * already prints - never a token, never an `Authorization` header.
28450
+ *
28451
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28452
+ * and lives for hours, so folding it into a call count makes one long-lived
28453
+ * stream look like a storm.
28413
28454
  */
28414
28455
  var RequestCensusGroupSchema = object({
28456
+ plane: TransportPlaneSchema,
28415
28457
  procedure: string(),
28416
28458
  userAgent: string(),
28417
28459
  ip: string(),
28418
28460
  principal: string(),
28419
28461
  calls: number(),
28462
+ subscriptions: number(),
28420
28463
  perMin: number()
28421
28464
  });
28422
28465
  /**
@@ -28429,6 +28472,14 @@ var RequestCensusGroupSchema = object({
28429
28472
  var RequestCensusProcedureSchema = object({
28430
28473
  procedure: string(),
28431
28474
  calls: number(),
28475
+ /**
28476
+ * The same total, split by transport. THIS is the row that answers the
28477
+ * question the census exists for: one look at `deviceManager.listAll` says
28478
+ * which plane carried the 4 960, without joining two log lines by eye.
28479
+ */
28480
+ planes: TransportPlaneCountsSchema,
28481
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28482
+ subscriptions: number(),
28432
28483
  perMin: number()
28433
28484
  });
28434
28485
  /**
@@ -28456,14 +28507,45 @@ var RequestCensusStatusSchema = object({
28456
28507
  */
28457
28508
  procedureCalls: number(),
28458
28509
  /**
28510
+ * `procedureCalls` split by transport. The four keys sum to
28511
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28512
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28513
+ */
28514
+ planes: TransportPlaneCountsSchema,
28515
+ /**
28516
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28517
+ * on no plane at all - which is a RESULT (a plane is missing from the
28518
+ * instrument), not a failure, and it has to be visible to be read as one.
28519
+ */
28520
+ planesExplainTotal: boolean(),
28521
+ /**
28459
28522
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28460
- * transport resolves one context per connection - but the number that says
28461
- * whether a plane this census cannot see was busy while HTTP was quiet.
28523
+ * adapter resolves one context per connection - kept because a plane's call
28524
+ * count of zero against 37 open connections says something different from a
28525
+ * plane with no connections at all.
28462
28526
  */
28463
28527
  wsConnections: number(),
28528
+ /**
28529
+ * Client frames the WS plane looked at. `wsMessages` far above
28530
+ * `planes.ws + subscriptions` means most traffic is not operations
28531
+ * (keepalives, connection params) - which is itself an answer.
28532
+ */
28533
+ wsMessages: number(),
28534
+ /**
28535
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28536
+ * purpose: one live-events stream opened at boot and held for six hours is
28537
+ * one subscription, and counting it as a call would let a quiet plane
28538
+ * masquerade as the storm.
28539
+ */
28540
+ subscriptions: number(),
28541
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28542
+ subscriptionStops: number(),
28464
28543
  distinctGroups: number(),
28465
- /** Calls counted in the totals whose group attribution was shed at the
28466
- * cardinality bound. */
28544
+ /**
28545
+ * Operations counted in the totals whose CALLER attribution was shed at the
28546
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28547
+ * which transport they arrived on, they just lost their group row.
28548
+ */
28467
28549
  unattributedCalls: number(),
28468
28550
  procedures: array(RequestCensusProcedureSchema).readonly(),
28469
28551
  groups: array(RequestCensusGroupSchema).readonly()
package/dist/addon.mjs CHANGED
@@ -28405,17 +28405,60 @@ var SetSiteLocationInputSchema = object({
28405
28405
  longitude: number().min(-180).max(180)
28406
28406
  }).nullable();
28407
28407
  /**
28408
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28408
+ * The TRANSPORT a call arrived on.
28409
+ *
28410
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28411
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28412
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28413
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28414
+ * checkable rather than asserted.
28415
+ *
28416
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28417
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28418
+ * connection; the viewer talks to the hub over `wsLink`
28419
+ * exclusively, so this is the plane the HTTP census could not see.
28420
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28421
+ * never touches a socket and therefore never touched a census.
28422
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28423
+ * that is exactly what its `0` asserts: every plane the hub has can name
28424
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28425
+ * plane nobody instrumented lands here instead of vanishing from the total.
28426
+ */
28427
+ var TransportPlaneSchema = _enum([
28428
+ "http",
28429
+ "ws",
28430
+ "mesh",
28431
+ "unknown"
28432
+ ]);
28433
+ /**
28434
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28435
+ * reads as "not instrumented", which is the one thing this census must never
28436
+ * make an operator wonder about.
28437
+ */
28438
+ var TransportPlaneCountsSchema = object({
28439
+ http: number(),
28440
+ ws: number(),
28441
+ mesh: number(),
28442
+ unknown: number()
28443
+ });
28444
+ /**
28445
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28409
28446
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28410
28447
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28411
28448
  * already prints - never a token, never an `Authorization` header.
28449
+ *
28450
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28451
+ * and lives for hours, so folding it into a call count makes one long-lived
28452
+ * stream look like a storm.
28412
28453
  */
28413
28454
  var RequestCensusGroupSchema = object({
28455
+ plane: TransportPlaneSchema,
28414
28456
  procedure: string(),
28415
28457
  userAgent: string(),
28416
28458
  ip: string(),
28417
28459
  principal: string(),
28418
28460
  calls: number(),
28461
+ subscriptions: number(),
28419
28462
  perMin: number()
28420
28463
  });
28421
28464
  /**
@@ -28428,6 +28471,14 @@ var RequestCensusGroupSchema = object({
28428
28471
  var RequestCensusProcedureSchema = object({
28429
28472
  procedure: string(),
28430
28473
  calls: number(),
28474
+ /**
28475
+ * The same total, split by transport. THIS is the row that answers the
28476
+ * question the census exists for: one look at `deviceManager.listAll` says
28477
+ * which plane carried the 4 960, without joining two log lines by eye.
28478
+ */
28479
+ planes: TransportPlaneCountsSchema,
28480
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28481
+ subscriptions: number(),
28431
28482
  perMin: number()
28432
28483
  });
28433
28484
  /**
@@ -28455,14 +28506,45 @@ var RequestCensusStatusSchema = object({
28455
28506
  */
28456
28507
  procedureCalls: number(),
28457
28508
  /**
28509
+ * `procedureCalls` split by transport. The four keys sum to
28510
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28511
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28512
+ */
28513
+ planes: TransportPlaneCountsSchema,
28514
+ /**
28515
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28516
+ * on no plane at all - which is a RESULT (a plane is missing from the
28517
+ * instrument), not a failure, and it has to be visible to be read as one.
28518
+ */
28519
+ planesExplainTotal: boolean(),
28520
+ /**
28458
28521
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28459
- * transport resolves one context per connection - but the number that says
28460
- * whether a plane this census cannot see was busy while HTTP was quiet.
28522
+ * adapter resolves one context per connection - kept because a plane's call
28523
+ * count of zero against 37 open connections says something different from a
28524
+ * plane with no connections at all.
28461
28525
  */
28462
28526
  wsConnections: number(),
28527
+ /**
28528
+ * Client frames the WS plane looked at. `wsMessages` far above
28529
+ * `planes.ws + subscriptions` means most traffic is not operations
28530
+ * (keepalives, connection params) - which is itself an answer.
28531
+ */
28532
+ wsMessages: number(),
28533
+ /**
28534
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28535
+ * purpose: one live-events stream opened at boot and held for six hours is
28536
+ * one subscription, and counting it as a call would let a quiet plane
28537
+ * masquerade as the storm.
28538
+ */
28539
+ subscriptions: number(),
28540
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28541
+ subscriptionStops: number(),
28463
28542
  distinctGroups: number(),
28464
- /** Calls counted in the totals whose group attribution was shed at the
28465
- * cardinality bound. */
28543
+ /**
28544
+ * Operations counted in the totals whose CALLER attribution was shed at the
28545
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28546
+ * which transport they arrived on, they just lost their group row.
28547
+ */
28466
28548
  unattributedCalls: number(),
28467
28549
  procedures: array(RequestCensusProcedureSchema).readonly(),
28468
28550
  groups: array(RequestCensusGroupSchema).readonly()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-gree",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
5
5
  "keywords": [
6
6
  "camstack",