@camstack/addon-mqtt-broker 1.2.32 → 1.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.
@@ -26209,17 +26209,60 @@ var SetSiteLocationInputSchema = object({
26209
26209
  longitude: number().min(-180).max(180)
26210
26210
  }).nullable();
26211
26211
  /**
26212
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26212
+ * The TRANSPORT a call arrived on.
26213
+ *
26214
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26215
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26216
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26217
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26218
+ * checkable rather than asserted.
26219
+ *
26220
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26221
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26222
+ * connection; the viewer talks to the hub over `wsLink`
26223
+ * exclusively, so this is the plane the HTTP census could not see.
26224
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26225
+ * never touches a socket and therefore never touched a census.
26226
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26227
+ * that is exactly what its `0` asserts: every plane the hub has can name
26228
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26229
+ * plane nobody instrumented lands here instead of vanishing from the total.
26230
+ */
26231
+ var TransportPlaneSchema = _enum([
26232
+ "http",
26233
+ "ws",
26234
+ "mesh",
26235
+ "unknown"
26236
+ ]);
26237
+ /**
26238
+ * Calls per plane. Every key is always present, `0` included — an absent plane
26239
+ * reads as "not instrumented", which is the one thing this census must never
26240
+ * make an operator wonder about.
26241
+ */
26242
+ var TransportPlaneCountsSchema = object({
26243
+ http: number(),
26244
+ ws: number(),
26245
+ mesh: number(),
26246
+ unknown: number()
26247
+ });
26248
+ /**
26249
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26213
26250
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26214
26251
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26215
26252
  * already prints - never a token, never an `Authorization` header.
26253
+ *
26254
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
26255
+ * and lives for hours, so folding it into a call count makes one long-lived
26256
+ * stream look like a storm.
26216
26257
  */
26217
26258
  var RequestCensusGroupSchema = object({
26259
+ plane: TransportPlaneSchema,
26218
26260
  procedure: string(),
26219
26261
  userAgent: string(),
26220
26262
  ip: string(),
26221
26263
  principal: string(),
26222
26264
  calls: number(),
26265
+ subscriptions: number(),
26223
26266
  perMin: number()
26224
26267
  });
26225
26268
  /**
@@ -26232,6 +26275,14 @@ var RequestCensusGroupSchema = object({
26232
26275
  var RequestCensusProcedureSchema = object({
26233
26276
  procedure: string(),
26234
26277
  calls: number(),
26278
+ /**
26279
+ * The same total, split by transport. THIS is the row that answers the
26280
+ * question the census exists for: one look at `deviceManager.listAll` says
26281
+ * which plane carried the 4 960, without joining two log lines by eye.
26282
+ */
26283
+ planes: TransportPlaneCountsSchema,
26284
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
26285
+ subscriptions: number(),
26235
26286
  perMin: number()
26236
26287
  });
26237
26288
  /**
@@ -26259,14 +26310,45 @@ var RequestCensusStatusSchema = object({
26259
26310
  */
26260
26311
  procedureCalls: number(),
26261
26312
  /**
26313
+ * `procedureCalls` split by transport. The four keys sum to
26314
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
26315
+ * `planesExplainTotal` is that identity, checked rather than assumed.
26316
+ */
26317
+ planes: TransportPlaneCountsSchema,
26318
+ /**
26319
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
26320
+ * on no plane at all - which is a RESULT (a plane is missing from the
26321
+ * instrument), not a failure, and it has to be visible to be read as one.
26322
+ */
26323
+ planesExplainTotal: boolean(),
26324
+ /**
26262
26325
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
26263
- * transport resolves one context per connection - but the number that says
26264
- * whether a plane this census cannot see was busy while HTTP was quiet.
26326
+ * adapter resolves one context per connection - kept because a plane's call
26327
+ * count of zero against 37 open connections says something different from a
26328
+ * plane with no connections at all.
26265
26329
  */
26266
26330
  wsConnections: number(),
26331
+ /**
26332
+ * Client frames the WS plane looked at. `wsMessages` far above
26333
+ * `planes.ws + subscriptions` means most traffic is not operations
26334
+ * (keepalives, connection params) - which is itself an answer.
26335
+ */
26336
+ wsMessages: number(),
26337
+ /**
26338
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
26339
+ * purpose: one live-events stream opened at boot and held for six hours is
26340
+ * one subscription, and counting it as a call would let a quiet plane
26341
+ * masquerade as the storm.
26342
+ */
26343
+ subscriptions: number(),
26344
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
26345
+ subscriptionStops: number(),
26267
26346
  distinctGroups: number(),
26268
- /** Calls counted in the totals whose group attribution was shed at the
26269
- * cardinality bound. */
26347
+ /**
26348
+ * Operations counted in the totals whose CALLER attribution was shed at the
26349
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
26350
+ * which transport they arrived on, they just lost their group row.
26351
+ */
26270
26352
  unattributedCalls: number(),
26271
26353
  procedures: array(RequestCensusProcedureSchema).readonly(),
26272
26354
  groups: array(RequestCensusGroupSchema).readonly()
@@ -26204,17 +26204,60 @@ var SetSiteLocationInputSchema = object({
26204
26204
  longitude: number().min(-180).max(180)
26205
26205
  }).nullable();
26206
26206
  /**
26207
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26207
+ * The TRANSPORT a call arrived on.
26208
+ *
26209
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26210
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26211
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26212
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26213
+ * checkable rather than asserted.
26214
+ *
26215
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26216
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26217
+ * connection; the viewer talks to the hub over `wsLink`
26218
+ * exclusively, so this is the plane the HTTP census could not see.
26219
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26220
+ * never touches a socket and therefore never touched a census.
26221
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26222
+ * that is exactly what its `0` asserts: every plane the hub has can name
26223
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26224
+ * plane nobody instrumented lands here instead of vanishing from the total.
26225
+ */
26226
+ var TransportPlaneSchema = _enum([
26227
+ "http",
26228
+ "ws",
26229
+ "mesh",
26230
+ "unknown"
26231
+ ]);
26232
+ /**
26233
+ * Calls per plane. Every key is always present, `0` included — an absent plane
26234
+ * reads as "not instrumented", which is the one thing this census must never
26235
+ * make an operator wonder about.
26236
+ */
26237
+ var TransportPlaneCountsSchema = object({
26238
+ http: number(),
26239
+ ws: number(),
26240
+ mesh: number(),
26241
+ unknown: number()
26242
+ });
26243
+ /**
26244
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26208
26245
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26209
26246
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26210
26247
  * already prints - never a token, never an `Authorization` header.
26248
+ *
26249
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
26250
+ * and lives for hours, so folding it into a call count makes one long-lived
26251
+ * stream look like a storm.
26211
26252
  */
26212
26253
  var RequestCensusGroupSchema = object({
26254
+ plane: TransportPlaneSchema,
26213
26255
  procedure: string(),
26214
26256
  userAgent: string(),
26215
26257
  ip: string(),
26216
26258
  principal: string(),
26217
26259
  calls: number(),
26260
+ subscriptions: number(),
26218
26261
  perMin: number()
26219
26262
  });
26220
26263
  /**
@@ -26227,6 +26270,14 @@ var RequestCensusGroupSchema = object({
26227
26270
  var RequestCensusProcedureSchema = object({
26228
26271
  procedure: string(),
26229
26272
  calls: number(),
26273
+ /**
26274
+ * The same total, split by transport. THIS is the row that answers the
26275
+ * question the census exists for: one look at `deviceManager.listAll` says
26276
+ * which plane carried the 4 960, without joining two log lines by eye.
26277
+ */
26278
+ planes: TransportPlaneCountsSchema,
26279
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
26280
+ subscriptions: number(),
26230
26281
  perMin: number()
26231
26282
  });
26232
26283
  /**
@@ -26254,14 +26305,45 @@ var RequestCensusStatusSchema = object({
26254
26305
  */
26255
26306
  procedureCalls: number(),
26256
26307
  /**
26308
+ * `procedureCalls` split by transport. The four keys sum to
26309
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
26310
+ * `planesExplainTotal` is that identity, checked rather than assumed.
26311
+ */
26312
+ planes: TransportPlaneCountsSchema,
26313
+ /**
26314
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
26315
+ * on no plane at all - which is a RESULT (a plane is missing from the
26316
+ * instrument), not a failure, and it has to be visible to be read as one.
26317
+ */
26318
+ planesExplainTotal: boolean(),
26319
+ /**
26257
26320
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
26258
- * transport resolves one context per connection - but the number that says
26259
- * whether a plane this census cannot see was busy while HTTP was quiet.
26321
+ * adapter resolves one context per connection - kept because a plane's call
26322
+ * count of zero against 37 open connections says something different from a
26323
+ * plane with no connections at all.
26260
26324
  */
26261
26325
  wsConnections: number(),
26326
+ /**
26327
+ * Client frames the WS plane looked at. `wsMessages` far above
26328
+ * `planes.ws + subscriptions` means most traffic is not operations
26329
+ * (keepalives, connection params) - which is itself an answer.
26330
+ */
26331
+ wsMessages: number(),
26332
+ /**
26333
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
26334
+ * purpose: one live-events stream opened at boot and held for six hours is
26335
+ * one subscription, and counting it as a call would let a quiet plane
26336
+ * masquerade as the storm.
26337
+ */
26338
+ subscriptions: number(),
26339
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
26340
+ subscriptionStops: number(),
26262
26341
  distinctGroups: number(),
26263
- /** Calls counted in the totals whose group attribution was shed at the
26264
- * cardinality bound. */
26342
+ /**
26343
+ * Operations counted in the totals whose CALLER attribution was shed at the
26344
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
26345
+ * which transport they arrived on, they just lost their group row.
26346
+ */
26265
26347
  unattributedCalls: number(),
26266
26348
  procedures: array(RequestCensusProcedureSchema).readonly(),
26267
26349
  groups: array(RequestCensusGroupSchema).readonly()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.2.32",
3
+ "version": "1.2.33",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",