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