@camstack/addon-tailscale 1.2.58 → 1.2.60

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-BZ74BNhY.js");
27
+ const require_dist = require("../dist-bgTZk5sR.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-DAMnpDgL.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-1YSHktSs.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
@@ -12517,7 +12611,10 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
12517
12611
  id: string(),
12518
12612
  name: string(),
12519
12613
  type: string()
12520
- }))), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12614
+ }))), method(object({ stableId: string() }), object({ deviceId: number() }), {
12615
+ kind: "mutation",
12616
+ timeoutMs: 3 * 6e4
12617
+ }), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12521
12618
  kind: "mutation",
12522
12619
  auth: "admin"
12523
12620
  }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
@@ -12798,7 +12895,8 @@ method(object({
12798
12895
  targetId: number()
12799
12896
  }), MigrateDeviceResultSchema, {
12800
12897
  kind: "mutation",
12801
- auth: "admin"
12898
+ auth: "admin",
12899
+ timeoutMs: 12 * 6e4
12802
12900
  }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
12803
12901
  deviceId: number(),
12804
12902
  name: string()
@@ -29481,6 +29579,12 @@ Object.freeze({
29481
29579
  addonId: null,
29482
29580
  access: "create"
29483
29581
  },
29582
+ "backup.cancel": {
29583
+ capName: "backup",
29584
+ capScope: "system",
29585
+ addonId: null,
29586
+ access: "create"
29587
+ },
29484
29588
  "backup.delete": {
29485
29589
  capName: "backup",
29486
29590
  capScope: "system",
@@ -29523,6 +29627,12 @@ Object.freeze({
29523
29627
  addonId: null,
29524
29628
  access: "view"
29525
29629
  },
29630
+ "backup.listRuns": {
29631
+ capName: "backup",
29632
+ capScope: "system",
29633
+ addonId: null,
29634
+ access: "view"
29635
+ },
29526
29636
  "backup.listSchedules": {
29527
29637
  capName: "backup",
29528
29638
  capScope: "system",
@@ -30723,6 +30833,12 @@ Object.freeze({
30723
30833
  addonId: null,
30724
30834
  access: "view"
30725
30835
  },
30836
+ "deviceProvider.reloadDevice": {
30837
+ capName: "device-provider",
30838
+ capScope: "system",
30839
+ addonId: null,
30840
+ access: "create"
30841
+ },
30726
30842
  "deviceProvider.start": {
30727
30843
  capName: "device-provider",
30728
30844
  capScope: "system",
@@ -34089,6 +34205,12 @@ Object.freeze({
34089
34205
  addonId: null,
34090
34206
  access: "create"
34091
34207
  },
34208
+ "streamBroker.forgetDeviceHardware": {
34209
+ capName: "stream-broker",
34210
+ capScope: "system",
34211
+ addonId: null,
34212
+ access: "delete"
34213
+ },
34092
34214
  "streamBroker.getAllRtspEntries": {
34093
34215
  capName: "stream-broker",
34094
34216
  capScope: "system",
@@ -36547,6 +36669,11 @@ Object.freeze({
36547
36669
  form: "single",
36548
36670
  optional: false
36549
36671
  }],
36672
+ "streamBroker.forgetDeviceHardware": [{
36673
+ name: "deviceId",
36674
+ form: "single",
36675
+ optional: false
36676
+ }],
36550
36677
  "streamBroker.getDeviceAudioMute": [{
36551
36678
  name: "deviceId",
36552
36679
  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
@@ -12517,7 +12611,10 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
12517
12611
  id: string(),
12518
12612
  name: string(),
12519
12613
  type: string()
12520
- }))), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12614
+ }))), method(object({ stableId: string() }), object({ deviceId: number() }), {
12615
+ kind: "mutation",
12616
+ timeoutMs: 3 * 6e4
12617
+ }), method(object({}), boolean()), method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
12521
12618
  kind: "mutation",
12522
12619
  auth: "admin"
12523
12620
  }), method(object({}), CreationSchemaOutputSchema), method(object({}), object({ deviceType: _enum(DeviceType).nullable() })), method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
@@ -12798,7 +12895,8 @@ method(object({
12798
12895
  targetId: number()
12799
12896
  }), MigrateDeviceResultSchema, {
12800
12897
  kind: "mutation",
12801
- auth: "admin"
12898
+ auth: "admin",
12899
+ timeoutMs: 12 * 6e4
12802
12900
  }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
12803
12901
  deviceId: number(),
12804
12902
  name: string()
@@ -29481,6 +29579,12 @@ Object.freeze({
29481
29579
  addonId: null,
29482
29580
  access: "create"
29483
29581
  },
29582
+ "backup.cancel": {
29583
+ capName: "backup",
29584
+ capScope: "system",
29585
+ addonId: null,
29586
+ access: "create"
29587
+ },
29484
29588
  "backup.delete": {
29485
29589
  capName: "backup",
29486
29590
  capScope: "system",
@@ -29523,6 +29627,12 @@ Object.freeze({
29523
29627
  addonId: null,
29524
29628
  access: "view"
29525
29629
  },
29630
+ "backup.listRuns": {
29631
+ capName: "backup",
29632
+ capScope: "system",
29633
+ addonId: null,
29634
+ access: "view"
29635
+ },
29526
29636
  "backup.listSchedules": {
29527
29637
  capName: "backup",
29528
29638
  capScope: "system",
@@ -30723,6 +30833,12 @@ Object.freeze({
30723
30833
  addonId: null,
30724
30834
  access: "view"
30725
30835
  },
30836
+ "deviceProvider.reloadDevice": {
30837
+ capName: "device-provider",
30838
+ capScope: "system",
30839
+ addonId: null,
30840
+ access: "create"
30841
+ },
30726
30842
  "deviceProvider.start": {
30727
30843
  capName: "device-provider",
30728
30844
  capScope: "system",
@@ -34089,6 +34205,12 @@ Object.freeze({
34089
34205
  addonId: null,
34090
34206
  access: "create"
34091
34207
  },
34208
+ "streamBroker.forgetDeviceHardware": {
34209
+ capName: "stream-broker",
34210
+ capScope: "system",
34211
+ addonId: null,
34212
+ access: "delete"
34213
+ },
34092
34214
  "streamBroker.getAllRtspEntries": {
34093
34215
  capName: "stream-broker",
34094
34216
  capScope: "system",
@@ -36547,6 +36669,11 @@ Object.freeze({
36547
36669
  form: "single",
36548
36670
  optional: false
36549
36671
  }],
36672
+ "streamBroker.forgetDeviceHardware": [{
36673
+ name: "deviceId",
36674
+ form: "single",
36675
+ optional: false
36676
+ }],
36550
36677
  "streamBroker.getDeviceAudioMute": [{
36551
36678
  name: "deviceId",
36552
36679
  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-BZ74BNhY.js");
5
+ const require_dist = require("../dist-bgTZk5sR.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-DAMnpDgL.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-1YSHktSs.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.58",
3
+ "version": "1.2.60",
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",