@camstack/addon-provider-hikvision 1.2.39 → 1.2.40

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
@@ -29020,17 +29020,60 @@ var SetSiteLocationInputSchema = object({
29020
29020
  longitude: number().min(-180).max(180)
29021
29021
  }).nullable();
29022
29022
  /**
29023
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
29023
+ * The TRANSPORT a call arrived on.
29024
+ *
29025
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
29026
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
29027
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
29028
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
29029
+ * checkable rather than asserted.
29030
+ *
29031
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
29032
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
29033
+ * connection; the viewer talks to the hub over `wsLink`
29034
+ * exclusively, so this is the plane the HTTP census could not see.
29035
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
29036
+ * never touches a socket and therefore never touched a census.
29037
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
29038
+ * that is exactly what its `0` asserts: every plane the hub has can name
29039
+ * itself. It is an output bucket, never a knob — a call that arrives on a
29040
+ * plane nobody instrumented lands here instead of vanishing from the total.
29041
+ */
29042
+ var TransportPlaneSchema = _enum([
29043
+ "http",
29044
+ "ws",
29045
+ "mesh",
29046
+ "unknown"
29047
+ ]);
29048
+ /**
29049
+ * Calls per plane. Every key is always present, `0` included — an absent plane
29050
+ * reads as "not instrumented", which is the one thing this census must never
29051
+ * make an operator wonder about.
29052
+ */
29053
+ var TransportPlaneCountsSchema = object({
29054
+ http: number(),
29055
+ ws: number(),
29056
+ mesh: number(),
29057
+ unknown: number()
29058
+ });
29059
+ /**
29060
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
29024
29061
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
29025
29062
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
29026
29063
  * already prints - never a token, never an `Authorization` header.
29064
+ *
29065
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
29066
+ * and lives for hours, so folding it into a call count makes one long-lived
29067
+ * stream look like a storm.
29027
29068
  */
29028
29069
  var RequestCensusGroupSchema = object({
29070
+ plane: TransportPlaneSchema,
29029
29071
  procedure: string(),
29030
29072
  userAgent: string(),
29031
29073
  ip: string(),
29032
29074
  principal: string(),
29033
29075
  calls: number(),
29076
+ subscriptions: number(),
29034
29077
  perMin: number()
29035
29078
  });
29036
29079
  /**
@@ -29043,6 +29086,14 @@ var RequestCensusGroupSchema = object({
29043
29086
  var RequestCensusProcedureSchema = object({
29044
29087
  procedure: string(),
29045
29088
  calls: number(),
29089
+ /**
29090
+ * The same total, split by transport. THIS is the row that answers the
29091
+ * question the census exists for: one look at `deviceManager.listAll` says
29092
+ * which plane carried the 4 960, without joining two log lines by eye.
29093
+ */
29094
+ planes: TransportPlaneCountsSchema,
29095
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
29096
+ subscriptions: number(),
29046
29097
  perMin: number()
29047
29098
  });
29048
29099
  /**
@@ -29070,14 +29121,45 @@ var RequestCensusStatusSchema = object({
29070
29121
  */
29071
29122
  procedureCalls: number(),
29072
29123
  /**
29124
+ * `procedureCalls` split by transport. The four keys sum to
29125
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
29126
+ * `planesExplainTotal` is that identity, checked rather than assumed.
29127
+ */
29128
+ planes: TransportPlaneCountsSchema,
29129
+ /**
29130
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
29131
+ * on no plane at all - which is a RESULT (a plane is missing from the
29132
+ * instrument), not a failure, and it has to be visible to be read as one.
29133
+ */
29134
+ planesExplainTotal: boolean(),
29135
+ /**
29073
29136
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
29074
- * transport resolves one context per connection - but the number that says
29075
- * whether a plane this census cannot see was busy while HTTP was quiet.
29137
+ * adapter resolves one context per connection - kept because a plane's call
29138
+ * count of zero against 37 open connections says something different from a
29139
+ * plane with no connections at all.
29076
29140
  */
29077
29141
  wsConnections: number(),
29142
+ /**
29143
+ * Client frames the WS plane looked at. `wsMessages` far above
29144
+ * `planes.ws + subscriptions` means most traffic is not operations
29145
+ * (keepalives, connection params) - which is itself an answer.
29146
+ */
29147
+ wsMessages: number(),
29148
+ /**
29149
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
29150
+ * purpose: one live-events stream opened at boot and held for six hours is
29151
+ * one subscription, and counting it as a call would let a quiet plane
29152
+ * masquerade as the storm.
29153
+ */
29154
+ subscriptions: number(),
29155
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
29156
+ subscriptionStops: number(),
29078
29157
  distinctGroups: number(),
29079
- /** Calls counted in the totals whose group attribution was shed at the
29080
- * cardinality bound. */
29158
+ /**
29159
+ * Operations counted in the totals whose CALLER attribution was shed at the
29160
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
29161
+ * which transport they arrived on, they just lost their group row.
29162
+ */
29081
29163
  unattributedCalls: number(),
29082
29164
  procedures: array(RequestCensusProcedureSchema).readonly(),
29083
29165
  groups: array(RequestCensusGroupSchema).readonly()
package/dist/addon.mjs CHANGED
@@ -29021,17 +29021,60 @@ var SetSiteLocationInputSchema = object({
29021
29021
  longitude: number().min(-180).max(180)
29022
29022
  }).nullable();
29023
29023
  /**
29024
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
29024
+ * The TRANSPORT a call arrived on.
29025
+ *
29026
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
29027
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
29028
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
29029
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
29030
+ * checkable rather than asserted.
29031
+ *
29032
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
29033
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
29034
+ * connection; the viewer talks to the hub over `wsLink`
29035
+ * exclusively, so this is the plane the HTTP census could not see.
29036
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
29037
+ * never touches a socket and therefore never touched a census.
29038
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
29039
+ * that is exactly what its `0` asserts: every plane the hub has can name
29040
+ * itself. It is an output bucket, never a knob — a call that arrives on a
29041
+ * plane nobody instrumented lands here instead of vanishing from the total.
29042
+ */
29043
+ var TransportPlaneSchema = _enum([
29044
+ "http",
29045
+ "ws",
29046
+ "mesh",
29047
+ "unknown"
29048
+ ]);
29049
+ /**
29050
+ * Calls per plane. Every key is always present, `0` included — an absent plane
29051
+ * reads as "not instrumented", which is the one thing this census must never
29052
+ * make an operator wonder about.
29053
+ */
29054
+ var TransportPlaneCountsSchema = object({
29055
+ http: number(),
29056
+ ws: number(),
29057
+ mesh: number(),
29058
+ unknown: number()
29059
+ });
29060
+ /**
29061
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
29025
29062
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
29026
29063
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
29027
29064
  * already prints - never a token, never an `Authorization` header.
29065
+ *
29066
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
29067
+ * and lives for hours, so folding it into a call count makes one long-lived
29068
+ * stream look like a storm.
29028
29069
  */
29029
29070
  var RequestCensusGroupSchema = object({
29071
+ plane: TransportPlaneSchema,
29030
29072
  procedure: string(),
29031
29073
  userAgent: string(),
29032
29074
  ip: string(),
29033
29075
  principal: string(),
29034
29076
  calls: number(),
29077
+ subscriptions: number(),
29035
29078
  perMin: number()
29036
29079
  });
29037
29080
  /**
@@ -29044,6 +29087,14 @@ var RequestCensusGroupSchema = object({
29044
29087
  var RequestCensusProcedureSchema = object({
29045
29088
  procedure: string(),
29046
29089
  calls: number(),
29090
+ /**
29091
+ * The same total, split by transport. THIS is the row that answers the
29092
+ * question the census exists for: one look at `deviceManager.listAll` says
29093
+ * which plane carried the 4 960, without joining two log lines by eye.
29094
+ */
29095
+ planes: TransportPlaneCountsSchema,
29096
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
29097
+ subscriptions: number(),
29047
29098
  perMin: number()
29048
29099
  });
29049
29100
  /**
@@ -29071,14 +29122,45 @@ var RequestCensusStatusSchema = object({
29071
29122
  */
29072
29123
  procedureCalls: number(),
29073
29124
  /**
29125
+ * `procedureCalls` split by transport. The four keys sum to
29126
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
29127
+ * `planesExplainTotal` is that identity, checked rather than assumed.
29128
+ */
29129
+ planes: TransportPlaneCountsSchema,
29130
+ /**
29131
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
29132
+ * on no plane at all - which is a RESULT (a plane is missing from the
29133
+ * instrument), not a failure, and it has to be visible to be read as one.
29134
+ */
29135
+ planesExplainTotal: boolean(),
29136
+ /**
29074
29137
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
29075
- * transport resolves one context per connection - but the number that says
29076
- * whether a plane this census cannot see was busy while HTTP was quiet.
29138
+ * adapter resolves one context per connection - kept because a plane's call
29139
+ * count of zero against 37 open connections says something different from a
29140
+ * plane with no connections at all.
29077
29141
  */
29078
29142
  wsConnections: number(),
29143
+ /**
29144
+ * Client frames the WS plane looked at. `wsMessages` far above
29145
+ * `planes.ws + subscriptions` means most traffic is not operations
29146
+ * (keepalives, connection params) - which is itself an answer.
29147
+ */
29148
+ wsMessages: number(),
29149
+ /**
29150
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
29151
+ * purpose: one live-events stream opened at boot and held for six hours is
29152
+ * one subscription, and counting it as a call would let a quiet plane
29153
+ * masquerade as the storm.
29154
+ */
29155
+ subscriptions: number(),
29156
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
29157
+ subscriptionStops: number(),
29079
29158
  distinctGroups: number(),
29080
- /** Calls counted in the totals whose group attribution was shed at the
29081
- * cardinality bound. */
29159
+ /**
29160
+ * Operations counted in the totals whose CALLER attribution was shed at the
29161
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
29162
+ * which transport they arrived on, they just lost their group row.
29163
+ */
29082
29164
  unattributedCalls: number(),
29083
29165
  procedures: array(RequestCensusProcedureSchema).readonly(),
29084
29166
  groups: array(RequestCensusGroupSchema).readonly()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.39",
3
+ "version": "1.2.40",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",