@camstack/addon-tailscale 1.2.57 → 1.2.59

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-DnnREw4Z.js");
27
+ const require_dist = require("../dist-DOa-4HqK.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-hjZ5e2qy.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-PbHGodVF.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";
@@ -10544,6 +10544,89 @@ var LocationStatSchema = object({
10544
10544
  fileCount: number(),
10545
10545
  present: boolean()
10546
10546
  });
10547
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10548
+ var BackupRunStateSchema = _enum([
10549
+ "queued",
10550
+ "running",
10551
+ "succeeded",
10552
+ "failed",
10553
+ "cancelled"
10554
+ ]);
10555
+ /**
10556
+ * Where a running backup currently is. `queued` before it starts,
10557
+ * `building` while the tar.gz is being staged, `uploading` during the
10558
+ * per-destination fan-out, `done` once terminal.
10559
+ */
10560
+ var BackupRunPhaseSchema = _enum([
10561
+ "queued",
10562
+ "building",
10563
+ "uploading",
10564
+ "done"
10565
+ ]);
10566
+ /**
10567
+ * Observable state of one backup run — readable WHILE it runs via
10568
+ * `backup.listRuns`. This is what makes the execution queue and
10569
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10570
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10571
+ * diagnosable with `du` because nothing reported that runs existed or
10572
+ * how large the staged archive had grown.
10573
+ */
10574
+ var BackupRunSchema = object({
10575
+ /** Stable run id — the handle `backup.cancel` takes. */
10576
+ id: string(),
10577
+ state: BackupRunStateSchema,
10578
+ phase: BackupRunPhaseSchema,
10579
+ /**
10580
+ * Resolved destination location ids. Empty while queued (targets are
10581
+ * resolved when the run starts, against the then-current policies).
10582
+ */
10583
+ destinationIds: array(string()).readonly(),
10584
+ label: string().optional(),
10585
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10586
+ requestedAt: number(),
10587
+ /** ms-epoch when the run left the queue and started building. */
10588
+ startedAt: number().optional(),
10589
+ /** ms-epoch when the run reached a terminal state. */
10590
+ finishedAt: number().optional(),
10591
+ /** Compressed bytes of the staging archive written so far. */
10592
+ stagedBytes: number(),
10593
+ /** Final staged archive size, once the build phase completes. */
10594
+ archiveSizeBytes: number().optional(),
10595
+ /** Bytes pushed to the destination currently uploading. */
10596
+ uploadedBytes: number(),
10597
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10598
+ completedDestinationIds: array(string()).readonly(),
10599
+ /** Destinations that failed during the fan-out. */
10600
+ failedDestinationIds: array(string()).readonly(),
10601
+ /** Failure message when `state === 'failed'`. */
10602
+ error: string().optional(),
10603
+ /**
10604
+ * 1-based place in the execution queue — 1 = runs next. Present only
10605
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10606
+ * queue's OWN pending order, never derived from timestamps, so the
10607
+ * UI cannot show an order the executor will not honour.
10608
+ */
10609
+ queuePosition: number().int().min(1).optional()
10610
+ });
10611
+ /**
10612
+ * Result of `backup.trigger`. The call still resolves when the run
10613
+ * terminates (compat with schedule-driven runs and the admin UI), but
10614
+ * it now names the run and says whether it had to WAIT: a trigger that
10615
+ * arrives while another run is in flight is enqueued (or joined onto
10616
+ * an identical already-queued run), never started concurrently.
10617
+ */
10618
+ var BackupTriggerResultSchema = object({
10619
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10620
+ runId: string(),
10621
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10622
+ queued: boolean(),
10623
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10624
+ joined: boolean(),
10625
+ /** True when the run was cancelled before completing every destination. */
10626
+ cancelled: boolean(),
10627
+ /** One entry per destination the archive landed at (partial on cancel). */
10628
+ entries: array(BackupEntrySchema).readonly()
10629
+ });
10547
10630
  /**
10548
10631
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10549
10632
  * SET of destination locations. Supersedes the per-location cron on
@@ -10591,7 +10674,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10591
10674
  * retention (manual runs).
10592
10675
  */
10593
10676
  retentionCount: number().int().min(1).max(1e3).optional()
10594
- }).optional(), array(BackupEntrySchema).readonly(), {
10677
+ }).optional(), BackupTriggerResultSchema, {
10678
+ kind: "mutation",
10679
+ auth: "admin"
10680
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10595
10681
  kind: "mutation",
10596
10682
  auth: "admin"
10597
10683
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11308,6 +11394,14 @@ method(object({
11308
11394
  }), object({ success: literal(true) }), {
11309
11395
  kind: "mutation",
11310
11396
  auth: "admin"
11397
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11398
+ derivedStreamsDeleted: array(string()).readonly(),
11399
+ assignmentsPurged: boolean(),
11400
+ probeSnapshotsDropped: number().int().nonnegative(),
11401
+ rtspTokenRowsDeleted: number().int().nonnegative()
11402
+ }), {
11403
+ kind: "mutation",
11404
+ auth: "admin"
11311
11405
  }), method(object({
11312
11406
  deviceId: number(),
11313
11407
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -18875,7 +18969,20 @@ var RecentTracksQueryInput = object({
18875
18969
  projection: TrackProjectionSchema.optional(),
18876
18970
  /** Include stationary-promoted rows (parked objects). Default false: the
18877
18971
  * feed lists passages; parking records live on the stationary registry. */
18878
- includeStationary: boolean().optional()
18972
+ includeStationary: boolean().optional(),
18973
+ /**
18974
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
18975
+ *
18976
+ * The same filter `listTracks` takes, because the timeline's class chips must
18977
+ * mean the same thing whether the scope is one camera or twelve. Until this
18978
+ * existed the scoped feed downloaded a page and narrowed it on the phone
18979
+ * while the single-camera path narrowed the read — one filter, two costs.
18980
+ *
18981
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
18982
+ * whose class list is unreadable are kept, and the client's rule stays the
18983
+ * exact one.
18984
+ */
18985
+ classes: array(string()).optional()
18879
18986
  });
18880
18987
  var RecentTracksPageSchema = object({
18881
18988
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -22913,8 +23020,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
22913
23020
  * threshold.
22914
23021
  */
22915
23022
  var BatteryStatusSchema = object({
22916
- /** 0..100 inclusive. Firmware-reported. */
22917
- percentage: number().min(0).max(100),
23023
+ /**
23024
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23025
+ * provider has registered the capability but no reading has landed.
23026
+ *
23027
+ * It is nullable because it was not, and the only value a provider could
23028
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23029
+ * itself at 0% on every start and corrected itself a moment later, which is
23030
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23031
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23032
+ * reading the difference is an alarm.
23033
+ *
23034
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23035
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23036
+ * declines to band a non-finite reading, which is the correct shape.
23037
+ */
23038
+ percentage: number().min(0).max(100).nullable(),
22918
23039
  /**
22919
23040
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
22920
23041
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -29454,6 +29575,12 @@ Object.freeze({
29454
29575
  addonId: null,
29455
29576
  access: "create"
29456
29577
  },
29578
+ "backup.cancel": {
29579
+ capName: "backup",
29580
+ capScope: "system",
29581
+ addonId: null,
29582
+ access: "create"
29583
+ },
29457
29584
  "backup.delete": {
29458
29585
  capName: "backup",
29459
29586
  capScope: "system",
@@ -29496,6 +29623,12 @@ Object.freeze({
29496
29623
  addonId: null,
29497
29624
  access: "view"
29498
29625
  },
29626
+ "backup.listRuns": {
29627
+ capName: "backup",
29628
+ capScope: "system",
29629
+ addonId: null,
29630
+ access: "view"
29631
+ },
29499
29632
  "backup.listSchedules": {
29500
29633
  capName: "backup",
29501
29634
  capScope: "system",
@@ -34062,6 +34195,12 @@ Object.freeze({
34062
34195
  addonId: null,
34063
34196
  access: "create"
34064
34197
  },
34198
+ "streamBroker.forgetDeviceHardware": {
34199
+ capName: "stream-broker",
34200
+ capScope: "system",
34201
+ addonId: null,
34202
+ access: "delete"
34203
+ },
34065
34204
  "streamBroker.getAllRtspEntries": {
34066
34205
  capName: "stream-broker",
34067
34206
  capScope: "system",
@@ -36520,6 +36659,11 @@ Object.freeze({
36520
36659
  form: "single",
36521
36660
  optional: false
36522
36661
  }],
36662
+ "streamBroker.forgetDeviceHardware": [{
36663
+ name: "deviceId",
36664
+ form: "single",
36665
+ optional: false
36666
+ }],
36523
36667
  "streamBroker.getDeviceAudioMute": [{
36524
36668
  name: "deviceId",
36525
36669
  form: "single",
@@ -10544,6 +10544,89 @@ var LocationStatSchema = object({
10544
10544
  fileCount: number(),
10545
10545
  present: boolean()
10546
10546
  });
10547
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10548
+ var BackupRunStateSchema = _enum([
10549
+ "queued",
10550
+ "running",
10551
+ "succeeded",
10552
+ "failed",
10553
+ "cancelled"
10554
+ ]);
10555
+ /**
10556
+ * Where a running backup currently is. `queued` before it starts,
10557
+ * `building` while the tar.gz is being staged, `uploading` during the
10558
+ * per-destination fan-out, `done` once terminal.
10559
+ */
10560
+ var BackupRunPhaseSchema = _enum([
10561
+ "queued",
10562
+ "building",
10563
+ "uploading",
10564
+ "done"
10565
+ ]);
10566
+ /**
10567
+ * Observable state of one backup run — readable WHILE it runs via
10568
+ * `backup.listRuns`. This is what makes the execution queue and
10569
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10570
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10571
+ * diagnosable with `du` because nothing reported that runs existed or
10572
+ * how large the staged archive had grown.
10573
+ */
10574
+ var BackupRunSchema = object({
10575
+ /** Stable run id — the handle `backup.cancel` takes. */
10576
+ id: string(),
10577
+ state: BackupRunStateSchema,
10578
+ phase: BackupRunPhaseSchema,
10579
+ /**
10580
+ * Resolved destination location ids. Empty while queued (targets are
10581
+ * resolved when the run starts, against the then-current policies).
10582
+ */
10583
+ destinationIds: array(string()).readonly(),
10584
+ label: string().optional(),
10585
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10586
+ requestedAt: number(),
10587
+ /** ms-epoch when the run left the queue and started building. */
10588
+ startedAt: number().optional(),
10589
+ /** ms-epoch when the run reached a terminal state. */
10590
+ finishedAt: number().optional(),
10591
+ /** Compressed bytes of the staging archive written so far. */
10592
+ stagedBytes: number(),
10593
+ /** Final staged archive size, once the build phase completes. */
10594
+ archiveSizeBytes: number().optional(),
10595
+ /** Bytes pushed to the destination currently uploading. */
10596
+ uploadedBytes: number(),
10597
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10598
+ completedDestinationIds: array(string()).readonly(),
10599
+ /** Destinations that failed during the fan-out. */
10600
+ failedDestinationIds: array(string()).readonly(),
10601
+ /** Failure message when `state === 'failed'`. */
10602
+ error: string().optional(),
10603
+ /**
10604
+ * 1-based place in the execution queue — 1 = runs next. Present only
10605
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10606
+ * queue's OWN pending order, never derived from timestamps, so the
10607
+ * UI cannot show an order the executor will not honour.
10608
+ */
10609
+ queuePosition: number().int().min(1).optional()
10610
+ });
10611
+ /**
10612
+ * Result of `backup.trigger`. The call still resolves when the run
10613
+ * terminates (compat with schedule-driven runs and the admin UI), but
10614
+ * it now names the run and says whether it had to WAIT: a trigger that
10615
+ * arrives while another run is in flight is enqueued (or joined onto
10616
+ * an identical already-queued run), never started concurrently.
10617
+ */
10618
+ var BackupTriggerResultSchema = object({
10619
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10620
+ runId: string(),
10621
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10622
+ queued: boolean(),
10623
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10624
+ joined: boolean(),
10625
+ /** True when the run was cancelled before completing every destination. */
10626
+ cancelled: boolean(),
10627
+ /** One entry per destination the archive landed at (partial on cancel). */
10628
+ entries: array(BackupEntrySchema).readonly()
10629
+ });
10547
10630
  /**
10548
10631
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10549
10632
  * SET of destination locations. Supersedes the per-location cron on
@@ -10591,7 +10674,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10591
10674
  * retention (manual runs).
10592
10675
  */
10593
10676
  retentionCount: number().int().min(1).max(1e3).optional()
10594
- }).optional(), array(BackupEntrySchema).readonly(), {
10677
+ }).optional(), BackupTriggerResultSchema, {
10678
+ kind: "mutation",
10679
+ auth: "admin"
10680
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10595
10681
  kind: "mutation",
10596
10682
  auth: "admin"
10597
10683
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11308,6 +11394,14 @@ method(object({
11308
11394
  }), object({ success: literal(true) }), {
11309
11395
  kind: "mutation",
11310
11396
  auth: "admin"
11397
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11398
+ derivedStreamsDeleted: array(string()).readonly(),
11399
+ assignmentsPurged: boolean(),
11400
+ probeSnapshotsDropped: number().int().nonnegative(),
11401
+ rtspTokenRowsDeleted: number().int().nonnegative()
11402
+ }), {
11403
+ kind: "mutation",
11404
+ auth: "admin"
11311
11405
  }), method(object({
11312
11406
  deviceId: number(),
11313
11407
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -18875,7 +18969,20 @@ var RecentTracksQueryInput = object({
18875
18969
  projection: TrackProjectionSchema.optional(),
18876
18970
  /** Include stationary-promoted rows (parked objects). Default false: the
18877
18971
  * feed lists passages; parking records live on the stationary registry. */
18878
- includeStationary: boolean().optional()
18972
+ includeStationary: boolean().optional(),
18973
+ /**
18974
+ * Restrict to these track classes. ABSENT or EMPTY means no filter.
18975
+ *
18976
+ * The same filter `listTracks` takes, because the timeline's class chips must
18977
+ * mean the same thing whether the scope is one camera or twelve. Until this
18978
+ * existed the scoped feed downloaded a page and narrowed it on the phone
18979
+ * while the single-camera path narrowed the read — one filter, two costs.
18980
+ *
18981
+ * A SUPERSET prefilter on `classes[]`, like its single-camera twin: rows
18982
+ * whose class list is unreadable are kept, and the client's rule stays the
18983
+ * exact one.
18984
+ */
18985
+ classes: array(string()).optional()
18879
18986
  });
18880
18987
  var RecentTracksPageSchema = object({
18881
18988
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -22913,8 +23020,22 @@ DeviceType.Automation, method(object({ deviceId: number().int().nonnegative() })
22913
23020
  * threshold.
22914
23021
  */
22915
23022
  var BatteryStatusSchema = object({
22916
- /** 0..100 inclusive. Firmware-reported. */
22917
- percentage: number().min(0).max(100),
23023
+ /**
23024
+ * 0..100 inclusive, firmware-reported. **`null` means NOT YET KNOWN** — the
23025
+ * provider has registered the capability but no reading has landed.
23026
+ *
23027
+ * It is nullable because it was not, and the only value a provider could
23028
+ * seed with was `0`. A battery camera behind an NVR therefore announced
23029
+ * itself at 0% on every start and corrected itself a moment later, which is
23030
+ * indistinguishable from a real flat battery: it fires the low-battery alert
23031
+ * every time the hub restarts. Unknown is not empty (D315), and on a battery
23032
+ * reading the difference is an alarm.
23033
+ *
23034
+ * `vacuum-control` and `lawn-mower-control` already model it this way.
23035
+ * Consumers must SKIP a null rather than coerce it — `battery-band` already
23036
+ * declines to band a non-finite reading, which is the correct shape.
23037
+ */
23038
+ percentage: number().min(0).max(100).nullable(),
22918
23039
  /**
22919
23040
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
22920
23041
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -29454,6 +29575,12 @@ Object.freeze({
29454
29575
  addonId: null,
29455
29576
  access: "create"
29456
29577
  },
29578
+ "backup.cancel": {
29579
+ capName: "backup",
29580
+ capScope: "system",
29581
+ addonId: null,
29582
+ access: "create"
29583
+ },
29457
29584
  "backup.delete": {
29458
29585
  capName: "backup",
29459
29586
  capScope: "system",
@@ -29496,6 +29623,12 @@ Object.freeze({
29496
29623
  addonId: null,
29497
29624
  access: "view"
29498
29625
  },
29626
+ "backup.listRuns": {
29627
+ capName: "backup",
29628
+ capScope: "system",
29629
+ addonId: null,
29630
+ access: "view"
29631
+ },
29499
29632
  "backup.listSchedules": {
29500
29633
  capName: "backup",
29501
29634
  capScope: "system",
@@ -34062,6 +34195,12 @@ Object.freeze({
34062
34195
  addonId: null,
34063
34196
  access: "create"
34064
34197
  },
34198
+ "streamBroker.forgetDeviceHardware": {
34199
+ capName: "stream-broker",
34200
+ capScope: "system",
34201
+ addonId: null,
34202
+ access: "delete"
34203
+ },
34065
34204
  "streamBroker.getAllRtspEntries": {
34066
34205
  capName: "stream-broker",
34067
34206
  capScope: "system",
@@ -36520,6 +36659,11 @@ Object.freeze({
36520
36659
  form: "single",
36521
36660
  optional: false
36522
36661
  }],
36662
+ "streamBroker.forgetDeviceHardware": [{
36663
+ name: "deviceId",
36664
+ form: "single",
36665
+ optional: false
36666
+ }],
36523
36667
  "streamBroker.getDeviceAudioMute": [{
36524
36668
  name: "deviceId",
36525
36669
  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-DnnREw4Z.js");
5
+ const require_dist = require("../dist-DOa-4HqK.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-hjZ5e2qy.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-PbHGodVF.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.57",
3
+ "version": "1.2.59",
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",