@adhdev/daemon-core 0.7.30 → 0.7.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/index.mjs CHANGED
@@ -1272,8 +1272,12 @@ var init_provider_cli_adapter = __esm({
1272
1272
  LOG.info("CLI", `[${this.cliType}] Using login shell (script shim or non-native binary)`);
1273
1273
  }
1274
1274
  shellCmd = isWin ? "cmd.exe" : process.env.SHELL || "/bin/zsh";
1275
- const fullCmd = [binaryPath, ...allArgs].map(shSingleQuote).join(" ");
1276
- shellArgs = isWin ? ["/c", fullCmd] : ["-l", "-c", fullCmd];
1275
+ if (isWin) {
1276
+ shellArgs = ["/c", binaryPath, ...allArgs];
1277
+ } else {
1278
+ const fullCmd = [binaryPath, ...allArgs].map(shSingleQuote).join(" ");
1279
+ shellArgs = ["-l", "-c", fullCmd];
1280
+ }
1277
1281
  } else {
1278
1282
  shellCmd = binaryPath;
1279
1283
  shellArgs = allArgs;
@@ -2223,16 +2227,16 @@ async function detectCLIs(providerLoader) {
2223
2227
  const results = await Promise.all(
2224
2228
  cliList.map(async (cli) => {
2225
2229
  try {
2226
- const pathResult = await execAsync(`${whichCmd} ${cli.command} 2>/dev/null`);
2230
+ const pathResult = await execAsync(`${whichCmd} ${cli.command}`);
2227
2231
  if (!pathResult) return { ...cli, installed: false };
2228
2232
  const firstPath = pathResult.split("\n")[0];
2229
2233
  let version;
2230
2234
  try {
2231
2235
  const versionCommands = [
2232
2236
  cli.versionCommand,
2233
- `${cli.command} --version 2>/dev/null`,
2234
- `${cli.command} -V 2>/dev/null`,
2235
- `${cli.command} -v 2>/dev/null`
2237
+ `${cli.command} --version`,
2238
+ `${cli.command} -V`,
2239
+ `${cli.command} -v`
2236
2240
  ].filter((v) => !!v);
2237
2241
  for (const versionCommand of versionCommands) {
2238
2242
  const versionResult = await execAsync(versionCommand, 3e3);
@@ -4379,10 +4383,13 @@ var IdeProviderInstance = class {
4379
4383
  if (result?.found && result.x != null && result.y != null) {
4380
4384
  const x = result.x;
4381
4385
  const y = result.y;
4382
- const anyCdp = cdp;
4383
- await anyCdp.send("Input.dispatchMouseEvent", { type: "mousePressed", x, y, button: "left", clickCount: 1 });
4384
- await anyCdp.send("Input.dispatchMouseEvent", { type: "mouseReleased", x, y, button: "left", clickCount: 1 });
4385
- LOG.info("IdeInstance", `[IdeInstance:${this.type}] autoApprove: dispatched mouse event at ${x},${y}`);
4386
+ if (cdp.send) {
4387
+ await cdp.send("Input.dispatchMouseEvent", { type: "mousePressed", x, y, button: "left", clickCount: 1 });
4388
+ await cdp.send("Input.dispatchMouseEvent", { type: "mouseReleased", x, y, button: "left", clickCount: 1 });
4389
+ LOG.info("IdeInstance", `[IdeInstance:${this.type}] autoApprove: dispatched mouse event at ${x},${y}`);
4390
+ } else {
4391
+ LOG.warn("IdeInstance", `[IdeInstance:${this.type}] autoApprove: cdp.send() not available for coordinate click`);
4392
+ }
4386
4393
  }
4387
4394
  this.pushEvent({
4388
4395
  event: "agent:auto_approved",
@@ -7040,14 +7047,6 @@ var ProviderLoader = class _ProviderLoader {
7040
7047
  }
7041
7048
  /**
7042
7049
  * Get raw provider metadata by type (NO scripts loaded).
7043
- * Use resolve() when you need scripts (readChat, listModels, etc).
7044
- * @deprecated Use getMeta() for metadata or resolve() for scripts.
7045
- */
7046
- get(type) {
7047
- return this.providers.get(type);
7048
- }
7049
- /**
7050
- * Get raw provider metadata by type (NO scripts loaded).
7051
7050
  * Safe for: category checks, icon, displayName, targetFilter, cdpPorts.
7052
7051
  * NOT safe for: script execution (readChat, listModels, sendMessage).
7053
7052
  * Use resolve() when scripts are needed.
@@ -8633,7 +8632,7 @@ var DaemonCommandRouter = class {
8633
8632
  }
8634
8633
  }
8635
8634
  const keysToRemove = [];
8636
- for (const key of this.deps.instanceManager.instances?.keys?.() || []) {
8635
+ for (const key of this.deps.instanceManager.listInstanceIds()) {
8637
8636
  if (key === `ide:${ideType}` || typeof key === "string" && key.startsWith(`ide:${ideType}_`)) {
8638
8637
  keysToRemove.push(key);
8639
8638
  }
@@ -11153,6 +11152,12 @@ var ProviderInstanceManager = class {
11153
11152
  get size() {
11154
11153
  return this.instances.size;
11155
11154
  }
11155
+ /**
11156
+ * All Instance IDs (for iteration without exposing the private Map)
11157
+ */
11158
+ listInstanceIds() {
11159
+ return [...this.instances.keys()];
11160
+ }
11156
11161
  // ─── State collect ────────────────────────────────
11157
11162
  /**
11158
11163
  * all Instance's current status collect