@camstack/system 1.2.7 → 1.2.9
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 +6 -6
- package/dist/addon-runner.mjs +6 -6
- package/dist/addon-utils.js +1 -1
- package/dist/addon-utils.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.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- 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/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/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 +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +12 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +48 -7
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +48 -7
- package/dist/builtins/storage-orchestrator/storage-pressure-manager.d.ts +27 -0
- 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/{custom-action-registry-BEXwC-oo.mjs → custom-action-registry-F__gp_VX.mjs} +1 -1
- package/dist/{custom-action-registry-vLYEFTtv.js → custom-action-registry-jY0NOZK8.js} +1 -1
- package/dist/{dist-CfcmjXSI.mjs → dist-CVCNYn7D.mjs} +1246 -732
- package/dist/{dist-DEkwmyIj.js → dist-SI-yNpKE.js} +1246 -732
- package/dist/index.js +57 -7
- package/dist/index.mjs +57 -7
- package/dist/kernel/cap-router-builder.d.ts +18 -1
- package/dist/kernel/custom-action-registry.d.ts +3 -3
- package/dist/kernel/transport/child-cap-protocol.d.ts +11 -1
- package/dist/{manifest-python-deps-DIrBiAMS.js → manifest-python-deps-CEwMAaKZ.js} +5 -3
- package/dist/{manifest-python-deps-QqIGHGMJ.mjs → manifest-python-deps-DyEweBkB.mjs} +5 -3
- package/package.json +1 -1
|
@@ -28,11 +28,38 @@ export interface PressureManagerDeps {
|
|
|
28
28
|
readonly maxRounds?: number;
|
|
29
29
|
/** Extra headroom % freed beyond the threshold to avoid re-breaching immediately (default 1). */
|
|
30
30
|
readonly hysteresisPercent?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Optional: map a locationId to a stable key identifying its PHYSICAL storage
|
|
33
|
+
* device — the `realpath` of the location's `basePath`, so aliases (symlinks /
|
|
34
|
+
* bind-mounts) and same-root managed locations (`recordings:default` +
|
|
35
|
+
* `recordingsLow:default`, both at `/recordings`) share one key.
|
|
36
|
+
*
|
|
37
|
+
* Powers an in-sweep dedup: once a physical device has actually been RELIEVED
|
|
38
|
+
* this sweep, other locations resolving to the SAME device are skipped for the
|
|
39
|
+
* rest of the tick. This closes a bounded OVER-eviction window — after the
|
|
40
|
+
* first alias frees the shared disk, a second alias re-reading not-yet-settled
|
|
41
|
+
* `statfs` free% (lazy fs accounting, open fds) could see it still breached and
|
|
42
|
+
* evict the oldest footage a second time. A fresh sweep on the next timer tick
|
|
43
|
+
* re-checks the settled free% and finishes any genuinely-residual pressure, so
|
|
44
|
+
* skipping can only ever DEFER relief (self-correcting), never over-delete.
|
|
45
|
+
*
|
|
46
|
+
* Omitted, or returning `null`, → no dedup (each location relieved
|
|
47
|
+
* independently), preserving prior single-disk behaviour.
|
|
48
|
+
*/
|
|
49
|
+
readonly getLocationDeviceKey?: (locationId: string) => Promise<string | null>;
|
|
31
50
|
}
|
|
32
51
|
export declare class StoragePressureManager {
|
|
33
52
|
private readonly deps;
|
|
34
53
|
constructor(deps: PressureManagerDeps);
|
|
35
54
|
/** Relieve every managed location currently under its threshold. */
|
|
36
55
|
sweep(): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Relieve one location until it recovers, nothing is evictable, or a round
|
|
58
|
+
* makes no progress. Returns `true` when at least one relief round actually
|
|
59
|
+
* reclaimed bytes (so the caller marks the location's physical device relieved
|
|
60
|
+
* for this sweep — the trigger for the over-eviction dedup: freed bytes mean a
|
|
61
|
+
* sibling alias may re-read a not-yet-settled `statfs`), `false` when nothing
|
|
62
|
+
* was freed (never breached, or breached with no evictable data).
|
|
63
|
+
*/
|
|
37
64
|
private relieveLocation;
|
|
38
65
|
}
|
|
@@ -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-SI-yNpKE.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 { St as hydrateSchema, at as BaseAddon, it as errMsg } from "../../dist-
|
|
1
|
+
import { St as hydrateSchema, at as BaseAddon, it as errMsg } from "../../dist-CVCNYn7D.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-SI-yNpKE.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 { R as logDestinationCapability, at as BaseAddon } from "../../dist-
|
|
1
|
+
import { R as logDestinationCapability, at as BaseAddon } from "../../dist-CVCNYn7D.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";
|
|
@@ -16,7 +16,7 @@ var CustomActionRegistry = class {
|
|
|
16
16
|
if (scope.kind !== "system") throw new Error(`custom action '${addonId}.${name}' declared scope '${scope.kind}' — not yet implemented`);
|
|
17
17
|
actions.set(name, {
|
|
18
18
|
spec,
|
|
19
|
-
handler: (input) => handler(name, input)
|
|
19
|
+
handler: (input, caller) => handler(name, input, caller)
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
this.byAddon.set(addonId, actions);
|
|
@@ -16,7 +16,7 @@ var CustomActionRegistry = class {
|
|
|
16
16
|
if (scope.kind !== "system") throw new Error(`custom action '${addonId}.${name}' declared scope '${scope.kind}' — not yet implemented`);
|
|
17
17
|
actions.set(name, {
|
|
18
18
|
spec,
|
|
19
|
-
handler: (input) => handler(name, input)
|
|
19
|
+
handler: (input, caller) => handler(name, input, caller)
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
this.byAddon.set(addonId, actions);
|