@adhdev/daemon-core 0.9.48 → 0.9.50

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.
@@ -60,7 +60,11 @@ function resolveCommandPath(command: string): string | null {
60
60
  /** Run a shell command with timeout, returning stdout or null on failure */
61
61
  function execAsync(cmd: string, timeoutMs = 5000): Promise<string | null> {
62
62
  return new Promise((resolve) => {
63
- const child = exec(cmd, { encoding: 'utf-8', timeout: timeoutMs }, (err, stdout) => {
63
+ const child = exec(cmd, {
64
+ encoding: 'utf-8',
65
+ timeout: timeoutMs,
66
+ ...(process.platform === 'win32' ? { windowsHide: true } : {}),
67
+ }, (err, stdout) => {
64
68
  if (err || !stdout?.trim()) {
65
69
  resolve(null);
66
70
  } else {
package/src/index.d.ts CHANGED
@@ -41,8 +41,8 @@ export { DaemonCommandHandler } from './commands/handler.js';
41
41
  export type { CommandResult, CommandContext } from './commands/handler.js';
42
42
  export { DaemonCommandRouter } from './commands/router.js';
43
43
  export type { CommandRouterDeps, CommandRouterResult } from './commands/router.js';
44
- export { maybeRunDaemonUpgradeHelperFromEnv, spawnDetachedDaemonUpgradeHelper, resolveCurrentGlobalInstallSurface, buildPinnedGlobalInstallCommand } from './commands/upgrade-helper.js';
45
- export type { DaemonUpgradeHelperPayload, CurrentGlobalInstallSurface, PinnedGlobalInstallCommand } from './commands/upgrade-helper.js';
44
+ export { maybeRunDaemonUpgradeHelperFromEnv, spawnDetachedDaemonUpgradeHelper, resolveCurrentGlobalInstallSurface, buildPinnedGlobalInstallCommand, execNpmCommandSync, getNpmExecOptions } from './commands/upgrade-helper.js';
45
+ export type { DaemonUpgradeHelperPayload, CurrentGlobalInstallSurface, PinnedGlobalInstallCommand, NpmExecOptions } from './commands/upgrade-helper.js';
46
46
  export { DaemonStatusReporter } from './status/reporter.js';
47
47
  export { buildSessionEntries, findCdpManager, hasCdpManager, isCdpConnected } from './status/builders.js';
48
48
  export { buildStatusSnapshot, buildMachineInfo } from './status/snapshot.js';
package/src/index.ts CHANGED
@@ -140,15 +140,18 @@ export type { CommandResult, CommandContext } from './commands/handler.js';
140
140
  export { DaemonCommandRouter } from './commands/router.js';
141
141
  export type { CommandRouterDeps, CommandRouterResult } from './commands/router.js';
142
142
  export {
143
- maybeRunDaemonUpgradeHelperFromEnv,
144
- spawnDetachedDaemonUpgradeHelper,
145
- resolveCurrentGlobalInstallSurface,
146
- buildPinnedGlobalInstallCommand,
143
+ maybeRunDaemonUpgradeHelperFromEnv,
144
+ spawnDetachedDaemonUpgradeHelper,
145
+ resolveCurrentGlobalInstallSurface,
146
+ buildPinnedGlobalInstallCommand,
147
+ execNpmCommandSync,
148
+ getNpmExecOptions,
147
149
  } from './commands/upgrade-helper.js';
148
150
  export type {
149
- DaemonUpgradeHelperPayload,
150
- CurrentGlobalInstallSurface,
151
- PinnedGlobalInstallCommand,
151
+ DaemonUpgradeHelperPayload,
152
+ CurrentGlobalInstallSurface,
153
+ PinnedGlobalInstallCommand,
154
+ NpmExecOptions,
152
155
  } from './commands/upgrade-helper.js';
153
156
 
154
157
  // ── Status ──
package/src/launch.ts CHANGED
@@ -469,7 +469,7 @@ async function launchMacOS(ide: IDEInfo, port: number, workspace?: string, newWi
469
469
 
470
470
  if (!useAppLauncher && ide.cliCommand) {
471
471
  // CLI based execute
472
- spawn(ide.cliCommand, args, { detached: true, stdio: 'ignore' }).unref();
472
+ spawn(ide.cliCommand, args, { detached: true, stdio: 'ignore', windowsHide: true }).unref();
473
473
  } else if (appName) {
474
474
  // Fallback to `open -a` when no CLI wrapper is available or the provider prefers it.
475
475
  const openArgs = ['-a', appName, '--args', ...args];
@@ -509,7 +509,7 @@ async function launchLinux(ide: IDEInfo, port: number, workspace?: string, newWi
509
509
  if (newWindow) args.push('--new-window');
510
510
  if (workspace) args.push(workspace);
511
511
 
512
- spawn(cli, args, { detached: true, stdio: 'ignore' }).unref();
512
+ spawn(cli, args, { detached: true, stdio: 'ignore', windowsHide: true }).unref();
513
513
  }
514
514
 
515
515
  export function getAvailableIdeIds(): string[] {
@@ -662,6 +662,7 @@ export class AcpProviderInstance implements ProviderInstance {
662
662
  env,
663
663
  stdio: ['pipe', 'pipe', 'pipe'],
664
664
  shell: spawnConfig.shell || false,
665
+ ...(process.platform === 'win32' ? { windowsHide: true } : {}),
665
666
  });
666
667
 
667
668
  // stderr → log + auth failure detection