@camstack/addon-tailscale 1.2.113 → 1.2.114

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-QU6Z21ZC.js");
27
+ const require_dist = require("../dist-D0HWXb6E.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-BU3Zv12X.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-B6boy2pR.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";
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
5359
5359
  var ZodFirstPartyTypeKind;
5360
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5361
5361
  //#endregion
5362
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5362
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5363
5363
  /**
5364
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5365
5365
  * window to float samples (D455).
@@ -11838,6 +11838,24 @@ var GetStreamWithCodecInputSchema = object({
11838
11838
  });
11839
11839
  var RtpSourceSchema = object({
11840
11840
  url: string(),
11841
+ /**
11842
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11843
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11844
+ *
11845
+ * The broker answers it because the broker is the only thing that can:
11846
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11847
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11848
+ * cap bindings would be a second authority, and two authorities on the same
11849
+ * question is how a composite camera ends up dialling a sleeping camera
11850
+ * because its own copy of the rule was a release behind.
11851
+ *
11852
+ * `null` is a real answer and is never a live url in disguise: a consumer
11853
+ * that silently fell back to {@link url} would perform exactly the wake this
11854
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11855
+ * transcode hands back an egress the broker is feeding itself, which has no
11856
+ * sentry counterpart.
11857
+ */
11858
+ sentryUrl: string().nullable().optional(),
11841
11859
  videoCodec: _enum(["H264", "H265"]),
11842
11860
  audioCodec: string(),
11843
11861
  resolution: object({
@@ -27258,6 +27276,114 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
27258
27276
  lastChangedAt: number()
27259
27277
  });
27260
27278
  /**
27279
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
27280
+ * page.
27281
+ *
27282
+ * ## Why this is a capability and not an addon settings schema
27283
+ *
27284
+ * It was one, and it did not render. The addon declared the editor as a
27285
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
27286
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
27287
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
27288
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
27289
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
27290
+ * not on it "falls off silently".
27291
+ *
27292
+ * Adding a fifth name to that list would have been the wrong fix twice over:
27293
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
27294
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
27295
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
27296
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
27297
+ * all use it): the framework emits the structural section and the widget
27298
+ * self-persists through the cap's own mutations.
27299
+ *
27300
+ * ## Why one addon may implement it
27301
+ *
27302
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
27303
+ * itself. Nothing else declares a composite camera, so nothing else has a
27304
+ * layout — and the device-scoped route means the widget asks THE camera, not
27305
+ * "the camera-grid addon", which is what let the old custom-action pair be
27306
+ * reached only by a caller that already knew the addon id.
27307
+ *
27308
+ * ## The tab
27309
+ *
27310
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
27311
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
27312
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
27313
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
27314
+ * next to "PTZ").
27315
+ */
27316
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
27317
+ var GridNormalizedRectSchema = object({
27318
+ x: number().min(0).max(1),
27319
+ y: number().min(0).max(1),
27320
+ width: number().gt(0).max(1),
27321
+ height: number().gt(0).max(1)
27322
+ });
27323
+ /**
27324
+ * One source camera, the part of its picture taken, and where that part lands.
27325
+ *
27326
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
27327
+ * — a profile switch, a firmware update, a substream that comes back different
27328
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
27329
+ * which is the class of bug nobody files.
27330
+ */
27331
+ var GridLayoutCellSchema = object({
27332
+ deviceId: number().int().positive(),
27333
+ /** The part of the SOURCE taken, normalized against the source. */
27334
+ source: GridNormalizedRectSchema,
27335
+ /** Where it lands, normalized against the CANVAS. */
27336
+ cell: GridNormalizedRectSchema
27337
+ });
27338
+ /**
27339
+ * Which profiles this grid can actually compose, and why not.
27340
+ *
27341
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
27342
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
27343
+ * the sources, because "this grid has no low" is not a finding — "615 has no
27344
+ * low" is, and it is the one an operator can act on.
27345
+ */
27346
+ var GridProfileOfferSchema = object({
27347
+ profile: _enum([
27348
+ "high",
27349
+ "mid",
27350
+ "low"
27351
+ ]),
27352
+ offered: boolean(),
27353
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
27354
+ missingSources: array(number().int().positive())
27355
+ });
27356
+ var GridLayoutViewSchema = object({
27357
+ /** The persisted grid row this camera was declared from. */
27358
+ instanceId: string(),
27359
+ deviceId: number().int().nonnegative(),
27360
+ name: string(),
27361
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
27362
+ width: number().int(),
27363
+ height: number().int(),
27364
+ fps: number().int(),
27365
+ cells: array(GridLayoutCellSchema),
27366
+ /** What the catalog will publish, and what it refuses to. Read-only. */
27367
+ profiles: array(GridProfileOfferSchema)
27368
+ });
27369
+ var GridLayoutPatchSchema = object({
27370
+ deviceId: number().int().nonnegative(),
27371
+ name: string().min(1).max(160).optional(),
27372
+ width: number().int().min(160).max(7680).optional(),
27373
+ height: number().int().min(120).max(4320).optional(),
27374
+ fps: number().int().min(1).max(60).optional(),
27375
+ /**
27376
+ * The whole cell list at once. A per-cell patch would need an ordering the
27377
+ * editor does not have, and a half-applied layout is a picture nobody asked
27378
+ * for.
27379
+ */
27380
+ cells: array(GridLayoutCellSchema).max(16)
27381
+ });
27382
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
27383
+ kind: "mutation",
27384
+ auth: "admin"
27385
+ });
27386
+ /**
27261
27387
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
27262
27388
  * on-camera motion-detection mask is a single `grid` region (a row-major
27263
27389
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -32286,6 +32412,18 @@ Object.freeze({
32286
32412
  addonId: null,
32287
32413
  access: "view"
32288
32414
  },
32415
+ "cameraGridLayout.getLayout": {
32416
+ capName: "camera-grid-layout",
32417
+ capScope: "device",
32418
+ addonId: null,
32419
+ access: "view"
32420
+ },
32421
+ "cameraGridLayout.saveLayout": {
32422
+ capName: "camera-grid-layout",
32423
+ capScope: "device",
32424
+ addonId: null,
32425
+ access: "create"
32426
+ },
32289
32427
  "cameraStreams.getBrokerStreams": {
32290
32428
  capName: "camera-streams",
32291
32429
  capScope: "device",
@@ -37985,6 +38123,21 @@ Object.freeze({
37985
38123
  form: "single",
37986
38124
  optional: false
37987
38125
  }],
38126
+ "cameraGridLayout.getLayout": [{
38127
+ name: "deviceId",
38128
+ form: "single",
38129
+ optional: false
38130
+ }],
38131
+ "cameraGridLayout.saveLayout": [{
38132
+ name: "cells",
38133
+ form: "object-array",
38134
+ optional: false,
38135
+ itemField: "deviceId"
38136
+ }, {
38137
+ name: "deviceId",
38138
+ form: "single",
38139
+ optional: false
38140
+ }],
37988
38141
  "cameraStreams.getBrokerStreams": [{
37989
38142
  name: "deviceId",
37990
38143
  form: "single",
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
5359
5359
  var ZodFirstPartyTypeKind;
5360
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5361
5361
  //#endregion
5362
- //#region ../types/dist/sleep-Dk-BdnBf.mjs
5362
+ //#region ../types/dist/sleep-Bs3xPtSh.mjs
5363
5363
  /**
5364
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5365
5365
  * window to float samples (D455).
@@ -11838,6 +11838,24 @@ var GetStreamWithCodecInputSchema = object({
11838
11838
  });
11839
11839
  var RtpSourceSchema = object({
11840
11840
  url: string(),
11841
+ /**
11842
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
11843
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
11844
+ *
11845
+ * The broker answers it because the broker is the only thing that can:
11846
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
11847
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
11848
+ * cap bindings would be a second authority, and two authorities on the same
11849
+ * question is how a composite camera ends up dialling a sleeping camera
11850
+ * because its own copy of the rule was a release behind.
11851
+ *
11852
+ * `null` is a real answer and is never a live url in disguise: a consumer
11853
+ * that silently fell back to {@link url} would perform exactly the wake this
11854
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
11855
+ * transcode hands back an egress the broker is feeding itself, which has no
11856
+ * sentry counterpart.
11857
+ */
11858
+ sentryUrl: string().nullable().optional(),
11841
11859
  videoCodec: _enum(["H264", "H265"]),
11842
11860
  audioCodec: string(),
11843
11861
  resolution: object({
@@ -27258,6 +27276,114 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
27258
27276
  lastChangedAt: number()
27259
27277
  });
27260
27278
  /**
27279
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
27280
+ * page.
27281
+ *
27282
+ * ## Why this is a capability and not an addon settings schema
27283
+ *
27284
+ * It was one, and it did not render. The addon declared the editor as a
27285
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
27286
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
27287
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
27288
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
27289
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
27290
+ * not on it "falls off silently".
27291
+ *
27292
+ * Adding a fifth name to that list would have been the wrong fix twice over:
27293
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
27294
+ * beside PTZ and motion zones on the camera itself — which is exactly where the
27295
+ * framework already puts a widget, when the widget is declared on a CAPABILITY.
27296
+ * `deviceConfig.ui` is the mechanism (`motion-zones`, `ptz`, `ptz-autotrack`
27297
+ * all use it): the framework emits the structural section and the widget
27298
+ * self-persists through the cap's own mutations.
27299
+ *
27300
+ * ## Why one addon may implement it
27301
+ *
27302
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
27303
+ * itself. Nothing else declares a composite camera, so nothing else has a
27304
+ * layout — and the device-scoped route means the widget asks THE camera, not
27305
+ * "the camera-grid addon", which is what let the old custom-action pair be
27306
+ * reached only by a caller that already knew the addon id.
27307
+ *
27308
+ * ## The tab
27309
+ *
27310
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
27311
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
27312
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
27313
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
27314
+ * next to "PTZ").
27315
+ */
27316
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
27317
+ var GridNormalizedRectSchema = object({
27318
+ x: number().min(0).max(1),
27319
+ y: number().min(0).max(1),
27320
+ width: number().gt(0).max(1),
27321
+ height: number().gt(0).max(1)
27322
+ });
27323
+ /**
27324
+ * One source camera, the part of its picture taken, and where that part lands.
27325
+ *
27326
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
27327
+ * — a profile switch, a firmware update, a substream that comes back different
27328
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
27329
+ * which is the class of bug nobody files.
27330
+ */
27331
+ var GridLayoutCellSchema = object({
27332
+ deviceId: number().int().positive(),
27333
+ /** The part of the SOURCE taken, normalized against the source. */
27334
+ source: GridNormalizedRectSchema,
27335
+ /** Where it lands, normalized against the CANVAS. */
27336
+ cell: GridNormalizedRectSchema
27337
+ });
27338
+ /**
27339
+ * Which profiles this grid can actually compose, and why not.
27340
+ *
27341
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
27342
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
27343
+ * the sources, because "this grid has no low" is not a finding — "615 has no
27344
+ * low" is, and it is the one an operator can act on.
27345
+ */
27346
+ var GridProfileOfferSchema = object({
27347
+ profile: _enum([
27348
+ "high",
27349
+ "mid",
27350
+ "low"
27351
+ ]),
27352
+ offered: boolean(),
27353
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
27354
+ missingSources: array(number().int().positive())
27355
+ });
27356
+ var GridLayoutViewSchema = object({
27357
+ /** The persisted grid row this camera was declared from. */
27358
+ instanceId: string(),
27359
+ deviceId: number().int().nonnegative(),
27360
+ name: string(),
27361
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
27362
+ width: number().int(),
27363
+ height: number().int(),
27364
+ fps: number().int(),
27365
+ cells: array(GridLayoutCellSchema),
27366
+ /** What the catalog will publish, and what it refuses to. Read-only. */
27367
+ profiles: array(GridProfileOfferSchema)
27368
+ });
27369
+ var GridLayoutPatchSchema = object({
27370
+ deviceId: number().int().nonnegative(),
27371
+ name: string().min(1).max(160).optional(),
27372
+ width: number().int().min(160).max(7680).optional(),
27373
+ height: number().int().min(120).max(4320).optional(),
27374
+ fps: number().int().min(1).max(60).optional(),
27375
+ /**
27376
+ * The whole cell list at once. A per-cell patch would need an ordering the
27377
+ * editor does not have, and a half-applied layout is a picture nobody asked
27378
+ * for.
27379
+ */
27380
+ cells: array(GridLayoutCellSchema).max(16)
27381
+ });
27382
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
27383
+ kind: "mutation",
27384
+ auth: "admin"
27385
+ });
27386
+ /**
27261
27387
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
27262
27388
  * on-camera motion-detection mask is a single `grid` region (a row-major
27263
27389
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -32286,6 +32412,18 @@ Object.freeze({
32286
32412
  addonId: null,
32287
32413
  access: "view"
32288
32414
  },
32415
+ "cameraGridLayout.getLayout": {
32416
+ capName: "camera-grid-layout",
32417
+ capScope: "device",
32418
+ addonId: null,
32419
+ access: "view"
32420
+ },
32421
+ "cameraGridLayout.saveLayout": {
32422
+ capName: "camera-grid-layout",
32423
+ capScope: "device",
32424
+ addonId: null,
32425
+ access: "create"
32426
+ },
32289
32427
  "cameraStreams.getBrokerStreams": {
32290
32428
  capName: "camera-streams",
32291
32429
  capScope: "device",
@@ -37985,6 +38123,21 @@ Object.freeze({
37985
38123
  form: "single",
37986
38124
  optional: false
37987
38125
  }],
38126
+ "cameraGridLayout.getLayout": [{
38127
+ name: "deviceId",
38128
+ form: "single",
38129
+ optional: false
38130
+ }],
38131
+ "cameraGridLayout.saveLayout": [{
38132
+ name: "cells",
38133
+ form: "object-array",
38134
+ optional: false,
38135
+ itemField: "deviceId"
38136
+ }, {
38137
+ name: "deviceId",
38138
+ form: "single",
38139
+ optional: false
38140
+ }],
37988
38141
  "cameraStreams.getBrokerStreams": [{
37989
38142
  name: "deviceId",
37990
38143
  form: "single",
@@ -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-QU6Z21ZC.js");
5
+ const require_dist = require("../dist-D0HWXb6E.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-BU3Zv12X.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-B6boy2pR.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.113",
3
+ "version": "1.2.114",
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",