@camstack/addon-export-hap 1.2.43 → 1.2.44

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.
@@ -26970,17 +26970,60 @@ var SetSiteLocationInputSchema = object({
26970
26970
  longitude: number().min(-180).max(180)
26971
26971
  }).nullable();
26972
26972
  /**
26973
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26973
+ * The TRANSPORT a call arrived on.
26974
+ *
26975
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26976
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26977
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26978
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26979
+ * checkable rather than asserted.
26980
+ *
26981
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26982
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26983
+ * connection; the viewer talks to the hub over `wsLink`
26984
+ * exclusively, so this is the plane the HTTP census could not see.
26985
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26986
+ * never touches a socket and therefore never touched a census.
26987
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26988
+ * that is exactly what its `0` asserts: every plane the hub has can name
26989
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26990
+ * plane nobody instrumented lands here instead of vanishing from the total.
26991
+ */
26992
+ var TransportPlaneSchema = _enum([
26993
+ "http",
26994
+ "ws",
26995
+ "mesh",
26996
+ "unknown"
26997
+ ]);
26998
+ /**
26999
+ * Calls per plane. Every key is always present, `0` included — an absent plane
27000
+ * reads as "not instrumented", which is the one thing this census must never
27001
+ * make an operator wonder about.
27002
+ */
27003
+ var TransportPlaneCountsSchema = object({
27004
+ http: number(),
27005
+ ws: number(),
27006
+ mesh: number(),
27007
+ unknown: number()
27008
+ });
27009
+ /**
27010
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26974
27011
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26975
27012
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26976
27013
  * already prints - never a token, never an `Authorization` header.
27014
+ *
27015
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
27016
+ * and lives for hours, so folding it into a call count makes one long-lived
27017
+ * stream look like a storm.
26977
27018
  */
26978
27019
  var RequestCensusGroupSchema = object({
27020
+ plane: TransportPlaneSchema,
26979
27021
  procedure: string(),
26980
27022
  userAgent: string(),
26981
27023
  ip: string(),
26982
27024
  principal: string(),
26983
27025
  calls: number(),
27026
+ subscriptions: number(),
26984
27027
  perMin: number()
26985
27028
  });
26986
27029
  /**
@@ -26993,6 +27036,14 @@ var RequestCensusGroupSchema = object({
26993
27036
  var RequestCensusProcedureSchema = object({
26994
27037
  procedure: string(),
26995
27038
  calls: number(),
27039
+ /**
27040
+ * The same total, split by transport. THIS is the row that answers the
27041
+ * question the census exists for: one look at `deviceManager.listAll` says
27042
+ * which plane carried the 4 960, without joining two log lines by eye.
27043
+ */
27044
+ planes: TransportPlaneCountsSchema,
27045
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
27046
+ subscriptions: number(),
26996
27047
  perMin: number()
26997
27048
  });
26998
27049
  /**
@@ -27020,14 +27071,45 @@ var RequestCensusStatusSchema = object({
27020
27071
  */
27021
27072
  procedureCalls: number(),
27022
27073
  /**
27074
+ * `procedureCalls` split by transport. The four keys sum to
27075
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
27076
+ * `planesExplainTotal` is that identity, checked rather than assumed.
27077
+ */
27078
+ planes: TransportPlaneCountsSchema,
27079
+ /**
27080
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
27081
+ * on no plane at all - which is a RESULT (a plane is missing from the
27082
+ * instrument), not a failure, and it has to be visible to be read as one.
27083
+ */
27084
+ planesExplainTotal: boolean(),
27085
+ /**
27023
27086
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
27024
- * transport resolves one context per connection - but the number that says
27025
- * whether a plane this census cannot see was busy while HTTP was quiet.
27087
+ * adapter resolves one context per connection - kept because a plane's call
27088
+ * count of zero against 37 open connections says something different from a
27089
+ * plane with no connections at all.
27026
27090
  */
27027
27091
  wsConnections: number(),
27092
+ /**
27093
+ * Client frames the WS plane looked at. `wsMessages` far above
27094
+ * `planes.ws + subscriptions` means most traffic is not operations
27095
+ * (keepalives, connection params) - which is itself an answer.
27096
+ */
27097
+ wsMessages: number(),
27098
+ /**
27099
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
27100
+ * purpose: one live-events stream opened at boot and held for six hours is
27101
+ * one subscription, and counting it as a call would let a quiet plane
27102
+ * masquerade as the storm.
27103
+ */
27104
+ subscriptions: number(),
27105
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
27106
+ subscriptionStops: number(),
27028
27107
  distinctGroups: number(),
27029
- /** Calls counted in the totals whose group attribution was shed at the
27030
- * cardinality bound. */
27108
+ /**
27109
+ * Operations counted in the totals whose CALLER attribution was shed at the
27110
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
27111
+ * which transport they arrived on, they just lost their group row.
27112
+ */
27031
27113
  unattributedCalls: number(),
27032
27114
  procedures: array(RequestCensusProcedureSchema).readonly(),
27033
27115
  groups: array(RequestCensusGroupSchema).readonly()
@@ -26958,17 +26958,60 @@ var SetSiteLocationInputSchema = object({
26958
26958
  longitude: number().min(-180).max(180)
26959
26959
  }).nullable();
26960
26960
  /**
26961
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26961
+ * The TRANSPORT a call arrived on.
26962
+ *
26963
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26964
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26965
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26966
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26967
+ * checkable rather than asserted.
26968
+ *
26969
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26970
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26971
+ * connection; the viewer talks to the hub over `wsLink`
26972
+ * exclusively, so this is the plane the HTTP census could not see.
26973
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26974
+ * never touches a socket and therefore never touched a census.
26975
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26976
+ * that is exactly what its `0` asserts: every plane the hub has can name
26977
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26978
+ * plane nobody instrumented lands here instead of vanishing from the total.
26979
+ */
26980
+ var TransportPlaneSchema = _enum([
26981
+ "http",
26982
+ "ws",
26983
+ "mesh",
26984
+ "unknown"
26985
+ ]);
26986
+ /**
26987
+ * Calls per plane. Every key is always present, `0` included — an absent plane
26988
+ * reads as "not instrumented", which is the one thing this census must never
26989
+ * make an operator wonder about.
26990
+ */
26991
+ var TransportPlaneCountsSchema = object({
26992
+ http: number(),
26993
+ ws: number(),
26994
+ mesh: number(),
26995
+ unknown: number()
26996
+ });
26997
+ /**
26998
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26962
26999
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26963
27000
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26964
27001
  * already prints - never a token, never an `Authorization` header.
27002
+ *
27003
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
27004
+ * and lives for hours, so folding it into a call count makes one long-lived
27005
+ * stream look like a storm.
26965
27006
  */
26966
27007
  var RequestCensusGroupSchema = object({
27008
+ plane: TransportPlaneSchema,
26967
27009
  procedure: string(),
26968
27010
  userAgent: string(),
26969
27011
  ip: string(),
26970
27012
  principal: string(),
26971
27013
  calls: number(),
27014
+ subscriptions: number(),
26972
27015
  perMin: number()
26973
27016
  });
26974
27017
  /**
@@ -26981,6 +27024,14 @@ var RequestCensusGroupSchema = object({
26981
27024
  var RequestCensusProcedureSchema = object({
26982
27025
  procedure: string(),
26983
27026
  calls: number(),
27027
+ /**
27028
+ * The same total, split by transport. THIS is the row that answers the
27029
+ * question the census exists for: one look at `deviceManager.listAll` says
27030
+ * which plane carried the 4 960, without joining two log lines by eye.
27031
+ */
27032
+ planes: TransportPlaneCountsSchema,
27033
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
27034
+ subscriptions: number(),
26984
27035
  perMin: number()
26985
27036
  });
26986
27037
  /**
@@ -27008,14 +27059,45 @@ var RequestCensusStatusSchema = object({
27008
27059
  */
27009
27060
  procedureCalls: number(),
27010
27061
  /**
27062
+ * `procedureCalls` split by transport. The four keys sum to
27063
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
27064
+ * `planesExplainTotal` is that identity, checked rather than assumed.
27065
+ */
27066
+ planes: TransportPlaneCountsSchema,
27067
+ /**
27068
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
27069
+ * on no plane at all - which is a RESULT (a plane is missing from the
27070
+ * instrument), not a failure, and it has to be visible to be read as one.
27071
+ */
27072
+ planesExplainTotal: boolean(),
27073
+ /**
27011
27074
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
27012
- * transport resolves one context per connection - but the number that says
27013
- * whether a plane this census cannot see was busy while HTTP was quiet.
27075
+ * adapter resolves one context per connection - kept because a plane's call
27076
+ * count of zero against 37 open connections says something different from a
27077
+ * plane with no connections at all.
27014
27078
  */
27015
27079
  wsConnections: number(),
27080
+ /**
27081
+ * Client frames the WS plane looked at. `wsMessages` far above
27082
+ * `planes.ws + subscriptions` means most traffic is not operations
27083
+ * (keepalives, connection params) - which is itself an answer.
27084
+ */
27085
+ wsMessages: number(),
27086
+ /**
27087
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
27088
+ * purpose: one live-events stream opened at boot and held for six hours is
27089
+ * one subscription, and counting it as a call would let a quiet plane
27090
+ * masquerade as the storm.
27091
+ */
27092
+ subscriptions: number(),
27093
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
27094
+ subscriptionStops: number(),
27016
27095
  distinctGroups: number(),
27017
- /** Calls counted in the totals whose group attribution was shed at the
27018
- * cardinality bound. */
27096
+ /**
27097
+ * Operations counted in the totals whose CALLER attribution was shed at the
27098
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
27099
+ * which transport they arrived on, they just lost their group row.
27100
+ */
27019
27101
  unattributedCalls: number(),
27020
27102
  procedures: array(RequestCensusProcedureSchema).readonly(),
27021
27103
  groups: array(RequestCensusGroupSchema).readonly()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.43",
3
+ "version": "1.2.44",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",