@camstack/addon-tailscale 1.2.32 → 1.2.33

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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-DweC0Ts3.js");
27
+ const require_dist = require("../dist-DJdV0Zv8.js");
28
28
  let node_child_process = require("node:child_process");
29
29
  let node_util = require("node:util");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-PPumLXbw.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-Du--YFtK.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as fs from "node:fs";
@@ -26207,17 +26207,60 @@ var SetSiteLocationInputSchema = object({
26207
26207
  longitude: number().min(-180).max(180)
26208
26208
  }).nullable();
26209
26209
  /**
26210
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26210
+ * The TRANSPORT a call arrived on.
26211
+ *
26212
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26213
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26214
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26215
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26216
+ * checkable rather than asserted.
26217
+ *
26218
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26219
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26220
+ * connection; the viewer talks to the hub over `wsLink`
26221
+ * exclusively, so this is the plane the HTTP census could not see.
26222
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26223
+ * never touches a socket and therefore never touched a census.
26224
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26225
+ * that is exactly what its `0` asserts: every plane the hub has can name
26226
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26227
+ * plane nobody instrumented lands here instead of vanishing from the total.
26228
+ */
26229
+ var TransportPlaneSchema = _enum([
26230
+ "http",
26231
+ "ws",
26232
+ "mesh",
26233
+ "unknown"
26234
+ ]);
26235
+ /**
26236
+ * Calls per plane. Every key is always present, `0` included — an absent plane
26237
+ * reads as "not instrumented", which is the one thing this census must never
26238
+ * make an operator wonder about.
26239
+ */
26240
+ var TransportPlaneCountsSchema = object({
26241
+ http: number(),
26242
+ ws: number(),
26243
+ mesh: number(),
26244
+ unknown: number()
26245
+ });
26246
+ /**
26247
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26211
26248
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26212
26249
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26213
26250
  * already prints - never a token, never an `Authorization` header.
26251
+ *
26252
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
26253
+ * and lives for hours, so folding it into a call count makes one long-lived
26254
+ * stream look like a storm.
26214
26255
  */
26215
26256
  var RequestCensusGroupSchema = object({
26257
+ plane: TransportPlaneSchema,
26216
26258
  procedure: string(),
26217
26259
  userAgent: string(),
26218
26260
  ip: string(),
26219
26261
  principal: string(),
26220
26262
  calls: number(),
26263
+ subscriptions: number(),
26221
26264
  perMin: number()
26222
26265
  });
26223
26266
  /**
@@ -26230,6 +26273,14 @@ var RequestCensusGroupSchema = object({
26230
26273
  var RequestCensusProcedureSchema = object({
26231
26274
  procedure: string(),
26232
26275
  calls: number(),
26276
+ /**
26277
+ * The same total, split by transport. THIS is the row that answers the
26278
+ * question the census exists for: one look at `deviceManager.listAll` says
26279
+ * which plane carried the 4 960, without joining two log lines by eye.
26280
+ */
26281
+ planes: TransportPlaneCountsSchema,
26282
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
26283
+ subscriptions: number(),
26233
26284
  perMin: number()
26234
26285
  });
26235
26286
  /**
@@ -26257,14 +26308,45 @@ var RequestCensusStatusSchema = object({
26257
26308
  */
26258
26309
  procedureCalls: number(),
26259
26310
  /**
26311
+ * `procedureCalls` split by transport. The four keys sum to
26312
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
26313
+ * `planesExplainTotal` is that identity, checked rather than assumed.
26314
+ */
26315
+ planes: TransportPlaneCountsSchema,
26316
+ /**
26317
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
26318
+ * on no plane at all - which is a RESULT (a plane is missing from the
26319
+ * instrument), not a failure, and it has to be visible to be read as one.
26320
+ */
26321
+ planesExplainTotal: boolean(),
26322
+ /**
26260
26323
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
26261
- * transport resolves one context per connection - but the number that says
26262
- * whether a plane this census cannot see was busy while HTTP was quiet.
26324
+ * adapter resolves one context per connection - kept because a plane's call
26325
+ * count of zero against 37 open connections says something different from a
26326
+ * plane with no connections at all.
26263
26327
  */
26264
26328
  wsConnections: number(),
26329
+ /**
26330
+ * Client frames the WS plane looked at. `wsMessages` far above
26331
+ * `planes.ws + subscriptions` means most traffic is not operations
26332
+ * (keepalives, connection params) - which is itself an answer.
26333
+ */
26334
+ wsMessages: number(),
26335
+ /**
26336
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
26337
+ * purpose: one live-events stream opened at boot and held for six hours is
26338
+ * one subscription, and counting it as a call would let a quiet plane
26339
+ * masquerade as the storm.
26340
+ */
26341
+ subscriptions: number(),
26342
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
26343
+ subscriptionStops: number(),
26265
26344
  distinctGroups: number(),
26266
- /** Calls counted in the totals whose group attribution was shed at the
26267
- * cardinality bound. */
26345
+ /**
26346
+ * Operations counted in the totals whose CALLER attribution was shed at the
26347
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
26348
+ * which transport they arrived on, they just lost their group row.
26349
+ */
26268
26350
  unattributedCalls: number(),
26269
26351
  procedures: array(RequestCensusProcedureSchema).readonly(),
26270
26352
  groups: array(RequestCensusGroupSchema).readonly()
@@ -26207,17 +26207,60 @@ var SetSiteLocationInputSchema = object({
26207
26207
  longitude: number().min(-180).max(180)
26208
26208
  }).nullable();
26209
26209
  /**
26210
- * One `(procedure, user-agent, ip, principal)` tuple of the HTTP request
26210
+ * The TRANSPORT a call arrived on.
26211
+ *
26212
+ * Every counted call carries exactly one of these, and `unknown` is a PLANE
26213
+ * rather than a gap: a plane that cannot attribute a call declares it here, so
26214
+ * the call lands in a named bucket instead of vanishing. `planes` summing to
26215
+ * `procedureCalls` is what makes "the sum of the planes explains the total"
26216
+ * checkable rather than asserted.
26217
+ *
26218
+ * - `http` — the Fastify tRPC plugin (`/trpc/*`), one context per request.
26219
+ * - `ws` — `applyWSSHandler`, counted per OPERATION rather than per
26220
+ * connection; the viewer talks to the hub over `wsLink`
26221
+ * exclusively, so this is the plane the HTTP census could not see.
26222
+ * - `mesh` — the in-process `$core-caps` bridge (`createCaller`), which
26223
+ * never touches a socket and therefore never touched a census.
26224
+ * - `unknown` — counted, plane undecidable. No hook produces it today, and
26225
+ * that is exactly what its `0` asserts: every plane the hub has can name
26226
+ * itself. It is an output bucket, never a knob — a call that arrives on a
26227
+ * plane nobody instrumented lands here instead of vanishing from the total.
26228
+ */
26229
+ var TransportPlaneSchema = _enum([
26230
+ "http",
26231
+ "ws",
26232
+ "mesh",
26233
+ "unknown"
26234
+ ]);
26235
+ /**
26236
+ * Calls per plane. Every key is always present, `0` included — an absent plane
26237
+ * reads as "not instrumented", which is the one thing this census must never
26238
+ * make an operator wonder about.
26239
+ */
26240
+ var TransportPlaneCountsSchema = object({
26241
+ http: number(),
26242
+ ws: number(),
26243
+ mesh: number(),
26244
+ unknown: number()
26245
+ });
26246
+ /**
26247
+ * One `(plane, procedure, user-agent, ip, principal)` tuple of the transport
26211
26248
  * census. `principal` is the DERIVED identity (`apocaliss92 (admin)`,
26212
26249
  * `scoped:1a2b3c4d (scoped-token)`, `anonymous`) that the tRPC error log
26213
26250
  * already prints - never a token, never an `Authorization` header.
26251
+ *
26252
+ * `subscriptions` is counted APART from `calls`: a subscription is opened once
26253
+ * and lives for hours, so folding it into a call count makes one long-lived
26254
+ * stream look like a storm.
26214
26255
  */
26215
26256
  var RequestCensusGroupSchema = object({
26257
+ plane: TransportPlaneSchema,
26216
26258
  procedure: string(),
26217
26259
  userAgent: string(),
26218
26260
  ip: string(),
26219
26261
  principal: string(),
26220
26262
  calls: number(),
26263
+ subscriptions: number(),
26221
26264
  perMin: number()
26222
26265
  });
26223
26266
  /**
@@ -26230,6 +26273,14 @@ var RequestCensusGroupSchema = object({
26230
26273
  var RequestCensusProcedureSchema = object({
26231
26274
  procedure: string(),
26232
26275
  calls: number(),
26276
+ /**
26277
+ * The same total, split by transport. THIS is the row that answers the
26278
+ * question the census exists for: one look at `deviceManager.listAll` says
26279
+ * which plane carried the 4 960, without joining two log lines by eye.
26280
+ */
26281
+ planes: TransportPlaneCountsSchema,
26282
+ /** Subscription STARTS on this procedure. Never folded into `calls`. */
26283
+ subscriptions: number(),
26233
26284
  perMin: number()
26234
26285
  });
26235
26286
  /**
@@ -26257,14 +26308,45 @@ var RequestCensusStatusSchema = object({
26257
26308
  */
26258
26309
  procedureCalls: number(),
26259
26310
  /**
26311
+ * `procedureCalls` split by transport. The four keys sum to
26312
+ * `procedureCalls` by construction - {@link RequestCensusSnapshotSchema}'s
26313
+ * `planesExplainTotal` is that identity, checked rather than assumed.
26314
+ */
26315
+ planes: TransportPlaneCountsSchema,
26316
+ /**
26317
+ * True iff `planes` sums to `procedureCalls`. False means a call was counted
26318
+ * on no plane at all - which is a RESULT (a plane is missing from the
26319
+ * instrument), not a failure, and it has to be visible to be read as one.
26320
+ */
26321
+ planesExplainTotal: boolean(),
26322
+ /**
26260
26323
  * tRPC WebSocket connections opened during the window. NOT calls - the WS
26261
- * transport resolves one context per connection - but the number that says
26262
- * whether a plane this census cannot see was busy while HTTP was quiet.
26324
+ * adapter resolves one context per connection - kept because a plane's call
26325
+ * count of zero against 37 open connections says something different from a
26326
+ * plane with no connections at all.
26263
26327
  */
26264
26328
  wsConnections: number(),
26329
+ /**
26330
+ * Client frames the WS plane looked at. `wsMessages` far above
26331
+ * `planes.ws + subscriptions` means most traffic is not operations
26332
+ * (keepalives, connection params) - which is itself an answer.
26333
+ */
26334
+ wsMessages: number(),
26335
+ /**
26336
+ * Subscription STARTS across every plane, excluded from `procedureCalls` on
26337
+ * purpose: one live-events stream opened at boot and held for six hours is
26338
+ * one subscription, and counting it as a call would let a quiet plane
26339
+ * masquerade as the storm.
26340
+ */
26341
+ subscriptions: number(),
26342
+ /** `subscription.stop` frames. Starts minus stops is what is still open. */
26343
+ subscriptionStops: number(),
26265
26344
  distinctGroups: number(),
26266
- /** Calls counted in the totals whose group attribution was shed at the
26267
- * cardinality bound. */
26345
+ /**
26346
+ * Operations counted in the totals whose CALLER attribution was shed at the
26347
+ * cardinality bound. Unrelated to the `unknown` PLANE: these calls know
26348
+ * which transport they arrived on, they just lost their group row.
26349
+ */
26268
26350
  unattributedCalls: number(),
26269
26351
  procedures: array(RequestCensusProcedureSchema).readonly(),
26270
26352
  groups: array(RequestCensusGroupSchema).readonly()
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-DweC0Ts3.js");
5
+ const require_dist = require("../dist-DJdV0Zv8.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_child_process = require("node:child_process");
8
8
  //#region src/ingress/tailscale-cli.ts
@@ -1,4 +1,4 @@
1
- import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-PPumLXbw.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-Du--YFtK.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-tailscale",
3
- "version": "1.2.32",
3
+ "version": "1.2.33",
4
4
  "description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",