@camstack/system 1.2.179 → 1.2.181

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.
Files changed (67) hide show
  1. package/dist/addon-runner.js +2 -2
  2. package/dist/addon-runner.mjs +2 -2
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +56 -10
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +657 -62
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +658 -63
  12. package/dist/builtins/backup-orchestrator/run-queue.d.ts +103 -0
  13. package/dist/builtins/backup-orchestrator/staging-paths.d.ts +36 -0
  14. package/dist/builtins/console-logging/index.js +1 -1
  15. package/dist/builtins/console-logging/index.mjs +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  17. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  18. package/dist/builtins/device-manager/device-manager.addon.js +349 -65
  19. package/dist/builtins/device-manager/device-manager.addon.mjs +349 -65
  20. package/dist/builtins/device-manager/device-meta-actions.d.ts +8 -19
  21. package/dist/builtins/device-manager/device-provider-context.d.ts +4 -0
  22. package/dist/builtins/device-manager/migrate-device.d.ts +47 -3
  23. package/dist/builtins/device-manager/migrate-guard.d.ts +39 -0
  24. package/dist/builtins/device-manager/migrate-hardware-state.d.ts +24 -0
  25. package/dist/builtins/device-manager/migrate-reload.d.ts +8 -0
  26. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  27. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  28. package/dist/builtins/hub-forwarder/index.js +1 -1
  29. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  30. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  31. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  32. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  33. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  34. package/dist/builtins/local-network/local-network.addon.js +1 -1
  35. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  36. package/dist/builtins/loki-logging/index.js +1 -1
  37. package/dist/builtins/loki-logging/index.mjs +1 -1
  38. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  39. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  40. package/dist/builtins/platform-probe/index.js +1 -1
  41. package/dist/builtins/platform-probe/index.mjs +1 -1
  42. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  43. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  44. package/dist/builtins/snapshot/index.js +1 -1
  45. package/dist/builtins/snapshot/index.mjs +1 -1
  46. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  47. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  48. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  49. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  50. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  51. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  52. package/dist/builtins/system-backup/system-backup.service.d.ts +55 -2
  53. package/dist/builtins/system-config/system-config.addon.js +1 -1
  54. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  55. package/dist/builtins/winston-logging/index.js +1 -1
  56. package/dist/builtins/winston-logging/index.mjs +1 -1
  57. package/dist/{dist-L_39vRmH.mjs → dist-DbnNk4Lw.mjs} +211 -2
  58. package/dist/{dist-C7qWwrK1.js → dist-whe0b4_3.js} +211 -2
  59. package/dist/index.js +530 -2
  60. package/dist/index.mjs +533 -5
  61. package/dist/kernel/addon-installer.d.ts +69 -0
  62. package/dist/kernel/deps/closure-dedupe.d.ts +105 -0
  63. package/dist/{manifest-system-deps-CMOGc5nC.mjs → manifest-system-deps-DOcMuUWK.mjs} +1 -1
  64. package/dist/{manifest-system-deps-PAIfmNun.js → manifest-system-deps-y5vZBO6q.js} +1 -1
  65. package/dist/{retired-settings-keys-3soU9pfP.js → retired-settings-keys-BdvmiaK7.js} +1 -1
  66. package/dist/{retired-settings-keys-CnbKAxmX.mjs → retired-settings-keys-CyQG8b-A.mjs} +1 -1
  67. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ import { DeviceManagerSettings } from './device-meta-store.js';
2
+ /** The narrow settings slice the swap needs — the seam the spec fakes. */
3
+ export type HardwareStateStore = Pick<DeviceManagerSettings, 'readDeviceStore' | 'writeDeviceStore' | 'clearDeviceStore' | 'readDeviceRuntimeState' | 'writeDeviceRuntimeState'>;
4
+ export interface SwappedHardwareState {
5
+ /** Runtime-state blob now persisted at `sourceId` (was the target's). */
6
+ readonly runtimeStateNowAtSource: Record<string, unknown>;
7
+ /** Runtime-state blob now persisted at `targetId` (was the source's). */
8
+ readonly runtimeStateNowAtTarget: Record<string, unknown>;
9
+ /** Hardware config keys that moved target → source. */
10
+ readonly hardwareKeysToSource: readonly string[];
11
+ /** Hardware config keys that moved source → target. */
12
+ readonly hardwareKeysToTarget: readonly string[];
13
+ /** Role config keys that stayed on each number. */
14
+ readonly roleKeysKeptAtSource: readonly string[];
15
+ readonly roleKeysKeptAtTarget: readonly string[];
16
+ }
17
+ /**
18
+ * Swap the hardware-scoped halves of two devices' persisted state. Runs right
19
+ * after `swapIds`, under the same meta write lock. THROWS on failure: a
20
+ * migration whose rows swapped but whose configs did not is exactly the
21
+ * incident this module exists to prevent, and it must never be reported as a
22
+ * success.
23
+ */
24
+ export declare function swapHardwareState(settings: HardwareStateStore, sourceId: number, targetId: number): Promise<SwappedHardwareState>;
@@ -0,0 +1,8 @@
1
+ import { ProviderContext } from './device-provider-context.js';
2
+ /** One migrated number and the identity that lives at it AFTER the swap. */
3
+ export interface MigratedDeviceTarget {
4
+ readonly deviceId: number;
5
+ readonly addonId: string;
6
+ readonly stableId: string;
7
+ }
8
+ export declare function reloadMigratedDevices(pctx: ProviderContext, targets: readonly MigratedDeviceTarget[]): Promise<void>;
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  //#region src/builtins/doorbell/trigger-engine.ts
8
8
  /**
9
9
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, G as doorbellCapability, Jt as createEvent, M as bareAddonId, Pt as errMsg, Vt as DeviceType, Y as evaluateSensorEdge, _ as SOURCE_CAPS, nt as isSameAddonId, rt as isSourceCap, sn as EventCategory, v as SOURCE_DEVICE_TYPES } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, G as doorbellCapability, Jt as createEvent, M as bareAddonId, Pt as errMsg, Vt as DeviceType, Y as evaluateSensorEdge, _ as SOURCE_CAPS, nt as isSameAddonId, rt as isSourceCap, sn as EventCategory, v as SOURCE_DEVICE_TYPES } from "../../dist-DbnNk4Lw.mjs";
2
2
  //#region src/builtins/doorbell/trigger-engine.ts
3
3
  /**
4
4
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
9
9
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-DbnNk4Lw.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
4
4
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-C7qWwrK1.js");
3
+ const require_dist = require("../../dist-whe0b4_3.js");
4
4
  //#region src/builtins/liveness-monitor/liveness-checks.ts
5
5
  var NO_DEVICES = "liveness:no-devices";
6
6
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, sn as EventCategory } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, sn as EventCategory } from "../../dist-DbnNk4Lw.mjs";
2
2
  //#region src/builtins/liveness-monitor/liveness-checks.ts
3
3
  var NO_DEVICES = "liveness:no-devices";
4
4
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  node_crypto = require_chunk.__toESM(node_crypto);
9
9
  let crypto$1 = require("crypto");
@@ -1,5 +1,5 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { A as authProviderCapability, Ft as BaseAddon, T as UserRecordSchema, jt as userManagementCapability, r as ApiKeyRecordSchema, x as ScopedTokenSchema } from "../../dist-L_39vRmH.mjs";
2
+ import { A as authProviderCapability, Ft as BaseAddon, T as UserRecordSchema, jt as userManagementCapability, r as ApiKeyRecordSchema, x as ScopedTokenSchema } from "../../dist-DbnNk4Lw.mjs";
3
3
  import * as crypto$2 from "node:crypto";
4
4
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
5
5
  import nodeCrypto from "crypto";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-C7qWwrK1.js");
3
+ const require_dist = require("../../dist-whe0b4_3.js");
4
4
  const require_tls = require("../../tls-BxQlomxd.js");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, sn as EventCategory, st as localNetworkCapability } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, sn as EventCategory, st as localNetworkCapability } from "../../dist-DbnNk4Lw.mjs";
2
2
  import { S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, i as writeExtraSans, l as reissueTlsLeaf, n as readTlsAccessStatus, o as validateUploadedTls, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, y as applyLanHttp } from "../../tls-DOTmtLCW.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { join } from "node:path";
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  //#region src/builtins/loki-logging/loki-payload.ts
8
8
  /**
9
9
  * Loki rejects a label name that is not a valid Prometheus label
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-DbnNk4Lw.mjs";
2
2
  //#region src/builtins/loki-logging/loki-payload.ts
3
3
  /**
4
4
  * Loki rejects a label name that is not a valid Prometheus label
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  let node_fs_promises = require("node:fs/promises");
8
8
  let node_child_process = require("node:child_process");
9
9
  let node_util = require("node:util");
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, Q as foldSnapshotByFunction, _t as reducePoints, dt as metricsProviderCapability, sn as EventCategory, vt as resolveBucketMs } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, Q as foldSnapshotByFunction, _t as reducePoints, dt as metricsProviderCapability, sn as EventCategory, vt as resolveBucketMs } from "../../dist-DbnNk4Lw.mjs";
2
2
  import { readFile, readdir } from "node:fs/promises";
3
3
  import { execFile, execFileSync } from "node:child_process";
4
4
  import { promisify } from "node:util";
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  let node_child_process = require("node:child_process");
8
8
  let node_util = require("node:util");
9
9
  let node_fs = require("node:fs");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Ft as BaseAddon, K as enumerateInferenceDevices, Pt as errMsg, Xt as emitReadiness, ht as platformProbeCapability, sn as EventCategory, wt as scoreRuntimes } from "../../dist-L_39vRmH.mjs";
2
+ import { Ft as BaseAddon, K as enumerateInferenceDevices, Pt as errMsg, Xt as emitReadiness, ht as platformProbeCapability, sn as EventCategory, wt as scoreRuntimes } from "../../dist-DbnNk4Lw.mjs";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
5
5
  import * as fs from "node:fs";
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
8
8
  /**
9
9
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, sn as EventCategory } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, sn as EventCategory } from "../../dist-DbnNk4Lw.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
@@ -1,4 +1,4 @@
1
- import { At as streamQualityLabel, Et as snapshotCapability, Ft as BaseAddon, M as bareAddonId, N as batteryCapability, Pt as errMsg, V as deriveBatteryPresence, Vt as DeviceType, en as nodePin, i as BatteryStatusSchema, sn as EventCategory, zt as DeviceFeature } from "../../dist-L_39vRmH.mjs";
1
+ import { At as streamQualityLabel, Et as snapshotCapability, Ft as BaseAddon, M as bareAddonId, N as batteryCapability, Pt as errMsg, V as deriveBatteryPresence, Vt as DeviceType, en as nodePin, i as BatteryStatusSchema, sn as EventCategory, zt as DeviceFeature } from "../../dist-DbnNk4Lw.mjs";
2
2
  import { z } from "zod";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { signExpiringUrl, verifyExpiringUrl } from "@camstack/types/node";
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, Z as filesystemBrowseCapability, kt as storageProviderCapability } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, Z as filesystemBrowseCapability, kt as storageProviderCapability } from "../../dist-DbnNk4Lw.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  const require_hub_cap_forward = require("../../hub-cap-forward-DmHNjbB0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { C as StorageLocationTypeSchema, Dt as storageCapability, F as collectSecretConfigKeys, Ft as BaseAddon, Ot as storageMigrationCapability, S as StorageCleanupJobSchema, Tt as settingsStoreCapability, h as REDACTED_SECRET, tn as parseJsonObject, w as StorageMigrationJobSchema } from "../../dist-L_39vRmH.mjs";
1
+ import { C as StorageLocationTypeSchema, Dt as storageCapability, F as collectSecretConfigKeys, Ft as BaseAddon, Ot as storageMigrationCapability, S as StorageCleanupJobSchema, Tt as settingsStoreCapability, h as REDACTED_SECRET, tn as parseJsonObject, w as StorageMigrationJobSchema } from "../../dist-DbnNk4Lw.mjs";
2
2
  import { t as HUB_CAP_FWD_ACTION } from "../../hub-cap-forward-BdT320dq.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -1,14 +1,47 @@
1
1
  import { IScopedLogger } from '@camstack/types';
2
+ /**
3
+ * Thrown when an archive build (or a backup run driving one) is
4
+ * stopped via its `AbortSignal`. Callers use `instanceof` to tell a
5
+ * deliberate operator cancel from a real failure — a cancelled run is
6
+ * an outcome, not an error to alert on. (D342)
7
+ */
8
+ export declare class BackupCancelledError extends Error {
9
+ constructor(message?: string);
10
+ }
2
11
  /**
3
12
  * Default set of paths considered part of a "system backup". Includes
4
13
  * everything that isn't pure backend code — config, sqlite, addons
5
14
  * (runtime overlay), addons-data (per-addon private dir), TLS certs,
6
15
  * auto-update marker.
7
16
  *
8
- * Excluded by default: recordings/, media/, models/, logs/, cache/
9
- * (too large or fully recreatable).
17
+ * Anything not listed is excluded by omission — recordings/, media/,
18
+ * models/, logs/, cache/ (too large or fully recreatable). Note this
19
+ * covers only TOP-LEVEL trees: bulk nested INSIDE a listed location
20
+ * is excluded via `DEFAULT_BACKUP_EXCLUDES` + the node_modules rule
21
+ * below, enforced in the walk and the tar filter alike.
10
22
  */
11
23
  export declare const DEFAULT_BACKUP_LOCATIONS: readonly ["config.yaml", "addons", "addons-data", "tls", "auto-update.json"];
24
+ /**
25
+ * Subtrees never captured by a system backup even though they live
26
+ * under a `DEFAULT_BACKUP_LOCATIONS` entry. Paths are dataDir-relative
27
+ * prefixes. Two lessons from the live hub (2026-09-04, D-record
28
+ * "backup excludes"):
29
+ *
30
+ * - `addons-data/backup-orchestrator/staging` — the orchestrator's
31
+ * LEGACY staging dir (now `<dataDir>/backup-staging`, outside every
32
+ * location). Before Jul 28 every archive nested all previous
33
+ * archives (175M → 503M → 4.5G); leaked files from that era must
34
+ * never be re-swept into new backups.
35
+ * - `addons-data/recorder/exports` — operator-exported clips (8.4 GB
36
+ * on the hub). Media, not system state; a restore has no use for it.
37
+ */
38
+ export declare const DEFAULT_BACKUP_EXCLUDES: readonly ["addons-data/backup-orchestrator/staging", "addons-data/recorder/exports"];
39
+ /**
40
+ * True when a dataDir-relative path must be omitted from archives,
41
+ * manifests and location stats. Accepts tar-style paths (`./` prefix,
42
+ * trailing `/`) and backslash separators.
43
+ */
44
+ export declare function isExcludedFromBackup(relPath: string): boolean;
12
45
  /** Path of the manifest file embedded inside every archive. */
13
46
  export declare const ARCHIVE_MANIFEST_NAME = ".camstack-backup-manifest.json";
14
47
  export type ArchiveEntryKind = 'file' | 'dir' | 'symlink';
@@ -109,10 +142,23 @@ export declare class SystemBackupService {
109
142
  *
110
143
  * Locations that don't exist are silently skipped. Throws if zero
111
144
  * locations would be included.
145
+ *
146
+ * Cancellation: `signal` aborts the build IN FLIGHT — the manifest
147
+ * walk checks it per filesystem node and the tar phase runs through
148
+ * `stream.pipeline(..., { signal })`, which destroys the pack and
149
+ * the file sink immediately. On abort the half-written archive is
150
+ * deleted here (never left for the caller to remember) and the call
151
+ * rejects with {@link BackupCancelledError}. (D342)
152
+ *
153
+ * Progress: `onArchiveBytes` receives the cumulative compressed
154
+ * bytes written to `archivePath` — the live "how large has staging
155
+ * grown" counter `backup.listRuns` exposes.
112
156
  */
113
157
  createArchive(opts: {
114
158
  archivePath: string;
115
159
  locations?: readonly string[];
160
+ signal?: AbortSignal;
161
+ onArchiveBytes?: (bytesWritten: number) => void;
116
162
  }): Promise<CreateArchiveResult>;
117
163
  /**
118
164
  * Best-effort `wal_checkpoint(TRUNCATE)` on every live SQLite database
@@ -165,4 +211,11 @@ export declare class SystemBackupService {
165
211
  /** Drop the marker after a successful boot-time restore. */
166
212
  clearPendingMarker(): void;
167
213
  private getRestoreMarkerPath;
214
+ /**
215
+ * Absolute-path form of {@link isExcludedFromBackup}, anchored on
216
+ * this service's dataDir. Shared by the manifest walk, the location
217
+ * stats and the WAL-checkpoint scan so all three agree with the tar
218
+ * filter about what a backup contains.
219
+ */
220
+ private exclusionPredicate;
168
221
  }
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  //#region src/builtins/system-config/system-config.addon.ts
8
8
  /**
9
9
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, Pt as errMsg, Qt as hydrateSchema } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, Pt as errMsg, Qt as hydrateSchema } from "../../dist-DbnNk4Lw.mjs";
2
2
  //#region src/builtins/system-config/system-config.addon.ts
3
3
  /**
4
4
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -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-C7qWwrK1.js");
6
+ const require_dist = require("../../dist-whe0b4_3.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-L_39vRmH.mjs";
1
+ import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-DbnNk4Lw.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";