@camstack/addon-agent-ui 1.2.33 → 1.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
@@ -26115,17 +26115,60 @@ var SetSiteLocationInputSchema = object({
26115
26115
  longitude: number().min(-180).max(180)
26116
26116
  }).nullable();
26117
26117
  /**
26118
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26118
+ * The TRANSPORT a call arrived on.
26119
+ *
26120
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26121
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26122
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26123
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26124
+ * checkable rather than asserted.
26125
+ *
26126
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26127
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26128
+ * connection; the viewer talks to the hub over `wsLink`
26129
+ * exclusively, so this is the plane the HTTP census could not see.
26130
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26131
+ * never touches a socket and therefore never touched a census.
26132
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26133
+ * that is exactly what its `0` asserts: every plane the hub has can name
26134
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26135
+ * plane nobody instrumented lands here instead of vanishing from the total.
26136
+ */
26137
+ var TransportPlaneSchema = _enum([
26138
+ "http",
26139
+ "ws",
26140
+ "mesh",
26141
+ "unknown"
26142
+ ]);
26143
+ /**
26144
+ * Calls per plane. Every key is always present, `0` included — an absent plane
26145
+ * reads as "not instrumented", which is the one thing this census must never
26146
+ * make an operator wonder about.
26147
+ */
26148
+ var TransportPlaneCountsSchema = object({
26149
+ http: number(),
26150
+ ws: number(),
26151
+ mesh: number(),
26152
+ unknown: number()
26153
+ });
26154
+ /**
26155
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26119
26156
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26120
26157
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26121
26158
  * already prints - never a token, never an `Authorization` header.
26159
+ *
26160
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
26161
+ * and lives for hours, so folding it into a call count makes one long-lived
26162
+ * stream look like a storm.
26122
26163
  */
26123
26164
  var RequestCensusGroupSchema = object({
26165
+ plane: TransportPlaneSchema,
26124
26166
  procedure: string(),
26125
26167
  userAgent: string(),
26126
26168
  ip: string(),
26127
26169
  principal: string(),
26128
26170
  calls: number(),
26171
+ subscriptions: number(),
26129
26172
  perMin: number()
26130
26173
  });
26131
26174
  /**
@@ -26138,6 +26181,14 @@ var RequestCensusGroupSchema = object({
26138
26181
  var RequestCensusProcedureSchema = object({
26139
26182
  procedure: string(),
26140
26183
  calls: number(),
26184
+ /**
26185
+ * The same total, split by transport. THIS is the row that answers the
26186
+ * question the census exists for: one look at `deviceManager.listAll` says
26187
+ * which plane carried the 4 960, without joining two log lines by eye.
26188
+ */
26189
+ planes: TransportPlaneCountsSchema,
26190
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
26191
+ subscriptions: number(),
26141
26192
  perMin: number()
26142
26193
  });
26143
26194
  /**
@@ -26165,14 +26216,45 @@ var RequestCensusStatusSchema = object({
26165
26216
  */
26166
26217
  procedureCalls: number(),
26167
26218
  /**
26219
+ * `procedureCalls` split by transport. The four keys sum to
26220
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
26221
+ * `planesExplainTotal` is that identity, checked rather than assumed.
26222
+ */
26223
+ planes: TransportPlaneCountsSchema,
26224
+ /**
26225
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
26226
+ * on no plane at all - which is a RESULT (a plane is missing from the
26227
+ * instrument), not a failure, and it has to be visible to be read as one.
26228
+ */
26229
+ planesExplainTotal: boolean(),
26230
+ /**
26168
26231
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
26169
- * transport resolves one context per connection - but the number that says
26170
- * whether a plane this census cannot see was busy while HTTP was quiet.
26232
+ * adapter resolves one context per connection - kept because a plane's call
26233
+ * count of zero against 37 open connections says something different from a
26234
+ * plane with no connections at all.
26171
26235
  */
26172
26236
  wsConnections: number(),
26237
+ /**
26238
+ * Client frames the WS plane looked at. `wsMessages` far above
26239
+ * `planes.ws + subscriptions` means most traffic is not operations
26240
+ * (keepalives, connection params) - which is itself an answer.
26241
+ */
26242
+ wsMessages: number(),
26243
+ /**
26244
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
26245
+ * purpose: one live-events stream opened at boot and held for six hours is
26246
+ * one subscription, and counting it as a call would let a quiet plane
26247
+ * masquerade as the storm.
26248
+ */
26249
+ subscriptions: number(),
26250
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
26251
+ subscriptionStops: number(),
26173
26252
  distinctGroups: number(),
26174
- /** Calls counted in the totals whose group attribution was shed at the
26175
- * cardinality bound. */
26253
+ /**
26254
+ * Operations counted in the totals whose CALLER attribution was shed at the
26255
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
26256
+ * which transport they arrived on, they just lost their group row.
26257
+ */
26176
26258
  unattributedCalls: number(),
26177
26259
  procedures: array(RequestCensusProcedureSchema).readonly(),
26178
26260
  groups: array(RequestCensusGroupSchema).readonly()
@@ -35061,7 +35143,7 @@ var AgentUIAddon = class extends BaseAddon {
35061
35143
  capability: adminUiCapability,
35062
35144
  provider: {
35063
35145
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
35064
- getVersion: async () => ({ version: "1.2.33" })
35146
+ getVersion: async () => ({ version: "1.2.34" })
35065
35147
  }
35066
35148
  }];
35067
35149
  }