@cloudagentfleet/hub 0.1.1 → 0.1.2

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.
@@ -2666,7 +2666,13 @@ async function readJson(request) {
2666
2666
  chunks.push(decoder.decode());
2667
2667
  return JSON.parse(chunks.join(""));
2668
2668
  }
2669
- if (process.argv[1]?.endsWith("/server.ts") || process.argv[1]?.endsWith("\\server.ts") || process.argv[1]?.endsWith("/server.mjs") || process.argv[1]?.endsWith("\\server.mjs")) {
2669
+ function isDirectHubEntrypoint() {
2670
+ const entry = process.argv[1];
2671
+ if (!entry) return false;
2672
+ const normalized = entry.replaceAll("\\", "/");
2673
+ return normalized.endsWith("/server.ts") || normalized.endsWith("/server.mjs") || normalized.endsWith("/cloudagentfleet-hub.mjs");
2674
+ }
2675
+ if (isDirectHubEntrypoint()) {
2670
2676
  startControllerServer();
2671
2677
  }
2672
2678
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudagentfleet/hub",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "description": "Cloud Agent Fleet Hub — control plane, routing, and Codeman proxy.",
6
6
  "type": "module",