@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.
- package/dist/addon-runner.js +2 -2
- package/dist/addon-runner.mjs +2 -2
- 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 +349 -65
- package/dist/builtins/device-manager/device-manager.addon.mjs +349 -65
- package/dist/builtins/device-manager/device-meta-actions.d.ts +8 -19
- package/dist/builtins/device-manager/device-provider-context.d.ts +4 -0
- package/dist/builtins/device-manager/migrate-device.d.ts +47 -3
- package/dist/builtins/device-manager/migrate-guard.d.ts +39 -0
- package/dist/builtins/device-manager/migrate-hardware-state.d.ts +24 -0
- package/dist/builtins/device-manager/migrate-reload.d.ts +8 -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-DbnNk4Lw.mjs} +211 -2
- package/dist/{dist-C7qWwrK1.js → dist-whe0b4_3.js} +211 -2
- 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-CMOGc5nC.mjs → manifest-system-deps-DOcMuUWK.mjs} +1 -1
- package/dist/{manifest-system-deps-PAIfmNun.js → manifest-system-deps-y5vZBO6q.js} +1 -1
- package/dist/{retired-settings-keys-3soU9pfP.js → retired-settings-keys-BdvmiaK7.js} +1 -1
- package/dist/{retired-settings-keys-CnbKAxmX.mjs → retired-settings-keys-CyQG8b-A.mjs} +1 -1
- package/package.json +1 -1
package/dist/addon-runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_manifest_system_deps = require("./manifest-system-deps-
|
|
2
|
+
const require_manifest_system_deps = require("./manifest-system-deps-y5vZBO6q.js");
|
|
3
3
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -317,7 +317,7 @@ async function runWorkerDeviceRestoreWithRetry(addon, context, addonId, sourceNo
|
|
|
317
317
|
};
|
|
318
318
|
}));
|
|
319
319
|
await restoreFn.call(addon, savedDevices);
|
|
320
|
-
log?.info?.(`[worker-restore] "${addonId}":
|
|
320
|
+
log?.info?.(`[worker-restore] "${addonId}": restore pass complete for ${savedDevices.length} persisted device(s)`);
|
|
321
321
|
} catch (err) {
|
|
322
322
|
log?.warn?.(`[worker-restore] "${addonId}": restoreDevices threw: ${(0, _camstack_types_addon.errMsg)(err)}`);
|
|
323
323
|
}
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as createUdsLoggerWithControl, Ft as RUNNER_RSS_BUDGET_ENV, Jt as startRunnerHeapWatch, Qt as emitHeapDiagnosticReport, a as createUdsAddonContext, bt as resolveAddonClass, it as setWorkerNativeCapsChangeListener, j as LocalChildClient, n as installManifestPythonDeps, nt as getWorkerNativeCapSnapshot, ot as validateProviderRegistrations, t as installManifestSystemDeps, tt as getWorkerNativeCapProvider, yt as installManifestNativeDeps } from "./manifest-system-deps-
|
|
1
|
+
import { A as createUdsLoggerWithControl, Ft as RUNNER_RSS_BUDGET_ENV, Jt as startRunnerHeapWatch, Qt as emitHeapDiagnosticReport, a as createUdsAddonContext, bt as resolveAddonClass, it as setWorkerNativeCapsChangeListener, j as LocalChildClient, n as installManifestPythonDeps, nt as getWorkerNativeCapSnapshot, ot as validateProviderRegistrations, t as installManifestSystemDeps, tt as getWorkerNativeCapProvider, yt as installManifestNativeDeps } from "./manifest-system-deps-DOcMuUWK.mjs";
|
|
2
2
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
3
3
|
import { register } from "node:module";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -314,7 +314,7 @@ async function runWorkerDeviceRestoreWithRetry(addon, context, addonId, sourceNo
|
|
|
314
314
|
};
|
|
315
315
|
}));
|
|
316
316
|
await restoreFn.call(addon, savedDevices);
|
|
317
|
-
log?.info?.(`[worker-restore] "${addonId}":
|
|
317
|
+
log?.info?.(`[worker-restore] "${addonId}": restore pass complete for ${savedDevices.length} persisted device(s)`);
|
|
318
318
|
} catch (err) {
|
|
319
319
|
log?.warn?.(`[worker-restore] "${addonId}": restoreDevices threw: ${errMsg(err)}`);
|
|
320
320
|
}
|
|
@@ -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-whe0b4_3.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as addonPagesCapability, Ft as BaseAddon, Pt as errMsg, sn as EventCategory } from "../../dist-
|
|
1
|
+
import { E as addonPagesCapability, Ft as BaseAddon, Pt as errMsg, sn as EventCategory } from "../../dist-DbnNk4Lw.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
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-
|
|
6
|
+
const require_dist = require("../../dist-whe0b4_3.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, O as addonWidgetsCapability, Pt as errMsg, sn as EventCategory } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, O as addonWidgetsCapability, Pt as errMsg, sn as EventCategory } from "../../dist-DbnNk4Lw.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
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
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-whe0b4_3.js");
|
|
7
7
|
//#region src/builtins/alerts/prune-policy.ts
|
|
8
8
|
/**
|
|
9
9
|
* Ids older than `cutoffMs`, oldest first.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, k as alertsCapability, n as AlertSchema, sn as EventCategory } from "../../dist-
|
|
1
|
+
import { Ft as BaseAddon, Jt as createEvent, Pt as errMsg, k as alertsCapability, n as AlertSchema, sn as EventCategory } from "../../dist-DbnNk4Lw.mjs";
|
|
2
2
|
//#region src/builtins/alerts/prune-policy.ts
|
|
3
3
|
/**
|
|
4
4
|
* Ids older than `cutoffMs`, oldest first.
|
|
@@ -7,10 +7,12 @@ export declare class BackupOrchestratorAddon extends BaseAddon<Record<string, ne
|
|
|
7
7
|
/**
|
|
8
8
|
* Transient build buffer for archive fan-out. The tar is built here
|
|
9
9
|
* ONCE, streamed to every destination via the storage cap's chunked
|
|
10
|
-
* upload, then removed. Lives
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* upload, then removed. Lives at `<nodeDataDir>/backup-staging` —
|
|
11
|
+
* OUTSIDE every backed-up location, so a backup can never contain a
|
|
12
|
+
* backup (the old `ctx.dataDir/staging` sat inside `addons-data` and
|
|
13
|
+
* compounded 175M → 4.5G before Jul 28), and distinct from
|
|
14
|
+
* `<nodeDataDir>/backups` where the default `backups` destination
|
|
15
|
+
* seeds when `CAMSTACK_BACKUP_ROOT` is unset. See staging-paths.ts.
|
|
14
16
|
*/
|
|
15
17
|
private stagingDir;
|
|
16
18
|
private scheduleTimer;
|
|
@@ -22,6 +24,15 @@ export declare class BackupOrchestratorAddon extends BaseAddon<Record<string, ne
|
|
|
22
24
|
*/
|
|
23
25
|
private scheduleBaselineAt;
|
|
24
26
|
private readonly manifestLock;
|
|
27
|
+
/**
|
|
28
|
+
* Global execution queue — at most ONE archive build at a time,
|
|
29
|
+
* cluster-node-wide (D342). Replaces the earlier invisible
|
|
30
|
+
* single-flight `buildLock`: same serialisation guarantee (two
|
|
31
|
+
* schedules due one tick apart built 8.2 GB + 3.7 GB side by side on
|
|
32
|
+
* the hub, 2026-09-04), but every run is now observable via
|
|
33
|
+
* `listRuns`, joinable when identical, and cancellable mid-stream.
|
|
34
|
+
*/
|
|
35
|
+
private runQueue;
|
|
25
36
|
constructor();
|
|
26
37
|
protected onInitialize(): Promise<ProviderRegistration[]>;
|
|
27
38
|
protected onShutdown(): Promise<void>;
|
|
@@ -59,14 +70,49 @@ export declare class BackupOrchestratorAddon extends BaseAddon<Record<string, ne
|
|
|
59
70
|
private aggregatedList;
|
|
60
71
|
private stagingPath;
|
|
61
72
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
73
|
+
* Boot-time staging hygiene. Sweeps the staging dir (sparing an
|
|
74
|
+
* archive a pending-restore marker references — the boot hook has
|
|
75
|
+
* not consumed it yet), then reports — without touching — the LEGACY
|
|
76
|
+
* staging dir inside `addons-data`, where pre-move leaks live. The
|
|
77
|
+
* legacy dir held 5.1 GB on the hub; deleting operator-visible
|
|
78
|
+
* gigabytes silently is not this addon's call, so it warns with the
|
|
79
|
+
* footprint instead.
|
|
80
|
+
*/
|
|
81
|
+
private cleanStagingArea;
|
|
82
|
+
/**
|
|
83
|
+
* Trigger a backup run through the global execution queue (D342):
|
|
84
|
+
* at most one archive build at a time, a trigger that arrives while
|
|
85
|
+
* one is in flight WAITS (or joins an identical queued run), and the
|
|
86
|
+
* result says which happened. The call still resolves when the run
|
|
87
|
+
* terminates; a cancelled run resolves with `cancelled: true` and
|
|
88
|
+
* whatever entries landed before the stop — a deliberate operator
|
|
89
|
+
* cancel is an outcome, not an error.
|
|
68
90
|
*/
|
|
69
91
|
private triggerBackup;
|
|
92
|
+
/** Wire `backup.listRuns` — queued + active + bounded history. */
|
|
93
|
+
private listRuns;
|
|
94
|
+
/**
|
|
95
|
+
* Wire `backup.cancel`. Delegates to the queue: a queued run is
|
|
96
|
+
* removed before it starts; the running run's abort signal fires and
|
|
97
|
+
* `runBackupBuild` stops the tar/upload streams and deletes its
|
|
98
|
+
* staging archive on the way out.
|
|
99
|
+
*/
|
|
100
|
+
private cancelRun;
|
|
101
|
+
/**
|
|
102
|
+
* Execute ONE backup run — only ever called by the queue, never
|
|
103
|
+
* directly (the queue is the single serialisation authority).
|
|
104
|
+
* Builds the archive in the private staging dir, then pushes it to
|
|
105
|
+
* every selected destination via the storage cap's chunked upload
|
|
106
|
+
* protocol. Per-destination errors are logged and recorded on the
|
|
107
|
+
* run — one bad sink doesn't kill the run.
|
|
108
|
+
*
|
|
109
|
+
* Cleanup contract (D342): the staging file is deleted in `finally`,
|
|
110
|
+
* which covers success, per-destination failure, build failure AND
|
|
111
|
+
* cancellation alike. The only leak this cannot cover — the process
|
|
112
|
+
* dying inside the run — is reclaimed by the boot sweep in
|
|
113
|
+
* `cleanStagingArea`.
|
|
114
|
+
*/
|
|
115
|
+
private runBackupBuild;
|
|
70
116
|
/**
|
|
71
117
|
* Push the staged archive to a single destination via chunked
|
|
72
118
|
* upload, then update the per-location manifest. Applies the
|