@camstack/system 1.2.458 → 1.2.460
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 +26 -11
- package/dist/addon-runner.mjs +26 -11
- package/dist/addon-utils.mjs +1 -1
- package/dist/{agent-https-DOELEug8.js → agent-https-Dnr_nIVx.js} +3 -723
- package/dist/{agent-https-CQA3W-3e.mjs → agent-https-Iw3RSQup.mjs} +4 -616
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/dist/builtins/alerts/alerts.addon.js +5 -7
- package/dist/builtins/alerts/alerts.addon.mjs +5 -7
- package/dist/builtins/alerts/record-kinds.d.ts +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +242 -4
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +243 -5
- package/dist/builtins/calendars/calendars.addon.js +2 -10
- package/dist/builtins/calendars/calendars.addon.mjs +2 -3
- package/dist/builtins/calendars/record-kinds.d.ts +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- 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 +4 -6
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +4 -6
- package/dist/builtins/device-history/device-history.addon.js +1 -1
- package/dist/builtins/device-history/device-history.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -4
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -4
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +41 -43
- package/dist/builtins/keychain/index.mjs +41 -43
- 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 +24 -40
- package/dist/builtins/local-auth/local-auth.addon.mjs +27 -43
- 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/native-metrics.addon.js +39 -4
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +48 -13
- package/dist/builtins/native-metrics/node-metrics-history-recorder.d.ts +16 -2
- package/dist/builtins/platform-probe/coral-accelerators.d.ts +10 -1
- package/dist/builtins/platform-probe/index.js +7 -4
- package/dist/builtins/platform-probe/index.mjs +13 -10
- package/dist/builtins/platform-probe/platform-scorer.d.ts +4 -1
- package/dist/builtins/record-entries/index.js +1 -1
- package/dist/builtins/record-entries/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/file-host-protocol.d.ts +0 -15
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +0 -44
- package/dist/builtins/sqlite-storage/records/records-catalog.d.ts +0 -2
- package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +0 -21
- package/dist/builtins/sqlite-storage/records/records-engine.d.ts +3 -20
- package/dist/builtins/sqlite-storage/records/records-plan.d.ts +9 -4
- package/dist/builtins/sqlite-storage/records/records-provider.d.ts +4 -18
- package/dist/builtins/sqlite-storage/records/records-sql.d.ts +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +0 -17
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +21 -196
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +21 -196
- package/dist/builtins/sqlite-storage/storage-admin-provider.d.ts +6 -14
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +2 -2
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +7 -9
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +7 -9
- package/dist/builtins/system-config/system-config.addon.js +667 -40
- package/dist/builtins/system-config/system-config.addon.mjs +737 -127
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-BVguN7VV.mjs → composition-sources-DNRZWR1j.mjs} +1 -1
- package/dist/{composition-sources-DURQNDJ4.js → composition-sources-b0e_2I-D.js} +1 -1
- package/dist/{constants-Njka8Cv6.js → constants-6OeJiZgi.js} +1 -1
- package/dist/{constants-FGjnsE2x.mjs → constants-BnkOdj9Q.mjs} +1 -1
- package/dist/{coral-accelerators-DcnZvctM.mjs → coral-accelerators-Qhn5TOYZ.mjs} +18 -15
- package/dist/{coral-accelerators-Bi_c3Rft.js → coral-accelerators-oUXmmbc2.js} +13 -10
- package/dist/{custom-action-registry-stpC3Zy-.mjs → custom-action-registry-DStvrQKI.mjs} +37 -37
- package/dist/{device-ca-lEaAQ9Xi.mjs → device-ca-Bnkw8GyU.mjs} +1 -1
- package/dist/{device-ca-BrVK_5s3.js → device-ca-CPTDs--d.js} +1 -1
- package/dist/{dist-BZQjLPiz.js → dist-Bn-RNanh.js} +29 -130
- package/dist/{dist-B_GRPhnY.mjs → dist-Wy8cTxg6.mjs} +30 -113
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-Bg2HfTwP.mjs → hub-mdns-ciao-CJu0nhla.mjs} +2 -2
- package/dist/{hub-mdns-ciao-nce3TXs_.js → hub-mdns-ciao-CTBTlia4.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +56 -31
- package/dist/index.mjs +257 -233
- package/dist/kernel/deps/addon-deps-manager.d.ts +9 -0
- package/dist/{restore-archive-C7kLDI_0.mjs → restore-archive-CM23Pq9B.mjs} +177 -424
- package/dist/{restore-archive-FyfZ8YMC.js → restore-archive-DM1OBYq4.js} +89 -342
- package/dist/{wal-maintenance-Duejh7Lx.mjs → wal-maintenance-Bj_MmDkr.mjs} +0 -0
- package/dist/{wal-maintenance-DfSIOj24.js → wal-maintenance-CaJjuLHq.js} +0 -0
- package/package.json +1 -1
- package/dist/builtins/records/legacy-table-row-count.d.ts +0 -5
- package/dist/builtins/records/phase6-declare-gate.d.ts +0 -28
- package/dist/builtins/sqlite-storage/records/count-settings-array-legacy.d.ts +0 -5
- package/dist/builtins/sqlite-storage/records/count-settings-brokers-legacy.d.ts +0 -6
- package/dist/phase6-declare-gate-Dag1_WR2.js +0 -98
- package/dist/phase6-declare-gate-Lb-mrVvz.mjs +0 -93
package/dist/addon-runner.js
CHANGED
|
@@ -39,9 +39,9 @@ let node_vm = require("node:vm");
|
|
|
39
39
|
node_vm = __toESM(node_vm);
|
|
40
40
|
let node_fs_promises = require("node:fs/promises");
|
|
41
41
|
let _trpc_client = require("@trpc/client");
|
|
42
|
+
let _camstack_types_node = require("@camstack/types/node");
|
|
42
43
|
let node_http = require("node:http");
|
|
43
44
|
let node_events = require("node:events");
|
|
44
|
-
let _camstack_types_node = require("@camstack/types/node");
|
|
45
45
|
let node_module = require("node:module");
|
|
46
46
|
let node_url = require("node:url");
|
|
47
47
|
//#region src/kernel/addon-refused-error.ts
|
|
@@ -7885,13 +7885,13 @@ var CORAL_PCI_VENDOR = "0x1ac1";
|
|
|
7885
7885
|
var CORAL_PCI_DEVICE = "0x089a";
|
|
7886
7886
|
/** A unit the apex driver bound: `/sys/class/apex/apex_<N>` ↔ `/dev/apex_<N>`. */
|
|
7887
7887
|
var APEX_ENTRY = /^apex_(\d+)$/;
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7888
|
+
function currentDelegateHost() {
|
|
7889
|
+
return {
|
|
7890
|
+
platform: process.platform,
|
|
7891
|
+
dataDir: (0, _camstack_types_node.nodeDataRootFromEnv)(process.env),
|
|
7892
|
+
override: process.env[_camstack_types_node.EDGETPU_LIB_ENV]
|
|
7893
|
+
};
|
|
7894
|
+
}
|
|
7895
7895
|
function countUsbCorals(fsx) {
|
|
7896
7896
|
let count = 0;
|
|
7897
7897
|
for (const device of fsx.listUsbDevices()) {
|
|
@@ -7946,7 +7946,7 @@ function classifyPci(fsx) {
|
|
|
7946
7946
|
* Returns `null` only when no Coral was found at all; a present-but-unusable
|
|
7947
7947
|
* Coral is reported with its typed reason, never as absent (D393/D315).
|
|
7948
7948
|
*/
|
|
7949
|
-
function classifyCoralAccelerator(fsx) {
|
|
7949
|
+
function classifyCoralAccelerator(fsx, delegateHost = currentDelegateHost()) {
|
|
7950
7950
|
const usb = countUsbCorals(fsx);
|
|
7951
7951
|
const pci = classifyPci(fsx);
|
|
7952
7952
|
const units = [];
|
|
@@ -7977,8 +7977,10 @@ function classifyCoralAccelerator(fsx) {
|
|
|
7977
7977
|
type: "coral-edgetpu",
|
|
7978
7978
|
units
|
|
7979
7979
|
};
|
|
7980
|
-
|
|
7981
|
-
|
|
7980
|
+
if ((0, _camstack_types_node.chooseEdgetpuDelegate)({
|
|
7981
|
+
...delegateHost,
|
|
7982
|
+
exists: (p) => fsx.exists(p)
|
|
7983
|
+
}) !== null) return {
|
|
7982
7984
|
type: "coral-edgetpu",
|
|
7983
7985
|
units: [{
|
|
7984
7986
|
bus: "usb",
|
|
@@ -8987,6 +8989,19 @@ var AddonDepsManager = class {
|
|
|
8987
8989
|
const pythonPath = await this.ensurePython();
|
|
8988
8990
|
if (!pythonPath) throw new Error("Cannot install Python requirements: Python is not available");
|
|
8989
8991
|
await singleFlight(this.depsDir, "python-pip", () => (0, _camstack_types_node.installPythonRequirements)(pythonPath, requirementsFile, this.logger));
|
|
8992
|
+
await this.stageNativeDepsDeclaredBy(requirementsFile);
|
|
8993
|
+
}
|
|
8994
|
+
/**
|
|
8995
|
+
* The native library a requirements file says its packages need
|
|
8996
|
+
* (`# camstack-native-dep: edgetpu-delegate`), staged under this node's
|
|
8997
|
+
* deps dir. Runs on every call — not only the first pip install — so a
|
|
8998
|
+
* node whose pip marker predates the line still gets the library. A
|
|
8999
|
+
* platform without a build answers `unavailable` (logged, not thrown); a
|
|
9000
|
+
* failed or tampered download throws, and provisioning reports it.
|
|
9001
|
+
*/
|
|
9002
|
+
async stageNativeDepsDeclaredBy(requirementsFile) {
|
|
9003
|
+
if (!(0, _camstack_types_node.declaresEdgetpuDelegate)(node_fs.readFileSync(requirementsFile, "utf8"))) return;
|
|
9004
|
+
await singleFlight(this.depsDir, "edgetpu-delegate", () => (0, _camstack_types_node.ensureEdgetpuDelegate)(this.nodeRoot, this.logger));
|
|
8990
9005
|
}
|
|
8991
9006
|
getDepsDir() {
|
|
8992
9007
|
return this.depsDir;
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -16,9 +16,9 @@ import { monitorEventLoopDelay } from "node:perf_hooks";
|
|
|
16
16
|
import * as vm from "node:vm";
|
|
17
17
|
import { mkdir, rm, stat, unlink } from "node:fs/promises";
|
|
18
18
|
import { TRPCClientError, createTRPCClient } from "@trpc/client";
|
|
19
|
+
import { EDGETPU_LIB_ENV, chooseEdgetpuDelegate, declaresEdgetpuDelegate, ensureBinary, ensureEdgetpuDelegate, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements, nodeDataRootFromEnv } from "@camstack/types/node";
|
|
19
20
|
import { createServer as createServer$1, request } from "node:http";
|
|
20
21
|
import { once } from "node:events";
|
|
21
|
-
import { ensureBinary, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
22
22
|
import { pathToFileURL } from "node:url";
|
|
23
23
|
//#region src/kernel/addon-refused-error.ts
|
|
24
24
|
/**
|
|
@@ -7861,13 +7861,13 @@ var CORAL_PCI_VENDOR = "0x1ac1";
|
|
|
7861
7861
|
var CORAL_PCI_DEVICE = "0x089a";
|
|
7862
7862
|
/** A unit the apex driver bound: `/sys/class/apex/apex_<N>` ↔ `/dev/apex_<N>`. */
|
|
7863
7863
|
var APEX_ENTRY = /^apex_(\d+)$/;
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7864
|
+
function currentDelegateHost() {
|
|
7865
|
+
return {
|
|
7866
|
+
platform: process.platform,
|
|
7867
|
+
dataDir: nodeDataRootFromEnv(process.env),
|
|
7868
|
+
override: process.env[EDGETPU_LIB_ENV]
|
|
7869
|
+
};
|
|
7870
|
+
}
|
|
7871
7871
|
function countUsbCorals(fsx) {
|
|
7872
7872
|
let count = 0;
|
|
7873
7873
|
for (const device of fsx.listUsbDevices()) {
|
|
@@ -7922,7 +7922,7 @@ function classifyPci(fsx) {
|
|
|
7922
7922
|
* Returns `null` only when no Coral was found at all; a present-but-unusable
|
|
7923
7923
|
* Coral is reported with its typed reason, never as absent (D393/D315).
|
|
7924
7924
|
*/
|
|
7925
|
-
function classifyCoralAccelerator(fsx) {
|
|
7925
|
+
function classifyCoralAccelerator(fsx, delegateHost = currentDelegateHost()) {
|
|
7926
7926
|
const usb = countUsbCorals(fsx);
|
|
7927
7927
|
const pci = classifyPci(fsx);
|
|
7928
7928
|
const units = [];
|
|
@@ -7953,8 +7953,10 @@ function classifyCoralAccelerator(fsx) {
|
|
|
7953
7953
|
type: "coral-edgetpu",
|
|
7954
7954
|
units
|
|
7955
7955
|
};
|
|
7956
|
-
|
|
7957
|
-
|
|
7956
|
+
if (chooseEdgetpuDelegate({
|
|
7957
|
+
...delegateHost,
|
|
7958
|
+
exists: (p) => fsx.exists(p)
|
|
7959
|
+
}) !== null) return {
|
|
7958
7960
|
type: "coral-edgetpu",
|
|
7959
7961
|
units: [{
|
|
7960
7962
|
bus: "usb",
|
|
@@ -8963,6 +8965,19 @@ var AddonDepsManager = class {
|
|
|
8963
8965
|
const pythonPath = await this.ensurePython();
|
|
8964
8966
|
if (!pythonPath) throw new Error("Cannot install Python requirements: Python is not available");
|
|
8965
8967
|
await singleFlight(this.depsDir, "python-pip", () => installPythonRequirements(pythonPath, requirementsFile, this.logger));
|
|
8968
|
+
await this.stageNativeDepsDeclaredBy(requirementsFile);
|
|
8969
|
+
}
|
|
8970
|
+
/**
|
|
8971
|
+
* The native library a requirements file says its packages need
|
|
8972
|
+
* (`# camstack-native-dep: edgetpu-delegate`), staged under this node's
|
|
8973
|
+
* deps dir. Runs on every call — not only the first pip install — so a
|
|
8974
|
+
* node whose pip marker predates the line still gets the library. A
|
|
8975
|
+
* platform without a build answers `unavailable` (logged, not thrown); a
|
|
8976
|
+
* failed or tampered download throws, and provisioning reports it.
|
|
8977
|
+
*/
|
|
8978
|
+
async stageNativeDepsDeclaredBy(requirementsFile) {
|
|
8979
|
+
if (!declaresEdgetpuDelegate(fs$1.readFileSync(requirementsFile, "utf8"))) return;
|
|
8980
|
+
await singleFlight(this.depsDir, "edgetpu-delegate", () => ensureEdgetpuDelegate(this.nodeRoot, this.logger));
|
|
8966
8981
|
}
|
|
8967
8982
|
getDepsDir() {
|
|
8968
8983
|
return this.depsDir;
|
package/dist/addon-utils.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-
|
|
1
|
+
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-DStvrQKI.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg, t as COURTESY_DEFAULT_WIDTH } from "./snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
export { COURTESY_DEFAULT_WIDTH, CustomActionRegistry, ModelDownloadHttpError, ModelDownloadService, STALL_REPORT_MS, STALL_TICK_MS, adoptModelRevisions, attributeStall, collectModelFiles, contentTypeFor, courtesyCacheKey, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloadHttpError, isModelDownloaded, parseRangeHeader, renderCourtesyJpeg, renderCourtesyOverlayJpeg, resolveFormatRevision, startEventLoopStallMonitor };
|