@foxden-app/foxclaw 0.5.68 → 0.5.69

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable FoxClaw changes are listed here. Each release note is bilingual so GitHub Releases and the npm package are useful to both Chinese and English readers.
4
4
 
5
+ ## 0.5.69 - 2026-07-11
6
+
7
+ ### 中文
8
+ - 修复 pnpm 11 的自更新路径解析:`pnpm root -g` 在 pnpm 11 返回全局目录本身(例如 `.../global/v11`),而不是旧版返回的 `node_modules` 目录。FoxClaw 现在同时识别两种布局,升级后可以正确执行自检和服务重启。
9
+
10
+ ### English
11
+ - Fixed self-update path resolution for pnpm 11. `pnpm root -g` now returns the global directory itself (for example `.../global/v11`) rather than the `node_modules` directory returned by earlier pnpm versions. FoxClaw now recognizes both layouts and can correctly run post-update checks and restart the service.
12
+
5
13
  ## 0.5.68 - 2026-07-01
6
14
 
7
15
  ### 中文
package/dist/update.d.ts CHANGED
@@ -85,5 +85,6 @@ export declare function performSelfUpdate(options: PerformSelfUpdateOptions): Se
85
85
  export declare function readPendingClusterUpdateBroadcast(filePath: string): PendingClusterUpdateBroadcast | null;
86
86
  export declare function writePendingClusterUpdateBroadcast(filePath: string, value: PendingClusterUpdateBroadcast): void;
87
87
  export declare function clearPendingClusterUpdateBroadcast(filePath: string): void;
88
+ export declare function resolveFoxclawEntryPointFromGlobalRoot(globalRoot: string, exists?: (target: string) => boolean): string | null;
88
89
  export declare function extractReleaseNotes(changelog: string, version: string, locale: AppLocale): string[] | null;
89
90
  export {};
package/dist/update.js CHANGED
@@ -472,6 +472,15 @@ function runInherited(command, args, env) {
472
472
  throw new Error(`${command} ${args.join(' ')} exited with status ${result.status ?? 'unknown'}.`);
473
473
  }
474
474
  }
475
+ export function resolveFoxclawEntryPointFromGlobalRoot(globalRoot, exists = fs.existsSync) {
476
+ // pnpm <= 10 prints the global node_modules directory; pnpm >= 11 prints
477
+ // the global directory itself. Accept both documented layouts.
478
+ const candidates = [
479
+ path.join(globalRoot, '@foxden-app', 'foxclaw', 'dist', 'main.js'),
480
+ path.join(globalRoot, 'node_modules', '@foxden-app', 'foxclaw', 'dist', 'main.js'),
481
+ ];
482
+ return candidates.find(candidate => exists(candidate)) ?? null;
483
+ }
475
484
  function resolveUpdatedEntryPoint(installer, env) {
476
485
  const result = spawnSync(installer.command, installer.rootArgs, { encoding: 'utf8', env });
477
486
  if (result.error) {
@@ -484,9 +493,9 @@ function resolveUpdatedEntryPoint(installer, env) {
484
493
  if (!globalRoot) {
485
494
  throw new Error(`Could not locate the updated global package root using ${installer.manager}.`);
486
495
  }
487
- const updatedEntryPoint = path.join(globalRoot, '@foxden-app', 'foxclaw', 'dist', 'main.js');
488
- if (!fs.existsSync(updatedEntryPoint)) {
489
- throw new Error(`Updated FoxClaw entry point was not found at ${updatedEntryPoint}.`);
496
+ const updatedEntryPoint = resolveFoxclawEntryPointFromGlobalRoot(globalRoot);
497
+ if (!updatedEntryPoint) {
498
+ throw new Error(`Updated FoxClaw entry point was not found below ${globalRoot} (checked direct and node_modules layouts).`);
490
499
  }
491
500
  return updatedEntryPoint;
492
501
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxden-app/foxclaw",
3
- "version": "0.5.68",
3
+ "version": "0.5.69",
4
4
  "description": "Foxden local execution claw for controlling Codex from trusted chat interfaces.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",