@camstack/system 1.2.217 → 1.2.219
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 +9 -6
- package/dist/addon-runner.mjs +9 -6
- package/dist/addon-utils.js +2 -2
- package/dist/addon-utils.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.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/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 +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- 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 +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/gpu-probe.d.ts +18 -0
- package/dist/builtins/native-metrics/native-metrics-provider.d.ts +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.d.ts +24 -8
- package/dist/builtins/native-metrics/native-metrics.addon.js +1318 -1098
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1318 -1101
- package/dist/builtins/native-metrics/proc-process-table.d.ts +25 -0
- package/dist/builtins/platform-probe/index.js +3 -3
- package/dist/builtins/platform-probe/index.mjs +3 -3
- 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-pragmas.d.ts +23 -0
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +1 -0
- 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/sqlite-storage/wal-checkpoint-policy.d.ts +115 -0
- package/dist/builtins/sqlite-storage/wal-checkpoint-worker.d.ts +1 -0
- package/dist/builtins/sqlite-storage/wal-checkpointer.d.ts +70 -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-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-F__gp_VX.mjs → custom-action-registry-B6gOtUWA.mjs} +19 -0
- package/dist/{custom-action-registry-jY0NOZK8.js → custom-action-registry-DKWhaWL1.js} +19 -0
- package/dist/{dist-C85OOASj.js → dist-B17W9ngu.js} +118 -3
- package/dist/{dist-DtDKMSeG.mjs → dist-Cyz5_i7z.mjs} +113 -4
- package/dist/index.d.ts +9 -2
- package/dist/index.js +39 -36
- package/dist/index.mjs +23 -38
- package/dist/kernel/array-buffer-census.d.ts +122 -0
- package/dist/kernel/custom-action-registry.d.ts +10 -1
- package/dist/kernel/heap-watch.d.ts +39 -1
- package/dist/kernel/moleculer/mesh-queue-report.d.ts +51 -0
- package/dist/kernel/outbound-queue-watch.d.ts +94 -0
- package/dist/kernel/socket-plane-report.d.ts +75 -4
- package/dist/kernel/transport/cap-routing-hints.d.ts +21 -0
- package/dist/kernel/transport/child-cap-protocol.d.ts +43 -3
- package/dist/kernel/transport/frame-codec.d.ts +49 -0
- package/dist/kernel/transport/local-child-client.d.ts +25 -2
- package/dist/kernel/transport/local-child-registry.d.ts +36 -1
- package/dist/kernel/transport/local-transport.d.ts +45 -2
- package/dist/kernel/transport/socket-channel.d.ts +19 -1
- package/dist/{manifest-system-deps-726RBOX7.mjs → manifest-system-deps-C7dihwWT.mjs} +1604 -788
- package/dist/{manifest-system-deps-DvY1bY_n.js → manifest-system-deps-g_nK0xsF.js} +1607 -683
- package/dist/process/proc-stat.d.ts +75 -0
- package/dist/process/resource-monitor.d.ts +9 -1
- package/dist/{resource-monitor-CdnzxBLP.js → resource-monitor-LVE1BoLs.js} +42 -23
- package/dist/{resource-monitor-BWmQ5i-o.mjs → resource-monitor-Vp0bPV3U.mjs} +42 -22
- package/dist/{retired-settings-keys-Cx-lYIbU.mjs → retired-settings-keys-BCYUrdsA.mjs} +1 -1
- package/dist/{retired-settings-keys-Dfj9LA-i.js → retired-settings-keys-CjvB7Etx.js} +1 -1
- package/dist/wal-checkpoint-policy-CAcg63o-.mjs +92 -0
- package/dist/wal-checkpoint-policy-CCJZngds.js +127 -0
- package/dist/wal-checkpoint-worker.js +138 -0
- package/dist/wal-checkpoint-worker.mjs +137 -0
- package/package.json +1 -1
- package/dist/{event-loop-stall-monitor-DM9OAzy8.js → event-loop-stall-monitor-CAsHdMwP.js} +1 -1
- package/dist/{event-loop-stall-monitor-B3CFd9tM.mjs → event-loop-stall-monitor-GPrVvx14.mjs} +1 -1
- package/dist/{tls-DOTmtLCW.mjs → tls-2xbgg78V.mjs} +2 -2
- package/dist/{tls-BxQlomxd.js → tls-BFs4PzoW.js} +2 -2
package/dist/addon-runner.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_manifest_system_deps = require("./manifest-system-deps-
|
|
3
|
-
const require_custom_action_registry = require("./custom-action-registry-
|
|
2
|
+
const require_manifest_system_deps = require("./manifest-system-deps-g_nK0xsF.js");
|
|
3
|
+
const require_custom_action_registry = require("./custom-action-registry-DKWhaWL1.js");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_chunk.__toESM(node_path);
|
|
6
6
|
let node_fs = require("node:fs");
|
|
@@ -85,7 +85,10 @@ function createChildAddonCallDispatch(deps) {
|
|
|
85
85
|
if (typeof action !== "string" || action.length === 0) throw new Error(`child-addon-call: addon "${addonId}" custom call missing action name`);
|
|
86
86
|
const entry = deps.customActions.resolve(addonId, action);
|
|
87
87
|
if (entry === null) throw new Error(`child-addon-call: addon "${addonId}" has no custom action "${action}"`);
|
|
88
|
-
|
|
88
|
+
const parsedInput = entry.spec.input.safeParse(call.args);
|
|
89
|
+
if (!parsedInput.success) throw new Error(`child-addon-call: addon "${addonId}" custom action "${action}" rejected its input — ` + parsedInput.error.issues.map((issue) => `${issue.path.join(".") || "(root)"}: ${issue.message}`).join("; "));
|
|
90
|
+
const result = await entry.handler(parsedInput.data, call.caller);
|
|
91
|
+
return entry.spec.output.parse(result);
|
|
89
92
|
}
|
|
90
93
|
case "settings": {
|
|
91
94
|
const method = call.method;
|
|
@@ -584,9 +587,9 @@ async function main() {
|
|
|
584
587
|
runnerLog.info("UDS child transport connected", { meta: { childId: runnerId } });
|
|
585
588
|
if (storageProvider) runnerLog.info(`"${nodeId}" storage provider rooted at ${dataDir}`);
|
|
586
589
|
else runnerLog.warn(`"${nodeId}" failed to load FilesystemStorageProvider`, { meta: { error: (0, _camstack_types_addon.errMsg)(storageProviderError) } });
|
|
587
|
-
const refreshChildCaps = (reason) => {
|
|
590
|
+
const refreshChildCaps = (reason, customActions) => {
|
|
588
591
|
const freshDescriptors = buildChildCapDescriptors(runnerManifest, require_manifest_system_deps.getWorkerNativeCapSnapshot());
|
|
589
|
-
udsChildClient.updateCaps(freshDescriptors).catch((err) => {
|
|
592
|
+
udsChildClient.updateCaps(freshDescriptors, customActions).catch((err) => {
|
|
590
593
|
runnerLog.warn(`UDS updateCaps failed (${reason})`, { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
591
594
|
});
|
|
592
595
|
};
|
|
@@ -673,7 +676,7 @@ async function main() {
|
|
|
673
676
|
process.exit(1);
|
|
674
677
|
}
|
|
675
678
|
if (deviceRestorePromises.length > 0 && !shuttingDown) await Promise.allSettled(deviceRestorePromises);
|
|
676
|
-
refreshChildCaps("post-init");
|
|
679
|
+
refreshChildCaps("post-init", customActionRegistry.describeAll(specs.map((spec) => spec.addonId)));
|
|
677
680
|
let hubReachableFired = false;
|
|
678
681
|
const fireHubReachableOnce = () => {
|
|
679
682
|
if (hubReachableFired) return;
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as createUdsLoggerWithControl, Ft as RUNNER_RSS_BUDGET_ENV, Jt as startRunnerHeapWatch,
|
|
2
|
-
import { t as CustomActionRegistry } from "./custom-action-registry-
|
|
1
|
+
import { A as createUdsLoggerWithControl, Ft as RUNNER_RSS_BUDGET_ENV, Jt as startRunnerHeapWatch, L as LocalChildClient, a as createUdsAddonContext, bt as resolveAddonClass, it as setWorkerNativeCapsChangeListener, n as installManifestPythonDeps, nt as getWorkerNativeCapSnapshot, on as emitHeapDiagnosticReport, ot as validateProviderRegistrations, t as installManifestSystemDeps, tt as getWorkerNativeCapProvider, yt as installManifestNativeDeps } from "./manifest-system-deps-C7dihwWT.mjs";
|
|
2
|
+
import { t as CustomActionRegistry } from "./custom-action-registry-B6gOtUWA.mjs";
|
|
3
3
|
import { register } from "node:module";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
5
|
import * as fs from "node:fs";
|
|
@@ -82,7 +82,10 @@ function createChildAddonCallDispatch(deps) {
|
|
|
82
82
|
if (typeof action !== "string" || action.length === 0) throw new Error(`child-addon-call: addon "${addonId}" custom call missing action name`);
|
|
83
83
|
const entry = deps.customActions.resolve(addonId, action);
|
|
84
84
|
if (entry === null) throw new Error(`child-addon-call: addon "${addonId}" has no custom action "${action}"`);
|
|
85
|
-
|
|
85
|
+
const parsedInput = entry.spec.input.safeParse(call.args);
|
|
86
|
+
if (!parsedInput.success) throw new Error(`child-addon-call: addon "${addonId}" custom action "${action}" rejected its input — ` + parsedInput.error.issues.map((issue) => `${issue.path.join(".") || "(root)"}: ${issue.message}`).join("; "));
|
|
87
|
+
const result = await entry.handler(parsedInput.data, call.caller);
|
|
88
|
+
return entry.spec.output.parse(result);
|
|
86
89
|
}
|
|
87
90
|
case "settings": {
|
|
88
91
|
const method = call.method;
|
|
@@ -581,9 +584,9 @@ async function main() {
|
|
|
581
584
|
runnerLog.info("UDS child transport connected", { meta: { childId: runnerId } });
|
|
582
585
|
if (storageProvider) runnerLog.info(`"${nodeId}" storage provider rooted at ${dataDir}`);
|
|
583
586
|
else runnerLog.warn(`"${nodeId}" failed to load FilesystemStorageProvider`, { meta: { error: errMsg(storageProviderError) } });
|
|
584
|
-
const refreshChildCaps = (reason) => {
|
|
587
|
+
const refreshChildCaps = (reason, customActions) => {
|
|
585
588
|
const freshDescriptors = buildChildCapDescriptors(runnerManifest, getWorkerNativeCapSnapshot());
|
|
586
|
-
udsChildClient.updateCaps(freshDescriptors).catch((err) => {
|
|
589
|
+
udsChildClient.updateCaps(freshDescriptors, customActions).catch((err) => {
|
|
587
590
|
runnerLog.warn(`UDS updateCaps failed (${reason})`, { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
588
591
|
});
|
|
589
592
|
};
|
|
@@ -670,7 +673,7 @@ async function main() {
|
|
|
670
673
|
process.exit(1);
|
|
671
674
|
}
|
|
672
675
|
if (deviceRestorePromises.length > 0 && !shuttingDown) await Promise.allSettled(deviceRestorePromises);
|
|
673
|
-
refreshChildCaps("post-init");
|
|
676
|
+
refreshChildCaps("post-init", customActionRegistry.describeAll(specs.map((spec) => spec.addonId)));
|
|
674
677
|
let hubReachableFired = false;
|
|
675
678
|
const fireHubReachableOnce = () => {
|
|
676
679
|
if (hubReachableFired) return;
|
package/dist/addon-utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-
|
|
4
|
-
const require_custom_action_registry = require("./custom-action-registry-
|
|
3
|
+
const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-CAsHdMwP.js");
|
|
4
|
+
const require_custom_action_registry = require("./custom-action-registry-DKWhaWL1.js");
|
|
5
5
|
exports.CustomActionRegistry = require_custom_action_registry.CustomActionRegistry;
|
|
6
6
|
exports.ModelDownloadService = require_event_loop_stall_monitor.ModelDownloadService;
|
|
7
7
|
exports.STALL_REPORT_MS = require_event_loop_stall_monitor.STALL_REPORT_MS;
|
package/dist/addon-utils.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, f as collectModelFiles, g as ensureModel, i as startEventLoopStallMonitor, m as downloadFile, n as STALL_TICK_MS, o as contentTypeFor, p as deleteModelFromDisk, r as attributeStall, t as STALL_REPORT_MS, v as getModelFilePath, y as isModelDownloaded } from "./event-loop-stall-monitor-
|
|
2
|
-
import { t as CustomActionRegistry } from "./custom-action-registry-
|
|
1
|
+
import { a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, f as collectModelFiles, g as ensureModel, i as startEventLoopStallMonitor, m as downloadFile, n as STALL_TICK_MS, o as contentTypeFor, p as deleteModelFromDisk, r as attributeStall, t as STALL_REPORT_MS, v as getModelFilePath, y as isModelDownloaded } from "./event-loop-stall-monitor-GPrVvx14.mjs";
|
|
2
|
+
import { t as CustomActionRegistry } from "./custom-action-registry-B6gOtUWA.mjs";
|
|
3
3
|
export { CustomActionRegistry, ModelDownloadService, STALL_REPORT_MS, STALL_TICK_MS, attributeStall, collectModelFiles, contentTypeFor, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloaded, parseRangeHeader, startEventLoopStallMonitor };
|
|
@@ -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-B17W9ngu.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 { Jt as
|
|
1
|
+
import { Jt as errMsg, Yt as BaseAddon, k as addonPagesCapability, xn as EventCategory } from "../../dist-Cyz5_i7z.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-B17W9ngu.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 { Jt as
|
|
1
|
+
import { Jt as errMsg, Yt as BaseAddon, j as addonWidgetsCapability, xn as EventCategory } from "../../dist-Cyz5_i7z.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-B17W9ngu.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 { Jt as
|
|
1
|
+
import { Jt as errMsg, M as alertsCapability, Yt as BaseAddon, cn as createEvent, n as AlertSchema, xn as EventCategory } from "../../dist-Cyz5_i7z.mjs";
|
|
2
2
|
//#region src/builtins/alerts/prune-policy.ts
|
|
3
3
|
/**
|
|
4
4
|
* Ids older than `cutoffMs`, oldest first.
|
|
@@ -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-B17W9ngu.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let buffer = require("buffer");
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P as backupCapability, Vt as storageOccupancyCapability, Yt as BaseAddon, bt as mayWriteToLocation, xn as EventCategory } from "../../dist-Cyz5_i7z.mjs";
|
|
2
2
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
3
3
|
import { Buffer as Buffer$1 } from "buffer";
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
@@ -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-B17W9ngu.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Yt as BaseAddon, gt as logDestinationCapability } from "../../dist-Cyz5_i7z.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|
|
@@ -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-B17W9ngu.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
6
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as coreBlockIdFromAddonId, Jt as
|
|
1
|
+
import { B as coreBlockIdFromAddonId, Jt as errMsg, V as coreBlocksCapability, Yt as BaseAddon, c as CORE_BLOCK_ADDON_PREFIX, d as DeclaredDevices, l as CoreBlockSchema, s as CORE_BLOCKS_ADDON_ID, z as coreBlockAddonId } from "../../dist-Cyz5_i7z.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import * as fs from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_retired_settings_keys = require("../../retired-settings-keys-
|
|
6
|
+
const require_dist = require("../../dist-B17W9ngu.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-CjvB7Etx.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
10
10
|
//#region src/builtins/device-manager/adoption-job-engine.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as
|
|
2
|
-
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-
|
|
1
|
+
import { $t as DeviceFeature, At as resolveContainerPrimaryChild, Ct as normalizeUnit, J as deviceStatusCapability, Jt as errMsg, K as deviceManagerCapability, L as buildStreamParamsConfigSchema, Nt as runtimeStatePolicyFor, Q as enumerateSchemaFields, S as STREAM_PROFILE_META, Tt as parseStreamParamsFormPatch, Yt as BaseAddon, Z as enumerateItemArrayFields, a as CAMERA_SWITCH_ORDER, bn as sleep, en as DeviceRole, f as DeviceStatusSchema, in as WELL_KNOWN_TAB_MAP, o as CAP_NAMES_WITH_STATUS, pn as isDeviceConfigCap, q as deviceStateCapability, t as ALL_CAPABILITY_DEFINITIONS, tn as DeviceType, xn as EventCategory } from "../../dist-Cyz5_i7z.mjs";
|
|
2
|
+
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-BCYUrdsA.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
5
5
|
//#region src/builtins/device-manager/adoption-job-engine.ts
|
|
@@ -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-B17W9ngu.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 { F as bareAddonId,
|
|
1
|
+
import { $ as evaluateSensorEdge, F as bareAddonId, Jt as errMsg, Y as doorbellCapability, Yt as BaseAddon, b as SOURCE_DEVICE_TYPES, cn as createEvent, lt as isSameAddonId, tn as DeviceType, ut as isSourceCap, xn as EventCategory, y as SOURCE_CAPS } from "../../dist-Cyz5_i7z.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-
|
|
6
|
+
const require_dist = require("../../dist-B17W9ngu.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 {
|
|
1
|
+
import { Yt as BaseAddon, gt as logDestinationCapability } from "../../dist-Cyz5_i7z.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-B17W9ngu.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 { Jt as
|
|
1
|
+
import { Jt as errMsg, Yt as BaseAddon, cn as createEvent, v as RecordingStatusSchema, xn as EventCategory } from "../../dist-Cyz5_i7z.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-B17W9ngu.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 { C as ScopedTokenSchema,
|
|
2
|
+
import { C as ScopedTokenSchema, N as authProviderCapability, O as UserRecordSchema, Wt as userManagementCapability, Yt as BaseAddon, r as ApiKeyRecordSchema } from "../../dist-Cyz5_i7z.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,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
4
|
-
const require_tls = require("../../tls-
|
|
3
|
+
const require_dist = require("../../dist-B17W9ngu.js");
|
|
4
|
+
const require_tls = require("../../tls-BFs4PzoW.js");
|
|
5
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
6
|
let node_path = require("node:path");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
1
|
+
import { Yt as BaseAddon, ht as localNetworkCapability, xn as EventCategory } from "../../dist-Cyz5_i7z.mjs";
|
|
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-2xbgg78V.mjs";
|
|
3
3
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { readFileSync } 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-B17W9ngu.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 {
|
|
1
|
+
import { Yt as BaseAddon, gt as logDestinationCapability } from "../../dist-Cyz5_i7z.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
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MetricsGpuInfo } from '@camstack/types';
|
|
2
|
+
/** `access(path, X_OK)` — resolves when executable, rejects otherwise. */
|
|
3
|
+
export type AccessCheck = (path: string) => Promise<void>;
|
|
4
|
+
/**
|
|
5
|
+
* The first `PATH` entry under which `binary` is executable, or `null`.
|
|
6
|
+
* An empty or missing `PATH` asks nothing.
|
|
7
|
+
*/
|
|
8
|
+
export declare function findOnPath(binary: string, pathEnv: string | undefined, check?: AccessCheck): Promise<string | null>;
|
|
9
|
+
/** The two impure steps, injectable. */
|
|
10
|
+
export interface NvidiaProbeDeps {
|
|
11
|
+
readonly findOnPath: (binary: string) => Promise<string | null>;
|
|
12
|
+
readonly exec: (command: string, args: readonly string[]) => Promise<string>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* `nvidia-smi`'s one-line CSV as a `MetricsGpuInfo`, or `null` when the
|
|
16
|
+
* binary is absent, fails, or prints something else. Never throws.
|
|
17
|
+
*/
|
|
18
|
+
export declare function readNvidiaGpu(deps: NvidiaProbeDeps): Promise<MetricsGpuInfo | null>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DiskSpaceInfo, MemoryInfo, MetricsGpuInfo, PidResourceStats, SystemResourceSnapshot } from '@camstack/types';
|
|
2
2
|
interface SamplingDiagnostics {
|
|
3
3
|
warn(message: string, meta?: Record<string, unknown>): void;
|
|
4
4
|
}
|
|
@@ -132,7 +132,23 @@ export default class NativeMetricsAddon extends BaseAddon<NativeMetricsConfig> {
|
|
|
132
132
|
* agreeing on a value nobody chose.
|
|
133
133
|
*/
|
|
134
134
|
private applyLoadSeriesConfig;
|
|
135
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* (Re)arm the process-tree timer at the configured interval.
|
|
137
|
+
*
|
|
138
|
+
* The process-tree snapshot is FIXED-CADENCE, and its cadence is the
|
|
139
|
+
* operator's `loadSeriesCadenceSec` (5-60 s, 10 by default).
|
|
140
|
+
*
|
|
141
|
+
* It used to emit only ON A CHANGE, with a 60 s fallback heartbeat, and the
|
|
142
|
+
* dedup is gone rather than tuned. A conditional emit makes a hole in the
|
|
143
|
+
* series mean two different things — "nothing changed" and "nobody reported"
|
|
144
|
+
* — and telling those apart is the entire reason an operator opens this chart
|
|
145
|
+
* after a spike. Now a gap means exactly one thing.
|
|
146
|
+
*
|
|
147
|
+
* It is not free: the emit rate is deterministic, so the durable table's row
|
|
148
|
+
* count is too (nodes x processes / cadence, no discount for a quiet fleet).
|
|
149
|
+
* The measured cost of that is in `docs/architecture/load-ledger.md`, and it
|
|
150
|
+
* is why the retention default is six hours rather than three days.
|
|
151
|
+
*/
|
|
136
152
|
private startProcessSnapshotTimer;
|
|
137
153
|
protected onShutdown(): Promise<void>;
|
|
138
154
|
/**
|
|
@@ -149,7 +165,8 @@ export default class NativeMetricsAddon extends BaseAddon<NativeMetricsConfig> {
|
|
|
149
165
|
/**
|
|
150
166
|
* Emit one `metrics.node-processes-snapshot` for this node.
|
|
151
167
|
*
|
|
152
|
-
* Heavy — a full
|
|
168
|
+
* Heavy — a full process-table read (`/proc` on Linux, `ps -eo` elsewhere;
|
|
169
|
+
* `proc-process-table.ts`) plus a `$process.list` broker call — and
|
|
153
170
|
* UNCONDITIONAL. The change-detection that used to guard it is gone: with a
|
|
154
171
|
* fixed cadence a missing interval means exactly one thing, and that is the
|
|
155
172
|
* property an operator investigating a spike is actually looking for.
|
|
@@ -171,13 +188,12 @@ export default class NativeMetricsAddon extends BaseAddon<NativeMetricsConfig> {
|
|
|
171
188
|
*/
|
|
172
189
|
private listNodeProcesses;
|
|
173
190
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
191
|
+
* Every pid + command + resource stats on this node.
|
|
192
|
+
*
|
|
193
|
+
* From `/proc` on Linux — no fork. This used to be a `ps -eo` child on every
|
|
194
|
+
* tick, i.e. a synchronous `fork()` of hub-main at p50 91 ms (D441, D452).
|
|
195
|
+
* `ps` remains the source only on a platform without `/proc`.
|
|
179
196
|
*/
|
|
180
|
-
/** Raw `ps` scan returning every pid + command + resource stats. */
|
|
181
197
|
private runPs;
|
|
182
198
|
/**
|
|
183
199
|
* The knobs live HERE, on the document this addon already owns.
|