@camstack/addon-auth 1.2.35 → 1.2.36

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.
@@ -26320,17 +26320,60 @@ var SetSiteLocationInputSchema = object({
26320
26320
  longitude: number().min(-180).max(180)
26321
26321
  }).nullable();
26322
26322
  /**
26323
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26323
+ * The TRANSPORT a call arrived on.
26324
+ *
26325
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26326
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26327
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26328
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26329
+ * checkable rather than asserted.
26330
+ *
26331
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26332
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26333
+ * connection; the viewer talks to the hub over `wsLink`
26334
+ * exclusively, so this is the plane the HTTP census could not see.
26335
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26336
+ * never touches a socket and therefore never touched a census.
26337
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26338
+ * that is exactly what its `0` asserts: every plane the hub has can name
26339
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26340
+ * plane nobody instrumented lands here instead of vanishing from the total.
26341
+ */
26342
+ var TransportPlaneSchema = _enum([
26343
+ "http",
26344
+ "ws",
26345
+ "mesh",
26346
+ "unknown"
26347
+ ]);
26348
+ /**
26349
+ * Calls per plane. Every key is always present, `0` included — an absent plane
26350
+ * reads as "not instrumented", which is the one thing this census must never
26351
+ * make an operator wonder about.
26352
+ */
26353
+ var TransportPlaneCountsSchema = object({
26354
+ http: number(),
26355
+ ws: number(),
26356
+ mesh: number(),
26357
+ unknown: number()
26358
+ });
26359
+ /**
26360
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26324
26361
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26325
26362
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26326
26363
  * already prints - never a token, never an `Authorization` header.
26364
+ *
26365
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
26366
+ * and lives for hours, so folding it into a call count makes one long-lived
26367
+ * stream look like a storm.
26327
26368
  */
26328
26369
  var RequestCensusGroupSchema = object({
26370
+ plane: TransportPlaneSchema,
26329
26371
  procedure: string(),
26330
26372
  userAgent: string(),
26331
26373
  ip: string(),
26332
26374
  principal: string(),
26333
26375
  calls: number(),
26376
+ subscriptions: number(),
26334
26377
  perMin: number()
26335
26378
  });
26336
26379
  /**
@@ -26343,6 +26386,14 @@ var RequestCensusGroupSchema = object({
26343
26386
  var RequestCensusProcedureSchema = object({
26344
26387
  procedure: string(),
26345
26388
  calls: number(),
26389
+ /**
26390
+ * The same total, split by transport. THIS is the row that answers the
26391
+ * question the census exists for: one look at `deviceManager.listAll` says
26392
+ * which plane carried the 4 960, without joining two log lines by eye.
26393
+ */
26394
+ planes: TransportPlaneCountsSchema,
26395
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
26396
+ subscriptions: number(),
26346
26397
  perMin: number()
26347
26398
  });
26348
26399
  /**
@@ -26370,14 +26421,45 @@ var RequestCensusStatusSchema = object({
26370
26421
  */
26371
26422
  procedureCalls: number(),
26372
26423
  /**
26424
+ * `procedureCalls` split by transport. The four keys sum to
26425
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
26426
+ * `planesExplainTotal` is that identity, checked rather than assumed.
26427
+ */
26428
+ planes: TransportPlaneCountsSchema,
26429
+ /**
26430
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
26431
+ * on no plane at all - which is a RESULT (a plane is missing from the
26432
+ * instrument), not a failure, and it has to be visible to be read as one.
26433
+ */
26434
+ planesExplainTotal: boolean(),
26435
+ /**
26373
26436
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
26374
- * transport resolves one context per connection - but the number that says
26375
- * whether a plane this census cannot see was busy while HTTP was quiet.
26437
+ * adapter resolves one context per connection - kept because a plane's call
26438
+ * count of zero against 37 open connections says something different from a
26439
+ * plane with no connections at all.
26376
26440
  */
26377
26441
  wsConnections: number(),
26442
+ /**
26443
+ * Client frames the WS plane looked at. `wsMessages` far above
26444
+ * `planes.ws + subscriptions` means most traffic is not operations
26445
+ * (keepalives, connection params) - which is itself an answer.
26446
+ */
26447
+ wsMessages: number(),
26448
+ /**
26449
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
26450
+ * purpose: one live-events stream opened at boot and held for six hours is
26451
+ * one subscription, and counting it as a call would let a quiet plane
26452
+ * masquerade as the storm.
26453
+ */
26454
+ subscriptions: number(),
26455
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
26456
+ subscriptionStops: number(),
26378
26457
  distinctGroups: number(),
26379
- /** Calls counted in the totals whose group attribution was shed at the
26380
- * cardinality bound. */
26458
+ /**
26459
+ * Operations counted in the totals whose CALLER attribution was shed at the
26460
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
26461
+ * which transport they arrived on, they just lost their group row.
26462
+ */
26381
26463
  unattributedCalls: number(),
26382
26464
  procedures: array(RequestCensusProcedureSchema).readonly(),
26383
26465
  groups: array(RequestCensusGroupSchema).readonly()
@@ -26320,17 +26320,60 @@ var SetSiteLocationInputSchema = object({
26320
26320
  longitude: number().min(-180).max(180)
26321
26321
  }).nullable();
26322
26322
  /**
26323
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26323
+ * The TRANSPORT a call arrived on.
26324
+ *
26325
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26326
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26327
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26328
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26329
+ * checkable rather than asserted.
26330
+ *
26331
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26332
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26333
+ * connection; the viewer talks to the hub over `wsLink`
26334
+ * exclusively, so this is the plane the HTTP census could not see.
26335
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26336
+ * never touches a socket and therefore never touched a census.
26337
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26338
+ * that is exactly what its `0` asserts: every plane the hub has can name
26339
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26340
+ * plane nobody instrumented lands here instead of vanishing from the total.
26341
+ */
26342
+ var TransportPlaneSchema = _enum([
26343
+ "http",
26344
+ "ws",
26345
+ "mesh",
26346
+ "unknown"
26347
+ ]);
26348
+ /**
26349
+ * Calls per plane. Every key is always present, `0` included — an absent plane
26350
+ * reads as "not instrumented", which is the one thing this census must never
26351
+ * make an operator wonder about.
26352
+ */
26353
+ var TransportPlaneCountsSchema = object({
26354
+ http: number(),
26355
+ ws: number(),
26356
+ mesh: number(),
26357
+ unknown: number()
26358
+ });
26359
+ /**
26360
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26324
26361
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26325
26362
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26326
26363
  * already prints - never a token, never an `Authorization` header.
26364
+ *
26365
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
26366
+ * and lives for hours, so folding it into a call count makes one long-lived
26367
+ * stream look like a storm.
26327
26368
  */
26328
26369
  var RequestCensusGroupSchema = object({
26370
+ plane: TransportPlaneSchema,
26329
26371
  procedure: string(),
26330
26372
  userAgent: string(),
26331
26373
  ip: string(),
26332
26374
  principal: string(),
26333
26375
  calls: number(),
26376
+ subscriptions: number(),
26334
26377
  perMin: number()
26335
26378
  });
26336
26379
  /**
@@ -26343,6 +26386,14 @@ var RequestCensusGroupSchema = object({
26343
26386
  var RequestCensusProcedureSchema = object({
26344
26387
  procedure: string(),
26345
26388
  calls: number(),
26389
+ /**
26390
+ * The same total, split by transport. THIS is the row that answers the
26391
+ * question the census exists for: one look at `deviceManager.listAll` says
26392
+ * which plane carried the 4 960, without joining two log lines by eye.
26393
+ */
26394
+ planes: TransportPlaneCountsSchema,
26395
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
26396
+ subscriptions: number(),
26346
26397
  perMin: number()
26347
26398
  });
26348
26399
  /**
@@ -26370,14 +26421,45 @@ var RequestCensusStatusSchema = object({
26370
26421
  */
26371
26422
  procedureCalls: number(),
26372
26423
  /**
26424
+ * `procedureCalls` split by transport. The four keys sum to
26425
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
26426
+ * `planesExplainTotal` is that identity, checked rather than assumed.
26427
+ */
26428
+ planes: TransportPlaneCountsSchema,
26429
+ /**
26430
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
26431
+ * on no plane at all - which is a RESULT (a plane is missing from the
26432
+ * instrument), not a failure, and it has to be visible to be read as one.
26433
+ */
26434
+ planesExplainTotal: boolean(),
26435
+ /**
26373
26436
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
26374
- * transport resolves one context per connection - but the number that says
26375
- * whether a plane this census cannot see was busy while HTTP was quiet.
26437
+ * adapter resolves one context per connection - kept because a plane's call
26438
+ * count of zero against 37 open connections says something different from a
26439
+ * plane with no connections at all.
26376
26440
  */
26377
26441
  wsConnections: number(),
26442
+ /**
26443
+ * Client frames the WS plane looked at. `wsMessages` far above
26444
+ * `planes.ws + subscriptions` means most traffic is not operations
26445
+ * (keepalives, connection params) - which is itself an answer.
26446
+ */
26447
+ wsMessages: number(),
26448
+ /**
26449
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
26450
+ * purpose: one live-events stream opened at boot and held for six hours is
26451
+ * one subscription, and counting it as a call would let a quiet plane
26452
+ * masquerade as the storm.
26453
+ */
26454
+ subscriptions: number(),
26455
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
26456
+ subscriptionStops: number(),
26378
26457
  distinctGroups: number(),
26379
- /** Calls counted in the totals whose group attribution was shed at the
26380
- * cardinality bound. */
26458
+ /**
26459
+ * Operations counted in the totals whose CALLER attribution was shed at the
26460
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
26461
+ * which transport they arrived on, they just lost their group row.
26462
+ */
26381
26463
  unattributedCalls: number(),
26382
26464
  procedures: array(RequestCensusProcedureSchema).readonly(),
26383
26465
  groups: array(RequestCensusGroupSchema).readonly()
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../chunk-Cek0wNdY.js");
6
- const require_dist = require("../dist-giwjMDHI.js");
6
+ const require_dist = require("../dist-Xgup874I.js");
7
7
  //#region src/magic-link/auth-magic-link.addon.ts
8
8
  /**
9
9
  * Magic-link authentication addon.
@@ -1,4 +1,4 @@
1
- import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-XHHoN0qI.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-By0Ejwk9.mjs";
2
2
  //#region src/magic-link/auth-magic-link.addon.ts
3
3
  /**
4
4
  * Magic-link authentication addon.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-Cek0wNdY.js");
6
- const require_dist = require("../dist-giwjMDHI.js");
6
+ const require_dist = require("../dist-Xgup874I.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  node_crypto = require_chunk.__toESM(node_crypto);
9
9
  //#region node_modules/jose/dist/webapi/lib/buffer_utils.js
@@ -1,4 +1,4 @@
1
- import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-XHHoN0qI.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-By0Ejwk9.mjs";
2
2
  import * as crypto$1 from "node:crypto";
3
3
  //#region node_modules/jose/dist/webapi/lib/buffer_utils.js
4
4
  var encoder = new TextEncoder();
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
3
3
  var e = {
4
4
  "@camstack/sdk": {
5
5
  name: "@camstack/sdk",
6
- version: "1.2.35",
6
+ version: "1.2.36",
7
7
  scope: ["default"],
8
8
  loaded: !1,
9
9
  from: "addon_auth_webauthn_widgets",
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.113",
21
+ version: "1.2.114",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_auth_webauthn_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.76",
36
+ version: "1.2.77",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_auth_webauthn_widgets",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-Cek0wNdY.js");
6
- const require_dist = require("../dist-giwjMDHI.js");
6
+ const require_dist = require("../dist-Xgup874I.js");
7
7
  let stream = require("stream");
8
8
  stream = require_chunk.__toESM(stream, 1);
9
9
  let http = require("http");
@@ -1,4 +1,4 @@
1
- import { a as loginMethodCapability, c as BaseAddon, d as number, f as object, l as array, n as addonWidgetsSourceCapability, o as userPasskeysCapability, p as string, u as boolean } from "../dist-XHHoN0qI.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, d as number, f as object, l as array, n as addonWidgetsSourceCapability, o as userPasskeysCapability, p as string, u as boolean } from "../dist-By0Ejwk9.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import Stream from "stream";
4
4
  import http from "http";
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.113",
39
+ version: "1.2.114",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -45,7 +45,7 @@ async function r() {
45
45
  }
46
46
  },
47
47
  "@camstack/sdk": {
48
- version: "1.2.35",
48
+ version: "1.2.36",
49
49
  scope: "default",
50
50
  shareConfig: {
51
51
  singleton: !0,
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.76",
84
+ version: "1.2.77",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-Z3KQYLnY.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-DQaOFxU5.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-auth",
3
- "version": "1.2.35",
3
+ "version": "1.2.36",
4
4
  "description": "Authentication bundle — magic-link, OIDC, and WebAuthn/passkey. Multi-entry npm package shipping 3 addons under a single bundle; each addon keeps its own id, capabilities, and runner.",
5
5
  "keywords": [
6
6
  "camstack",