@camstack/agent 1.1.31 → 1.1.33

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/cli.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { createRequire as __cr } from 'node:module'; const require = globalThis.require ?? __cr(import.meta.url);
3
3
  import {
4
4
  startAgent
5
- } from "./chunk-CIITICY3.mjs";
5
+ } from "./chunk-POIXEKWT.mjs";
6
6
 
7
7
  // src/cli.ts
8
8
  import { existsSync } from "fs";
package/dist/index.js CHANGED
@@ -1856,15 +1856,20 @@ function resolveAddonPackageDirs(addonsDir) {
1856
1856
  return dirs;
1857
1857
  }
1858
1858
  function buildAgentChildUdsManifest(nodeId, childId, caps) {
1859
- const systemCapNames = /* @__PURE__ */ new Set();
1859
+ const capsByAddon = /* @__PURE__ */ new Map();
1860
1860
  for (const cap of caps) {
1861
- if (cap.deviceId === void 0) {
1862
- systemCapNames.add(cap.capName);
1863
- }
1861
+ if (cap.deviceId !== void 0) continue;
1862
+ const addonId = cap.addonId ?? childId;
1863
+ const set = capsByAddon.get(addonId) ?? /* @__PURE__ */ new Set();
1864
+ set.add(cap.capName);
1865
+ capsByAddon.set(addonId, set);
1864
1866
  }
1865
- const addons = [
1866
- { addonId: childId, capabilities: [...systemCapNames] }
1867
- ];
1867
+ if (capsByAddon.size === 0) {
1868
+ capsByAddon.set(childId, /* @__PURE__ */ new Set());
1869
+ }
1870
+ const addons = [...capsByAddon.entries()].map(
1871
+ ([addonId, capNames]) => ({ addonId, capabilities: [...capNames] })
1872
+ );
1868
1873
  return { nodeId, addons };
1869
1874
  }
1870
1875
  var scriptName = process.argv[1] ?? "";