@camstack/system 1.2.71 → 1.2.73
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 +2 -1
- package/dist/index.mjs +2 -1
- package/dist/kernel/transport/local-child-registry.d.ts +22 -0
- package/dist/{manifest-python-deps-BdWxKNvu.mjs → manifest-python-deps-C1DMs1J9.mjs} +5 -1
- package/dist/{manifest-python-deps-BqIpg0C7.js → manifest-python-deps-DG_LLcZF.js} +5 -1
- 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-DG_LLcZF.js");
|
|
3
3
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_chunk.__toESM(node_path);
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as createUdsLoggerWithControl, L as LocalChildClient, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps, xt as resolveAddonClass } from "./manifest-python-deps-
|
|
1
|
+
import { I as createUdsLoggerWithControl, L as LocalChildClient, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps, xt as resolveAddonClass } from "./manifest-python-deps-C1DMs1J9.mjs";
|
|
2
2
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
3
3
|
import { register } from "node:module";
|
|
4
4
|
import * as path$1 from "node:path";
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ const require_builtins_system_config_system_config_addon = require("./builtins/s
|
|
|
25
25
|
require("./builtins/system-config/index.js");
|
|
26
26
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
27
27
|
const require_file_data_plane = require("./file-data-plane-DUHPHa-Y.js");
|
|
28
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
28
|
+
const require_manifest_python_deps = require("./manifest-python-deps-DG_LLcZF.js");
|
|
29
29
|
const require_resource_monitor = require("./resource-monitor-CdnzxBLP.js");
|
|
30
30
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
31
31
|
let zod = require("zod");
|
|
@@ -3330,6 +3330,7 @@ var AddonLoader = class {
|
|
|
3330
3330
|
};
|
|
3331
3331
|
/** Check if a Dirent is a directory (or a symlink pointing to a directory) */
|
|
3332
3332
|
function isDirectoryEntry(entry, parentDir) {
|
|
3333
|
+
if (entry.name.startsWith(".")) return false;
|
|
3333
3334
|
if (entry.isDirectory()) return true;
|
|
3334
3335
|
if (entry.isSymbolicLink()) try {
|
|
3335
3336
|
return node_fs.statSync(node_path.join(parentDir, entry.name)).isDirectory();
|
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.
|
|
|
24
24
|
import "./builtins/system-config/index.mjs";
|
|
25
25
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
26
26
|
import { a as parseTokenizedUrl, c as collectModelFiles, d as downloadModel, f as ensureModel, h as isModelDownloaded, i as parseRangeHeader, l as deleteModelFromDisk, m as getModelFilePath, n as contentTypeFor, o as resolveFilePath, p as fetchJson, r as createAuthenticatedFileServer, s as ModelDownloadService, t as createFileDataPlaneHandler, u as downloadFile } from "./file-data-plane-CuE_hBli.mjs";
|
|
27
|
-
import { $ as buildNativeCapProxy, A as createHubCapForwardService, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as runNpm, D as localProviderLink, E as ipcParentLink, F as createUdsLogger, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, N as createUdsEventBus, O as HUB_CAP_FWD_ACTION, P as udsChildLogToWorkerEntry, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as resolveNpmInvocation, T as ipcChildLink, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, k as HUB_CAP_FWD_SERVICE, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveAddonClass, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-
|
|
27
|
+
import { $ as buildNativeCapProxy, A as createHubCapForwardService, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as runNpm, D as localProviderLink, E as ipcParentLink, F as createUdsLogger, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, N as createUdsEventBus, O as HUB_CAP_FWD_ACTION, P as udsChildLogToWorkerEntry, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as resolveNpmInvocation, T as ipcChildLink, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, k as HUB_CAP_FWD_SERVICE, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveAddonClass, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-C1DMs1J9.mjs";
|
|
28
28
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
|
|
29
29
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
30
30
|
import { z } from "zod";
|
|
@@ -3322,6 +3322,7 @@ var AddonLoader = class {
|
|
|
3322
3322
|
};
|
|
3323
3323
|
/** Check if a Dirent is a directory (or a symlink pointing to a directory) */
|
|
3324
3324
|
function isDirectoryEntry(entry, parentDir) {
|
|
3325
|
+
if (entry.name.startsWith(".")) return false;
|
|
3325
3326
|
if (entry.isDirectory()) return true;
|
|
3326
3327
|
if (entry.isSymbolicLink()) try {
|
|
3327
3328
|
return fs$17.statSync(path$39.join(parentDir, entry.name)).isDirectory();
|
|
@@ -95,6 +95,27 @@ export interface LocalChildRegistryOptions {
|
|
|
95
95
|
* everything). The kernel has no cap registry, so the wiring side injects it.
|
|
96
96
|
*/
|
|
97
97
|
readonly isAggregatedCollectionMethod?: (capName: string, method: string) => boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Does this call carry an explicit `{ addonId }` selector naming the provider
|
|
100
|
+
* it wants? Such a call must NOT be short-circuited to a local sibling
|
|
101
|
+
* either: `resolveChildId` picks the FIRST-registered child for the cap name,
|
|
102
|
+
* which is the one thing the caller took the trouble to say it did not want.
|
|
103
|
+
* It goes to `onUnownedCall`, which resolves the named provider.
|
|
104
|
+
*
|
|
105
|
+
* The array-method bypass above and this one are the same defect seen twice.
|
|
106
|
+
* `broker.getBrokerConfig({id:'ha_001', addonId:'provider-homeassistant'})`
|
|
107
|
+
* from the Home Assistant export was answered by `provider-homematic` — which
|
|
108
|
+
* returns `null` for a broker it does not own, indistinguishable from "no
|
|
109
|
+
* such broker" — so the export could never open a link. Fixing only
|
|
110
|
+
* `onUnownedCall` did nothing, because this decision is made first: measured
|
|
111
|
+
* on the live hub with a deliberately bogus addonId, which came back `null`
|
|
112
|
+
* instead of refused (2026-08-09, [D105]).
|
|
113
|
+
*
|
|
114
|
+
* Omitted ⇒ prior behaviour exactly. The kernel has no cap registry, so the
|
|
115
|
+
* wiring side injects it, sharing the predicate with the handler that then
|
|
116
|
+
* performs the routing — a rule implemented twice is a rule that drifts.
|
|
117
|
+
*/
|
|
118
|
+
readonly isAddonPinnedCall?: (capName: string, method: string, args: unknown) => boolean;
|
|
98
119
|
/**
|
|
99
120
|
* Per-cap-method bound for UDS cap calls, in ms — read from the cap
|
|
100
121
|
* definition's declared `timeoutMs`. The SAME resolver the remote plane uses
|
|
@@ -130,6 +151,7 @@ export declare class LocalChildRegistry {
|
|
|
130
151
|
private readonly ownNodeId?;
|
|
131
152
|
/** See {@link LocalChildRegistryOptions.isAggregatedCollectionMethod}. */
|
|
132
153
|
private readonly isAggregatedCollectionMethod?;
|
|
154
|
+
private readonly isAddonPinnedCall?;
|
|
133
155
|
/** See {@link LocalChildRegistryOptions.capTimeoutMs}. */
|
|
134
156
|
private readonly capTimeoutMs?;
|
|
135
157
|
/** Tracks capNames already logged as UDS-routed; one INFO line per capName per process. */
|
|
@@ -4438,6 +4438,7 @@ var LocalChildRegistry = class {
|
|
|
4438
4438
|
ownNodeId;
|
|
4439
4439
|
/** See {@link LocalChildRegistryOptions.isAggregatedCollectionMethod}. */
|
|
4440
4440
|
isAggregatedCollectionMethod;
|
|
4441
|
+
isAddonPinnedCall;
|
|
4441
4442
|
/** See {@link LocalChildRegistryOptions.capTimeoutMs}. */
|
|
4442
4443
|
capTimeoutMs;
|
|
4443
4444
|
/** Tracks capNames already logged as UDS-routed; one INFO line per capName per process. */
|
|
@@ -4469,6 +4470,7 @@ var LocalChildRegistry = class {
|
|
|
4469
4470
|
this.resolveChildIdForAddon = opts.resolveChildIdForAddon;
|
|
4470
4471
|
this.ownNodeId = opts.ownNodeId;
|
|
4471
4472
|
this.isAggregatedCollectionMethod = opts.isAggregatedCollectionMethod;
|
|
4473
|
+
this.isAddonPinnedCall = opts.isAddonPinnedCall;
|
|
4472
4474
|
this.capTimeoutMs = opts.capTimeoutMs;
|
|
4473
4475
|
} else {
|
|
4474
4476
|
this.server = serverOrOptions;
|
|
@@ -4842,7 +4844,9 @@ var LocalChildRegistry = class {
|
|
|
4842
4844
|
};
|
|
4843
4845
|
const pinnedNodeId = out.nodeId ?? extractNodeId(out.args);
|
|
4844
4846
|
const pinTargetsThisNode = pinnedNodeId !== void 0 && this.ownNodeId !== void 0 && pinnedNodeId === this.ownNodeId;
|
|
4845
|
-
|
|
4847
|
+
const aggregated = pinnedNodeId === void 0 && this.isAggregatedCollectionMethod?.(out.capName, out.method) === true;
|
|
4848
|
+
const addonPinned = pinnedNodeId === void 0 && this.isAddonPinnedCall?.(out.capName, out.method, out.args) === true;
|
|
4849
|
+
if ((!aggregated && !addonPinned && (pinnedNodeId === void 0 || pinTargetsThisNode) ? this.resolveChildId(out.capName, out.deviceId) : null) !== null) {
|
|
4846
4850
|
if (!this.egressRoutedCaps.has(out.capName)) {
|
|
4847
4851
|
this.egressRoutedCaps.add(out.capName);
|
|
4848
4852
|
this.logger?.info("routed child egress over UDS", { capName: out.capName });
|
|
@@ -4440,6 +4440,7 @@ var LocalChildRegistry = class {
|
|
|
4440
4440
|
ownNodeId;
|
|
4441
4441
|
/** See {@link LocalChildRegistryOptions.isAggregatedCollectionMethod}. */
|
|
4442
4442
|
isAggregatedCollectionMethod;
|
|
4443
|
+
isAddonPinnedCall;
|
|
4443
4444
|
/** See {@link LocalChildRegistryOptions.capTimeoutMs}. */
|
|
4444
4445
|
capTimeoutMs;
|
|
4445
4446
|
/** Tracks capNames already logged as UDS-routed; one INFO line per capName per process. */
|
|
@@ -4471,6 +4472,7 @@ var LocalChildRegistry = class {
|
|
|
4471
4472
|
this.resolveChildIdForAddon = opts.resolveChildIdForAddon;
|
|
4472
4473
|
this.ownNodeId = opts.ownNodeId;
|
|
4473
4474
|
this.isAggregatedCollectionMethod = opts.isAggregatedCollectionMethod;
|
|
4475
|
+
this.isAddonPinnedCall = opts.isAddonPinnedCall;
|
|
4474
4476
|
this.capTimeoutMs = opts.capTimeoutMs;
|
|
4475
4477
|
} else {
|
|
4476
4478
|
this.server = serverOrOptions;
|
|
@@ -4844,7 +4846,9 @@ var LocalChildRegistry = class {
|
|
|
4844
4846
|
};
|
|
4845
4847
|
const pinnedNodeId = out.nodeId ?? extractNodeId(out.args);
|
|
4846
4848
|
const pinTargetsThisNode = pinnedNodeId !== void 0 && this.ownNodeId !== void 0 && pinnedNodeId === this.ownNodeId;
|
|
4847
|
-
|
|
4849
|
+
const aggregated = pinnedNodeId === void 0 && this.isAggregatedCollectionMethod?.(out.capName, out.method) === true;
|
|
4850
|
+
const addonPinned = pinnedNodeId === void 0 && this.isAddonPinnedCall?.(out.capName, out.method, out.args) === true;
|
|
4851
|
+
if ((!aggregated && !addonPinned && (pinnedNodeId === void 0 || pinTargetsThisNode) ? this.resolveChildId(out.capName, out.deviceId) : null) !== null) {
|
|
4848
4852
|
if (!this.egressRoutedCaps.has(out.capName)) {
|
|
4849
4853
|
this.egressRoutedCaps.add(out.capName);
|
|
4850
4854
|
this.logger?.info("routed child egress over UDS", { capName: out.capName });
|