@camstack/system 1.1.27 → 1.1.29

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.
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_manifest_python_deps = require("./manifest-python-deps-CCmnJmNf.js");
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);
@@ -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-DPA7N9UP.mjs";
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-CCmnJmNf.js");
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");
@@ -4125,6 +4125,18 @@ var CapabilityRegistry = class CapabilityRegistry {
4125
4125
  }
4126
4126
  }
4127
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
+ }
4128
4140
  /** Unregister a provider. For singleton: clears active. For collection: removes from list. */
4129
4141
  unregisterProvider(capabilityName, addonId) {
4130
4142
  const state = this.capabilities.get(capabilityName);
@@ -93236,8 +93248,9 @@ async function stageFrameworkLockstep(input) {
93236
93248
  extract: input.extract
93237
93249
  });
93238
93250
  const results = [];
93251
+ const primary = FRAMEWORK_LOCKSTEP[0];
93239
93252
  for (const pkg of FRAMEWORK_LOCKSTEP) {
93240
- const version = await input.resolveVersion(pkg);
93253
+ const version = pkg === primary ? input.toVersion : await input.resolveVersion(pkg);
93241
93254
  const { stagedPath } = await stagingArea.fetchAndStage({
93242
93255
  jobId: input.jobId,
93243
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-DPA7N9UP.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-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";
@@ -4117,6 +4117,18 @@ var CapabilityRegistry = class CapabilityRegistry {
4117
4117
  }
4118
4118
  }
4119
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
+ }
4120
4132
  /** Unregister a provider. For singleton: clears active. For collection: removes from list. */
4121
4133
  unregisterProvider(capabilityName, addonId) {
4122
4134
  const state = this.capabilities.get(capabilityName);
@@ -93228,8 +93240,9 @@ async function stageFrameworkLockstep(input) {
93228
93240
  extract: input.extract
93229
93241
  });
93230
93242
  const results = [];
93243
+ const primary = FRAMEWORK_LOCKSTEP[0];
93231
93244
  for (const pkg of FRAMEWORK_LOCKSTEP) {
93232
- const version = await input.resolveVersion(pkg);
93245
+ const version = pkg === primary ? input.toVersion : await input.resolveVersion(pkg);
93233
93246
  const { stagedPath } = await stagingArea.fetchAndStage({
93234
93247
  jobId: input.jobId,
93235
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. The Intel NPU is not separately
7
- * detected an Intel iGPU already selects openvino (the NPU only bumps the
8
- * score, never changes the winner). PURE unit-tested.
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. The Intel NPU is not separately
5667
- * detected an Intel iGPU already selects openvino (the NPU only bumps the
5668
- * score, never changes the winner). PURE unit-tested.
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. The Intel NPU is not separately
5669
- * detected an Intel iGPU already selects openvino (the NPU only bumps the
5670
- * score, never changes the winner). PURE unit-tested.
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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",