adhdev 0.9.76-rc.1 → 0.9.76-rc.3

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
@@ -40874,7 +40874,7 @@ function summarizeSessionHostPruneResult(result) {
40874
40874
  keptCount: Array.isArray(value.keptSessionIds) ? value.keptSessionIds.length : void 0
40875
40875
  };
40876
40876
  }
40877
- var fs10, CHANNEL_NPM_TAG, CHAT_COMMANDS, READ_DEBUG_ENABLED2, DaemonCommandRouter;
40877
+ var fs10, CHANNEL_NPM_TAG, CHANNEL_SERVER_URL, CHAT_COMMANDS, READ_DEBUG_ENABLED2, DaemonCommandRouter;
40878
40878
  var init_router = __esm({
40879
40879
  "../../oss/packages/daemon-core/src/commands/router.ts"() {
40880
40880
  "use strict";
@@ -40902,6 +40902,10 @@ var init_router = __esm({
40902
40902
  init_upgrade_helper();
40903
40903
  fs10 = __toESM(require("fs"));
40904
40904
  CHANNEL_NPM_TAG = { stable: "latest", preview: "next" };
40905
+ CHANNEL_SERVER_URL = {
40906
+ stable: "https://api.adhf.dev",
40907
+ preview: "https://api-preview.adhf.dev"
40908
+ };
40905
40909
  CHAT_COMMANDS = [
40906
40910
  "send_chat",
40907
40911
  "new_chat",
@@ -41507,6 +41511,7 @@ var init_router = __esm({
41507
41511
  const npmTag = CHANNEL_NPM_TAG[channel];
41508
41512
  const latest = String(execNpmCommandSync(["view", `${pkgName}@${npmTag}`, "version"], { encoding: "utf-8", timeout: 1e4 }, npmSurface)).trim();
41509
41513
  LOG.info("Upgrade", `Latest ${pkgName}@${npmTag}: v${latest}`);
41514
+ updateConfig({ updateChannel: channel, serverUrl: CHANNEL_SERVER_URL[channel] });
41510
41515
  let currentInstalled = null;
41511
41516
  try {
41512
41517
  const currentJson = String(execNpmCommandSync(["ls", "-g", pkgName, "--depth=0", "--json"], {
@@ -81091,17 +81096,19 @@ var init_server_connection = __esm({
81091
81096
  return;
81092
81097
  } else if (message.type === "version_mismatch") {
81093
81098
  const p = message.payload;
81099
+ const updateCommand = typeof p.updateCommand === "string" && p.updateCommand.trim() ? p.updateCommand.trim() : "adhdev daemon:upgrade";
81094
81100
  LOG.info("Server", `
81095
81101
  \u{1F504} Update available: v${p.current} \u2192 v${p.latest}`);
81096
- LOG.info("Server", ` Run: adhdev daemon:upgrade
81102
+ LOG.info("Server", ` Run: ${updateCommand}
81097
81103
  `);
81098
81104
  } else if (message.type === "force_update_required") {
81099
81105
  this.compatBlocked = true;
81100
81106
  const p = message.payload;
81107
+ const updateCommand = typeof p.updateCommand === "string" && p.updateCommand.trim() ? p.updateCommand.trim() : "adhdev daemon:upgrade";
81101
81108
  LOG.error("Server", `
81102
81109
  \u26D4 Daemon v${this.options.daemonVersion} is no longer compatible.`);
81103
81110
  LOG.error("Server", ` Minimum required: v${p.minVersion}`);
81104
- LOG.error("Server", ` Run: adhdev daemon:upgrade
81111
+ LOG.error("Server", ` Run: ${updateCommand}
81105
81112
  `);
81106
81113
  }
81107
81114
  const handlers = this.messageHandlers.get(message.type);
@@ -90296,7 +90303,7 @@ var init_adhdev_daemon = __esm({
90296
90303
  init_version();
90297
90304
  init_src();
90298
90305
  init_runtime_defaults();
90299
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.1" });
90306
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.3" });
90300
90307
  AdhdevDaemon = class _AdhdevDaemon {
90301
90308
  localHttpServer = null;
90302
90309
  localWss = null;
@@ -93935,7 +93942,7 @@ var DEFAULT_DAEMON_PORT_TEXT = String(DEFAULT_DAEMON_PORT);
93935
93942
  var DEV_SERVER_PORT2 = 19280;
93936
93943
  var DEV_SERVER_BASE_URL = `http://127.0.0.1:${DEV_SERVER_PORT2}`;
93937
93944
  var CHANNEL_NPM_TAG2 = { stable: "latest", preview: "next" };
93938
- var CHANNEL_SERVER_URL = {
93945
+ var CHANNEL_SERVER_URL2 = {
93939
93946
  stable: "https://api.adhf.dev",
93940
93947
  preview: "https://api-preview.adhf.dev"
93941
93948
  };
@@ -93959,7 +93966,7 @@ function releaseChannelLabel(channel) {
93959
93966
  }
93960
93967
  async function persistReleaseChannel(channel) {
93961
93968
  const { updateConfig: updateConfig2 } = await Promise.resolve().then(() => (init_src(), src_exports));
93962
- updateConfig2({ updateChannel: channel, serverUrl: CHANNEL_SERVER_URL[channel] });
93969
+ updateConfig2({ updateChannel: channel, serverUrl: CHANNEL_SERVER_URL2[channel] });
93963
93970
  }
93964
93971
  function hideCommand(command) {
93965
93972
  command._hidden = true;
@@ -94955,7 +94962,7 @@ function registerDaemonCommands(program2, pkgVersion3) {
94955
94962
  const current = normalizeReleaseChannel2(config2.updateChannel) || "stable";
94956
94963
  console.log(source_default.bold("\n ADHDev Channel\n"));
94957
94964
  console.log(` ${source_default.bold("Channel:")} ${releaseChannelLabel(current)}`);
94958
- console.log(` ${source_default.bold("Server:")} ${config2.serverUrl || CHANNEL_SERVER_URL[current]}`);
94965
+ console.log(` ${source_default.bold("Server:")} ${config2.serverUrl || CHANNEL_SERVER_URL2[current]}`);
94959
94966
  console.log();
94960
94967
  });
94961
94968
  channel.command("set <channel>").description("Set the ADHDev channel: stable/latest or preview/next").action(async (channelName) => {
@@ -94970,7 +94977,7 @@ function registerDaemonCommands(program2, pkgVersion3) {
94970
94977
  await persistReleaseChannel(selected);
94971
94978
  console.log(source_default.green(`
94972
94979
  \u2713 Channel set to ${releaseChannelLabel(selected)}`));
94973
- console.log(source_default.gray(` Server: ${CHANNEL_SERVER_URL[selected]}`));
94980
+ console.log(source_default.gray(` Server: ${CHANNEL_SERVER_URL2[selected]}`));
94974
94981
  console.log(source_default.gray(` Update: adhdev update --channel ${selected}
94975
94982
  `));
94976
94983
  });