@camstack/addon-provider-amcrest 0.2.33 → 0.2.34

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
@@ -28786,17 +28786,60 @@ var SetSiteLocationInputSchema = object({
28786
28786
  longitude: number().min(-180).max(180)
28787
28787
  }).nullable();
28788
28788
  /**
28789
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28789
+ * The TRANSPORT a call arrived on.
28790
+ *
28791
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28792
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28793
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28794
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28795
+ * checkable rather than asserted.
28796
+ *
28797
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28798
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28799
+ * connection; the viewer talks to the hub over `wsLink`
28800
+ * exclusively, so this is the plane the HTTP census could not see.
28801
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28802
+ * never touches a socket and therefore never touched a census.
28803
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28804
+ * that is exactly what its `0` asserts: every plane the hub has can name
28805
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28806
+ * plane nobody instrumented lands here instead of vanishing from the total.
28807
+ */
28808
+ var TransportPlaneSchema = _enum([
28809
+ "http",
28810
+ "ws",
28811
+ "mesh",
28812
+ "unknown"
28813
+ ]);
28814
+ /**
28815
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28816
+ * reads as "not instrumented", which is the one thing this census must never
28817
+ * make an operator wonder about.
28818
+ */
28819
+ var TransportPlaneCountsSchema = object({
28820
+ http: number(),
28821
+ ws: number(),
28822
+ mesh: number(),
28823
+ unknown: number()
28824
+ });
28825
+ /**
28826
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28790
28827
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28791
28828
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28792
28829
  * already prints - never a token, never an `Authorization` header.
28830
+ *
28831
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28832
+ * and lives for hours, so folding it into a call count makes one long-lived
28833
+ * stream look like a storm.
28793
28834
  */
28794
28835
  var RequestCensusGroupSchema = object({
28836
+ plane: TransportPlaneSchema,
28795
28837
  procedure: string(),
28796
28838
  userAgent: string(),
28797
28839
  ip: string(),
28798
28840
  principal: string(),
28799
28841
  calls: number(),
28842
+ subscriptions: number(),
28800
28843
  perMin: number()
28801
28844
  });
28802
28845
  /**
@@ -28809,6 +28852,14 @@ var RequestCensusGroupSchema = object({
28809
28852
  var RequestCensusProcedureSchema = object({
28810
28853
  procedure: string(),
28811
28854
  calls: number(),
28855
+ /**
28856
+ * The same total, split by transport. THIS is the row that answers the
28857
+ * question the census exists for: one look at `deviceManager.listAll` says
28858
+ * which plane carried the 4 960, without joining two log lines by eye.
28859
+ */
28860
+ planes: TransportPlaneCountsSchema,
28861
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28862
+ subscriptions: number(),
28812
28863
  perMin: number()
28813
28864
  });
28814
28865
  /**
@@ -28836,14 +28887,45 @@ var RequestCensusStatusSchema = object({
28836
28887
  */
28837
28888
  procedureCalls: number(),
28838
28889
  /**
28890
+ * `procedureCalls` split by transport. The four keys sum to
28891
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28892
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28893
+ */
28894
+ planes: TransportPlaneCountsSchema,
28895
+ /**
28896
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28897
+ * on no plane at all - which is a RESULT (a plane is missing from the
28898
+ * instrument), not a failure, and it has to be visible to be read as one.
28899
+ */
28900
+ planesExplainTotal: boolean(),
28901
+ /**
28839
28902
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28840
- * transport resolves one context per connection - but the number that says
28841
- * whether a plane this census cannot see was busy while HTTP was quiet.
28903
+ * adapter resolves one context per connection - kept because a plane's call
28904
+ * count of zero against 37 open connections says something different from a
28905
+ * plane with no connections at all.
28842
28906
  */
28843
28907
  wsConnections: number(),
28908
+ /**
28909
+ * Client frames the WS plane looked at. `wsMessages` far above
28910
+ * `planes.ws + subscriptions` means most traffic is not operations
28911
+ * (keepalives, connection params) - which is itself an answer.
28912
+ */
28913
+ wsMessages: number(),
28914
+ /**
28915
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28916
+ * purpose: one live-events stream opened at boot and held for six hours is
28917
+ * one subscription, and counting it as a call would let a quiet plane
28918
+ * masquerade as the storm.
28919
+ */
28920
+ subscriptions: number(),
28921
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28922
+ subscriptionStops: number(),
28844
28923
  distinctGroups: number(),
28845
- /** Calls counted in the totals whose group attribution was shed at the
28846
- * cardinality bound. */
28924
+ /**
28925
+ * Operations counted in the totals whose CALLER attribution was shed at the
28926
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28927
+ * which transport they arrived on, they just lost their group row.
28928
+ */
28847
28929
  unattributedCalls: number(),
28848
28930
  procedures: array(RequestCensusProcedureSchema).readonly(),
28849
28931
  groups: array(RequestCensusGroupSchema).readonly()
package/dist/addon.mjs CHANGED
@@ -28787,17 +28787,60 @@ var SetSiteLocationInputSchema = object({
28787
28787
  longitude: number().min(-180).max(180)
28788
28788
  }).nullable();
28789
28789
  /**
28790
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
28790
+ * The TRANSPORT a call arrived on.
28791
+ *
28792
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
28793
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
28794
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
28795
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
28796
+ * checkable rather than asserted.
28797
+ *
28798
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
28799
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
28800
+ * connection; the viewer talks to the hub over `wsLink`
28801
+ * exclusively, so this is the plane the HTTP census could not see.
28802
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
28803
+ * never touches a socket and therefore never touched a census.
28804
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
28805
+ * that is exactly what its `0` asserts: every plane the hub has can name
28806
+ * itself. It is an output bucket, never a knob — a call that arrives on a
28807
+ * plane nobody instrumented lands here instead of vanishing from the total.
28808
+ */
28809
+ var TransportPlaneSchema = _enum([
28810
+ "http",
28811
+ "ws",
28812
+ "mesh",
28813
+ "unknown"
28814
+ ]);
28815
+ /**
28816
+ * Calls per plane. Every key is always present, `0` included — an absent plane
28817
+ * reads as "not instrumented", which is the one thing this census must never
28818
+ * make an operator wonder about.
28819
+ */
28820
+ var TransportPlaneCountsSchema = object({
28821
+ http: number(),
28822
+ ws: number(),
28823
+ mesh: number(),
28824
+ unknown: number()
28825
+ });
28826
+ /**
28827
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
28791
28828
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
28792
28829
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
28793
28830
  * already prints - never a token, never an `Authorization` header.
28831
+ *
28832
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
28833
+ * and lives for hours, so folding it into a call count makes one long-lived
28834
+ * stream look like a storm.
28794
28835
  */
28795
28836
  var RequestCensusGroupSchema = object({
28837
+ plane: TransportPlaneSchema,
28796
28838
  procedure: string(),
28797
28839
  userAgent: string(),
28798
28840
  ip: string(),
28799
28841
  principal: string(),
28800
28842
  calls: number(),
28843
+ subscriptions: number(),
28801
28844
  perMin: number()
28802
28845
  });
28803
28846
  /**
@@ -28810,6 +28853,14 @@ var RequestCensusGroupSchema = object({
28810
28853
  var RequestCensusProcedureSchema = object({
28811
28854
  procedure: string(),
28812
28855
  calls: number(),
28856
+ /**
28857
+ * The same total, split by transport. THIS is the row that answers the
28858
+ * question the census exists for: one look at `deviceManager.listAll` says
28859
+ * which plane carried the 4 960, without joining two log lines by eye.
28860
+ */
28861
+ planes: TransportPlaneCountsSchema,
28862
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
28863
+ subscriptions: number(),
28813
28864
  perMin: number()
28814
28865
  });
28815
28866
  /**
@@ -28837,14 +28888,45 @@ var RequestCensusStatusSchema = object({
28837
28888
  */
28838
28889
  procedureCalls: number(),
28839
28890
  /**
28891
+ * `procedureCalls` split by transport. The four keys sum to
28892
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
28893
+ * `planesExplainTotal` is that identity, checked rather than assumed.
28894
+ */
28895
+ planes: TransportPlaneCountsSchema,
28896
+ /**
28897
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
28898
+ * on no plane at all - which is a RESULT (a plane is missing from the
28899
+ * instrument), not a failure, and it has to be visible to be read as one.
28900
+ */
28901
+ planesExplainTotal: boolean(),
28902
+ /**
28840
28903
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
28841
- * transport resolves one context per connection - but the number that says
28842
- * whether a plane this census cannot see was busy while HTTP was quiet.
28904
+ * adapter resolves one context per connection - kept because a plane's call
28905
+ * count of zero against 37 open connections says something different from a
28906
+ * plane with no connections at all.
28843
28907
  */
28844
28908
  wsConnections: number(),
28909
+ /**
28910
+ * Client frames the WS plane looked at. `wsMessages` far above
28911
+ * `planes.ws + subscriptions` means most traffic is not operations
28912
+ * (keepalives, connection params) - which is itself an answer.
28913
+ */
28914
+ wsMessages: number(),
28915
+ /**
28916
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
28917
+ * purpose: one live-events stream opened at boot and held for six hours is
28918
+ * one subscription, and counting it as a call would let a quiet plane
28919
+ * masquerade as the storm.
28920
+ */
28921
+ subscriptions: number(),
28922
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
28923
+ subscriptionStops: number(),
28845
28924
  distinctGroups: number(),
28846
- /** Calls counted in the totals whose group attribution was shed at the
28847
- * cardinality bound. */
28925
+ /**
28926
+ * Operations counted in the totals whose CALLER attribution was shed at the
28927
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
28928
+ * which transport they arrived on, they just lost their group row.
28929
+ */
28848
28930
  unattributedCalls: number(),
28849
28931
  procedures: array(RequestCensusProcedureSchema).readonly(),
28850
28932
  groups: array(RequestCensusGroupSchema).readonly()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-amcrest",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
5
5
  "keywords": [
6
6
  "camstack",