@camstack/system 1.2.179 → 1.2.180
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.
- package/dist/addon-runner.js +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +56 -10
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +657 -62
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +658 -63
- package/dist/builtins/backup-orchestrator/run-queue.d.ts +103 -0
- package/dist/builtins/backup-orchestrator/staging-paths.d.ts +36 -0
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +146 -5
- package/dist/builtins/device-manager/device-manager.addon.mjs +146 -5
- package/dist/builtins/device-manager/device-meta-actions.d.ts +1 -1
- package/dist/builtins/device-manager/migrate-device.d.ts +33 -0
- package/dist/builtins/device-manager/migrate-hardware-state.d.ts +24 -0
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-backup/system-backup.service.d.ts +55 -2
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-L_39vRmH.mjs → dist-DqNTelT4.mjs} +167 -1
- package/dist/{dist-C7qWwrK1.js → dist-TEwQZL3g.js} +167 -1
- package/dist/index.js +530 -2
- package/dist/index.mjs +533 -5
- package/dist/kernel/addon-installer.d.ts +69 -0
- package/dist/kernel/deps/closure-dedupe.d.ts +105 -0
- package/dist/{manifest-system-deps-PAIfmNun.js → manifest-system-deps-BVIr3MYJ.js} +1 -1
- package/dist/{manifest-system-deps-CMOGc5nC.mjs → manifest-system-deps-Ci-jhrxY.mjs} +1 -1
- package/dist/{retired-settings-keys-CnbKAxmX.mjs → retired-settings-keys-CeSITpIX.mjs} +1 -1
- package/dist/{retired-settings-keys-3soU9pfP.js → retired-settings-keys-DauPtbFR.js} +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
1
|
+
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-DqNTelT4.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-
|
|
3
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
1
|
+
import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, sn as EventCategory } from "../../dist-DqNTelT4.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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
2
|
+
import { A as authProviderCapability, Ft as BaseAddon, T as UserRecordSchema, jt as userManagementCapability, r as ApiKeyRecordSchema, x as ScopedTokenSchema } from "../../dist-DqNTelT4.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-
|
|
3
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
1
|
+
import { Ft as BaseAddon, sn as EventCategory, st as localNetworkCapability } from "../../dist-DqNTelT4.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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
1
|
+
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-DqNTelT4.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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
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-DqNTelT4.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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
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-DqNTelT4.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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
1
|
+
import { Ft as BaseAddon, sn as EventCategory } from "../../dist-DqNTelT4.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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
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-DqNTelT4.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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
1
|
+
import { Ft as BaseAddon, Z as filesystemBrowseCapability, kt as storageProviderCapability } from "../../dist-DqNTelT4.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";
|
|
Binary file
|
|
Binary file
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
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-DqNTelT4.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
|
-
*
|
|
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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
1
|
+
import { Ft as BaseAddon, Pt as errMsg, Qt as hydrateSchema } from "../../dist-DqNTelT4.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-
|
|
6
|
+
const require_dist = require("../../dist-TEwQZL3g.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-
|
|
1
|
+
import { Ft as BaseAddon, ct as logDestinationCapability } from "../../dist-DqNTelT4.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";
|
|
@@ -7164,6 +7164,89 @@ var LocationStatSchema = z.object({
|
|
|
7164
7164
|
fileCount: z.number(),
|
|
7165
7165
|
present: z.boolean()
|
|
7166
7166
|
});
|
|
7167
|
+
/** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
|
|
7168
|
+
var BackupRunStateSchema = z.enum([
|
|
7169
|
+
"queued",
|
|
7170
|
+
"running",
|
|
7171
|
+
"succeeded",
|
|
7172
|
+
"failed",
|
|
7173
|
+
"cancelled"
|
|
7174
|
+
]);
|
|
7175
|
+
/**
|
|
7176
|
+
* Where a running backup currently is. `queued` before it starts,
|
|
7177
|
+
* `building` while the tar.gz is being staged, `uploading` during the
|
|
7178
|
+
* per-destination fan-out, `done` once terminal.
|
|
7179
|
+
*/
|
|
7180
|
+
var BackupRunPhaseSchema = z.enum([
|
|
7181
|
+
"queued",
|
|
7182
|
+
"building",
|
|
7183
|
+
"uploading",
|
|
7184
|
+
"done"
|
|
7185
|
+
]);
|
|
7186
|
+
/**
|
|
7187
|
+
* Observable state of one backup run — readable WHILE it runs via
|
|
7188
|
+
* `backup.listRuns`. This is what makes the execution queue and
|
|
7189
|
+
* `backup.cancel` usable: the 2026-09-04 incident (two concurrent
|
|
7190
|
+
* multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
|
|
7191
|
+
* diagnosable with `du` because nothing reported that runs existed or
|
|
7192
|
+
* how large the staged archive had grown.
|
|
7193
|
+
*/
|
|
7194
|
+
var BackupRunSchema = z.object({
|
|
7195
|
+
/** Stable run id — the handle `backup.cancel` takes. */
|
|
7196
|
+
id: z.string(),
|
|
7197
|
+
state: BackupRunStateSchema,
|
|
7198
|
+
phase: BackupRunPhaseSchema,
|
|
7199
|
+
/**
|
|
7200
|
+
* Resolved destination location ids. Empty while queued (targets are
|
|
7201
|
+
* resolved when the run starts, against the then-current policies).
|
|
7202
|
+
*/
|
|
7203
|
+
destinationIds: z.array(z.string()).readonly(),
|
|
7204
|
+
label: z.string().optional(),
|
|
7205
|
+
/** ms-epoch when the run was submitted (trigger call / schedule fire). */
|
|
7206
|
+
requestedAt: z.number(),
|
|
7207
|
+
/** ms-epoch when the run left the queue and started building. */
|
|
7208
|
+
startedAt: z.number().optional(),
|
|
7209
|
+
/** ms-epoch when the run reached a terminal state. */
|
|
7210
|
+
finishedAt: z.number().optional(),
|
|
7211
|
+
/** Compressed bytes of the staging archive written so far. */
|
|
7212
|
+
stagedBytes: z.number(),
|
|
7213
|
+
/** Final staged archive size, once the build phase completes. */
|
|
7214
|
+
archiveSizeBytes: z.number().optional(),
|
|
7215
|
+
/** Bytes pushed to the destination currently uploading. */
|
|
7216
|
+
uploadedBytes: z.number(),
|
|
7217
|
+
/** Destinations where the archive fully landed (uploaded + indexed). */
|
|
7218
|
+
completedDestinationIds: z.array(z.string()).readonly(),
|
|
7219
|
+
/** Destinations that failed during the fan-out. */
|
|
7220
|
+
failedDestinationIds: z.array(z.string()).readonly(),
|
|
7221
|
+
/** Failure message when `state === 'failed'`. */
|
|
7222
|
+
error: z.string().optional(),
|
|
7223
|
+
/**
|
|
7224
|
+
* 1-based place in the execution queue — 1 = runs next. Present only
|
|
7225
|
+
* while `state === 'queued'`. Stamped by the orchestrator from the
|
|
7226
|
+
* queue's OWN pending order, never derived from timestamps, so the
|
|
7227
|
+
* UI cannot show an order the executor will not honour.
|
|
7228
|
+
*/
|
|
7229
|
+
queuePosition: z.number().int().min(1).optional()
|
|
7230
|
+
});
|
|
7231
|
+
/**
|
|
7232
|
+
* Result of `backup.trigger`. The call still resolves when the run
|
|
7233
|
+
* terminates (compat with schedule-driven runs and the admin UI), but
|
|
7234
|
+
* it now names the run and says whether it had to WAIT: a trigger that
|
|
7235
|
+
* arrives while another run is in flight is enqueued (or joined onto
|
|
7236
|
+
* an identical already-queued run), never started concurrently.
|
|
7237
|
+
*/
|
|
7238
|
+
var BackupTriggerResultSchema = z.object({
|
|
7239
|
+
/** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
|
|
7240
|
+
runId: z.string(),
|
|
7241
|
+
/** True when the run waited behind an in-flight run instead of starting immediately. */
|
|
7242
|
+
queued: z.boolean(),
|
|
7243
|
+
/** True when this trigger was coalesced onto an identical already-queued run. */
|
|
7244
|
+
joined: z.boolean(),
|
|
7245
|
+
/** True when the run was cancelled before completing every destination. */
|
|
7246
|
+
cancelled: z.boolean(),
|
|
7247
|
+
/** One entry per destination the archive landed at (partial on cancel). */
|
|
7248
|
+
entries: z.array(BackupEntrySchema).readonly()
|
|
7249
|
+
});
|
|
7167
7250
|
/**
|
|
7168
7251
|
* A backup schedule — the N:M "entry" that binds one cron cadence to a
|
|
7169
7252
|
* SET of destination locations. Supersedes the per-location cron on
|
|
@@ -7221,6 +7304,11 @@ var backupCapability = {
|
|
|
7221
7304
|
* Trigger a backup. Without `destinations` the orchestrator fans
|
|
7222
7305
|
* out to every destination flagged as enabled in the routing
|
|
7223
7306
|
* config; with it, only the listed addons receive the archive.
|
|
7307
|
+
*
|
|
7308
|
+
* At most ONE backup run executes at a time — the source tree and
|
|
7309
|
+
* the staging disk are shared by every run, so a second trigger
|
|
7310
|
+
* while one is in flight is enqueued (or joined onto an identical
|
|
7311
|
+
* queued run) and the result says so. See D342.
|
|
7224
7312
|
*/
|
|
7225
7313
|
trigger: method(z.object({
|
|
7226
7314
|
/** Subset of registered `backup-destination` addon ids to write to. */
|
|
@@ -7234,7 +7322,30 @@ var backupCapability = {
|
|
|
7234
7322
|
* retention (manual runs).
|
|
7235
7323
|
*/
|
|
7236
7324
|
retentionCount: z.number().int().min(1).max(1e3).optional()
|
|
7237
|
-
}).optional(),
|
|
7325
|
+
}).optional(), BackupTriggerResultSchema, {
|
|
7326
|
+
kind: "mutation",
|
|
7327
|
+
auth: "admin"
|
|
7328
|
+
}),
|
|
7329
|
+
/**
|
|
7330
|
+
* Every run the orchestrator knows about, in EXECUTION order: the
|
|
7331
|
+
* running run first, then queued runs in the exact order they will
|
|
7332
|
+
* execute (each with `queuePosition`, 1 = next), then the bounded
|
|
7333
|
+
* finished history newest-first. Only one run executes at a time
|
|
7334
|
+
* (D342) — the queued section IS the line. Each run carries live
|
|
7335
|
+
* phase + byte counters so a runaway build is visible in seconds,
|
|
7336
|
+
* not via `du`.
|
|
7337
|
+
*/
|
|
7338
|
+
listRuns: method(z.void(), z.array(BackupRunSchema).readonly(), { auth: "admin" }),
|
|
7339
|
+
/**
|
|
7340
|
+
* Stop a backup run. Mirrors `storage-migration.cancel` semantics:
|
|
7341
|
+
* id in, `{ cancelled }` out — `false` when the run is unknown or
|
|
7342
|
+
* already terminal. A QUEUED run is removed before it ever starts;
|
|
7343
|
+
* the RUNNING run has its tar/upload stream actually aborted, the
|
|
7344
|
+
* half-written staging archive is deleted, and the in-flight
|
|
7345
|
+
* destination upload is aborted server-side (partial discarded).
|
|
7346
|
+
* Destinations that already completed keep their archive.
|
|
7347
|
+
*/
|
|
7348
|
+
cancel: method(z.object({ runId: z.string() }), z.object({ cancelled: z.boolean() }), {
|
|
7238
7349
|
kind: "mutation",
|
|
7239
7350
|
auth: "admin"
|
|
7240
7351
|
}),
|
|
@@ -8112,6 +8223,38 @@ var streamBrokerCapability = {
|
|
|
8112
8223
|
auth: "admin"
|
|
8113
8224
|
}),
|
|
8114
8225
|
/**
|
|
8226
|
+
* The HARDWARE behind a device number was replaced
|
|
8227
|
+
* (`deviceManager.migrateDevice`). Forget every piece of broker state that
|
|
8228
|
+
* described the old box, so the next catalog pull derives everything from
|
|
8229
|
+
* the camera that is actually there:
|
|
8230
|
+
*
|
|
8231
|
+
* - every `derived:*` stream definition — a derived is authored against a
|
|
8232
|
+
* specific profile layout, and against the wrong hardware its feeder
|
|
8233
|
+
* respawns forever (observed at attempt 2732 on the live hub,
|
|
8234
|
+
* 2026-09-01);
|
|
8235
|
+
* - the profile-slot assignment entry, PURGED (not unassigned — unassign
|
|
8236
|
+
* marks the slot manual, which would pin the stale choice instead of
|
|
8237
|
+
* letting `computeInitialAssignment` re-derive it);
|
|
8238
|
+
* - the probe snapshots (`<deviceId>/…` — probed codec/resolution of the
|
|
8239
|
+
* old hardware);
|
|
8240
|
+
* - the persisted RTSP token rows for the device's brokers (keyed
|
|
8241
|
+
* `<deviceId>/<camStreamId>`; the stream ids change with the hardware,
|
|
8242
|
+
* so the rows are dead URLs).
|
|
8243
|
+
*
|
|
8244
|
+
* An RPC, deliberately — an event is telemetry and may be dropped (D8),
|
|
8245
|
+
* and a dropped forget leaves a feeder respawning against a stream that
|
|
8246
|
+
* does not exist.
|
|
8247
|
+
*/
|
|
8248
|
+
forgetDeviceHardware: method(z.object({ deviceId: z.number().int().nonnegative() }), z.object({
|
|
8249
|
+
derivedStreamsDeleted: z.array(z.string()).readonly(),
|
|
8250
|
+
assignmentsPurged: z.boolean(),
|
|
8251
|
+
probeSnapshotsDropped: z.number().int().nonnegative(),
|
|
8252
|
+
rtspTokenRowsDeleted: z.number().int().nonnegative()
|
|
8253
|
+
}), {
|
|
8254
|
+
kind: "mutation",
|
|
8255
|
+
auth: "admin"
|
|
8256
|
+
}),
|
|
8257
|
+
/**
|
|
8115
8258
|
* Render a short GIF or MP4 from the broker's PRE-BUFFER around an instant.
|
|
8116
8259
|
*
|
|
8117
8260
|
* The pre-buffer is the only source that already holds the seconds BEFORE
|
|
@@ -34933,6 +35076,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
34933
35076
|
addonId: null,
|
|
34934
35077
|
access: "create"
|
|
34935
35078
|
},
|
|
35079
|
+
"backup.cancel": {
|
|
35080
|
+
capName: "backup",
|
|
35081
|
+
capScope: "system",
|
|
35082
|
+
addonId: null,
|
|
35083
|
+
access: "create"
|
|
35084
|
+
},
|
|
34936
35085
|
"backup.delete": {
|
|
34937
35086
|
capName: "backup",
|
|
34938
35087
|
capScope: "system",
|
|
@@ -34975,6 +35124,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
34975
35124
|
addonId: null,
|
|
34976
35125
|
access: "view"
|
|
34977
35126
|
},
|
|
35127
|
+
"backup.listRuns": {
|
|
35128
|
+
capName: "backup",
|
|
35129
|
+
capScope: "system",
|
|
35130
|
+
addonId: null,
|
|
35131
|
+
access: "view"
|
|
35132
|
+
},
|
|
34978
35133
|
"backup.listSchedules": {
|
|
34979
35134
|
capName: "backup",
|
|
34980
35135
|
capScope: "system",
|
|
@@ -39541,6 +39696,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
39541
39696
|
addonId: null,
|
|
39542
39697
|
access: "create"
|
|
39543
39698
|
},
|
|
39699
|
+
"streamBroker.forgetDeviceHardware": {
|
|
39700
|
+
capName: "stream-broker",
|
|
39701
|
+
capScope: "system",
|
|
39702
|
+
addonId: null,
|
|
39703
|
+
access: "delete"
|
|
39704
|
+
},
|
|
39544
39705
|
"streamBroker.getAllRtspEntries": {
|
|
39545
39706
|
capName: "stream-broker",
|
|
39546
39707
|
capScope: "system",
|
|
@@ -41999,6 +42160,11 @@ Object.freeze({
|
|
|
41999
42160
|
form: "single",
|
|
42000
42161
|
optional: false
|
|
42001
42162
|
}],
|
|
42163
|
+
"streamBroker.forgetDeviceHardware": [{
|
|
42164
|
+
name: "deviceId",
|
|
42165
|
+
form: "single",
|
|
42166
|
+
optional: false
|
|
42167
|
+
}],
|
|
42002
42168
|
"streamBroker.getDeviceAudioMute": [{
|
|
42003
42169
|
name: "deviceId",
|
|
42004
42170
|
form: "single",
|