@foxden-app/foxclaw 0.5.55 → 0.5.56

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,16 @@
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.56 - 2026-06-21
6
+
7
+ ### 中文
8
+ - 修正 `foxclaw status` 和 Telegram `/status` 的升级状态摘要:旧的成功 self-update 记录如果不是当前 FoxClaw 版本,不再显示为 “Last update/Last service update”,避免误导当前运行版本判断。
9
+ - 多 runtime 状态聚合现在携带当前 FoxClaw 版本,用于判断升级记录是否仍然相关;失败、运行中等需要处理的升级状态仍会展示。
10
+
11
+ ### English
12
+ - Fixed `foxclaw status` and Telegram `/status` update summaries so stale successful self-update records are no longer shown as the current "Last update/Last service update" when they do not match the running FoxClaw version.
13
+ - Multi-runtime status aggregation now carries the current FoxClaw version for this relevance check; failed or in-progress update states are still shown.
14
+
5
15
  ## 0.5.55 - 2026-06-21
6
16
 
7
17
  ### 中文
@@ -38,6 +38,7 @@ export interface CoreCoordinator {
38
38
  }>;
39
39
  statusUpdated?: (status: RuntimeStatus) => void;
40
40
  getServiceStatus?: () => Promise<{
41
+ currentVersion?: string;
41
42
  bots: NonNullable<RuntimeStatus['bots']>;
42
43
  weixinRuntime?: RuntimeStatus['weixinRuntime'];
43
44
  authMirror?: RuntimeStatus['authMirror'];
@@ -7,6 +7,7 @@ import { normalizeLocale, t } from '../i18n.js';
7
7
  import { chatGptAuthMetadataMatchesCandidateName, parseChatGptAuthMetadata, readChatGptAuthRecord, readChatGptAuthMetadata, } from '../auth/mirror.js';
8
8
  import { readAccessTokenExpiresAtMs } from '../auth/cross_node_sync.js';
9
9
  import { parseCommand } from './commands.js';
10
+ import { shouldShowRuntimeLastUpdate } from '../update_status.js';
10
11
  import { buildAccessSettingsKeyboard, buildModelSettingsKeyboard, buildSetupPanelKeyboard, buildThreadListKeyboard, buildThreadsKeyboard, clampEffortToModel, formatAccessPresetLabel, formatActiveTurnMessageModeLabel, formatAccessSettingsMessage, formatApprovalPolicyLabel, formatCollaborationModeLabel, formatModelSettingsMessage, formatSandboxModeLabel, formatServiceTierStatusLabel, formatSetupPanelMessage, formatThreadContextSummary, formatThreadsMessage, formatWeixinAccessCopyPaste, formatWeixinModelCopyPaste, formatWeixinThreadsCopyPaste, formatWeixinWhereNavCopyPaste, formatWhereMessage, normalizeRequestedEffort, resolveCurrentModel, resolveActiveTurnMessageMode, resolveRequestedModel, } from './presentation.js';
11
12
  import { clampServiceTierToModel, resolveFastTierForModel } from './service_tier.js';
12
13
  import { TELEGRAM_BOT_API_DOWNLOAD_LIMIT_BYTES, buildAttachmentPrompt, isNativeImageAttachment, planAttachmentStoragePath, summarizeTelegramInput, } from '../telegram/media.js';
@@ -496,13 +497,14 @@ export class BridgeSessionCore {
496
497
  value: formatAuthProactiveRefreshStatus(locale, serviceStatus.authProactiveRefresh),
497
498
  }));
498
499
  }
499
- if (serviceStatus.lastUpdate) {
500
+ if (shouldShowRuntimeLastUpdate(serviceStatus)) {
501
+ const lastUpdate = serviceStatus.lastUpdate;
500
502
  lines.push(t(locale, 'status_last_update', {
501
- from: serviceStatus.lastUpdate.fromVersion,
502
- to: serviceStatus.lastUpdate.toVersion ?? t(locale, 'unknown'),
503
- time: serviceStatus.lastUpdate.updatedAt,
503
+ from: lastUpdate.fromVersion,
504
+ to: lastUpdate.toVersion ?? t(locale, 'unknown'),
505
+ time: lastUpdate.updatedAt,
504
506
  }));
505
- const codexUpdateLine = this.formatCodexUpdateResult(serviceStatus.lastUpdate);
507
+ const codexUpdateLine = this.formatCodexUpdateResult(lastUpdate);
506
508
  if (codexUpdateLine) {
507
509
  lines.push(t(locale, 'status_last_codex_update', { value: codexUpdateLine }));
508
510
  }
package/dist/main.js CHANGED
@@ -17,6 +17,7 @@ import { buildFoxclawSystemdUnitText, buildSystemdRestartHelperArgs, cgroupConta
17
17
  import { clearPendingClusterUpdateBroadcast, createSelfUpdateRuntime, inferPnpmHomeFromEntryPoint, performSelfUpdate, readPendingClusterUpdateBroadcast, readSelfUpdateStatus, writeSelfUpdateStatus, } from './update.js';
18
18
  import { TELEGRAM_VOICE_MAX_BYTES, TELEGRAM_VOICE_SUPPORTED_EXTENSIONS, telegramVoiceContentType, } from './voice/files.js';
19
19
  import { inferTelegramBotId, resolveTelegramVoiceTarget } from './voice/target.js';
20
+ import { shouldShowRuntimeLastUpdate } from './update_status.js';
20
21
  const rawCommand = process.argv[2];
21
22
  const command = rawCommand || 'serve';
22
23
  loadEnv();
@@ -396,8 +397,9 @@ function formatRuntimeStatusSummary(status) {
396
397
  if (status.authProactiveRefresh) {
397
398
  lines.push(`Auth refresh: ${status.authProactiveRefresh.state}${status.authProactiveRefresh.finishedAt ? ` ${formatAge(status.authProactiveRefresh.finishedAt)}` : ''}`);
398
399
  }
399
- if (status.lastUpdate) {
400
- lines.push(`Last update: ${status.lastUpdate.fromVersion} -> ${status.lastUpdate.toVersion ?? 'unknown'} ${formatAge(status.lastUpdate.updatedAt)}`);
400
+ if (shouldShowRuntimeLastUpdate(status, readPackageVersion())) {
401
+ const lastUpdate = status.lastUpdate;
402
+ lines.push(`Last update: ${lastUpdate.fromVersion} -> ${lastUpdate.toVersion ?? 'unknown'} ${formatAge(lastUpdate.updatedAt)}`);
401
403
  }
402
404
  if (status.lastError) {
403
405
  lines.push(`Last error: ${truncateStatusLine(status.lastError, 160)}`);
@@ -627,6 +629,7 @@ async function runServeCli() {
627
629
  authSyncTest: () => authSync?.testPeers() ?? Promise.resolve({ sent: 0, replied: 0, missing: [] }),
628
630
  statusUpdated: () => writeAggregateStatus(),
629
631
  getServiceStatus: async () => ({
632
+ currentVersion: readPackageVersion(),
630
633
  bots: await Promise.all(runtimes.map(async (runtime) => {
631
634
  const status = runtime.core.getRuntimeStatus();
632
635
  return {
@@ -0,0 +1,11 @@
1
+ type RuntimeLastUpdateStatus = {
2
+ userAgent?: string | null;
3
+ currentVersion?: string | null;
4
+ lastUpdate?: {
5
+ state: string;
6
+ toVersion: string | null;
7
+ } | null;
8
+ };
9
+ export declare function shouldShowRuntimeLastUpdate(status: RuntimeLastUpdateStatus, currentVersion?: string | null): boolean;
10
+ export declare function extractFoxClawVersionFromUserAgent(userAgent: string | null | undefined): string | null;
11
+ export {};
@@ -0,0 +1,18 @@
1
+ export function shouldShowRuntimeLastUpdate(status, currentVersion = null) {
2
+ const update = status.lastUpdate;
3
+ if (!update) {
4
+ return false;
5
+ }
6
+ if (update.state !== 'succeeded') {
7
+ return true;
8
+ }
9
+ const version = currentVersion?.trim() || status.currentVersion?.trim() || extractFoxClawVersionFromUserAgent(status.userAgent);
10
+ return Boolean(version && update.toVersion === version);
11
+ }
12
+ export function extractFoxClawVersionFromUserAgent(userAgent) {
13
+ if (!userAgent) {
14
+ return null;
15
+ }
16
+ const match = userAgent.match(/\(foxclaw;\s*([^)]+)\)/i);
17
+ return match?.[1]?.trim() || null;
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxden-app/foxclaw",
3
- "version": "0.5.55",
3
+ "version": "0.5.56",
4
4
  "description": "Foxden local execution claw for controlling Codex from trusted chat interfaces.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",