@camstack/system 1.1.49 → 1.1.50
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.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/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/coral-accelerators.d.ts +22 -0
- package/dist/builtins/platform-probe/index.js +67 -2
- package/dist/builtins/platform-probe/index.mjs +67 -2
- 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.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/{dist-8phgmJ6b.mjs → dist-CC3E-_3h.mjs} +153 -7
- package/dist/{dist-BDV1WKRg.js → dist-CQYo6Zp8.js} +164 -6
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +2 -0
- package/dist/{manifest-python-deps-B09I9ems.mjs → manifest-python-deps-DqATCsK0.mjs} +31 -4
- package/dist/{manifest-python-deps-DAA0ULwT.js → manifest-python-deps-Wy8dNJpr.js} +31 -4
- package/package.json +1 -1
package/dist/addon-runner.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
3
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
2
|
+
const require_dist = require("./dist-CQYo6Zp8.js");
|
|
3
|
+
const require_manifest_python_deps = require("./manifest-python-deps-Wy8dNJpr.js");
|
|
4
4
|
const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
|
|
5
5
|
let node_fs = require("node:fs");
|
|
6
6
|
node_fs = require_chunk.__toESM(node_fs);
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { F as createUdsLoggerWithControl, I as LocalChildClient, i as createUdsAddonContext, it as setWorkerNativeCapsChangeListener, nt as getWorkerNativeCapSnapshot, ot as validateProviderRegistrations, t as installManifestPythonDeps, tt as getWorkerNativeCapProvider, vt as installManifestNativeDeps, yt as resolveAddonClass } from "./manifest-python-deps-
|
|
1
|
+
import { A as isCollectionArrayMethod, t as ALL_CAPABILITY_DEFINITIONS } from "./dist-CC3E-_3h.mjs";
|
|
2
|
+
import { F as createUdsLoggerWithControl, I as LocalChildClient, i as createUdsAddonContext, it as setWorkerNativeCapsChangeListener, nt as getWorkerNativeCapSnapshot, ot as validateProviderRegistrations, t as installManifestPythonDeps, tt as getWorkerNativeCapProvider, vt as installManifestNativeDeps, yt as resolveAddonClass } from "./manifest-python-deps-DqATCsK0.mjs";
|
|
3
3
|
import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
|
|
4
4
|
import { register } from "node:module";
|
|
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
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CQYo6Zp8.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as addonPagesCapability, nt as errMsg, rt as BaseAddon, ut as EventCategory } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import * as fs from "node:fs";
|
|
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-CQYo6Zp8.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as addonWidgetsCapability, nt as errMsg, rt as BaseAddon, ut as EventCategory } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import * as fs from "node:fs";
|
|
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-CQYo6Zp8.js");
|
|
7
7
|
//#region src/builtins/alerts/alerts.addon.ts
|
|
8
8
|
var CATEGORY_MAPPINGS = {
|
|
9
9
|
"addon.crashed": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _t as createEvent, h as alertsCapability, n as AlertSchema, nt as errMsg, rt as BaseAddon, ut as EventCategory } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
//#region src/builtins/alerts/alerts.addon.ts
|
|
3
3
|
var CATEGORY_MAPPINGS = {
|
|
4
4
|
"addon.crashed": {
|
|
@@ -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-CQYo6Zp8.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_fs$1 = require_chunk.__toESM(node_fs, 1);
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { rt as BaseAddon, ut as EventCategory, v as backupCapability } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import Kt from "node:fs";
|
|
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-CQYo6Zp8.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 { I as logDestinationCapability, rt as BaseAddon } from "../../dist-CC3E-_3h.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 = {
|
|
@@ -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-CQYo6Zp8.js");
|
|
7
7
|
let _camstack_types_node = require("@camstack/types/node");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as toExpressionValue, B as normalizeUnit, C as enumerateItemArrayFields, H as parseStreamParamsFormPatch, O as getByPath, Ot as sleep, S as deviceStatusCapability, St as isDeviceConfigCap, T as evaluateLinkExpression, a as DeviceStatusSchema, b as deviceManagerCapability, c as STREAM_PROFILE_META, ct as DeviceRole, g as applyTransform, i as CAP_NAMES_WITH_STATUS, lt as DeviceType, nt as errMsg, pt as WELL_KNOWN_TAB_MAP, q as setByPath, rt as BaseAddon, st as DeviceFeature, t as ALL_CAPABILITY_DEFINITIONS, tt as validateExpressionSource, ut as EventCategory, w as enumerateSchemaFields, x as deviceStateCapability, y as buildStreamParamsConfigSchema } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -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-CQYo6Zp8.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 { I as logDestinationCapability, rt as BaseAddon } from "../../dist-CC3E-_3h.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;
|
|
@@ -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-CQYo6Zp8.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as authProviderCapability, d as UserRecordSchema, et as userManagementCapability, l as ScopedTokenSchema, r as ApiKeyRecordSchema, rt as BaseAddon } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import * as crypto$1 from "node:crypto";
|
|
4
4
|
import { randomUUID } from "node: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-CQYo6Zp8.js");
|
|
4
4
|
let node_os = require("node:os");
|
|
5
5
|
node_os = require_chunk.__toESM(node_os);
|
|
6
6
|
//#region src/builtins/local-network/local-network.addon.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as localNetworkCapability, rt as BaseAddon, ut as EventCategory } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import * as os from "node:os";
|
|
3
3
|
//#region src/builtins/local-network/local-network.addon.ts
|
|
4
4
|
/**
|
|
@@ -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-CQYo6Zp8.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_child_process = require("node:child_process");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { R as metricsProviderCapability, _t as createEvent, rt as BaseAddon, ut as EventCategory } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import { execFile, execFileSync } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CoralInfo } from '@camstack/types';
|
|
2
|
+
/**
|
|
3
|
+
* Filesystem seam for Coral USB Edge TPU detection — mirrors the
|
|
4
|
+
* `AcceleratorFs` pattern in `intel-accelerators.ts` so the classifier stays a
|
|
5
|
+
* pure, unit-testable function over injected reads.
|
|
6
|
+
*/
|
|
7
|
+
export interface CoralFs {
|
|
8
|
+
/** USB device directory names under `/sys/bus/usb/devices` (e.g. `2-4`). */
|
|
9
|
+
listUsbDevices(): readonly string[];
|
|
10
|
+
/** Read a `<sysfsNode>/<attr>` value (idVendor / idProduct), trimmed. */
|
|
11
|
+
readUsbAttr(device: string, attr: string): string;
|
|
12
|
+
/** Whether a filesystem path exists (the libedgetpu delegate). */
|
|
13
|
+
exists(path: string): boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Detect a Coral USB Edge TPU. Present when EITHER a matching USB device is
|
|
17
|
+
* enumerated OR the libedgetpu delegate is installed (the delegate is the
|
|
18
|
+
* hub-provisioned runtime prerequisite; on a container whose `/sys` USB view is
|
|
19
|
+
* limited, its presence is a reliable operator-intent signal that the Coral is
|
|
20
|
+
* wired through). Returns `null` when neither signal is found.
|
|
21
|
+
*/
|
|
22
|
+
export declare function classifyCoralAccelerator(fsx: CoralFs): CoralInfo | null;
|
|
@@ -3,13 +3,59 @@ 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-CQYo6Zp8.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_child_process = require("node:child_process");
|
|
10
10
|
let node_util = require("node:util");
|
|
11
11
|
let node_os = require("node:os");
|
|
12
12
|
node_os = require_chunk.__toESM(node_os);
|
|
13
|
+
//#region src/builtins/platform-probe/coral-accelerators.ts
|
|
14
|
+
/**
|
|
15
|
+
* Coral USB Edge TPU USB identifiers.
|
|
16
|
+
*
|
|
17
|
+
* The device enumerates as `1a6e:089a` (Global Unichip) BEFORE the libedgetpu
|
|
18
|
+
* firmware loads, then re-enumerates as `18d1:9302` (Google) AFTER. Either id
|
|
19
|
+
* means a Coral is physically attached, so both count as a positive signal.
|
|
20
|
+
*/
|
|
21
|
+
var CORAL_USB_IDS = [{
|
|
22
|
+
vendor: "1a6e",
|
|
23
|
+
product: "089a"
|
|
24
|
+
}, {
|
|
25
|
+
vendor: "18d1",
|
|
26
|
+
product: "9302"
|
|
27
|
+
}];
|
|
28
|
+
/**
|
|
29
|
+
* Default install path of the libedgetpu delegate on the hub, provisioned
|
|
30
|
+
* out-of-band by `/data/deps/edgetpu-install.sh` (it is a system shared
|
|
31
|
+
* library, not a pip package). Overridable via `CAMSTACK_EDGETPU_LIB` — kept in
|
|
32
|
+
* sync with the Python pool's own default in `inference_pool.py`.
|
|
33
|
+
*/
|
|
34
|
+
var DEFAULT_EDGETPU_LIB = "/data/deps/edgetpu/lib/libedgetpu.so.1";
|
|
35
|
+
/**
|
|
36
|
+
* Detect a Coral USB Edge TPU. Present when EITHER a matching USB device is
|
|
37
|
+
* enumerated OR the libedgetpu delegate is installed (the delegate is the
|
|
38
|
+
* hub-provisioned runtime prerequisite; on a container whose `/sys` USB view is
|
|
39
|
+
* limited, its presence is a reliable operator-intent signal that the Coral is
|
|
40
|
+
* wired through). Returns `null` when neither signal is found.
|
|
41
|
+
*/
|
|
42
|
+
function classifyCoralAccelerator(fsx) {
|
|
43
|
+
for (const device of fsx.listUsbDevices()) {
|
|
44
|
+
const vendor = fsx.readUsbAttr(device, "idVendor").toLowerCase();
|
|
45
|
+
const product = fsx.readUsbAttr(device, "idProduct").toLowerCase();
|
|
46
|
+
if (CORAL_USB_IDS.some((id) => id.vendor === vendor && id.product === product)) return {
|
|
47
|
+
type: "coral-edgetpu",
|
|
48
|
+
bus: "usb"
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const libPath = process.env["CAMSTACK_EDGETPU_LIB"] ?? DEFAULT_EDGETPU_LIB;
|
|
52
|
+
if (fsx.exists(libPath)) return {
|
|
53
|
+
type: "coral-edgetpu",
|
|
54
|
+
bus: "usb"
|
|
55
|
+
};
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
13
59
|
//#region src/builtins/platform-probe/platform-scorer.ts
|
|
14
60
|
/**
|
|
15
61
|
* Promisified `execFile`. Used across the scorer so every subprocess
|
|
@@ -162,6 +208,24 @@ var PlatformScorer = class {
|
|
|
162
208
|
} });
|
|
163
209
|
let gpu = null;
|
|
164
210
|
let npu = null;
|
|
211
|
+
const coral = classifyCoralAccelerator({
|
|
212
|
+
listUsbDevices: () => {
|
|
213
|
+
try {
|
|
214
|
+
return node_fs.readdirSync("/sys/bus/usb/devices");
|
|
215
|
+
} catch {
|
|
216
|
+
return [];
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
readUsbAttr: (device, attr) => {
|
|
220
|
+
try {
|
|
221
|
+
return node_fs.readFileSync(`/sys/bus/usb/devices/${device}/${attr}`, "utf8").trim();
|
|
222
|
+
} catch {
|
|
223
|
+
return "";
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
exists: (p) => node_fs.existsSync(p)
|
|
227
|
+
});
|
|
228
|
+
if (coral) this.logger.info("Coral USB Edge TPU detected", { meta: { bus: coral.bus } });
|
|
165
229
|
if (platform === "darwin" && arch === "arm64") {
|
|
166
230
|
gpu = {
|
|
167
231
|
type: "apple",
|
|
@@ -220,7 +284,8 @@ var PlatformScorer = class {
|
|
|
220
284
|
totalRAM_MB,
|
|
221
285
|
availableRAM_MB,
|
|
222
286
|
gpu,
|
|
223
|
-
npu
|
|
287
|
+
npu,
|
|
288
|
+
coral
|
|
224
289
|
};
|
|
225
290
|
}
|
|
226
291
|
/**
|
|
@@ -1,8 +1,54 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as scoreRuntimes, U as platformProbeCapability, nt as errMsg, rt as BaseAddon, ut as EventCategory, yt as emitReadiness } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
import * as os from "node:os";
|
|
6
|
+
//#region src/builtins/platform-probe/coral-accelerators.ts
|
|
7
|
+
/**
|
|
8
|
+
* Coral USB Edge TPU USB identifiers.
|
|
9
|
+
*
|
|
10
|
+
* The device enumerates as `1a6e:089a` (Global Unichip) BEFORE the libedgetpu
|
|
11
|
+
* firmware loads, then re-enumerates as `18d1:9302` (Google) AFTER. Either id
|
|
12
|
+
* means a Coral is physically attached, so both count as a positive signal.
|
|
13
|
+
*/
|
|
14
|
+
var CORAL_USB_IDS = [{
|
|
15
|
+
vendor: "1a6e",
|
|
16
|
+
product: "089a"
|
|
17
|
+
}, {
|
|
18
|
+
vendor: "18d1",
|
|
19
|
+
product: "9302"
|
|
20
|
+
}];
|
|
21
|
+
/**
|
|
22
|
+
* Default install path of the libedgetpu delegate on the hub, provisioned
|
|
23
|
+
* out-of-band by `/data/deps/edgetpu-install.sh` (it is a system shared
|
|
24
|
+
* library, not a pip package). Overridable via `CAMSTACK_EDGETPU_LIB` — kept in
|
|
25
|
+
* sync with the Python pool's own default in `inference_pool.py`.
|
|
26
|
+
*/
|
|
27
|
+
var DEFAULT_EDGETPU_LIB = "/data/deps/edgetpu/lib/libedgetpu.so.1";
|
|
28
|
+
/**
|
|
29
|
+
* Detect a Coral USB Edge TPU. Present when EITHER a matching USB device is
|
|
30
|
+
* enumerated OR the libedgetpu delegate is installed (the delegate is the
|
|
31
|
+
* hub-provisioned runtime prerequisite; on a container whose `/sys` USB view is
|
|
32
|
+
* limited, its presence is a reliable operator-intent signal that the Coral is
|
|
33
|
+
* wired through). Returns `null` when neither signal is found.
|
|
34
|
+
*/
|
|
35
|
+
function classifyCoralAccelerator(fsx) {
|
|
36
|
+
for (const device of fsx.listUsbDevices()) {
|
|
37
|
+
const vendor = fsx.readUsbAttr(device, "idVendor").toLowerCase();
|
|
38
|
+
const product = fsx.readUsbAttr(device, "idProduct").toLowerCase();
|
|
39
|
+
if (CORAL_USB_IDS.some((id) => id.vendor === vendor && id.product === product)) return {
|
|
40
|
+
type: "coral-edgetpu",
|
|
41
|
+
bus: "usb"
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const libPath = process.env["CAMSTACK_EDGETPU_LIB"] ?? DEFAULT_EDGETPU_LIB;
|
|
45
|
+
if (fsx.exists(libPath)) return {
|
|
46
|
+
type: "coral-edgetpu",
|
|
47
|
+
bus: "usb"
|
|
48
|
+
};
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
6
52
|
//#region src/builtins/platform-probe/platform-scorer.ts
|
|
7
53
|
/**
|
|
8
54
|
* Promisified `execFile`. Used across the scorer so every subprocess
|
|
@@ -155,6 +201,24 @@ var PlatformScorer = class {
|
|
|
155
201
|
} });
|
|
156
202
|
let gpu = null;
|
|
157
203
|
let npu = null;
|
|
204
|
+
const coral = classifyCoralAccelerator({
|
|
205
|
+
listUsbDevices: () => {
|
|
206
|
+
try {
|
|
207
|
+
return fs.readdirSync("/sys/bus/usb/devices");
|
|
208
|
+
} catch {
|
|
209
|
+
return [];
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
readUsbAttr: (device, attr) => {
|
|
213
|
+
try {
|
|
214
|
+
return fs.readFileSync(`/sys/bus/usb/devices/${device}/${attr}`, "utf8").trim();
|
|
215
|
+
} catch {
|
|
216
|
+
return "";
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
exists: (p) => fs.existsSync(p)
|
|
220
|
+
});
|
|
221
|
+
if (coral) this.logger.info("Coral USB Edge TPU detected", { meta: { bus: coral.bus } });
|
|
158
222
|
if (platform === "darwin" && arch === "arm64") {
|
|
159
223
|
gpu = {
|
|
160
224
|
type: "apple",
|
|
@@ -213,7 +277,8 @@ var PlatformScorer = class {
|
|
|
213
277
|
totalRAM_MB,
|
|
214
278
|
availableRAM_MB,
|
|
215
279
|
gpu,
|
|
216
|
-
npu
|
|
280
|
+
npu,
|
|
281
|
+
coral
|
|
217
282
|
};
|
|
218
283
|
}
|
|
219
284
|
/**
|
|
@@ -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-CQYo6Zp8.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 {
|
|
1
|
+
import { rt as BaseAddon, ut as EventCategory } from "../../dist-CC3E-_3h.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
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CQYo6Zp8.js");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
//#region src/builtins/snapshot/snapshot-coalescing.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as streamQualityLabel, Y as snapshotCapability, lt as DeviceType, nt as errMsg, rt as BaseAddon, st as DeviceFeature, z as nodePin } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
3
|
//#region src/builtins/snapshot/snapshot-coalescing.ts
|
|
4
4
|
/**
|
|
@@ -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-CQYo6Zp8.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as filesystemBrowseCapability, Z as storageProviderCapability, rt as BaseAddon } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import { basename, dirname, join, resolve, sep } 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-CQYo6Zp8.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let better_sqlite3 = require("better-sqlite3");
|
|
9
9
|
better_sqlite3 = require_chunk.__toESM(better_sqlite3);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as settingsStoreCapability, mt as asJsonObject, nt as errMsg, rt as BaseAddon, s as RUNTIME_DEFAULTS, wt as parseJsonUnknown } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import Database from "better-sqlite3";
|
|
4
4
|
//#region src/builtins/sqlite-storage/sqlite-settings-backend.ts
|
|
@@ -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-CQYo6Zp8.js");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_chunk.__toESM(node_path);
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ct as parseJsonObject, X as storageCapability, rt as BaseAddon, u as StorageLocationTypeSchema } from "../../dist-CC3E-_3h.mjs";
|
|
2
2
|
import * as path$1 from "node:path";
|
|
3
3
|
import * as fs from "node:fs/promises";
|
|
4
4
|
import { buildStorageLocationRegistry } from "@camstack/system";
|
|
@@ -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-CQYo6Zp8.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 {
|
|
1
|
+
import { nt as errMsg, rt as BaseAddon, xt as hydrateSchema } from "../../dist-CC3E-_3h.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-CQYo6Zp8.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 {
|
|
1
|
+
import { I as logDestinationCapability, rt as BaseAddon } from "../../dist-CC3E-_3h.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";
|