adhdev 0.6.36 → 0.6.39

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/index.js CHANGED
@@ -505,8 +505,7 @@ async function detectIDEs() {
505
505
  path: appPath || cliPath,
506
506
  cliCommand: resolvedCli || null,
507
507
  version: version2,
508
- icon: def.icon,
509
- extensionSupport: def.extensionSupport
508
+ icon: def.icon
510
509
  });
511
510
  }
512
511
  return results;
@@ -4965,14 +4964,7 @@ var init_handler = __esm({
4965
4964
  }
4966
4965
  return { success: false, error: `VSCode command not available: ${resolvedCmd || cmd}` };
4967
4966
  }
4968
- case "get_open_editors":
4969
- case "open_tab":
4970
- case "close_tab":
4971
- case "open_folder":
4972
- case "open_folder_picker":
4973
- case "open_recent":
4974
- case "get_commands":
4975
- return { success: false, error: `${cmd} requires bridge-extension (removed)` };
4967
+ // ─── Workspace cmds ──────────────
4976
4968
  case "get_recent_workspaces":
4977
4969
  return this.handleGetRecentWorkspaces(args);
4978
4970
  case "get_cli_history": {
@@ -5425,7 +5417,6 @@ var init_provider_loader = __esm({
5425
5417
  name: p.name,
5426
5418
  displayName: p.displayName || p.name,
5427
5419
  icon: p.icon || "\u{1F4BB}",
5428
- extensionSupport: "full",
5429
5420
  cli: p.cli,
5430
5421
  paths: p.paths
5431
5422
  });
@@ -27045,7 +27036,13 @@ var init_dev_server = __esm({
27045
27036
  return;
27046
27037
  }
27047
27038
  try {
27048
- const scriptCode = params ? fn(params) : fn();
27039
+ let scriptCode = null;
27040
+ if (["sendMessage", "webviewSendMessage", "switchSession", "webviewSwitchSession", "setMode", "webviewSetMode", "setModel", "webviewSetModel"].includes(scriptName)) {
27041
+ const firstVal = params && typeof params === "object" && Object.keys(params).length > 0 ? Object.values(params)[0] : params;
27042
+ scriptCode = firstVal !== void 0 ? fn(firstVal) : fn();
27043
+ } else {
27044
+ scriptCode = params !== void 0 ? fn(params) : fn();
27045
+ }
27049
27046
  if (!scriptCode) {
27050
27047
  this.json(res, 500, { error: "Script function returned null" });
27051
27048
  return;
@@ -31273,7 +31270,7 @@ var init_adhdev_daemon = __esm({
31273
31270
  fs11 = __toESM(require("fs"));
31274
31271
  path14 = __toESM(require("path"));
31275
31272
  import_chalk2 = __toESM(require("chalk"));
31276
- pkgVersion = "0.6.36";
31273
+ pkgVersion = "0.6.39";
31277
31274
  if (pkgVersion === "unknown") {
31278
31275
  try {
31279
31276
  const possiblePaths = [
@@ -32491,6 +32488,10 @@ function registerSetupCommands(program2, providerLoader) {
32491
32488
 
32492
32489
  // src/cli/daemon-commands.ts
32493
32490
  var import_chalk5 = __toESM(require("chalk"));
32491
+ function hideCommand(command) {
32492
+ command.hideHelp?.();
32493
+ return command;
32494
+ }
32494
32495
  function registerDaemonCommands(program2, pkgVersion3) {
32495
32496
  program2.command("daemon").description("\u{1F680} Start ADHDev Daemon \u2014 unified hub for IDE monitoring, agent management, and remote control").option("-p, --port <port>", "Local WS server port", "19222").option("--server <url>", "Override server URL for testing").option("--dev", "Enable Dev Mode \u2014 HTTP API on :19280 for script debugging").action(async (options) => {
32496
32497
  const { AdhdevDaemon: AdhdevDaemon2 } = await Promise.resolve().then(() => (init_adhdev_daemon(), adhdev_daemon_exports));
@@ -32502,7 +32503,35 @@ function registerDaemonCommands(program2, pkgVersion3) {
32502
32503
  dev: options.dev || false
32503
32504
  });
32504
32505
  });
32505
- program2.command("daemon:status").description("Check ADHDev Daemon status").action(async () => {
32506
+ program2.command("standalone").description("\u{1F5A5}\uFE0F Start ADHDev Standalone Server (Local Dashboard & Embedded Daemon)").option("-p, --port <port>", "Local HTTP/WS server port", "3847").option("--host <host>", "Bind to specific host (use 0.0.0.0 for LAN access)").option("--no-open", "Prevent opening browser automatically").option("--token <token>", "Require token authentication").option("--dev", "Enable Dev Mode").action(async (options) => {
32507
+ const { spawn: spawn3, execSync: execSync7 } = await import("child_process");
32508
+ console.log(import_chalk5.default.cyan("\n Starting ADHDev Standalone Server..."));
32509
+ const args = [];
32510
+ if (options.port) args.push("--port", options.port);
32511
+ if (options.host) args.push("--host", options.host);
32512
+ if (options.open === false) args.push("--no-open");
32513
+ if (options.token) args.push("--token", options.token);
32514
+ if (options.dev) args.push("--dev");
32515
+ let bin = "npx";
32516
+ const npxArgs = ["-y", "@adhdev/daemon-standalone@latest", ...args];
32517
+ try {
32518
+ execSync7("adhdev-standalone --help", { stdio: "ignore" });
32519
+ bin = "adhdev-standalone";
32520
+ } catch {
32521
+ console.log(import_chalk5.default.gray(" Standalone server package not found locally."));
32522
+ console.log(import_chalk5.default.gray(" Downloading and running via npx (this may take a moment)..."));
32523
+ }
32524
+ const spawnArgs = bin === "npx" ? npxArgs : args;
32525
+ const child = spawn3(bin, spawnArgs, {
32526
+ stdio: "inherit",
32527
+ shell: process.platform === "win32"
32528
+ });
32529
+ child.on("error", (err) => {
32530
+ console.error(import_chalk5.default.red(`
32531
+ \u2717 Failed to start standalone server: ${err.message}`));
32532
+ });
32533
+ });
32534
+ hideCommand(program2.command("daemon:status").description("Check ADHDev Daemon status").action(async () => {
32506
32535
  const { isDaemonRunning: isDaemonRunning2 } = await Promise.resolve().then(() => (init_adhdev_daemon(), adhdev_daemon_exports));
32507
32536
  if (isDaemonRunning2()) {
32508
32537
  console.log(import_chalk5.default.green(`
@@ -32514,8 +32543,8 @@ function registerDaemonCommands(program2, pkgVersion3) {
32514
32543
  console.log(import_chalk5.default.gray(` Start with: adhdev daemon
32515
32544
  `));
32516
32545
  }
32517
- });
32518
- program2.command("daemon:stop").description("Stop ADHDev Daemon").action(async () => {
32546
+ }));
32547
+ hideCommand(program2.command("daemon:stop").description("Stop ADHDev Daemon").action(async () => {
32519
32548
  const { stopDaemon: stopDaemon2 } = await Promise.resolve().then(() => (init_adhdev_daemon(), adhdev_daemon_exports));
32520
32549
  if (stopDaemon2()) {
32521
32550
  console.log(import_chalk5.default.green(`
@@ -32526,8 +32555,8 @@ function registerDaemonCommands(program2, pkgVersion3) {
32526
32555
  \u2717 No running daemon found.
32527
32556
  `));
32528
32557
  }
32529
- });
32530
- program2.command("daemon:restart").description("Restart ADHDev Daemon (stop \u2192 start)").option("-p, --port <port>", "Local WS server port", "19222").option("--server <url>", "Override server URL").option("--dev", "Enable Dev Mode").action(async (options) => {
32558
+ }));
32559
+ hideCommand(program2.command("daemon:restart").description("Restart ADHDev Daemon (stop \u2192 start)").option("-p, --port <port>", "Local WS server port", "19222").option("--server <url>", "Override server URL").option("--dev", "Enable Dev Mode").action(async (options) => {
32531
32560
  const { stopDaemon: stopDaemon2, isDaemonRunning: isDaemonRunning2 } = await Promise.resolve().then(() => (init_adhdev_daemon(), adhdev_daemon_exports));
32532
32561
  const { spawn: spawn3 } = await import("child_process");
32533
32562
  if (isDaemonRunning2()) {
@@ -32554,8 +32583,8 @@ function registerDaemonCommands(program2, pkgVersion3) {
32554
32583
  `));
32555
32584
  process.exit(1);
32556
32585
  }
32557
- });
32558
- program2.command("daemon:upgrade").description("Upgrade ADHDev to latest version and restart daemon").option("--no-restart", "Upgrade only, skip daemon restart").action(async (options) => {
32586
+ }));
32587
+ hideCommand(program2.command("daemon:upgrade").description("Upgrade ADHDev to latest version and restart daemon").option("--no-restart", "Upgrade only, skip daemon restart").action(async (options) => {
32559
32588
  const { isDaemonRunning: isDaemonRunning2, stopDaemon: stopDaemon2 } = await Promise.resolve().then(() => (init_adhdev_daemon(), adhdev_daemon_exports));
32560
32589
  const { execSync: execSync7, spawn: spawn3 } = await import("child_process");
32561
32590
  const fsMod = await import("fs");
@@ -32632,7 +32661,7 @@ function registerDaemonCommands(program2, pkgVersion3) {
32632
32661
  } else {
32633
32662
  console.log(import_chalk5.default.green("\n \u2713 Upgrade complete (daemon not restarted)\n"));
32634
32663
  }
32635
- });
32664
+ }));
32636
32665
  program2.command("update").description("\u{1F504} Update ADHDev to latest version and restart daemon (alias for daemon:upgrade)").option("--no-restart", "Upgrade only, skip daemon restart").action(async (options) => {
32637
32666
  process.argv = [process.argv[0], process.argv[1], "daemon:upgrade", ...options.restart === false ? ["--no-restart"] : []];
32638
32667
  await program2.parseAsync(process.argv);
@@ -32642,8 +32671,12 @@ function registerDaemonCommands(program2, pkgVersion3) {
32642
32671
  // src/cli/provider-commands.ts
32643
32672
  var import_chalk6 = __toESM(require("chalk"));
32644
32673
  init_cdp_utils();
32674
+ function hideCommand2(command) {
32675
+ command.hideHelp?.();
32676
+ return command;
32677
+ }
32645
32678
  function registerProviderCommands(program2) {
32646
- const provider = program2.command("provider").description("\u{1F50C} Provider management \u2014 list, test, reload providers");
32679
+ const provider = hideCommand2(program2.command("provider").description("\u{1F50C} Provider management \u2014 list, test, reload providers"));
32647
32680
  provider.command("list").description("List all loaded providers").option("-j, --json", "Output raw JSON").action(async (options) => {
32648
32681
  try {
32649
32682
  const { ProviderLoader: ProviderLoader2 } = await Promise.resolve().then(() => (init_src(), src_exports));
@@ -33424,7 +33457,7 @@ function registerProviderCommands(program2) {
33424
33457
  });
33425
33458
  }
33426
33459
  function registerCdpCommands(program2) {
33427
- const cdp = program2.command("cdp").description("\u{1F50D} CDP debugging tools \u2014 analyze IDE DOM for script development");
33460
+ const cdp = hideCommand2(program2.command("cdp").description("\u{1F50D} CDP debugging tools \u2014 analyze IDE DOM for script development"));
33428
33461
  cdp.command("debug").description("Analyze IDE AI panel \u2014 find inputs, buttons, textareas, iframes").option("-p, --port <port>", "CDP port (direct mode)", "9222").option("-d, --daemon", "Use running daemon instead of direct CDP").option("--session <id>", "Agent webview session ID").option("-j, --json", "Output raw JSON").action(async (options) => {
33429
33462
  try {
33430
33463
  let result;
@@ -33670,11 +33703,17 @@ if (process.argv.length <= 2) {
33670
33703
  program.outputHelp();
33671
33704
  console.log();
33672
33705
  console.log(import_chalk7.default.gray(" Quick start:"));
33706
+ console.log(import_chalk7.default.gray(" adhdev setup \u2014 First-time setup & login"));
33673
33707
  console.log(import_chalk7.default.gray(" adhdev daemon \u2014 Start unified daemon (Required)"));
33708
+ console.log(import_chalk7.default.gray(" adhdev standalone \u2014 Start standalone local dashboard & daemon"));
33674
33709
  console.log(import_chalk7.default.gray(" adhdev launch cursor \u2014 Launch IDE with CDP (e.g. cursor, windsurf)"));
33675
33710
  console.log(import_chalk7.default.gray(" adhdev launch claude \u2014 Launch CLI agent (e.g. gemini, claude)"));
33676
- console.log(import_chalk7.default.gray(" adhdev setup \u2014 First-time setup & configuration"));
33677
33711
  console.log(import_chalk7.default.gray(" adhdev status \u2014 Check current setup"));
33712
+ console.log(import_chalk7.default.gray(" adhdev update \u2014 Upgrade to latest version"));
33713
+ console.log();
33714
+ console.log(import_chalk7.default.gray(" Advanced tools:"));
33715
+ console.log(import_chalk7.default.gray(" adhdev provider ... \u2014 Provider development commands"));
33716
+ console.log(import_chalk7.default.gray(" adhdev cdp ... \u2014 CDP debugging tools"));
33678
33717
  console.log();
33679
33718
  } else {
33680
33719
  program.parseAsync(process.argv).catch((err) => {