@camstack/system 1.1.26 → 1.1.28
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 +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/index.js +33 -23
- package/dist/index.mjs +33 -23
- package/dist/kernel/capability-registry.d.ts +10 -0
- package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +2 -0
- package/dist/kernel/inference/inference-resolver.d.ts +4 -3
- package/dist/{manifest-python-deps-DPA7N9UP.mjs → manifest-python-deps-DXMKBZW1.mjs} +9 -6
- package/dist/{manifest-python-deps-CCmnJmNf.js → manifest-python-deps-jWKVwa7t.js} +9 -6
- package/package.json +1 -1
package/dist/addon-runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
2
|
+
const require_manifest_python_deps = require("./manifest-python-deps-jWKVwa7t.js");
|
|
3
3
|
const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
node_fs = require_chunk.__toESM(node_fs);
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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 { 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-DXMKBZW1.mjs";
|
|
2
2
|
import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
|
|
3
3
|
import { register } from "node:module";
|
|
4
4
|
import * as fs from "node:fs";
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ const require_builtins_local_auth_local_auth_addon = require("./builtins/local-a
|
|
|
20
20
|
require("./builtins/local-auth/index.js");
|
|
21
21
|
const require_builtins_device_manager_device_manager_addon = require("./builtins/device-manager/device-manager.addon.js");
|
|
22
22
|
require("./builtins/device-manager/index.js");
|
|
23
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
23
|
+
const require_manifest_python_deps = require("./manifest-python-deps-jWKVwa7t.js");
|
|
24
24
|
const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
|
|
25
25
|
let _camstack_types_node = require("@camstack/types/node");
|
|
26
26
|
let node_http = require("node:http");
|
|
@@ -3339,32 +3339,30 @@ var AddonInstaller = class AddonInstaller {
|
|
|
3339
3339
|
}
|
|
3340
3340
|
/** Install addon from a tgz file (uploaded or downloaded) */
|
|
3341
3341
|
async installFromTgz(tgzPath) {
|
|
3342
|
-
const
|
|
3342
|
+
const stagingRoot = node_path.join(this.addonsDir, ".staging");
|
|
3343
|
+
ensureDir(stagingRoot);
|
|
3344
|
+
await this.sweepGraveyard(stagingRoot);
|
|
3345
|
+
const stagingDir = node_path.join(stagingRoot, `install-${process.pid}-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`);
|
|
3346
|
+
ensureDir(stagingDir);
|
|
3343
3347
|
try {
|
|
3344
3348
|
await execFileAsync("tar", [
|
|
3345
3349
|
"-xzf",
|
|
3346
3350
|
tgzPath,
|
|
3347
3351
|
"-C",
|
|
3348
|
-
|
|
3349
|
-
], { timeout:
|
|
3350
|
-
const
|
|
3351
|
-
const pkgJsonPath =
|
|
3352
|
+
stagingDir
|
|
3353
|
+
], { timeout: 12e4 });
|
|
3354
|
+
const pkgDir = node_fs.existsSync(node_path.join(stagingDir, "package", "package.json")) ? node_path.join(stagingDir, "package") : stagingDir;
|
|
3355
|
+
const pkgJsonPath = node_path.join(pkgDir, "package.json");
|
|
3352
3356
|
if (!node_fs.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
|
|
3353
3357
|
const pkgView = readPackageJson(pkgJsonPath);
|
|
3354
3358
|
if (!pkgView) throw new Error(`Invalid package.json at ${pkgJsonPath}`);
|
|
3355
3359
|
if (!pkgView.camstackAddons) throw new Error(`Package ${pkgView.name} has no camstack.addons manifest`);
|
|
3356
3360
|
const targetDir = node_path.join(this.addonsDir, pkgView.name);
|
|
3357
|
-
await this.evictInstallDir(targetDir);
|
|
3358
|
-
ensureDir(targetDir);
|
|
3359
|
-
const sourceDir = node_path.dirname(pkgJsonPath);
|
|
3360
3361
|
const strippedManifest = stripCamstackDeps(pkgView.raw);
|
|
3361
|
-
await node_fs.promises.writeFile(
|
|
3362
|
-
const sourceDist = node_path.join(sourceDir, "dist");
|
|
3363
|
-
if (node_fs.existsSync(sourceDist)) await copyDirRecursive(sourceDist, node_path.join(targetDir, "dist"));
|
|
3364
|
-
await copyExtraFileDirs(pkgView.raw, sourceDir, targetDir);
|
|
3362
|
+
await node_fs.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
|
|
3365
3363
|
const strippedRuntimeDeps = strippedManifest["dependencies"];
|
|
3366
3364
|
if (strippedRuntimeDeps != null && typeof strippedRuntimeDeps === "object" && Object.keys(strippedRuntimeDeps).length > 0) {
|
|
3367
|
-
this.logger.info(`${pkgView.name} — installing runtime dependencies`, { meta: {
|
|
3365
|
+
this.logger.info(`${pkgView.name} — installing runtime dependencies`, { meta: { stagingDir: pkgDir } });
|
|
3368
3366
|
try {
|
|
3369
3367
|
await execFileAsync("npm", [
|
|
3370
3368
|
"install",
|
|
@@ -3375,7 +3373,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
3375
3373
|
"--no-package-lock",
|
|
3376
3374
|
...this.registry ? ["--registry", this.registry] : []
|
|
3377
3375
|
], {
|
|
3378
|
-
cwd:
|
|
3376
|
+
cwd: pkgDir,
|
|
3379
3377
|
timeout: 24e4
|
|
3380
3378
|
});
|
|
3381
3379
|
} catch (err) {
|
|
@@ -3383,14 +3381,13 @@ var AddonInstaller = class AddonInstaller {
|
|
|
3383
3381
|
}
|
|
3384
3382
|
}
|
|
3385
3383
|
try {
|
|
3386
|
-
await require_manifest_python_deps.installManifestNativeDeps(
|
|
3384
|
+
await require_manifest_python_deps.installManifestNativeDeps(pkgDir, pkgView.raw, this.logger, this.registry);
|
|
3387
3385
|
} catch (nativeErr) {
|
|
3388
|
-
await node_fs.promises.rm(targetDir, {
|
|
3389
|
-
recursive: true,
|
|
3390
|
-
force: true
|
|
3391
|
-
});
|
|
3392
3386
|
throw new Error(`${pkgView.name} — native deps install failed: ${(0, _camstack_types.errMsg)(nativeErr)}`, { cause: nativeErr });
|
|
3393
3387
|
}
|
|
3388
|
+
await this.evictInstallDir(targetDir);
|
|
3389
|
+
ensureDir(node_path.dirname(targetDir));
|
|
3390
|
+
await node_fs.promises.rename(pkgDir, targetDir);
|
|
3394
3391
|
this.manifest.upsert(pkgView.name, {
|
|
3395
3392
|
version: pkgView.version,
|
|
3396
3393
|
source: "bundled"
|
|
@@ -3400,10 +3397,10 @@ var AddonInstaller = class AddonInstaller {
|
|
|
3400
3397
|
version: pkgView.version
|
|
3401
3398
|
};
|
|
3402
3399
|
} finally {
|
|
3403
|
-
await node_fs.promises.rm(
|
|
3400
|
+
await node_fs.promises.rm(stagingDir, {
|
|
3404
3401
|
recursive: true,
|
|
3405
3402
|
force: true
|
|
3406
|
-
});
|
|
3403
|
+
}).catch(() => void 0);
|
|
3407
3404
|
}
|
|
3408
3405
|
}
|
|
3409
3406
|
/**
|
|
@@ -4128,6 +4125,18 @@ var CapabilityRegistry = class CapabilityRegistry {
|
|
|
4128
4125
|
}
|
|
4129
4126
|
}
|
|
4130
4127
|
}
|
|
4128
|
+
/**
|
|
4129
|
+
* Whether a provider for the exact `(capabilityName, addonId)` pair is
|
|
4130
|
+
* currently registered. Lets a re-registration path (e.g. the agent's
|
|
4131
|
+
* in-place group-runner reload) make {@link registerProvider} idempotent by
|
|
4132
|
+
* dropping a stale prior registration first — `registerProvider` itself
|
|
4133
|
+
* throws on a duplicate pair (a deliberate guard against a duplicate
|
|
4134
|
+
* `registerProvider` call inside one init path), so callers that legitimately
|
|
4135
|
+
* re-register the same pair must unregister first.
|
|
4136
|
+
*/
|
|
4137
|
+
hasProvider(capabilityName, addonId) {
|
|
4138
|
+
return this.capabilities.get(capabilityName)?.providers.has(addonId) ?? false;
|
|
4139
|
+
}
|
|
4131
4140
|
/** Unregister a provider. For singleton: clears active. For collection: removes from list. */
|
|
4132
4141
|
unregisterProvider(capabilityName, addonId) {
|
|
4133
4142
|
const state = this.capabilities.get(capabilityName);
|
|
@@ -93239,8 +93248,9 @@ async function stageFrameworkLockstep(input) {
|
|
|
93239
93248
|
extract: input.extract
|
|
93240
93249
|
});
|
|
93241
93250
|
const results = [];
|
|
93251
|
+
const primary = FRAMEWORK_LOCKSTEP[0];
|
|
93242
93252
|
for (const pkg of FRAMEWORK_LOCKSTEP) {
|
|
93243
|
-
const version = await input.resolveVersion(pkg);
|
|
93253
|
+
const version = pkg === primary ? input.toVersion : await input.resolveVersion(pkg);
|
|
93244
93254
|
const { stagedPath } = await stagingArea.fetchAndStage({
|
|
93245
93255
|
jobId: input.jobId,
|
|
93246
93256
|
name: pkg,
|
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import { LocalAuthAddon, a as require_ms, c as __esmMin, d as __toCommonJS, f as
|
|
|
18
18
|
import "./builtins/local-auth/index.mjs";
|
|
19
19
|
import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
|
|
20
20
|
import "./builtins/device-manager/index.mjs";
|
|
21
|
-
import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, y as __resetCapUsageRegistryForTests, yt as resolveAddonClass, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-
|
|
21
|
+
import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, y as __resetCapUsageRegistryForTests, yt as resolveAddonClass, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-DXMKBZW1.mjs";
|
|
22
22
|
import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
|
|
23
23
|
import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
24
24
|
import { request } from "node:http";
|
|
@@ -3331,32 +3331,30 @@ var AddonInstaller = class AddonInstaller {
|
|
|
3331
3331
|
}
|
|
3332
3332
|
/** Install addon from a tgz file (uploaded or downloaded) */
|
|
3333
3333
|
async installFromTgz(tgzPath) {
|
|
3334
|
-
const
|
|
3334
|
+
const stagingRoot = path$39.join(this.addonsDir, ".staging");
|
|
3335
|
+
ensureDir(stagingRoot);
|
|
3336
|
+
await this.sweepGraveyard(stagingRoot);
|
|
3337
|
+
const stagingDir = path$39.join(stagingRoot, `install-${process.pid}-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`);
|
|
3338
|
+
ensureDir(stagingDir);
|
|
3335
3339
|
try {
|
|
3336
3340
|
await execFileAsync("tar", [
|
|
3337
3341
|
"-xzf",
|
|
3338
3342
|
tgzPath,
|
|
3339
3343
|
"-C",
|
|
3340
|
-
|
|
3341
|
-
], { timeout:
|
|
3342
|
-
const
|
|
3343
|
-
const pkgJsonPath =
|
|
3344
|
+
stagingDir
|
|
3345
|
+
], { timeout: 12e4 });
|
|
3346
|
+
const pkgDir = fs$17.existsSync(path$39.join(stagingDir, "package", "package.json")) ? path$39.join(stagingDir, "package") : stagingDir;
|
|
3347
|
+
const pkgJsonPath = path$39.join(pkgDir, "package.json");
|
|
3344
3348
|
if (!fs$17.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
|
|
3345
3349
|
const pkgView = readPackageJson(pkgJsonPath);
|
|
3346
3350
|
if (!pkgView) throw new Error(`Invalid package.json at ${pkgJsonPath}`);
|
|
3347
3351
|
if (!pkgView.camstackAddons) throw new Error(`Package ${pkgView.name} has no camstack.addons manifest`);
|
|
3348
3352
|
const targetDir = path$39.join(this.addonsDir, pkgView.name);
|
|
3349
|
-
await this.evictInstallDir(targetDir);
|
|
3350
|
-
ensureDir(targetDir);
|
|
3351
|
-
const sourceDir = path$39.dirname(pkgJsonPath);
|
|
3352
3353
|
const strippedManifest = stripCamstackDeps(pkgView.raw);
|
|
3353
|
-
await fs$17.promises.writeFile(
|
|
3354
|
-
const sourceDist = path$39.join(sourceDir, "dist");
|
|
3355
|
-
if (fs$17.existsSync(sourceDist)) await copyDirRecursive(sourceDist, path$39.join(targetDir, "dist"));
|
|
3356
|
-
await copyExtraFileDirs(pkgView.raw, sourceDir, targetDir);
|
|
3354
|
+
await fs$17.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
|
|
3357
3355
|
const strippedRuntimeDeps = strippedManifest["dependencies"];
|
|
3358
3356
|
if (strippedRuntimeDeps != null && typeof strippedRuntimeDeps === "object" && Object.keys(strippedRuntimeDeps).length > 0) {
|
|
3359
|
-
this.logger.info(`${pkgView.name} — installing runtime dependencies`, { meta: {
|
|
3357
|
+
this.logger.info(`${pkgView.name} — installing runtime dependencies`, { meta: { stagingDir: pkgDir } });
|
|
3360
3358
|
try {
|
|
3361
3359
|
await execFileAsync("npm", [
|
|
3362
3360
|
"install",
|
|
@@ -3367,7 +3365,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
3367
3365
|
"--no-package-lock",
|
|
3368
3366
|
...this.registry ? ["--registry", this.registry] : []
|
|
3369
3367
|
], {
|
|
3370
|
-
cwd:
|
|
3368
|
+
cwd: pkgDir,
|
|
3371
3369
|
timeout: 24e4
|
|
3372
3370
|
});
|
|
3373
3371
|
} catch (err) {
|
|
@@ -3375,14 +3373,13 @@ var AddonInstaller = class AddonInstaller {
|
|
|
3375
3373
|
}
|
|
3376
3374
|
}
|
|
3377
3375
|
try {
|
|
3378
|
-
await installManifestNativeDeps(
|
|
3376
|
+
await installManifestNativeDeps(pkgDir, pkgView.raw, this.logger, this.registry);
|
|
3379
3377
|
} catch (nativeErr) {
|
|
3380
|
-
await fs$17.promises.rm(targetDir, {
|
|
3381
|
-
recursive: true,
|
|
3382
|
-
force: true
|
|
3383
|
-
});
|
|
3384
3378
|
throw new Error(`${pkgView.name} — native deps install failed: ${errMsg(nativeErr)}`, { cause: nativeErr });
|
|
3385
3379
|
}
|
|
3380
|
+
await this.evictInstallDir(targetDir);
|
|
3381
|
+
ensureDir(path$39.dirname(targetDir));
|
|
3382
|
+
await fs$17.promises.rename(pkgDir, targetDir);
|
|
3386
3383
|
this.manifest.upsert(pkgView.name, {
|
|
3387
3384
|
version: pkgView.version,
|
|
3388
3385
|
source: "bundled"
|
|
@@ -3392,10 +3389,10 @@ var AddonInstaller = class AddonInstaller {
|
|
|
3392
3389
|
version: pkgView.version
|
|
3393
3390
|
};
|
|
3394
3391
|
} finally {
|
|
3395
|
-
await fs$17.promises.rm(
|
|
3392
|
+
await fs$17.promises.rm(stagingDir, {
|
|
3396
3393
|
recursive: true,
|
|
3397
3394
|
force: true
|
|
3398
|
-
});
|
|
3395
|
+
}).catch(() => void 0);
|
|
3399
3396
|
}
|
|
3400
3397
|
}
|
|
3401
3398
|
/**
|
|
@@ -4120,6 +4117,18 @@ var CapabilityRegistry = class CapabilityRegistry {
|
|
|
4120
4117
|
}
|
|
4121
4118
|
}
|
|
4122
4119
|
}
|
|
4120
|
+
/**
|
|
4121
|
+
* Whether a provider for the exact `(capabilityName, addonId)` pair is
|
|
4122
|
+
* currently registered. Lets a re-registration path (e.g. the agent's
|
|
4123
|
+
* in-place group-runner reload) make {@link registerProvider} idempotent by
|
|
4124
|
+
* dropping a stale prior registration first — `registerProvider` itself
|
|
4125
|
+
* throws on a duplicate pair (a deliberate guard against a duplicate
|
|
4126
|
+
* `registerProvider` call inside one init path), so callers that legitimately
|
|
4127
|
+
* re-register the same pair must unregister first.
|
|
4128
|
+
*/
|
|
4129
|
+
hasProvider(capabilityName, addonId) {
|
|
4130
|
+
return this.capabilities.get(capabilityName)?.providers.has(addonId) ?? false;
|
|
4131
|
+
}
|
|
4123
4132
|
/** Unregister a provider. For singleton: clears active. For collection: removes from list. */
|
|
4124
4133
|
unregisterProvider(capabilityName, addonId) {
|
|
4125
4134
|
const state = this.capabilities.get(capabilityName);
|
|
@@ -93231,8 +93240,9 @@ async function stageFrameworkLockstep(input) {
|
|
|
93231
93240
|
extract: input.extract
|
|
93232
93241
|
});
|
|
93233
93242
|
const results = [];
|
|
93243
|
+
const primary = FRAMEWORK_LOCKSTEP[0];
|
|
93234
93244
|
for (const pkg of FRAMEWORK_LOCKSTEP) {
|
|
93235
|
-
const version = await input.resolveVersion(pkg);
|
|
93245
|
+
const version = pkg === primary ? input.toVersion : await input.resolveVersion(pkg);
|
|
93236
93246
|
const { stagedPath } = await stagingArea.fetchAndStage({
|
|
93237
93247
|
jobId: input.jobId,
|
|
93238
93248
|
name: pkg,
|
|
@@ -137,6 +137,16 @@ export declare class CapabilityRegistry {
|
|
|
137
137
|
* using different `addonId`s and the user picks one via `configReader`.
|
|
138
138
|
*/
|
|
139
139
|
registerProvider(capabilityName: string, addonId: string, provider: unknown): void;
|
|
140
|
+
/**
|
|
141
|
+
* Whether a provider for the exact `(capabilityName, addonId)` pair is
|
|
142
|
+
* currently registered. Lets a re-registration path (e.g. the agent's
|
|
143
|
+
* in-place group-runner reload) make {@link registerProvider} idempotent by
|
|
144
|
+
* dropping a stale prior registration first — `registerProvider` itself
|
|
145
|
+
* throws on a duplicate pair (a deliberate guard against a duplicate
|
|
146
|
+
* `registerProvider` call inside one init path), so callers that legitimately
|
|
147
|
+
* re-register the same pair must unregister first.
|
|
148
|
+
*/
|
|
149
|
+
hasProvider(capabilityName: string, addonId: string): boolean;
|
|
140
150
|
/** Unregister a provider. For singleton: clears active. For collection: removes from list. */
|
|
141
151
|
unregisterProvider(capabilityName: string, addonId: string): void;
|
|
142
152
|
/** Enable a previously disabled collection provider. */
|
|
@@ -6,6 +6,8 @@ export interface PlatformSignals {
|
|
|
6
6
|
readonly hasAmdGpu: boolean;
|
|
7
7
|
readonly hasIntelGpu: boolean;
|
|
8
8
|
readonly hasRenderNode: boolean;
|
|
9
|
+
/** Intel NPU (Meteor Lake / Core Ultra "AI Boost") — exposed as /dev/accel/accel0. */
|
|
10
|
+
readonly hasIntelNpu: boolean;
|
|
9
11
|
}
|
|
10
12
|
export declare function probePlatform(): PlatformSignals;
|
|
11
13
|
/**
|
|
@@ -3,9 +3,10 @@ import { PlatformSignals } from '../hwaccel/hwaccel-resolver.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Map the shared platform GPU-vendor probe into the inference `gpu`/`npu` types
|
|
5
5
|
* the runtime scorer understands. NVIDIA → cuda; Intel iGPU (or a bare render
|
|
6
|
-
* node) → openvino; Apple Silicon → CoreML/ANE
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* node) → openvino; Apple Silicon → CoreML/ANE; Intel NPU ("AI Boost") →
|
|
7
|
+
* intel-npu. The NPU only bumps the score, never changes the openvino winner,
|
|
8
|
+
* but surfacing it lets the TS hint/UI reflect the accelerator the python pool
|
|
9
|
+
* actually compiles onto (NPU>GPU>CPU). PURE — unit-tested.
|
|
9
10
|
*/
|
|
10
11
|
export declare function mapSignalsToInferenceHardware(signals: PlatformSignals): KernelInferenceHardware;
|
|
11
12
|
/**
|
|
@@ -5554,7 +5554,8 @@ function probeLinuxGpus() {
|
|
|
5554
5554
|
hasNvidiaGpu: false,
|
|
5555
5555
|
hasAmdGpu: false,
|
|
5556
5556
|
hasIntelGpu: false,
|
|
5557
|
-
hasRenderNode: false
|
|
5557
|
+
hasRenderNode: false,
|
|
5558
|
+
hasIntelNpu: safeExistsSync("/dev/accel/accel0")
|
|
5558
5559
|
};
|
|
5559
5560
|
signals.hasRenderNode = safeExistsSync("/dev/dri/renderD128");
|
|
5560
5561
|
if (safeExistsSync("/dev/nvidia0") || safeExistsSync("/proc/driver/nvidia/version")) signals.hasNvidiaGpu = true;
|
|
@@ -5586,7 +5587,8 @@ function probePlatform() {
|
|
|
5586
5587
|
hasNvidiaGpu: false,
|
|
5587
5588
|
hasAmdGpu: false,
|
|
5588
5589
|
hasIntelGpu: false,
|
|
5589
|
-
hasRenderNode: false
|
|
5590
|
+
hasRenderNode: false,
|
|
5591
|
+
hasIntelNpu: false
|
|
5590
5592
|
};
|
|
5591
5593
|
}
|
|
5592
5594
|
function pickBackendsForPlatform(signals) {
|
|
@@ -5663,14 +5665,15 @@ function createKernelHwAccel() {
|
|
|
5663
5665
|
/**
|
|
5664
5666
|
* Map the shared platform GPU-vendor probe into the inference `gpu`/`npu` types
|
|
5665
5667
|
* the runtime scorer understands. NVIDIA → cuda; Intel iGPU (or a bare render
|
|
5666
|
-
* node) → openvino; Apple Silicon → CoreML/ANE
|
|
5667
|
-
*
|
|
5668
|
-
*
|
|
5668
|
+
* node) → openvino; Apple Silicon → CoreML/ANE; Intel NPU ("AI Boost") →
|
|
5669
|
+
* intel-npu. The NPU only bumps the score, never changes the openvino winner,
|
|
5670
|
+
* but surfacing it lets the TS hint/UI reflect the accelerator the python pool
|
|
5671
|
+
* actually compiles onto (NPU>GPU>CPU). PURE — unit-tested.
|
|
5669
5672
|
*/
|
|
5670
5673
|
function mapSignalsToInferenceHardware(signals) {
|
|
5671
5674
|
return {
|
|
5672
5675
|
gpu: signals.hasNvidiaGpu ? { type: "nvidia" } : signals.hasIntelGpu || signals.hasRenderNode ? { type: "intel" } : null,
|
|
5673
|
-
npu: signals.platform === "darwin" && signals.arch === "arm64" ? { type: "apple-ane" } : null
|
|
5676
|
+
npu: signals.platform === "darwin" && signals.arch === "arm64" ? { type: "apple-ane" } : signals.hasIntelNpu ? { type: "intel-npu" } : null
|
|
5674
5677
|
};
|
|
5675
5678
|
}
|
|
5676
5679
|
/**
|
|
@@ -5556,7 +5556,8 @@ function probeLinuxGpus() {
|
|
|
5556
5556
|
hasNvidiaGpu: false,
|
|
5557
5557
|
hasAmdGpu: false,
|
|
5558
5558
|
hasIntelGpu: false,
|
|
5559
|
-
hasRenderNode: false
|
|
5559
|
+
hasRenderNode: false,
|
|
5560
|
+
hasIntelNpu: safeExistsSync("/dev/accel/accel0")
|
|
5560
5561
|
};
|
|
5561
5562
|
signals.hasRenderNode = safeExistsSync("/dev/dri/renderD128");
|
|
5562
5563
|
if (safeExistsSync("/dev/nvidia0") || safeExistsSync("/proc/driver/nvidia/version")) signals.hasNvidiaGpu = true;
|
|
@@ -5588,7 +5589,8 @@ function probePlatform() {
|
|
|
5588
5589
|
hasNvidiaGpu: false,
|
|
5589
5590
|
hasAmdGpu: false,
|
|
5590
5591
|
hasIntelGpu: false,
|
|
5591
|
-
hasRenderNode: false
|
|
5592
|
+
hasRenderNode: false,
|
|
5593
|
+
hasIntelNpu: false
|
|
5592
5594
|
};
|
|
5593
5595
|
}
|
|
5594
5596
|
function pickBackendsForPlatform(signals) {
|
|
@@ -5665,14 +5667,15 @@ function createKernelHwAccel() {
|
|
|
5665
5667
|
/**
|
|
5666
5668
|
* Map the shared platform GPU-vendor probe into the inference `gpu`/`npu` types
|
|
5667
5669
|
* the runtime scorer understands. NVIDIA → cuda; Intel iGPU (or a bare render
|
|
5668
|
-
* node) → openvino; Apple Silicon → CoreML/ANE
|
|
5669
|
-
*
|
|
5670
|
-
*
|
|
5670
|
+
* node) → openvino; Apple Silicon → CoreML/ANE; Intel NPU ("AI Boost") →
|
|
5671
|
+
* intel-npu. The NPU only bumps the score, never changes the openvino winner,
|
|
5672
|
+
* but surfacing it lets the TS hint/UI reflect the accelerator the python pool
|
|
5673
|
+
* actually compiles onto (NPU>GPU>CPU). PURE — unit-tested.
|
|
5671
5674
|
*/
|
|
5672
5675
|
function mapSignalsToInferenceHardware(signals) {
|
|
5673
5676
|
return {
|
|
5674
5677
|
gpu: signals.hasNvidiaGpu ? { type: "nvidia" } : signals.hasIntelGpu || signals.hasRenderNode ? { type: "intel" } : null,
|
|
5675
|
-
npu: signals.platform === "darwin" && signals.arch === "arm64" ? { type: "apple-ane" } : null
|
|
5678
|
+
npu: signals.platform === "darwin" && signals.arch === "arm64" ? { type: "apple-ane" } : signals.hasIntelNpu ? { type: "intel-npu" } : null
|
|
5676
5679
|
};
|
|
5677
5680
|
}
|
|
5678
5681
|
/**
|