@foxden-app/foxclaw 0.5.55 → 0.5.57
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 +20 -0
- package/dist/controller/controller.d.ts +1 -0
- package/dist/controller/controller.js +7 -5
- package/dist/main.js +5 -2
- package/dist/update_status.d.ts +11 -0
- package/dist/update_status.js +18 -0
- package/dist/voice/tts.js +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
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.57 - 2026-06-21
|
|
6
|
+
|
|
7
|
+
### 中文
|
|
8
|
+
- 修复 SoulX SSH 语音后端 URL 构造错误:远端脚本现在正确展开 `$BASE_URL`,不再把 `${BASE_URL}` 字面量传给 curl 导致 `URL rejected: Bad hostname`。
|
|
9
|
+
- SoulX SSH 语音请求现在也会把 `VOICE_TTS_TIMEOUT_MS` 下发给远端 curl,远端 `/health` 和 `/v1/tts` 请求会自行按超时退出,避免 SSH 被中断后留下长时间运行的 curl。
|
|
10
|
+
|
|
11
|
+
### English
|
|
12
|
+
- Fixed SoulX SSH voice backend URL construction. The remote script now expands `$BASE_URL` correctly instead of passing a literal `${BASE_URL}` to curl and failing with `URL rejected: Bad hostname`.
|
|
13
|
+
- SoulX SSH voice requests now pass `VOICE_TTS_TIMEOUT_MS` down to remote curl for both `/health` and `/v1/tts`, preventing long-running remote curl processes after a timed-out SSH call.
|
|
14
|
+
|
|
15
|
+
## 0.5.56 - 2026-06-21
|
|
16
|
+
|
|
17
|
+
### 中文
|
|
18
|
+
- 修正 `foxclaw status` 和 Telegram `/status` 的升级状态摘要:旧的成功 self-update 记录如果不是当前 FoxClaw 版本,不再显示为 “Last update/Last service update”,避免误导当前运行版本判断。
|
|
19
|
+
- 多 runtime 状态聚合现在携带当前 FoxClaw 版本,用于判断升级记录是否仍然相关;失败、运行中等需要处理的升级状态仍会展示。
|
|
20
|
+
|
|
21
|
+
### English
|
|
22
|
+
- 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.
|
|
23
|
+
- Multi-runtime status aggregation now carries the current FoxClaw version for this relevance check; failed or in-progress update states are still shown.
|
|
24
|
+
|
|
5
25
|
## 0.5.55 - 2026-06-21
|
|
6
26
|
|
|
7
27
|
### 中文
|
|
@@ -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
|
|
500
|
+
if (shouldShowRuntimeLastUpdate(serviceStatus)) {
|
|
501
|
+
const lastUpdate = serviceStatus.lastUpdate;
|
|
500
502
|
lines.push(t(locale, 'status_last_update', {
|
|
501
|
-
from:
|
|
502
|
-
to:
|
|
503
|
-
time:
|
|
503
|
+
from: lastUpdate.fromVersion,
|
|
504
|
+
to: lastUpdate.toVersion ?? t(locale, 'unknown'),
|
|
505
|
+
time: lastUpdate.updatedAt,
|
|
504
506
|
}));
|
|
505
|
-
const codexUpdateLine = this.formatCodexUpdateResult(
|
|
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
|
|
400
|
-
|
|
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/dist/voice/tts.js
CHANGED
|
@@ -42,7 +42,7 @@ async function synthesizeViaHttp(text, config) {
|
|
|
42
42
|
throw new Error('VOICE_TTS_URL is not configured');
|
|
43
43
|
}
|
|
44
44
|
if (config.voiceTtsEngine === 'soulx') {
|
|
45
|
-
return convertToOggOpus(await requestTtsWav(config, '/v1/tts', { text, seed:
|
|
45
|
+
return convertToOggOpus(await requestTtsWav(config, '/v1/tts', { text, seed: 7 }), config.voiceFfmpegBin);
|
|
46
46
|
}
|
|
47
47
|
try {
|
|
48
48
|
return convertToOggOpus(await requestTtsWav(config, '/v1/tts/custom', { text, language: 'zh' }), config.voiceFfmpegBin);
|
|
@@ -194,23 +194,25 @@ async function synthesizeSoulxViaSsh(text, config) {
|
|
|
194
194
|
}
|
|
195
195
|
const encodedText = Buffer.from(text, 'utf8').toString('base64');
|
|
196
196
|
const baseUrl = config.voiceTtsUrl || 'http://127.0.0.1:18082';
|
|
197
|
+
const curlMaxTimeSeconds = Math.max(1, Math.ceil(config.voiceTtsTimeoutMs / 1000));
|
|
197
198
|
const script = String.raw `set -euo pipefail
|
|
198
199
|
TEXT="$(printf '%s' "$1" | base64 -d)"
|
|
199
200
|
ENV_DIR="$2"
|
|
200
201
|
BASE_URL="$3"
|
|
202
|
+
CURL_MAX_TIME="$4"
|
|
201
203
|
cd "$ENV_DIR"
|
|
202
204
|
set -a
|
|
203
205
|
. ./.env
|
|
204
206
|
set +a
|
|
205
207
|
tmp="$(mktemp -d)"
|
|
206
208
|
trap 'rm -rf "$tmp"' EXIT
|
|
207
|
-
curl -sS "
|
|
209
|
+
curl -sS --connect-timeout 5 --max-time "$CURL_MAX_TIME" "$BASE_URL/health" >/dev/null
|
|
208
210
|
TEXT="$TEXT" python3 - <<'PY' > "$tmp/body.json"
|
|
209
211
|
import json
|
|
210
212
|
import os
|
|
211
213
|
print(json.dumps({"text": os.environ["TEXT"], "seed": 7, "dialect_prompt": ""}, ensure_ascii=False))
|
|
212
214
|
PY
|
|
213
|
-
status="$(curl -sS -w '%{http_code}' -X POST "
|
|
215
|
+
status="$(curl -sS --connect-timeout 5 --max-time "$CURL_MAX_TIME" -w '%{http_code}' -X POST "$BASE_URL/v1/tts" \
|
|
214
216
|
-H "Authorization: Bearer $QWEN_SPEECH_API_TOKEN" \
|
|
215
217
|
-H "Content-Type: application/json" \
|
|
216
218
|
--data-binary "@$tmp/body.json" \
|
|
@@ -238,6 +240,7 @@ PY
|
|
|
238
240
|
encodedText,
|
|
239
241
|
envDir,
|
|
240
242
|
baseUrl,
|
|
243
|
+
String(curlMaxTimeSeconds),
|
|
241
244
|
], script, config.voiceTtsTimeoutMs);
|
|
242
245
|
}
|
|
243
246
|
async function runSshBinary(args, stdin, timeoutMs) {
|