@adhdev/daemon-core 0.9.76-rc.2 → 0.9.76-rc.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.76-rc.2",
3
+ "version": "0.9.76-rc.4",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,6 +41,10 @@ import { execNpmCommandSync, resolveCurrentGlobalInstallSurface, spawnDetachedDa
41
41
 
42
42
  type ReleaseChannel = 'stable' | 'preview';
43
43
  const CHANNEL_NPM_TAG: Record<ReleaseChannel, 'latest' | 'next'> = { stable: 'latest', preview: 'next' };
44
+ const CHANNEL_SERVER_URL: Record<ReleaseChannel, string> = {
45
+ stable: 'https://api.adhf.dev',
46
+ preview: 'https://api-preview.adhf.dev',
47
+ };
44
48
 
45
49
  function normalizeReleaseChannel(value: unknown): ReleaseChannel | null {
46
50
  if (typeof value !== 'string') return null;
@@ -892,6 +896,7 @@ export class DaemonCommandRouter {
892
896
  // Check channel-pinned dist-tag and resolve it to a concrete install version.
893
897
  const latest = String(execNpmCommandSync(['view', `${pkgName}@${npmTag}`, 'version'], { encoding: 'utf-8', timeout: 10000 }, npmSurface)).trim();
894
898
  LOG.info('Upgrade', `Latest ${pkgName}@${npmTag}: v${latest}`);
899
+ updateConfig({ updateChannel: channel, serverUrl: CHANNEL_SERVER_URL[channel] } as any);
895
900
  let currentInstalled: string | null = null;
896
901
  try {
897
902
  const currentJson = String(execNpmCommandSync(['ls', '-g', pkgName, '--depth=0', '--json'], {