@camstack/system 1.2.139 → 1.2.140

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.
Files changed (59) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  14. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  15. package/dist/builtins/device-manager/device-manager.addon.js +3 -3
  16. package/dist/builtins/device-manager/device-manager.addon.mjs +3 -3
  17. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  19. package/dist/builtins/hub-forwarder/index.js +1 -1
  20. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  21. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  22. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  23. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  24. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  25. package/dist/builtins/local-network/local-network.addon.js +1 -1
  26. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  27. package/dist/builtins/loki-logging/index.js +1 -1
  28. package/dist/builtins/loki-logging/index.mjs +1 -1
  29. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  30. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  31. package/dist/builtins/platform-probe/index.js +1 -1
  32. package/dist/builtins/platform-probe/index.mjs +1 -1
  33. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  34. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  35. package/dist/builtins/snapshot/index.js +1 -1
  36. package/dist/builtins/snapshot/index.mjs +1 -1
  37. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  38. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  40. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  41. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  42. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  43. package/dist/builtins/system-config/system-config.addon.js +1 -1
  44. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  45. package/dist/builtins/winston-logging/index.js +1 -1
  46. package/dist/builtins/winston-logging/index.mjs +1 -1
  47. package/dist/{dist-D595vzqY.mjs → dist-Clses4Bs.mjs} +71 -5
  48. package/dist/{dist-MqjCyx1E.js → dist-D5Jhh8Vk.js} +71 -5
  49. package/dist/index.js +28 -17
  50. package/dist/index.mjs +29 -17
  51. package/dist/kernel/cap-router-builder.d.ts +13 -0
  52. package/dist/kernel/index.d.ts +1 -1
  53. package/dist/kernel/moleculer/trpc-links.d.ts +1 -12
  54. package/dist/kernel/transport/cap-route-resolver.d.ts +25 -1
  55. package/dist/{manifest-python-deps-C9x9vrqt.js → manifest-python-deps-Bu8H1_rg.js} +16 -49
  56. package/dist/{manifest-python-deps-08rqn6xN.mjs → manifest-python-deps-Dxifi-o0.mjs} +17 -44
  57. package/dist/{retired-settings-keys-BvxgnDT1.mjs → retired-settings-keys-Cr8N6C6X.mjs} +1 -1
  58. package/dist/{retired-settings-keys-IVq6xR9i.js → retired-settings-keys-Dflres-F.js} +1 -1
  59. package/package.json +1 -1
@@ -4792,9 +4792,20 @@ var CapRouteResolver = class {
4792
4792
  childId
4793
4793
  };
4794
4794
  }
4795
- async dispatch(route, method, args) {
4795
+ /**
4796
+ * @param addonId Optional out-of-band PROVIDER-selection hint (Task 7.5a):
4797
+ * the addonId of the provider the CALLER already resolved (e.g.
4798
+ * `buildCapCallFn`'s `deps.addonId` for a registered grouped-runner
4799
+ * provider). Only meaningful for `agent-child-forward` — a `remote-moleculer`
4800
+ * route already encodes the provider in its action name
4801
+ * (`${addonId}.${cap}.${method}`, via `NodeCapAuthority.getAddonId`), and a
4802
+ * `hub-local-uds` caller that already knows the addonId (`buildCapCallFn`)
4803
+ * talks to `LocalChildRegistry.callCapOnChild` directly rather than through
4804
+ * `dispatch`.
4805
+ */
4806
+ async dispatch(route, method, args, addonId) {
4796
4807
  try {
4797
- return await this.dispatchInner(route, method, args);
4808
+ return await this.dispatchInner(route, method, args, addonId);
4798
4809
  } catch (err) {
4799
4810
  if (err instanceof CapRouteError) throw err;
4800
4811
  const nodeId = this.routeNodeId(route);
@@ -4813,7 +4824,7 @@ var CapRouteResolver = class {
4813
4824
  * Inner dispatch: may throw CapRouteError (validation failures) or arbitrary
4814
4825
  * transport errors. The outer `dispatch` wraps non-CapRouteErrors.
4815
4826
  */
4816
- async dispatchInner(route, method, args) {
4827
+ async dispatchInner(route, method, args, addonId) {
4817
4828
  switch (route.kind) {
4818
4829
  case "hub-in-process": return route.ref.invoke(method, args);
4819
4830
  case "hub-local-uds": {
@@ -4859,7 +4870,8 @@ var CapRouteResolver = class {
4859
4870
  method,
4860
4871
  args,
4861
4872
  ...route.childId !== void 0 ? { childId: route.childId } : {},
4862
- ...deviceId !== void 0 ? { deviceId } : {}
4873
+ ...deviceId !== void 0 ? { deviceId } : {},
4874
+ ...addonId !== void 0 ? { addonId } : {}
4863
4875
  };
4864
4876
  return callWithServiceDiscovery(this.broker, AGENT_CAP_FWD_SERVICE, AGENT_CAP_FWD_ACTION, params, {
4865
4877
  nodeID: route.agentNodeId,
@@ -6444,45 +6456,6 @@ function brokerTransportLink(broker, serviceMap, observerOpts, linkOptions) {
6444
6456
  };
6445
6457
  }
6446
6458
  /**
6447
- * Middle link that routes a cap op to a LOCAL addon-runner over UDS via the
6448
- * `LocalChildRegistry`. If no local child owns `(capName, deviceId?)`, the op
6449
- * passes through to `next(op)` (e.g. `brokerTransportLink` for remote agents),
6450
- * so this link is transparent for everything it does not own.
6451
- *
6452
- * `deviceId` for device-scoped caps is read from `op.input` (the same place
6453
- * the codegen'd device-scoped routers carry it); the full `op.input` is
6454
- * forwarded as the child method's argument.
6455
- */
6456
- function ipcChildLink(registry) {
6457
- return () => {
6458
- return ({ op, next }) => {
6459
- const parsed = parsePath(op.path);
6460
- if (!parsed) return next(op);
6461
- const input = op.input;
6462
- const inputObj = input && typeof input === "object" && !Array.isArray(input) ? input : null;
6463
- const deviceId = inputObj && typeof inputObj.deviceId === "number" ? inputObj.deviceId : void 0;
6464
- if (registry.resolveChildId(parsed.capName, deviceId) === null) return next(op);
6465
- return observable((observer) => {
6466
- registry.callCap({
6467
- capName: parsed.capName,
6468
- method: parsed.method,
6469
- args: op.input,
6470
- deviceId
6471
- }).then((data) => {
6472
- observer.next({ result: {
6473
- type: "data",
6474
- data
6475
- } });
6476
- observer.complete();
6477
- }).catch((cause) => {
6478
- observer.error(TRPCClientError.from(cause instanceof Error ? cause : new Error(String(cause))));
6479
- });
6480
- return () => {};
6481
- });
6482
- };
6483
- };
6484
- }
6485
- /**
6486
6459
  * Middle link that routes a child addon's outbound `ctx.api` cap call to the
6487
6460
  * parent hub over UDS via `callOut` (obtained at call-time so the child can
6488
6461
  * reconnect without rebuilding its tRPC client).
@@ -8175,4 +8148,4 @@ async function installManifestPythonDeps(declaration, addonDir, deps, logger) {
8175
8148
  await deps.installPythonRequirements(reqAbs);
8176
8149
  }
8177
8150
  //#endregion
8178
- export { buildNativeCapProxy as $, createHubCapForwardService as A, buildHeapSample as At, AGENT_CAP_FWD_ACTION as B, brokerTransportLink as C, runNpm as Ct, localProviderLink as D, HEAP_WATCH_INTERVAL_MS as Dt, ipcParentLink as E, HEAP_RECLAIM_TRIGGER_MB as Et, createUdsLogger as F, strandedMb as Ft, callWithServiceDiscovery as G, CapRouteResolver as H, createUdsLoggerWithControl as I, UdsLocalTransportServer as J, createLocalTransport as K, LocalChildClient as L, createUdsEventBridge as M, shouldReclaim as Mt, createUdsEventBus as N, startHeapWatch as Nt, HUB_CAP_FWD_ACTION as O, HEAP_WATCH_WARN_RATIO as Ot, udsChildLogToWorkerEntry as P, startRunnerHeapWatch as Pt, encodeFrame as Q, LocalChildRegistry as R, brokerCallForCap as S, resolveNpmInvocation as St, ipcChildLink as T, HEAP_RECLAIM_MIN_INTERVAL_MS as Tt, CapRouteError as U, AGENT_CAP_FWD_SERVICE as V, classifyCapRoute as W, localEndpointPath as X, SocketChannel as Y, FrameDecoder as Z, createKernelHwAccel as _, CapabilityHandle as _t, getWorkerDeviceRegistry as a, setWorkerNativeCapsChangeListener as at, __resetCapUsageRegistryForTests as b, installManifestNativeDeps as bt, setHubConnected as c, NATIVE_PROVIDER_SERVICE_INFIX as ct, getBrokerEventBus as d, capBareAction as dt, buildUdsNativeCapProxy as et, getMoleculerEventStats as f, capServiceName as ft, AddonDepsManager as g, DeviceRegistry as gt, subscribePassthrough as h, serializeTypedArrays as ht, createUdsAddonContext as i, mountNativeCapService as it, createParentUnownedCallHandler as j, createV8Reclaimer as jt, HUB_CAP_FWD_SERVICE as k, RUNNER_HEAP_WATCH_INTERVAL_MS as kt, EVENT_TOPIC_PREFIX as l, capActionName as lt, setNodeEventInterest as m, deserializeTypedArrays as mt, adaptBrokerToCluster as n, getWorkerNativeCapProvider as nt, getOrInitReadinessRegistry as o, createAddonService as ot, registerEventBusService as p, parseCapAction as pt, UdsLocalTransportClient as q, createAddonContext as r, getWorkerNativeCapSnapshot as rt, getOrInitReadinessRegistryForClient as s, validateProviderRegistrations as st, installManifestPythonDeps as t, createBrokerDeviceManagerApi as tt, clusterEventTopic as u, capActionSuffix as ut, resolveHwAccel as v, CapabilityUnavailableError as vt, buildLinkChain as w, createAddonDataPlaneFacility as wt, getCapUsageRegistry as x, resolveAddonClass as xt, CapUsageRegistry as y, copyBundledNativeModules as yt, UDS_NO_ROUTE_PREFIX as z };
8151
+ export { buildUdsNativeCapProxy as $, createParentUnownedCallHandler as A, createV8Reclaimer as At, AGENT_CAP_FWD_SERVICE as B, brokerTransportLink as C, createAddonDataPlaneFacility as Ct, HUB_CAP_FWD_ACTION as D, HEAP_WATCH_WARN_RATIO as Dt, localProviderLink as E, HEAP_WATCH_INTERVAL_MS as Et, createUdsLoggerWithControl as F, createLocalTransport as G, CapRouteError as H, LocalChildClient as I, SocketChannel as J, UdsLocalTransportClient as K, LocalChildRegistry as L, createUdsEventBus as M, startHeapWatch as Mt, udsChildLogToWorkerEntry as N, startRunnerHeapWatch as Nt, HUB_CAP_FWD_SERVICE as O, RUNNER_HEAP_WATCH_INTERVAL_MS as Ot, createUdsLogger as P, strandedMb as Pt, buildNativeCapProxy as Q, UDS_NO_ROUTE_PREFIX as R, brokerCallForCap as S, runNpm as St, ipcParentLink as T, HEAP_RECLAIM_TRIGGER_MB as Tt, classifyCapRoute as U, CapRouteResolver as V, callWithServiceDiscovery as W, FrameDecoder as X, localEndpointPath as Y, encodeFrame as Z, createKernelHwAccel as _, CapabilityUnavailableError as _t, getWorkerDeviceRegistry as a, createAddonService as at, __resetCapUsageRegistryForTests as b, resolveAddonClass as bt, setHubConnected as c, capActionName as ct, getBrokerEventBus as d, capServiceName as dt, createBrokerDeviceManagerApi as et, getMoleculerEventStats as f, parseCapAction as ft, AddonDepsManager as g, CapabilityHandle as gt, subscribePassthrough as h, DeviceRegistry as ht, createUdsAddonContext as i, setWorkerNativeCapsChangeListener as it, createUdsEventBridge as j, shouldReclaim as jt, createHubCapForwardService as k, buildHeapSample as kt, EVENT_TOPIC_PREFIX as l, capActionSuffix as lt, setNodeEventInterest as m, serializeTypedArrays as mt, adaptBrokerToCluster as n, getWorkerNativeCapSnapshot as nt, getOrInitReadinessRegistry as o, validateProviderRegistrations as ot, registerEventBusService as p, deserializeTypedArrays as pt, UdsLocalTransportServer as q, createAddonContext as r, mountNativeCapService as rt, getOrInitReadinessRegistryForClient as s, NATIVE_PROVIDER_SERVICE_INFIX as st, installManifestPythonDeps as t, getWorkerNativeCapProvider as tt, clusterEventTopic as u, capBareAction as ut, resolveHwAccel as v, copyBundledNativeModules as vt, buildLinkChain as w, HEAP_RECLAIM_MIN_INTERVAL_MS as wt, getCapUsageRegistry as x, resolveNpmInvocation as xt, CapUsageRegistry as y, installManifestNativeDeps as yt, AGENT_CAP_FWD_ACTION as z };
@@ -1,4 +1,4 @@
1
- import { At as asJsonObject } from "./dist-D595vzqY.mjs";
1
+ import { At as asJsonObject } from "./dist-Clses4Bs.mjs";
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-MqjCyx1E.js");
1
+ const require_dist = require("./dist-D5Jhh8Vk.js");
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.139",
3
+ "version": "1.2.140",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",