camstack 1.2.196 → 1.2.198
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/cli.js
CHANGED
|
@@ -37,7 +37,7 @@ async function runServe(args) {
|
|
|
37
37
|
...typeof values.data === "string" ? { data: values.data } : {}
|
|
38
38
|
};
|
|
39
39
|
Object.assign(process.env, buildServeEnv(opts));
|
|
40
|
-
await import("./launcher-
|
|
40
|
+
await import("./launcher-JMVZTHWI.js");
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
// src/commands/agent.ts
|
|
@@ -82,7 +82,7 @@ async function runAgent(args) {
|
|
|
82
82
|
...typeof values.port === "string" ? { port: values.port } : {}
|
|
83
83
|
};
|
|
84
84
|
Object.assign(process.env, buildAgentEnv(opts));
|
|
85
|
-
await import("./launcher-
|
|
85
|
+
await import("./launcher-JMVZTHWI.js");
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
// src/commands/setup.ts
|
|
@@ -122867,8 +122867,9 @@ var require_node = __commonJS({
|
|
|
122867
122867
|
}
|
|
122868
122868
|
return;
|
|
122869
122869
|
}
|
|
122870
|
+
const flags = format2 === "tar.xz" ? "-xJf" : format2 === "tar" ? "-xf" : "-xzf";
|
|
122870
122871
|
deps.exec(tar, [
|
|
122871
|
-
|
|
122872
|
+
flags,
|
|
122872
122873
|
archivePath,
|
|
122873
122874
|
"-C",
|
|
122874
122875
|
destDir
|
|
@@ -123361,6 +123362,264 @@ ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
|
123361
123362
|
hash
|
|
123362
123363
|
} });
|
|
123363
123364
|
}
|
|
123365
|
+
var AR_MAGIC = "!<arch>\n";
|
|
123366
|
+
var AR_HEADER_BYTES = 60;
|
|
123367
|
+
function readArMembers(archive) {
|
|
123368
|
+
if (archive.subarray(0, 8).toString("latin1") !== AR_MAGIC) throw new Error('not an ar archive (a .deb starts with "!<arch>")');
|
|
123369
|
+
const members = [];
|
|
123370
|
+
let offset = 8;
|
|
123371
|
+
while (offset + AR_HEADER_BYTES <= archive.length) {
|
|
123372
|
+
const header = archive.subarray(offset, offset + AR_HEADER_BYTES).toString("latin1");
|
|
123373
|
+
if (header.slice(58, 60) !== "`\n") throw new Error(`corrupt ar member header at byte ${offset}`);
|
|
123374
|
+
const name = header.slice(0, 16).trim().replace(/\/$/, "");
|
|
123375
|
+
const size = Number.parseInt(header.slice(48, 58).trim(), 10);
|
|
123376
|
+
if (!Number.isInteger(size) || size < 0) throw new Error(`ar member "${name}" has no valid size`);
|
|
123377
|
+
const start = offset + AR_HEADER_BYTES;
|
|
123378
|
+
if (start + size > archive.length) throw new Error(`ar member "${name}" runs past the end of the archive`);
|
|
123379
|
+
members.push({
|
|
123380
|
+
name,
|
|
123381
|
+
data: archive.subarray(start, start + size)
|
|
123382
|
+
});
|
|
123383
|
+
offset = start + size + size % 2;
|
|
123384
|
+
}
|
|
123385
|
+
return members;
|
|
123386
|
+
}
|
|
123387
|
+
function debDataMember(deb) {
|
|
123388
|
+
const member = readArMembers(deb).find((m) => m.name.startsWith("data.tar"));
|
|
123389
|
+
if (member === void 0) throw new Error(".deb has no data.tar member");
|
|
123390
|
+
const suffix = member.name.slice(8);
|
|
123391
|
+
const compression = suffix === ".zst" ? "zst" : suffix === ".xz" ? "xz" : suffix === ".gz" ? "gz" : suffix === "" ? "none" : null;
|
|
123392
|
+
if (compression === null) throw new Error(`.deb payload ${member.name} uses a compression this extractor does not read`);
|
|
123393
|
+
return {
|
|
123394
|
+
compression,
|
|
123395
|
+
data: member.data
|
|
123396
|
+
};
|
|
123397
|
+
}
|
|
123398
|
+
function extractDebPayload(deb, destDir, workDir, extract = extractArchive) {
|
|
123399
|
+
const payload = debDataMember(deb);
|
|
123400
|
+
(0, node_fs.mkdirSync)(destDir, { recursive: true });
|
|
123401
|
+
(0, node_fs.mkdirSync)(workDir, { recursive: true });
|
|
123402
|
+
if (payload.compression === "xz") {
|
|
123403
|
+
const xzPath = (0, node_path.join)(workDir, "data.tar.xz");
|
|
123404
|
+
(0, node_fs.writeFileSync)(xzPath, payload.data);
|
|
123405
|
+
extract(xzPath, "tar.xz", destDir);
|
|
123406
|
+
return;
|
|
123407
|
+
}
|
|
123408
|
+
const tar = payload.compression === "zst" ? (0, node_zlib.zstdDecompressSync)(payload.data) : payload.compression === "gz" ? (0, node_zlib.gunzipSync)(payload.data) : payload.data;
|
|
123409
|
+
const tarPath = (0, node_path.join)(workDir, "data.tar");
|
|
123410
|
+
(0, node_fs.writeFileSync)(tarPath, tar);
|
|
123411
|
+
extract(tarPath, "tar", destDir);
|
|
123412
|
+
}
|
|
123413
|
+
function findEntryByName(dir, name) {
|
|
123414
|
+
for (const entry of (0, node_fs.readdirSync)(dir, { withFileTypes: true })) {
|
|
123415
|
+
const full = (0, node_path.join)(dir, entry.name);
|
|
123416
|
+
if ((entry.isFile() || entry.isSymbolicLink()) && entry.name === name) return full;
|
|
123417
|
+
if (entry.isDirectory()) {
|
|
123418
|
+
const nested = findEntryByName(full, name);
|
|
123419
|
+
if (nested !== null) return nested;
|
|
123420
|
+
}
|
|
123421
|
+
}
|
|
123422
|
+
return null;
|
|
123423
|
+
}
|
|
123424
|
+
function installLibraryFromDeb(debPath, memberName, targetPath2, workDir, extract = extractArchive) {
|
|
123425
|
+
const tree = (0, node_path.join)(workDir, "tree");
|
|
123426
|
+
try {
|
|
123427
|
+
extractDebPayload((0, node_fs.readFileSync)(debPath), tree, workDir, extract);
|
|
123428
|
+
const found = findEntryByName(tree, memberName);
|
|
123429
|
+
if (found === null) throw new Error(`${memberName} not found inside ${debPath}`);
|
|
123430
|
+
(0, node_fs.copyFileSync)(found, targetPath2);
|
|
123431
|
+
} finally {
|
|
123432
|
+
(0, node_fs.rmSync)(workDir, {
|
|
123433
|
+
recursive: true,
|
|
123434
|
+
force: true
|
|
123435
|
+
});
|
|
123436
|
+
}
|
|
123437
|
+
}
|
|
123438
|
+
var EDGETPU_LIB_ENV = "CAMSTACK_EDGETPU_LIB";
|
|
123439
|
+
var EDGETPU_DELEGATE_RELEASE = "16.0TF2.17.1-1";
|
|
123440
|
+
var LEGACY_EDGETPU_LIB = "/data/deps/edgetpu/lib/libedgetpu.so.1";
|
|
123441
|
+
var FERANICK = `https://github.com/feranick/libedgetpu/releases/download/${EDGETPU_DELEGATE_RELEASE}`;
|
|
123442
|
+
function linuxSet(deb, debSha, debSize, libusbUrl, libusbSha, libusbSize) {
|
|
123443
|
+
return {
|
|
123444
|
+
supported: true,
|
|
123445
|
+
files: [{
|
|
123446
|
+
url: `${FERANICK}/${deb}`,
|
|
123447
|
+
sha256: debSha,
|
|
123448
|
+
sizeBytes: debSize,
|
|
123449
|
+
container: "deb",
|
|
123450
|
+
member: "libedgetpu.so.1",
|
|
123451
|
+
installAs: "libedgetpu.so.1"
|
|
123452
|
+
}, {
|
|
123453
|
+
url: libusbUrl,
|
|
123454
|
+
sha256: libusbSha,
|
|
123455
|
+
sizeBytes: libusbSize,
|
|
123456
|
+
container: "deb",
|
|
123457
|
+
member: "libusb-1.0.so.0",
|
|
123458
|
+
installAs: "libusb-1.0.so.0"
|
|
123459
|
+
}]
|
|
123460
|
+
};
|
|
123461
|
+
}
|
|
123462
|
+
function getEdgetpuDelegateArtifact(platform, arch) {
|
|
123463
|
+
if (platform === "linux" && arch === "x64") return linuxSet("libedgetpu1-std_16.0tf2.17.1-1.ubuntu24.04_amd64.deb", "3cd98ae42d26a0ab601673d2162eb968921f751d3879ef960687637cad1cba96", 389600, "http://archive.ubuntu.com/ubuntu/pool/main/libu/libusb-1.0/libusb-1.0-0_1.0.27-1_amd64.deb", "d59e679a82ee2b724c556397e831e879936adbe8a007705872b65a5e1ec887b5", 54008);
|
|
123464
|
+
if (platform === "linux" && arch === "arm64") return linuxSet("libedgetpu1-std_16.0tf2.17.1-1.ubuntu24.04_arm64.deb", "6d53b6f6f9a19a6685a488e0c262aed2b11b6ff8c953f10e0aa14a16122f0d37", 338416, "http://ports.ubuntu.com/ubuntu-ports/pool/main/libu/libusb-1.0/libusb-1.0-0_1.0.27-1_arm64.deb", "c8c34ef4385b6be34fe94aabd4de06c7bbd5ae617e80e9306f412f4c979aa5e4", 54082);
|
|
123465
|
+
if (platform === "darwin" && arch === "arm64") return {
|
|
123466
|
+
supported: true,
|
|
123467
|
+
files: [{
|
|
123468
|
+
url: `${FERANICK}/libedgetpu-16.0-tf2.17.1-1_MacOS_Silicon.zip`,
|
|
123469
|
+
sha256: "5d57b4ff80bfe70d1d9306a3a8a83f52b38e8a151c35aecf68d807744eacf1f4",
|
|
123470
|
+
sizeBytes: 760105,
|
|
123471
|
+
container: "zip",
|
|
123472
|
+
member: "libedgetpu-16.0-tf2.17.1-1_MacOS_Silicon/throttled/darwin_arm64/libedgetpu.1.0.dylib",
|
|
123473
|
+
installAs: "libedgetpu.1.dylib"
|
|
123474
|
+
}]
|
|
123475
|
+
};
|
|
123476
|
+
if (platform === "darwin") return {
|
|
123477
|
+
supported: false,
|
|
123478
|
+
reason: "ai-edge-litert 2.1.6 publishes no macOS x86_64 wheel, and the Intel delegate links MacPorts libusb at /opt/local/lib"
|
|
123479
|
+
};
|
|
123480
|
+
if (platform === "win32") return {
|
|
123481
|
+
supported: false,
|
|
123482
|
+
reason: "no libedgetpu built against TF 2.17.1 exists for Windows (feranick ships Linux and macOS only)"
|
|
123483
|
+
};
|
|
123484
|
+
return {
|
|
123485
|
+
supported: false,
|
|
123486
|
+
reason: `no pinned libedgetpu build for ${platform}-${arch}`
|
|
123487
|
+
};
|
|
123488
|
+
}
|
|
123489
|
+
function edgetpuDelegateFileName(platform) {
|
|
123490
|
+
return platform === "darwin" ? "libedgetpu.1.dylib" : "libedgetpu.so.1";
|
|
123491
|
+
}
|
|
123492
|
+
function edgetpuLibDir(dataDir) {
|
|
123493
|
+
return (0, node_path.join)(dataDir, "deps", "edgetpu", "lib");
|
|
123494
|
+
}
|
|
123495
|
+
function chooseEdgetpuDelegate(lookup) {
|
|
123496
|
+
const override = lookup.override?.trim();
|
|
123497
|
+
if (override !== void 0 && override.length > 0) return lookup.exists(override) ? {
|
|
123498
|
+
path: override,
|
|
123499
|
+
origin: "override"
|
|
123500
|
+
} : null;
|
|
123501
|
+
if (lookup.dataDir !== void 0 && lookup.dataDir.length > 0) {
|
|
123502
|
+
const staged = (0, node_path.join)(edgetpuLibDir(lookup.dataDir), edgetpuDelegateFileName(lookup.platform));
|
|
123503
|
+
if (lookup.exists(staged)) return {
|
|
123504
|
+
path: staged,
|
|
123505
|
+
origin: "staged"
|
|
123506
|
+
};
|
|
123507
|
+
}
|
|
123508
|
+
if (lookup.exists("/data/deps/edgetpu/lib/libedgetpu.so.1")) return {
|
|
123509
|
+
path: LEGACY_EDGETPU_LIB,
|
|
123510
|
+
origin: "legacy"
|
|
123511
|
+
};
|
|
123512
|
+
return null;
|
|
123513
|
+
}
|
|
123514
|
+
function nodeDataRootFromEnv(env) {
|
|
123515
|
+
return env["CAMSTACK_DATA"] ?? env["CAMSTACK_DATA_DIR"];
|
|
123516
|
+
}
|
|
123517
|
+
async function download(url, target) {
|
|
123518
|
+
const response = await fetch(url, { redirect: "follow" });
|
|
123519
|
+
if (!response.ok) throw new Error(`download failed: ${response.status} ${response.statusText} (${url})`);
|
|
123520
|
+
(0, node_fs.writeFileSync)(target, Buffer.from(await response.arrayBuffer()));
|
|
123521
|
+
}
|
|
123522
|
+
async function stageFile(file, libDir, workRoot) {
|
|
123523
|
+
const target = (0, node_path.join)(libDir, file.installAs);
|
|
123524
|
+
if ((0, node_fs.existsSync)(target)) return;
|
|
123525
|
+
const work = (0, node_path.join)(workRoot, file.installAs);
|
|
123526
|
+
(0, node_fs.rmSync)(work, {
|
|
123527
|
+
recursive: true,
|
|
123528
|
+
force: true
|
|
123529
|
+
});
|
|
123530
|
+
(0, node_fs.mkdirSync)(work, { recursive: true });
|
|
123531
|
+
const container = (0, node_path.join)(work, `download.${file.container}`);
|
|
123532
|
+
const partial = `${target}.partial`;
|
|
123533
|
+
try {
|
|
123534
|
+
await download(file.url, container);
|
|
123535
|
+
verifySha256(container, file.sha256, file.installAs, file.url);
|
|
123536
|
+
if (file.container === "deb") installLibraryFromDeb(container, file.member, partial, (0, node_path.join)(work, "deb"));
|
|
123537
|
+
else {
|
|
123538
|
+
const tree = (0, node_path.join)(work, "tree");
|
|
123539
|
+
(0, node_fs.mkdirSync)(tree, { recursive: true });
|
|
123540
|
+
extractArchive(container, "zip", tree);
|
|
123541
|
+
const inner = (0, node_path.join)(tree, file.member);
|
|
123542
|
+
const found = (0, node_fs.existsSync)(inner) ? inner : findEntryByName(tree, file.member.split("/").pop() ?? file.member);
|
|
123543
|
+
if (found === null) throw new Error(`${file.member} not found inside ${file.url}`);
|
|
123544
|
+
(0, node_fs.copyFileSync)(found, partial);
|
|
123545
|
+
}
|
|
123546
|
+
(0, node_fs.renameSync)(partial, target);
|
|
123547
|
+
} finally {
|
|
123548
|
+
(0, node_fs.rmSync)(work, {
|
|
123549
|
+
recursive: true,
|
|
123550
|
+
force: true
|
|
123551
|
+
});
|
|
123552
|
+
(0, node_fs.rmSync)(partial, { force: true });
|
|
123553
|
+
}
|
|
123554
|
+
}
|
|
123555
|
+
var EDGETPU_DELEGATE_DIRECTIVE = "# camstack-native-dep: edgetpu-delegate";
|
|
123556
|
+
function declaresEdgetpuDelegate(requirementsText) {
|
|
123557
|
+
return requirementsText.split(/\r?\n/).some((line) => line.trim() === EDGETPU_DELEGATE_DIRECTIVE);
|
|
123558
|
+
}
|
|
123559
|
+
async function ensureEdgetpuDelegate(dataDir, logger, opts = {}) {
|
|
123560
|
+
const env = opts.env ?? process.env;
|
|
123561
|
+
const platform = opts.platform ?? process.platform;
|
|
123562
|
+
const arch = opts.arch ?? process.arch;
|
|
123563
|
+
const override = env[EDGETPU_LIB_ENV]?.trim();
|
|
123564
|
+
const present = chooseEdgetpuDelegate({
|
|
123565
|
+
platform,
|
|
123566
|
+
dataDir,
|
|
123567
|
+
override,
|
|
123568
|
+
exists: node_fs.existsSync
|
|
123569
|
+
});
|
|
123570
|
+
if (present !== null) {
|
|
123571
|
+
logger.info("Coral delegate resolved", { meta: {
|
|
123572
|
+
path: present.path,
|
|
123573
|
+
origin: present.origin
|
|
123574
|
+
} });
|
|
123575
|
+
return {
|
|
123576
|
+
kind: "ready",
|
|
123577
|
+
path: present.path,
|
|
123578
|
+
origin: present.origin
|
|
123579
|
+
};
|
|
123580
|
+
}
|
|
123581
|
+
if (override !== void 0 && override.length > 0) {
|
|
123582
|
+
const reason = `${EDGETPU_LIB_ENV} names a file that does not exist: ${override}`;
|
|
123583
|
+
logger.error("Coral delegate not staged", { meta: { reason } });
|
|
123584
|
+
return {
|
|
123585
|
+
kind: "unavailable",
|
|
123586
|
+
reason
|
|
123587
|
+
};
|
|
123588
|
+
}
|
|
123589
|
+
const artifact = getEdgetpuDelegateArtifact(platform, arch);
|
|
123590
|
+
if (!artifact.supported) {
|
|
123591
|
+
logger.warn("Coral delegate not staged", { meta: { reason: artifact.reason } });
|
|
123592
|
+
return {
|
|
123593
|
+
kind: "unavailable",
|
|
123594
|
+
reason: artifact.reason
|
|
123595
|
+
};
|
|
123596
|
+
}
|
|
123597
|
+
const libDir = edgetpuLibDir(dataDir);
|
|
123598
|
+
(0, node_fs.mkdirSync)(libDir, { recursive: true });
|
|
123599
|
+
logger.info("Coral delegate is not on this node yet \u2014 downloading the pinned set", { meta: {
|
|
123600
|
+
release: EDGETPU_DELEGATE_RELEASE,
|
|
123601
|
+
files: artifact.files.map((f) => f.installAs).join(",")
|
|
123602
|
+
} });
|
|
123603
|
+
const workRoot = (0, node_path.join)(dataDir, "deps", ".edgetpu-staging");
|
|
123604
|
+
try {
|
|
123605
|
+
for (const file of artifact.files) await stageFile(file, libDir, workRoot);
|
|
123606
|
+
} finally {
|
|
123607
|
+
(0, node_fs.rmSync)(workRoot, {
|
|
123608
|
+
recursive: true,
|
|
123609
|
+
force: true
|
|
123610
|
+
});
|
|
123611
|
+
}
|
|
123612
|
+
const path = (0, node_path.join)(libDir, edgetpuDelegateFileName(platform));
|
|
123613
|
+
logger.info("Coral delegate resolved", { meta: {
|
|
123614
|
+
path,
|
|
123615
|
+
origin: "downloaded"
|
|
123616
|
+
} });
|
|
123617
|
+
return {
|
|
123618
|
+
kind: "ready",
|
|
123619
|
+
path,
|
|
123620
|
+
origin: "downloaded"
|
|
123621
|
+
};
|
|
123622
|
+
}
|
|
123364
123623
|
var DEFAULT_FIRST_UNIT_TIMEOUT_MS = 12e3;
|
|
123365
123624
|
var FRAGMENT_LOG_EVERY = 30;
|
|
123366
123625
|
var Fmp4FragmentChild = class {
|
|
@@ -124381,11 +124640,15 @@ ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
|
124381
124640
|
return input.persisted ?? input.fresh;
|
|
124382
124641
|
}
|
|
124383
124642
|
exports.ChildCostRegistry = ChildCostRegistry;
|
|
124643
|
+
exports.EDGETPU_DELEGATE_DIRECTIVE = EDGETPU_DELEGATE_DIRECTIVE;
|
|
124644
|
+
exports.EDGETPU_DELEGATE_RELEASE = EDGETPU_DELEGATE_RELEASE;
|
|
124645
|
+
exports.EDGETPU_LIB_ENV = EDGETPU_LIB_ENV;
|
|
124384
124646
|
exports.FFMPEG_RELEASE = require_composition.FFMPEG_RELEASE;
|
|
124385
124647
|
exports.FfmpegProcess = FfmpegProcess;
|
|
124386
124648
|
exports.FilesystemStorageProvider = FilesystemStorageProvider;
|
|
124387
124649
|
exports.Fmp4FragmentChild = Fmp4FragmentChild;
|
|
124388
124650
|
exports.Fmp4FragmentPlane = Fmp4FragmentPlane;
|
|
124651
|
+
exports.LEGACY_EDGETPU_LIB = LEGACY_EDGETPU_LIB;
|
|
124389
124652
|
exports.NO_COST_CLAIM = NO_COST_CLAIM;
|
|
124390
124653
|
exports.NO_PINNED_FFMPEG_DETAIL = NO_PINNED_FFMPEG_DETAIL;
|
|
124391
124654
|
exports.OwnerOnlyError = OwnerOnlyError;
|
|
@@ -124393,23 +124656,33 @@ ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
|
124393
124656
|
exports.buildBinaryPath = buildBinaryPath;
|
|
124394
124657
|
exports.canonicalDeviceFingerprint = canonicalDeviceFingerprint;
|
|
124395
124658
|
exports.canonicalHash = require_composition.canonicalHash;
|
|
124659
|
+
exports.chooseEdgetpuDelegate = chooseEdgetpuDelegate;
|
|
124396
124660
|
exports.containsOrEquals = containsOrEquals;
|
|
124397
124661
|
exports.customizationBlockName = customizationBlockName;
|
|
124662
|
+
exports.debDataMember = debDataMember;
|
|
124663
|
+
exports.declaresEdgetpuDelegate = declaresEdgetpuDelegate;
|
|
124398
124664
|
exports.defaultFfmpegSpawn = defaultFfmpegSpawn;
|
|
124399
124665
|
exports.diffExportTargets = diffExportTargets;
|
|
124400
124666
|
exports.downloadBinary = downloadBinary;
|
|
124667
|
+
exports.edgetpuDelegateFileName = edgetpuDelegateFileName;
|
|
124668
|
+
exports.edgetpuLibDir = edgetpuLibDir;
|
|
124401
124669
|
exports.ensureBinary = ensureBinary;
|
|
124670
|
+
exports.ensureEdgetpuDelegate = ensureEdgetpuDelegate;
|
|
124402
124671
|
exports.ensureFfmpeg = ensureFfmpeg;
|
|
124403
124672
|
exports.ensurePython = ensurePython;
|
|
124673
|
+
exports.extractDebPayload = extractDebPayload;
|
|
124404
124674
|
exports.findInPath = findInPath;
|
|
124675
|
+
exports.getEdgetpuDelegateArtifact = getEdgetpuDelegateArtifact;
|
|
124405
124676
|
exports.getFfmpegArtifact = require_composition.getFfmpegArtifact;
|
|
124406
124677
|
exports.getFfmpegDownloadUrl = require_composition.getFfmpegDownloadUrl;
|
|
124407
124678
|
exports.getPlatformInfo = getPlatformInfo;
|
|
124408
124679
|
exports.getPythonDownloadUrl = getPythonDownloadUrl;
|
|
124409
124680
|
exports.icaclsArgs = icaclsArgs;
|
|
124681
|
+
exports.installLibraryFromDeb = installLibraryFromDeb;
|
|
124410
124682
|
exports.installPythonPackages = installPythonPackages;
|
|
124411
124683
|
exports.installPythonRequirements = installPythonRequirements;
|
|
124412
124684
|
exports.mkdirOwnerOnlySync = mkdirOwnerOnlySync;
|
|
124685
|
+
exports.nodeDataRootFromEnv = nodeDataRootFromEnv;
|
|
124413
124686
|
exports.nodeProcStatReader = nodeProcStatReader;
|
|
124414
124687
|
exports.parseFfmpegCapabilities = parseFfmpegCapabilities;
|
|
124415
124688
|
exports.parseProcCpuSeconds = parseProcCpuSeconds;
|
|
@@ -124417,6 +124690,7 @@ ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
|
124417
124690
|
exports.physicalRootOf = physicalRootOf;
|
|
124418
124691
|
exports.pinnedFfmpegSpawner = pinnedFfmpegSpawner;
|
|
124419
124692
|
exports.probeFfmpegBinary = probeFfmpegBinary;
|
|
124693
|
+
exports.readArMembers = readArMembers;
|
|
124420
124694
|
exports.readProcessCost = readProcessCost;
|
|
124421
124695
|
exports.resolveExportFingerprint = resolveExportFingerprint;
|
|
124422
124696
|
exports.resolvePinnedFfmpegSpawner = resolvePinnedFfmpegSpawner;
|
|
@@ -158995,6 +159269,23 @@ var require_native_metrics_addon = __commonJS({
|
|
|
158995
159269
|
var NODE_CONTAINER_CURRENT_KEY = keyOf("container-current-mib");
|
|
158996
159270
|
keyOf("process-cpu-percent");
|
|
158997
159271
|
keyOf("process-rss-mib");
|
|
159272
|
+
var RUNNER_SAMPLE_MIN_INTERVAL_MS = 1e4;
|
|
159273
|
+
var RUNNER_SAMPLE_RATE_SLACK_MS = 1e3;
|
|
159274
|
+
function sampleIsDue(slot, ts) {
|
|
159275
|
+
if (slot === void 0 || ts < slot.lastTs) return true;
|
|
159276
|
+
return ts >= slot.nextDue - RUNNER_SAMPLE_RATE_SLACK_MS;
|
|
159277
|
+
}
|
|
159278
|
+
function nextSampleSlot(slot, ts) {
|
|
159279
|
+
if (slot === void 0) return {
|
|
159280
|
+
lastTs: ts,
|
|
159281
|
+
nextDue: ts + RUNNER_SAMPLE_MIN_INTERVAL_MS
|
|
159282
|
+
};
|
|
159283
|
+
if (ts < slot.lastTs) return slot;
|
|
159284
|
+
return {
|
|
159285
|
+
lastTs: ts,
|
|
159286
|
+
nextDue: Math.max(slot.nextDue, ts) + RUNNER_SAMPLE_MIN_INTERVAL_MS
|
|
159287
|
+
};
|
|
159288
|
+
}
|
|
158998
159289
|
var DECLARATIONS = [
|
|
158999
159290
|
{
|
|
159000
159291
|
name: "runner-cpu-main-percent",
|
|
@@ -159084,6 +159375,8 @@ var require_native_metrics_addon = __commonJS({
|
|
|
159084
159375
|
deps;
|
|
159085
159376
|
declared = false;
|
|
159086
159377
|
lastTotalsAt = /* @__PURE__ */ new Map();
|
|
159378
|
+
/** Per node: the door's slot for the per-runner batch (see {@link sampleIsDue}). */
|
|
159379
|
+
sampleSlots = /* @__PURE__ */ new Map();
|
|
159087
159380
|
/** A not-ready skip was logged and device-history has not been ready since. */
|
|
159088
159381
|
waitLogged = false;
|
|
159089
159382
|
constructor(deps) {
|
|
@@ -159103,6 +159396,7 @@ var require_native_metrics_addon = __commonJS({
|
|
|
159103
159396
|
}
|
|
159104
159397
|
/** One process snapshot: per-runner sums plus the container's memory. */
|
|
159105
159398
|
async recordSample(nodeId, atMs, processes, containerMemory) {
|
|
159399
|
+
if (!sampleIsDue(this.sampleSlots.get(nodeId), atMs)) return;
|
|
159106
159400
|
const subject = {
|
|
159107
159401
|
kind: "node",
|
|
159108
159402
|
nodeId
|
|
@@ -159146,7 +159440,7 @@ var require_native_metrics_addon = __commonJS({
|
|
|
159146
159440
|
points.push(point(RUNNER_PROCESSES_KEY, scope, t.count));
|
|
159147
159441
|
}
|
|
159148
159442
|
if (containerMemory !== null) points.push(point(NODE_CONTAINER_CURRENT_KEY, "", Math.round(containerMemory.currentBytes / MIB)));
|
|
159149
|
-
await this.write(nodeId, atMs, points);
|
|
159443
|
+
if (await this.write(nodeId, atMs, points) > 0) this.sampleSlots.set(nodeId, nextSampleSlot(this.sampleSlots.get(nodeId), atMs));
|
|
159150
159444
|
}
|
|
159151
159445
|
/** One resources snapshot: the node's totals, at most every {@link NODE_TOTALS_MIN_INTERVAL_MS}. */
|
|
159152
159446
|
async recordTotals(nodeId, atMs, snapshot) {
|
|
@@ -159176,8 +159470,8 @@ var require_native_metrics_addon = __commonJS({
|
|
|
159176
159470
|
await this.write(nodeId, atMs, points);
|
|
159177
159471
|
}
|
|
159178
159472
|
async write(nodeId, atMs, points) {
|
|
159179
|
-
if (points.length === 0) return;
|
|
159180
|
-
if (!await this.ensureDeclared()) return;
|
|
159473
|
+
if (points.length === 0) return 0;
|
|
159474
|
+
if (!await this.ensureDeclared()) return 0;
|
|
159181
159475
|
try {
|
|
159182
159476
|
const result = await this.deps.deviceHistory.record({ points });
|
|
159183
159477
|
if (result.refused.length > 0) {
|
|
@@ -159188,12 +159482,14 @@ var require_native_metrics_addon = __commonJS({
|
|
|
159188
159482
|
refused: refusalCounts(result)
|
|
159189
159483
|
} });
|
|
159190
159484
|
}
|
|
159485
|
+
return result.accepted;
|
|
159191
159486
|
} catch (err) {
|
|
159192
159487
|
this.deps.logger.warn("node metrics history sample not stored", { meta: {
|
|
159193
159488
|
nodeId,
|
|
159194
159489
|
atMs,
|
|
159195
159490
|
error: err instanceof Error ? err.message : String(err)
|
|
159196
159491
|
} });
|
|
159492
|
+
return 0;
|
|
159197
159493
|
}
|
|
159198
159494
|
}
|
|
159199
159495
|
async readContainerPoints(nodeId, sinceMs, maxPoints) {
|
|
@@ -164911,9 +165207,9 @@ var require_lib = __commonJS({
|
|
|
164911
165207
|
}
|
|
164912
165208
|
});
|
|
164913
165209
|
|
|
164914
|
-
// ../system/dist/wal-maintenance-
|
|
164915
|
-
var
|
|
164916
|
-
"../system/dist/wal-maintenance-
|
|
165210
|
+
// ../system/dist/wal-maintenance-CaJjuLHq.js
|
|
165211
|
+
var require_wal_maintenance_CaJjuLHq = __commonJS({
|
|
165212
|
+
"../system/dist/wal-maintenance-CaJjuLHq.js"(exports) {
|
|
164917
165213
|
"use strict";
|
|
164918
165214
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
164919
165215
|
var require_dist10 = require_dist_Bn_RNanh();
|
|
@@ -165487,12 +165783,14 @@ CREATE TABLE IF NOT EXISTS _record_sequences (
|
|
|
165487
165783
|
const eqCount = equalities.length;
|
|
165488
165784
|
const eqSet = new Set(equalities.map((p) => p.field));
|
|
165489
165785
|
const range = ranges[0];
|
|
165490
|
-
const
|
|
165786
|
+
const candidates = decl.indexes.filter((index) => {
|
|
165491
165787
|
const leading = index.fields.slice(0, eqCount);
|
|
165492
165788
|
if (leading.length !== eqCount || !leading.every((f) => eqSet.has(f))) return false;
|
|
165493
165789
|
if (range !== void 0 && index.fields[eqCount] !== range.field) return false;
|
|
165494
165790
|
return extra.every((f) => index.fields.includes(f));
|
|
165495
165791
|
});
|
|
165792
|
+
const groupBy = opts.groupBy;
|
|
165793
|
+
const candidate = (groupBy === void 0 ? void 0 : candidates.find((index) => index.fields[eqCount] === groupBy)) ?? candidates[0];
|
|
165496
165794
|
if (candidate === void 0) {
|
|
165497
165795
|
const declared = decl.indexes.map((i) => `${i.name}(${i.fields.join(", ")})`).join("; ");
|
|
165498
165796
|
throw new require_dist10.UnindexedFilterError(`${kind}: no declared index serves [${[...predicates.map((p) => p.field), ...extra].join(", ")}]. Declared: ${declared.length > 0 ? declared : "none"}. A filter on an unindexed field does not compile - declare an index`);
|
|
@@ -165615,9 +165913,9 @@ CREATE TABLE IF NOT EXISTS _record_sequences (
|
|
|
165615
165913
|
const params = [];
|
|
165616
165914
|
const tag = `id:${dir}`;
|
|
165617
165915
|
if (q.cursor !== void 0) {
|
|
165618
|
-
assertCursor(q.cursor, tag,
|
|
165916
|
+
assertCursor(q.cursor, tag, 2);
|
|
165619
165917
|
clauses.push(`id ${cmp} ?`);
|
|
165620
|
-
params.push(
|
|
165918
|
+
params.push(q.cursor.values[0] ?? null);
|
|
165621
165919
|
}
|
|
165622
165920
|
return {
|
|
165623
165921
|
sql: `SELECT ${ROW_COLUMNS}, id AS _k0 FROM records WHERE ${clauses.join(" AND ")} ORDER BY id ${dir} LIMIT ${q.limit + 1}`,
|
|
@@ -165668,7 +165966,8 @@ CREATE TABLE IF NOT EXISTS _record_sequences (
|
|
|
165668
165966
|
if (extra.length === 0 && q.where === void 0) throw new require_dist10.InvalidRecordError(`${kind}: a count with no field and no groupBy is "count"`);
|
|
165669
165967
|
const where = planWhere(kind, decl, q.where, {
|
|
165670
165968
|
allowIn: true,
|
|
165671
|
-
extraFields: extra
|
|
165969
|
+
extraFields: extra,
|
|
165970
|
+
groupBy: q.groupBy
|
|
165672
165971
|
});
|
|
165673
165972
|
if (where === null) throw new require_dist10.InvalidRecordError(`${kind}: aggregate has nothing to read`);
|
|
165674
165973
|
const fn = q.op.toUpperCase();
|
|
@@ -169092,7 +169391,7 @@ var require_sqlite_settings_addon = __commonJS({
|
|
|
169092
169391
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
169093
169392
|
var require_dist10 = require_dist_Bn_RNanh();
|
|
169094
169393
|
var require_retired_settings_keys = require_retired_settings_keys_D_VwZiDt();
|
|
169095
|
-
var require_wal_maintenance =
|
|
169394
|
+
var require_wal_maintenance = require_wal_maintenance_CaJjuLHq();
|
|
169096
169395
|
var require_sqlite_snapshot_protocol = require_sqlite_snapshot_protocol_B9OndqZv();
|
|
169097
169396
|
var require_wal_checkpoint_policy = require_wal_checkpoint_policy_d2z2qPqx();
|
|
169098
169397
|
var node_fs_promises = __require("fs/promises");
|
|
@@ -170819,7 +171118,7 @@ var require_sqlite_storage = __commonJS({
|
|
|
170819
171118
|
});
|
|
170820
171119
|
require_chunk_Cek0wNdY();
|
|
170821
171120
|
var require_builtins_sqlite_storage_filesystem_storage_addon = require_filesystem_storage_addon();
|
|
170822
|
-
var require_wal_maintenance =
|
|
171121
|
+
var require_wal_maintenance = require_wal_maintenance_CaJjuLHq();
|
|
170823
171122
|
var require_builtins_sqlite_storage_sqlite_settings_addon = require_sqlite_settings_addon();
|
|
170824
171123
|
var ConfigStore = class {
|
|
170825
171124
|
db;
|
|
@@ -275007,9 +275306,9 @@ var require_winston_logging = __commonJS({
|
|
|
275007
275306
|
}
|
|
275008
275307
|
});
|
|
275009
275308
|
|
|
275010
|
-
// ../system/dist/custom-action-registry-
|
|
275011
|
-
var
|
|
275012
|
-
"../system/dist/custom-action-registry-
|
|
275309
|
+
// ../system/dist/custom-action-registry-MRyes5j0.js
|
|
275310
|
+
var require_custom_action_registry_MRyes5j0 = __commonJS({
|
|
275311
|
+
"../system/dist/custom-action-registry-MRyes5j0.js"(exports) {
|
|
275013
275312
|
"use strict";
|
|
275014
275313
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
275015
275314
|
var node_crypto = __require("crypto");
|
|
@@ -275132,6 +275431,8 @@ var require_custom_action_registry_COyb49zm = __commonJS({
|
|
|
275132
275431
|
"objectDetection/yolov9/openvino/camstack-yolov9t-320-int8.xml": "ee465e0ee5c6ad7c4edc481b506a076045b82236ada80efcf8601a6ba0a7ee86",
|
|
275133
275432
|
"objectDetection/yolov9/openvino/camstack-yolov9t-640-fp16.xml": "d4dd2278941ccb210d0763d822353f6d951c6a4f4f5a1604d7e3536ce6ffb954",
|
|
275134
275433
|
"objectDetection/yolov9/openvino/camstack-yolov9t-640-int8.xml": "be2c95951a9f3a6d408bbabd551c99b8a6190f9ff659ae614b9e58cf0e51202c",
|
|
275434
|
+
"objectDetection/yolov9/tflite/yolov9-s-relu6-best_320_int8_edgetpu.tflite": "49a38e77439b475d0d259a6d9fe7ea32fcaa58de3748499dd120aceebad9c591",
|
|
275435
|
+
"objectDetection/yolov9/tflite/yolov9-s-relu6-tpumax_512_int8_edgetpu.tflite": "f634f60259101556825fd69662f96282e74364b507f83e6382cc34d5d0e6170e",
|
|
275135
275436
|
"packageDetection/rfdetr-package/coreml/camstack-rfdetr-package.mlpackage": "73e42f03d66011a311bd83a0a3d1890e7eb1b9b2ba2b5688552a5d4fd60e0e72",
|
|
275136
275437
|
"packageDetection/rfdetr-package/onnx/camstack-rfdetr-package.onnx": "5af96c6b5936f179e317c9e3915b7c7f74ea3625355f97f6a071c3cd5af2475c",
|
|
275137
275438
|
"packageDetection/rfdetr-package/openvino/camstack-rfdetr-package.xml": "e2cb5bbccb7809d5c7e691a957bc5e008084119bdf29e2c95d6b6b0791e3061a",
|
|
@@ -288030,11 +288331,12 @@ var require_restore_archive_DM1OBYq4 = __commonJS({
|
|
|
288030
288331
|
}
|
|
288031
288332
|
});
|
|
288032
288333
|
|
|
288033
|
-
// ../system/dist/coral-accelerators-
|
|
288034
|
-
var
|
|
288035
|
-
"../system/dist/coral-accelerators-
|
|
288334
|
+
// ../system/dist/coral-accelerators-oUXmmbc2.js
|
|
288335
|
+
var require_coral_accelerators_oUXmmbc2 = __commonJS({
|
|
288336
|
+
"../system/dist/coral-accelerators-oUXmmbc2.js"(exports) {
|
|
288036
288337
|
"use strict";
|
|
288037
288338
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
288339
|
+
var _camstack_types_node = require_node();
|
|
288038
288340
|
var node_fs = __require("fs");
|
|
288039
288341
|
node_fs = require_chunk.__toESM(node_fs);
|
|
288040
288342
|
var CORAL_USB_IDS = [{
|
|
@@ -288047,7 +288349,13 @@ var require_coral_accelerators_Bi_c3Rft = __commonJS({
|
|
|
288047
288349
|
var CORAL_PCI_VENDOR = "0x1ac1";
|
|
288048
288350
|
var CORAL_PCI_DEVICE = "0x089a";
|
|
288049
288351
|
var APEX_ENTRY = /^apex_(\d+)$/;
|
|
288050
|
-
|
|
288352
|
+
function currentDelegateHost() {
|
|
288353
|
+
return {
|
|
288354
|
+
platform: process.platform,
|
|
288355
|
+
dataDir: (0, _camstack_types_node.nodeDataRootFromEnv)(process.env),
|
|
288356
|
+
override: process.env[_camstack_types_node.EDGETPU_LIB_ENV]
|
|
288357
|
+
};
|
|
288358
|
+
}
|
|
288051
288359
|
function countUsbCorals(fsx) {
|
|
288052
288360
|
let count = 0;
|
|
288053
288361
|
for (const device of fsx.listUsbDevices()) {
|
|
@@ -288083,7 +288391,7 @@ var require_coral_accelerators_Bi_c3Rft = __commonJS({
|
|
|
288083
288391
|
driverMissing
|
|
288084
288392
|
};
|
|
288085
288393
|
}
|
|
288086
|
-
function classifyCoralAccelerator(fsx) {
|
|
288394
|
+
function classifyCoralAccelerator(fsx, delegateHost = currentDelegateHost()) {
|
|
288087
288395
|
const usb = countUsbCorals(fsx);
|
|
288088
288396
|
const pci = classifyPci(fsx);
|
|
288089
288397
|
const units = [];
|
|
@@ -288114,8 +288422,10 @@ var require_coral_accelerators_Bi_c3Rft = __commonJS({
|
|
|
288114
288422
|
type: "coral-edgetpu",
|
|
288115
288423
|
units
|
|
288116
288424
|
};
|
|
288117
|
-
|
|
288118
|
-
|
|
288425
|
+
if ((0, _camstack_types_node.chooseEdgetpuDelegate)({
|
|
288426
|
+
...delegateHost,
|
|
288427
|
+
exists: (p) => fsx.exists(p)
|
|
288428
|
+
}) !== null) return {
|
|
288119
288429
|
type: "coral-edgetpu",
|
|
288120
288430
|
units: [{
|
|
288121
288431
|
bus: "usb",
|
|
@@ -294795,7 +295105,7 @@ var require_dist3 = __commonJS({
|
|
|
294795
295105
|
var require_builtins_native_metrics_native_metrics_addon = require_native_metrics_addon();
|
|
294796
295106
|
var require_builtins_device_history_device_history_addon = require_device_history_addon();
|
|
294797
295107
|
var require_builtins_sqlite_storage_filesystem_storage_addon = require_filesystem_storage_addon();
|
|
294798
|
-
var require_wal_maintenance =
|
|
295108
|
+
var require_wal_maintenance = require_wal_maintenance_CaJjuLHq();
|
|
294799
295109
|
var require_builtins_sqlite_storage_sqlite_settings_addon = require_sqlite_settings_addon();
|
|
294800
295110
|
var require_builtins_sqlite_storage_index = require_sqlite_storage();
|
|
294801
295111
|
var require_builtins_storage_orchestrator_storage_orchestrator_addon = require_storage_orchestrator_addon();
|
|
@@ -294805,12 +295115,12 @@ var require_dist3 = __commonJS({
|
|
|
294805
295115
|
var require_builtins_system_config_system_config_addon = require_system_config_addon();
|
|
294806
295116
|
require_system_config();
|
|
294807
295117
|
var require_builtins_winston_logging_index = require_winston_logging();
|
|
294808
|
-
var require_custom_action_registry =
|
|
295118
|
+
var require_custom_action_registry = require_custom_action_registry_MRyes5j0();
|
|
294809
295119
|
var require_hub_mdns_ciao = require_hub_mdns_ciao_CTBTlia4();
|
|
294810
295120
|
var require_platform_key_source = require_platform_key_source_Di7HrlGR();
|
|
294811
295121
|
var require_resource_monitor = require_resource_monitor_mio9dSCT();
|
|
294812
295122
|
var require_restore_archive = require_restore_archive_DM1OBYq4();
|
|
294813
|
-
var require_coral_accelerators =
|
|
295123
|
+
var require_coral_accelerators = require_coral_accelerators_oUXmmbc2();
|
|
294814
295124
|
var zod = require_zod();
|
|
294815
295125
|
var node_crypto = __require("crypto");
|
|
294816
295126
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
@@ -299706,6 +300016,20 @@ var require_dist3 = __commonJS({
|
|
|
299706
300016
|
}
|
|
299707
300017
|
async loadDeclaration(addonDir, declaration, packageName, packageVersion, packageDisplayName, bundle) {
|
|
299708
300018
|
if (!declaration.entry) throw new Error(`Addon "${declaration.id}" has no entry point in package.json`);
|
|
300019
|
+
const owner = this.addons.get(declaration.id);
|
|
300020
|
+
if (owner !== void 0 && owner.packageName !== packageName) {
|
|
300021
|
+
this.logger.warn(`Skipped addon "${declaration.id}" from ${packageName}: already provided by ${owner.packageName}`, {
|
|
300022
|
+
tags: { addonId: declaration.id },
|
|
300023
|
+
meta: {
|
|
300024
|
+
skippedPackage: packageName,
|
|
300025
|
+
skippedVersion: packageVersion,
|
|
300026
|
+
skippedDir: addonDir,
|
|
300027
|
+
ownerPackage: owner.packageName,
|
|
300028
|
+
ownerVersion: owner.packageVersion
|
|
300029
|
+
}
|
|
300030
|
+
});
|
|
300031
|
+
return;
|
|
300032
|
+
}
|
|
299709
300033
|
const entryFile = declaration.entry.replace(/^\.\//, "").replace(/^src\//, "dist/").replace(/\.ts$/, ".js");
|
|
299710
300034
|
let entryPath = node_path.resolve(addonDir, entryFile);
|
|
299711
300035
|
if (!node_fs.existsSync(entryPath)) {
|
|
@@ -313417,6 +313741,19 @@ var require_dist3 = __commonJS({
|
|
|
313417
313741
|
const pythonPath = await this.ensurePython();
|
|
313418
313742
|
if (!pythonPath) throw new Error("Cannot install Python requirements: Python is not available");
|
|
313419
313743
|
await singleFlight(this.depsDir, "python-pip", () => (0, _camstack_types_node.installPythonRequirements)(pythonPath, requirementsFile, this.logger));
|
|
313744
|
+
await this.stageNativeDepsDeclaredBy(requirementsFile);
|
|
313745
|
+
}
|
|
313746
|
+
/**
|
|
313747
|
+
* The native library a requirements file says its packages need
|
|
313748
|
+
* (`# camstack-native-dep: edgetpu-delegate`), staged under this node's
|
|
313749
|
+
* deps dir. Runs on every call — not only the first pip install — so a
|
|
313750
|
+
* node whose pip marker predates the line still gets the library. A
|
|
313751
|
+
* platform without a build answers `unavailable` (logged, not thrown); a
|
|
313752
|
+
* failed or tampered download throws, and provisioning reports it.
|
|
313753
|
+
*/
|
|
313754
|
+
async stageNativeDepsDeclaredBy(requirementsFile) {
|
|
313755
|
+
if (!(0, _camstack_types_node.declaresEdgetpuDelegate)(node_fs.readFileSync(requirementsFile, "utf8"))) return;
|
|
313756
|
+
await singleFlight(this.depsDir, "edgetpu-delegate", () => (0, _camstack_types_node.ensureEdgetpuDelegate)(this.nodeRoot, this.logger));
|
|
313420
313757
|
}
|
|
313421
313758
|
getDepsDir() {
|
|
313422
313759
|
return this.depsDir;
|
|
@@ -317677,6 +318014,7 @@ var require_dist3 = __commonJS({
|
|
|
317677
318014
|
exports.RUNTIME_DEFAULTS = require_dist10.RUNTIME_DEFAULTS;
|
|
317678
318015
|
exports.ReadinessRegistry = require_dist10.ReadinessRegistry;
|
|
317679
318016
|
exports.ReadinessTimeoutError = require_dist10.ReadinessTimeoutError;
|
|
318017
|
+
exports.RecordsEngine = require_wal_maintenance.RecordsEngine;
|
|
317680
318018
|
exports.ReplEngine = ReplEngine;
|
|
317681
318019
|
exports.RingBuffer = RingBuffer;
|
|
317682
318020
|
exports.SERVER_AUTH_OID = require_agent_https.SERVER_AUTH_OID;
|
|
@@ -588165,8 +588503,12 @@ var require_addon_registry_service = __commonJS({
|
|
|
588165
588503
|
function isShareViewKind(value) {
|
|
588166
588504
|
return typeof value === "string" && types_1.SHARE_VIEW_KINDS.includes(value);
|
|
588167
588505
|
}
|
|
588506
|
+
var SELF_READYING_CAPABILITIES = /* @__PURE__ */ new Set([
|
|
588507
|
+
"platform-probe",
|
|
588508
|
+
"device-history"
|
|
588509
|
+
]);
|
|
588168
588510
|
function shouldEmitProviderRegisteredReady(capability) {
|
|
588169
|
-
return capability
|
|
588511
|
+
return !SELF_READYING_CAPABILITIES.has(capability);
|
|
588170
588512
|
}
|
|
588171
588513
|
var DEVICE_SCOPED_CAP_NAMES = new Set(types_1.ALL_CAPABILITY_DEFINITIONS.filter((def) => def.scope === "device").map((def) => def.name));
|
|
588172
588514
|
function isDeviceScopedCapName(capName) {
|
|
@@ -589790,6 +590132,13 @@ var require_addon_registry_service = __commonJS({
|
|
|
589790
590132
|
const failed = [];
|
|
589791
590133
|
for (const registered of freshLoader.listAddons()) {
|
|
589792
590134
|
const existing = this.addonEntries.get(registered.declaration.id);
|
|
590135
|
+
if (existing && existing.packageName !== registered.packageName) {
|
|
590136
|
+
this.logger.warn("loadNewAddons: skipped a package claiming a running addon id", {
|
|
590137
|
+
tags: { addonId: registered.declaration.id },
|
|
590138
|
+
meta: { skippedPackage: registered.packageName, ownerPackage: existing.packageName }
|
|
590139
|
+
});
|
|
590140
|
+
continue;
|
|
590141
|
+
}
|
|
589793
590142
|
if (existing) {
|
|
589794
590143
|
existing.packageVersion = registered.packageVersion;
|
|
589795
590144
|
existing.packageName = registered.packageName;
|