@camstack/agent 1.1.20 → 1.1.22
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/{chunk-BWAPSCEC.mjs → chunk-2BGDDMHB.mjs} +17 -8
- package/dist/chunk-2BGDDMHB.mjs.map +1 -0
- package/dist/cli.js +14 -4
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-BWAPSCEC.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -579,9 +579,12 @@ function createAgentService(deps) {
|
|
|
579
579
|
}
|
|
580
580
|
const pkgName = entry?.packageName;
|
|
581
581
|
if (pkgName && pkgName !== addonId) {
|
|
582
|
-
const
|
|
583
|
-
if (
|
|
584
|
-
|
|
582
|
+
const pkgShared = [...deps.loadedAddons.values()].some((e) => e.packageName === pkgName);
|
|
583
|
+
if (!pkgShared) {
|
|
584
|
+
const pkgDir = path3.join(deps.addonsDir, pkgName);
|
|
585
|
+
if (fs3.existsSync(pkgDir)) {
|
|
586
|
+
fs3.rmSync(pkgDir, { recursive: true, force: true });
|
|
587
|
+
}
|
|
585
588
|
}
|
|
586
589
|
}
|
|
587
590
|
broker.logger.info(`$agent.undeploy: ${addonId} disposed (instance + service + folder)`);
|
|
@@ -1101,6 +1104,9 @@ function registerAgentCapDispatch(registrar, agentUdsRegistry, inProcessLookup,
|
|
|
1101
1104
|
// src/agent-bootstrap.ts
|
|
1102
1105
|
var import_system4 = require("@camstack/system");
|
|
1103
1106
|
var agentLogManager = new import_system4.LogManager(5e3);
|
|
1107
|
+
var DATA_NODEID_CAPS = new Set(
|
|
1108
|
+
import_types3.ALL_CAPABILITY_DEFINITIONS.filter((c) => c.nodeIdMode === "data").map((c) => c.name)
|
|
1109
|
+
);
|
|
1104
1110
|
async function startAgent(configPath) {
|
|
1105
1111
|
const config = loadAgentConfig(configPath);
|
|
1106
1112
|
const hubUrlWasExplicit = process.env["CAMSTACK_HUB_URL"] !== void 0;
|
|
@@ -1352,6 +1358,11 @@ async function startAgent(configPath) {
|
|
|
1352
1358
|
// fallback. Getter: `agentUdsRegistry` is assigned later in this scope,
|
|
1353
1359
|
// after the handler is constructed.
|
|
1354
1360
|
getLocalDispatcher: () => agentUdsRegistry ?? null,
|
|
1361
|
+
// `nodeIdMode: 'data'` signal: these caps carry `nodeId` as provider
|
|
1362
|
+
// DATA (the hub singleton dispatches internally), never a routing pin —
|
|
1363
|
+
// suppressing the pin lets the call forward unpinned to the hub's
|
|
1364
|
+
// singleton resolution, with `args.nodeId` intact for the provider.
|
|
1365
|
+
isDataNodeIdCap: (capName) => DATA_NODEID_CAPS.has(capName),
|
|
1355
1366
|
// AGENT → HUB forward: a cap no agent-local child owns is routed to the
|
|
1356
1367
|
// hub's `$hub-cap-fwd.forward`, which runs it through the hub's own
|
|
1357
1368
|
// routing. Only the hub registers `$hub-cap-fwd`, so the undirected
|
|
@@ -1426,7 +1437,6 @@ async function startAgent(configPath) {
|
|
|
1426
1437
|
};
|
|
1427
1438
|
registerAgentCapDispatch(broker, agentUdsRegistry, agentInProcessLookup, consoleLogger);
|
|
1428
1439
|
(0, import_system3.registerEventBusService)(broker);
|
|
1429
|
-
broker.createService((0, import_system3.createHwAccelService)((0, import_system3.createKernelHwAccel)()));
|
|
1430
1440
|
await broker.start();
|
|
1431
1441
|
let hubUrlFromRegistry;
|
|
1432
1442
|
const reconcileHubUrlFromRegistry = () => {
|