@foxden-app/foxclaw 0.12.0 → 0.13.1
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 +34 -0
- package/dist/antigravity/account_ui.d.ts +34 -0
- package/dist/antigravity/account_ui.js +354 -0
- package/dist/antigravity/adapter.js +1 -1
- package/dist/antigravity/auth.d.ts +4 -1
- package/dist/antigravity/auth.js +17 -5
- package/dist/antigravity/controller.d.ts +3 -108
- package/dist/antigravity/controller.js +2 -2129
- package/dist/antigravity/conversation_ui.d.ts +56 -0
- package/dist/antigravity/conversation_ui.js +509 -0
- package/dist/antigravity/ui_callbacks.d.ts +6 -0
- package/dist/antigravity/ui_callbacks.js +6 -0
- package/dist/bridge/unified_bridge.d.ts +114 -0
- package/dist/bridge/unified_bridge.js +1343 -0
- package/dist/channels/bridge_messaging_router.d.ts +8 -4
- package/dist/channels/bridge_messaging_router.js +15 -4
- package/dist/channels/telegram/telegram_messaging_port.d.ts +16 -0
- package/dist/channels/telegram/telegram_messaging_port.js +22 -2
- package/dist/channels/text_actions.d.ts +14 -0
- package/dist/channels/text_actions.js +48 -0
- package/dist/channels/weixin/weixin_channel_adapter.d.ts +3 -4
- package/dist/channels/weixin/weixin_channel_adapter.js +2 -2
- package/dist/channels/weixin/weixin_messaging_port.d.ts +16 -1
- package/dist/channels/weixin/weixin_messaging_port.js +34 -7
- package/dist/codex_app/activity.d.ts +62 -0
- package/dist/codex_app/activity.js +418 -0
- package/dist/codex_app/adapter.d.ts +2 -2
- package/dist/codex_app/adapter.js +55 -25
- package/dist/codex_app/backend_ui.d.ts +4 -0
- package/dist/codex_app/backend_ui.js +48 -0
- package/dist/codex_app/client.js +0 -12
- package/dist/controller/access.d.ts +1 -11
- package/dist/controller/access.js +1 -33
- package/dist/controller/activity.d.ts +1 -62
- package/dist/controller/activity.js +2 -418
- package/dist/controller/auth_errors.d.ts +11 -0
- package/dist/controller/auth_errors.js +124 -0
- package/dist/controller/auth_files.d.ts +13 -0
- package/dist/controller/auth_files.js +156 -0
- package/dist/controller/auth_presentation.d.ts +77 -0
- package/dist/controller/auth_presentation.js +697 -0
- package/dist/controller/auth_quota_service.d.ts +27 -0
- package/dist/controller/auth_quota_service.js +151 -0
- package/dist/controller/controller.d.ts +30 -56
- package/dist/controller/controller.js +181 -3497
- package/dist/controller/interactions.d.ts +74 -0
- package/dist/controller/interactions.js +560 -0
- package/dist/controller/local_usage_service.d.ts +19 -0
- package/dist/controller/local_usage_service.js +62 -0
- package/dist/controller/native_panel_service.d.ts +55 -0
- package/dist/controller/native_panel_service.js +214 -0
- package/dist/controller/native_panels.d.ts +61 -0
- package/dist/controller/native_panels.js +784 -0
- package/dist/controller/shared_helpers.d.ts +53 -0
- package/dist/controller/shared_helpers.js +399 -0
- package/dist/controller/state_types.d.ts +390 -0
- package/dist/controller/state_types.js +82 -0
- package/dist/controller/turn_rendering.d.ts +22 -0
- package/dist/controller/turn_rendering.js +288 -0
- package/dist/core/access.d.ts +11 -0
- package/dist/core/access.js +33 -0
- package/dist/core/attachment_files.d.ts +13 -0
- package/dist/core/attachment_files.js +180 -0
- package/dist/core/attachment_types.d.ts +22 -0
- package/dist/core/attachment_types.js +1 -0
- package/dist/core/attachments.d.ts +5 -3
- package/dist/core/attachments.js +2 -2
- package/dist/core/backend_registry.d.ts +22 -0
- package/dist/core/backend_registry.js +50 -0
- package/dist/core/backend_ui.d.ts +28 -0
- package/dist/core/backend_ui.js +1 -0
- package/dist/core/channel_events.d.ts +48 -0
- package/dist/core/channel_events.js +1 -0
- package/dist/core/channel_port.d.ts +52 -8
- package/dist/core/engine_spi.d.ts +19 -4
- package/dist/core/listener_scope.d.ts +11 -0
- package/dist/core/listener_scope.js +10 -0
- package/dist/core/message_text.d.ts +2 -0
- package/dist/core/message_text.js +28 -0
- package/dist/core/network_errors.d.ts +1 -0
- package/dist/core/network_errors.js +23 -0
- package/dist/core/orchestrator.d.ts +53 -24
- package/dist/core/orchestrator.js +855 -507
- package/dist/core/queued_engine_input.d.ts +12 -0
- package/dist/core/queued_engine_input.js +16 -0
- package/dist/core/runtime_supervisor.d.ts +19 -0
- package/dist/core/runtime_supervisor.js +45 -0
- package/dist/core/scope_operations.d.ts +7 -0
- package/dist/core/scope_operations.js +19 -0
- package/dist/core/stream_preview.js +21 -9
- package/dist/dsh/adapter.js +18 -5
- package/dist/dsh/backend.d.ts +7 -0
- package/dist/dsh/backend.js +21 -0
- package/dist/dsh/runtime.d.ts +0 -1
- package/dist/dsh/runtime.js +4 -13
- package/dist/dsh/ui.d.ts +8 -8
- package/dist/dsh/ui.js +1 -1
- package/dist/main.js +55 -43
- package/dist/opencode/adapter.js +28 -9
- package/dist/opencode/controller.js +1 -1
- package/dist/store/channel_inbox.d.ts +14 -0
- package/dist/store/channel_inbox.js +21 -0
- package/dist/store/database.d.ts +7 -3
- package/dist/store/database.js +7 -2
- package/dist/store/task_journal.d.ts +32 -0
- package/dist/store/task_journal.js +70 -0
- package/dist/telegram/api.d.ts +2 -2
- package/dist/telegram/api.js +10 -28
- package/dist/telegram/gateway.d.ts +13 -27
- package/dist/telegram/gateway.js +86 -43
- package/dist/telegram/media.d.ts +2 -34
- package/dist/telegram/media.js +1 -180
- package/dist/telegram/task_preview.d.ts +13 -0
- package/dist/telegram/task_preview.js +92 -0
- package/dist/telegram/task_result.d.ts +2 -0
- package/dist/telegram/task_result.js +12 -0
- package/dist/telegram/text.d.ts +1 -1
- package/dist/telegram/text.js +2 -27
- package/dist/types.d.ts +1 -1
- package/dist/update.d.ts +27 -2
- package/dist/update.js +81 -28
- package/docs/release.md +13 -11
- package/docs/zh/architecture-review.md +106 -0
- package/docs/zh/release.md +13 -11
- package/docs/zh/telegram-experience.md +40 -0
- package/package.json +8 -5
package/dist/update.d.ts
CHANGED
|
@@ -68,6 +68,11 @@ export interface PendingClusterUpdateBroadcast {
|
|
|
68
68
|
fromVersion: string;
|
|
69
69
|
updatedAt: string;
|
|
70
70
|
}
|
|
71
|
+
interface CodexCliUpdateResult {
|
|
72
|
+
message: string;
|
|
73
|
+
fromVersion: string | null;
|
|
74
|
+
toVersion: string | null;
|
|
75
|
+
}
|
|
71
76
|
export declare function selfUpdateStatusPath(statusPath: string): string;
|
|
72
77
|
export declare function inferPnpmHomeFromEntryPoint(entryPoint: string): string | null;
|
|
73
78
|
export declare function inferPnpmFallbackPackageFromEntryPoint(entryPoint: string): string;
|
|
@@ -88,11 +93,31 @@ export declare function buildSelfUpdateLaunchCommand(options: {
|
|
|
88
93
|
systemdRunPath?: string | null;
|
|
89
94
|
unitName?: string;
|
|
90
95
|
}): SelfUpdateLaunchCommand;
|
|
91
|
-
export declare function
|
|
96
|
+
export declare function assertSelfUpdateVersion(current: string, candidate: string, expected?: string): void;
|
|
97
|
+
interface SelfUpdateOperations {
|
|
98
|
+
latestVersion: (installer: SelfUpdateInstaller, env: NodeJS.ProcessEnv) => string;
|
|
99
|
+
run: typeof runInherited;
|
|
100
|
+
entryPoint: typeof resolveUpdatedEntryPoint;
|
|
101
|
+
readVersion: typeof readInstalledPackageVersion;
|
|
102
|
+
updateCodex: typeof updateManagedCodexCli;
|
|
103
|
+
updateAgy: typeof updateManagedAgyCli;
|
|
104
|
+
}
|
|
105
|
+
export declare function performSelfUpdate(options: PerformSelfUpdateOptions, overrides?: Partial<SelfUpdateOperations>): SelfUpdateOutcome;
|
|
92
106
|
export declare function readPendingClusterUpdateBroadcast(filePath: string): PendingClusterUpdateBroadcast | null;
|
|
93
107
|
export declare function writePendingClusterUpdateBroadcast(filePath: string, value: PendingClusterUpdateBroadcast): void;
|
|
94
108
|
export declare function clearPendingClusterUpdateBroadcast(filePath: string): void;
|
|
109
|
+
declare function updateManagedCodexCli(codexCliBin: string, nodePath: string, env: NodeJS.ProcessEnv): CodexCliUpdateResult;
|
|
110
|
+
interface AgyCliUpdateResult {
|
|
111
|
+
message: string;
|
|
112
|
+
fromVersion: string | null;
|
|
113
|
+
toVersion: string | null;
|
|
114
|
+
}
|
|
115
|
+
declare function updateManagedAgyCli(agyCliBin: string, env: NodeJS.ProcessEnv): AgyCliUpdateResult;
|
|
116
|
+
declare function runInherited(command: string, args: string[], env: NodeJS.ProcessEnv): void;
|
|
95
117
|
export declare function resolveFoxclawEntryPointFromGlobalRoot(globalRoot: string, exists?: (target: string) => boolean): string | null;
|
|
96
|
-
export declare function resolveFoxclawEntryPointFromPnpmHome(pnpmHome: string, preferBin?: boolean, exists?: (target: string) => boolean, readText?: (target: string) => string): string | null;
|
|
118
|
+
export declare function resolveFoxclawEntryPointFromPnpmHome(pnpmHome: string, preferBin?: boolean, exists?: (target: string) => boolean, readText?: (target: string) => string, installationRoot?: string): string | null;
|
|
119
|
+
export declare function resolveFoxclawEntryPointFromInstallation(globalRoot: string, pnpmHome?: string, exists?: (target: string) => boolean, readText?: (target: string) => string): string | null;
|
|
120
|
+
declare function resolveUpdatedEntryPoint(installer: SelfUpdateInstaller, env: NodeJS.ProcessEnv): string;
|
|
121
|
+
declare function readInstalledPackageVersion(updatedEntryPoint: string): string;
|
|
97
122
|
export declare function extractReleaseNotes(changelog: string, version: string, locale: AppLocale): string[] | null;
|
|
98
123
|
export {};
|
package/dist/update.js
CHANGED
|
@@ -3,7 +3,10 @@ import path from 'node:path';
|
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import process from 'node:process';
|
|
5
5
|
import { spawn, spawnSync } from 'node:child_process';
|
|
6
|
-
|
|
6
|
+
import { valid, lt } from 'semver';
|
|
7
|
+
const PACKAGE_NAME = '@foxden-app/foxclaw';
|
|
8
|
+
const PACKAGE_SPEC = `${PACKAGE_NAME}@latest`;
|
|
9
|
+
const PACKAGE_REGISTRY = 'https://registry.npmjs.org';
|
|
7
10
|
const CODEX_PACKAGE_SPEC = '@openai/codex@latest';
|
|
8
11
|
const UPDATE_STATUS_FILENAME = 'self-update.json';
|
|
9
12
|
export const SELF_UPDATE_PENDING_TIMEOUT_MS = 15 * 60_000;
|
|
@@ -153,6 +156,9 @@ export function readSelfUpdateStatus(statusFile) {
|
|
|
153
156
|
...(typeof parsed.codexUpdate === 'string' ? { codexUpdate: parsed.codexUpdate } : {}),
|
|
154
157
|
...(typeof parsed.codexFromVersion === 'string' ? { codexFromVersion: parsed.codexFromVersion } : {}),
|
|
155
158
|
...(typeof parsed.codexToVersion === 'string' ? { codexToVersion: parsed.codexToVersion } : {}),
|
|
159
|
+
...(typeof parsed.agyUpdate === 'string' ? { agyUpdate: parsed.agyUpdate } : {}),
|
|
160
|
+
...(typeof parsed.agyFromVersion === 'string' ? { agyFromVersion: parsed.agyFromVersion } : {}),
|
|
161
|
+
...(typeof parsed.agyToVersion === 'string' ? { agyToVersion: parsed.agyToVersion } : {}),
|
|
156
162
|
error: typeof parsed.error === 'string' ? parsed.error : null,
|
|
157
163
|
updatedAt: parsed.updatedAt,
|
|
158
164
|
};
|
|
@@ -311,25 +317,73 @@ export function buildSelfUpdateLaunchCommand(options) {
|
|
|
311
317
|
viaSystemdRun: false,
|
|
312
318
|
};
|
|
313
319
|
}
|
|
314
|
-
export function
|
|
320
|
+
export function assertSelfUpdateVersion(current, candidate, expected) {
|
|
321
|
+
const from = valid(current);
|
|
322
|
+
const to = valid(candidate);
|
|
323
|
+
if (!from || !to) {
|
|
324
|
+
throw new Error(`Cannot verify FoxClaw update versions: ${current} -> ${candidate}.`);
|
|
325
|
+
}
|
|
326
|
+
if (lt(to, from)) {
|
|
327
|
+
throw new Error(`Refusing FoxClaw downgrade: ${current} -> ${candidate}.`);
|
|
328
|
+
}
|
|
329
|
+
if (expected && to !== valid(expected)) {
|
|
330
|
+
throw new Error(`Installed FoxClaw ${candidate} does not match requested ${expected}; service restart refused.`);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
function readLatestFoxclawVersion(installer, env) {
|
|
334
|
+
// Read the same registry used by the exact-version install, bypassing stale local metadata.
|
|
335
|
+
const result = spawnSync(installer.command, ['view', PACKAGE_SPEC, 'version', '--json', `--registry=${PACKAGE_REGISTRY}`, '--prefer-online'], { encoding: 'utf8', env, timeout: 30_000 });
|
|
336
|
+
if (result.error)
|
|
337
|
+
throw result.error;
|
|
338
|
+
if (result.status !== 0)
|
|
339
|
+
throw new Error('Could not read the latest FoxClaw version from the npm registry.');
|
|
340
|
+
let version;
|
|
341
|
+
try {
|
|
342
|
+
version = JSON.parse(result.stdout.trim());
|
|
343
|
+
}
|
|
344
|
+
catch {
|
|
345
|
+
throw new Error('Invalid latest FoxClaw version response.');
|
|
346
|
+
}
|
|
347
|
+
if (typeof version !== 'string' || !valid(version))
|
|
348
|
+
throw new Error('Invalid latest FoxClaw version response.');
|
|
349
|
+
return valid(version);
|
|
350
|
+
}
|
|
351
|
+
export function performSelfUpdate(options, overrides = {}) {
|
|
315
352
|
const env = options.env ?? process.env;
|
|
353
|
+
const operations = {
|
|
354
|
+
latestVersion: readLatestFoxclawVersion,
|
|
355
|
+
run: runInherited,
|
|
356
|
+
entryPoint: resolveUpdatedEntryPoint,
|
|
357
|
+
readVersion: readInstalledPackageVersion,
|
|
358
|
+
updateCodex: updateManagedCodexCli,
|
|
359
|
+
updateAgy: updateManagedAgyCli,
|
|
360
|
+
...overrides,
|
|
361
|
+
};
|
|
316
362
|
let toVersion = null;
|
|
317
363
|
let codexUpdate = null;
|
|
318
364
|
let agyUpdate = null;
|
|
319
365
|
try {
|
|
320
|
-
codexUpdate = updateManagedCodexCli(options.codexCliBin ?? env.CODEX_CLI_BIN ?? '', options.nodePath, env);
|
|
321
|
-
console.log(`[UPDATE] ${codexUpdate.message}`);
|
|
322
|
-
agyUpdate = updateManagedAgyCli(options.agyCliBin ?? env.AGY_CLI_BIN ?? '', env);
|
|
323
|
-
console.log(`[UPDATE] ${agyUpdate.message}`);
|
|
324
366
|
const installer = resolveSelfUpdateInstaller(options.entryPoint, options.nodePath, fs.existsSync, env);
|
|
325
367
|
const installerEnv = buildInstallerEnv(options.entryPoint, installer, env);
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
const
|
|
329
|
-
|
|
368
|
+
const targetVersion = operations.latestVersion(installer, installerEnv);
|
|
369
|
+
assertSelfUpdateVersion(options.version, targetVersion);
|
|
370
|
+
const spec = `${PACKAGE_NAME}@${targetVersion}`;
|
|
371
|
+
const installArgs = [
|
|
372
|
+
...installer.installArgs.map(arg => arg === PACKAGE_SPEC ? spec : arg),
|
|
373
|
+
`--registry=${PACKAGE_REGISTRY}`,
|
|
374
|
+
];
|
|
375
|
+
console.log(`[UPDATE] Installing ${spec} with ${installer.manager}...`);
|
|
376
|
+
operations.run(installer.command, installArgs, installerEnv);
|
|
377
|
+
const updatedEntryPoint = operations.entryPoint(installer, installerEnv);
|
|
378
|
+
toVersion = operations.readVersion(updatedEntryPoint);
|
|
379
|
+
assertSelfUpdateVersion(options.version, toVersion, targetVersion);
|
|
380
|
+
codexUpdate = operations.updateCodex(options.codexCliBin ?? env.CODEX_CLI_BIN ?? '', options.nodePath, env);
|
|
381
|
+
console.log(`[UPDATE] ${codexUpdate.message}`);
|
|
382
|
+
agyUpdate = operations.updateAgy(options.agyCliBin ?? env.AGY_CLI_BIN ?? '', env);
|
|
383
|
+
console.log(`[UPDATE] ${agyUpdate.message}`);
|
|
330
384
|
const releaseNotes = readInstalledReleaseNotes(updatedEntryPoint, toVersion, options.notificationFile);
|
|
331
385
|
console.log('[UPDATE] Running checks and restarting the FoxClaw service...');
|
|
332
|
-
|
|
386
|
+
operations.run(options.nodePath, [updatedEntryPoint, 'start'], installerEnv);
|
|
333
387
|
completeNotification(options.notificationFile, 'succeeded', toVersion, codexUpdate, null, releaseNotes, agyUpdate);
|
|
334
388
|
if (options.clusterBroadcastFile && env.FOXCLAW_SUPPRESS_UPDATE_BROADCAST !== '1') {
|
|
335
389
|
writePendingClusterUpdateBroadcast(options.clusterBroadcastFile, {
|
|
@@ -339,23 +393,13 @@ export function performSelfUpdate(options) {
|
|
|
339
393
|
});
|
|
340
394
|
}
|
|
341
395
|
console.log(`[OK] FoxClaw updated and restarted: ${options.version} -> ${toVersion}`);
|
|
342
|
-
return {
|
|
343
|
-
ok: true,
|
|
344
|
-
fromVersion: options.version,
|
|
345
|
-
toVersion,
|
|
346
|
-
error: null,
|
|
347
|
-
};
|
|
396
|
+
return { ok: true, fromVersion: options.version, toVersion, error: null };
|
|
348
397
|
}
|
|
349
398
|
catch (error) {
|
|
350
399
|
const message = formatError(error);
|
|
351
400
|
completeNotification(options.notificationFile, 'failed', toVersion, codexUpdate, message, null, agyUpdate);
|
|
352
401
|
console.error(`[FAIL] FoxClaw update failed: ${message}`);
|
|
353
|
-
return {
|
|
354
|
-
ok: false,
|
|
355
|
-
fromVersion: options.version,
|
|
356
|
-
toVersion,
|
|
357
|
-
error: message,
|
|
358
|
-
};
|
|
402
|
+
return { ok: false, fromVersion: options.version, toVersion, error: message };
|
|
359
403
|
}
|
|
360
404
|
}
|
|
361
405
|
export function readPendingClusterUpdateBroadcast(filePath) {
|
|
@@ -563,7 +607,7 @@ export function resolveFoxclawEntryPointFromGlobalRoot(globalRoot, exists = fs.e
|
|
|
563
607
|
];
|
|
564
608
|
return candidates.find(candidate => exists(candidate)) ?? null;
|
|
565
609
|
}
|
|
566
|
-
export function resolveFoxclawEntryPointFromPnpmHome(pnpmHome, preferBin = false, exists = fs.existsSync, readText = (target) => fs.readFileSync(target, 'utf8')) {
|
|
610
|
+
export function resolveFoxclawEntryPointFromPnpmHome(pnpmHome, preferBin = false, exists = fs.existsSync, readText = (target) => fs.readFileSync(target, 'utf8'), installationRoot) {
|
|
567
611
|
const commandName = process.platform === 'win32' ? 'foxclaw.cmd' : 'foxclaw';
|
|
568
612
|
const rootShim = path.join(pnpmHome, commandName);
|
|
569
613
|
const binShim = path.join(pnpmHome, 'bin', commandName);
|
|
@@ -581,11 +625,23 @@ export function resolveFoxclawEntryPointFromPnpmHome(pnpmHome, preferBin = false
|
|
|
581
625
|
const matches = contents.match(/(?:[A-Za-z]:[\\/]|\/)[^\r\n"']*?[\\/]node_modules[\\/]@foxden-app[\\/]foxclaw[\\/]dist[\\/]main\.js/g);
|
|
582
626
|
const entryPoint = matches?.at(-1) ?? null;
|
|
583
627
|
if (entryPoint && exists(entryPoint)) {
|
|
628
|
+
const relative = installationRoot ? path.relative(path.resolve(installationRoot), path.resolve(entryPoint)) : null;
|
|
629
|
+
if (relative !== null && (path.isAbsolute(relative) || relative === '..' || relative.startsWith(`..${path.sep}`))) {
|
|
630
|
+
continue;
|
|
631
|
+
}
|
|
584
632
|
return entryPoint;
|
|
585
633
|
}
|
|
586
634
|
}
|
|
587
635
|
return null;
|
|
588
636
|
}
|
|
637
|
+
export function resolveFoxclawEntryPointFromInstallation(globalRoot, pnpmHome, exists = fs.existsSync, readText = target => fs.readFileSync(target, 'utf8')) {
|
|
638
|
+
// The installer-owned root is authoritative. Another pnpm layout may have a stale shim.
|
|
639
|
+
const direct = resolveFoxclawEntryPointFromGlobalRoot(globalRoot, exists);
|
|
640
|
+
if (direct || !pnpmHome)
|
|
641
|
+
return direct;
|
|
642
|
+
const installationRoot = path.basename(globalRoot) === 'node_modules' ? path.dirname(globalRoot) : globalRoot;
|
|
643
|
+
return resolveFoxclawEntryPointFromPnpmHome(pnpmHome, /^v\d+$/.test(path.basename(globalRoot)), exists, readText, installationRoot);
|
|
644
|
+
}
|
|
589
645
|
function resolveUpdatedEntryPoint(installer, env) {
|
|
590
646
|
const result = spawnSync(installer.command, installer.rootArgs, { encoding: 'utf8', env });
|
|
591
647
|
if (result.error) {
|
|
@@ -598,10 +654,7 @@ function resolveUpdatedEntryPoint(installer, env) {
|
|
|
598
654
|
if (!globalRoot) {
|
|
599
655
|
throw new Error(`Could not locate the updated global package root using ${installer.manager}.`);
|
|
600
656
|
}
|
|
601
|
-
const updatedEntryPoint = (installer.pnpmHome
|
|
602
|
-
? resolveFoxclawEntryPointFromPnpmHome(installer.pnpmHome, /^v\d+$/.test(path.basename(globalRoot)))
|
|
603
|
-
: null)
|
|
604
|
-
?? resolveFoxclawEntryPointFromGlobalRoot(globalRoot);
|
|
657
|
+
const updatedEntryPoint = resolveFoxclawEntryPointFromInstallation(globalRoot, installer.pnpmHome);
|
|
605
658
|
if (!updatedEntryPoint) {
|
|
606
659
|
throw new Error(`Updated FoxClaw entry point was not found below ${globalRoot} (checked direct and node_modules layouts).`);
|
|
607
660
|
}
|
package/docs/release.md
CHANGED
|
@@ -16,38 +16,40 @@ Check the worktree and remote state:
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
git status --short --branch
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
node -p "require('./package.json').name + '@' + require('./package.json').version"
|
|
20
|
+
pnpm view @foxden-app/foxclaw version
|
|
21
21
|
git tag --list 'v*' --sort=-v:refname | head
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Confirm the target version and remote tag do not already exist:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
27
|
+
pnpm view @foxden-app/foxclaw@0.5.10 version 2>/dev/null || true
|
|
28
28
|
git ls-remote --tags origin refs/tags/v0.5.10
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
Use the version pinned in `packageManager` and install with `pnpm install --frozen-lockfile`. npm is used only by the publishing workflow for registry authentication and publication.
|
|
32
|
+
|
|
31
33
|
Run the same local checks as the publish workflow:
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
pnpm lint
|
|
37
|
+
pnpm typecheck
|
|
38
|
+
pnpm test
|
|
39
|
+
pnpm pack --pack-destination /tmp/foxclaw-release
|
|
38
40
|
git diff --check
|
|
39
41
|
```
|
|
40
42
|
|
|
41
|
-
`
|
|
43
|
+
`pnpm pack` runs `prepack` and creates the release archive. Inspect it with `tar -tzf /tmp/foxclaw-release/*.tgz` and confirm `CHANGELOG.md` is included.
|
|
42
44
|
|
|
43
45
|
## Prepare The Version
|
|
44
46
|
|
|
45
|
-
1. Update `package.json` and `
|
|
47
|
+
1. Update `package.json` and `pnpm-lock.yaml`.
|
|
46
48
|
2. Add a new top entry to `CHANGELOG.md` with both `### 中文` and `### English` sections.
|
|
47
49
|
3. Commit the release metadata:
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
|
-
git add package.json
|
|
52
|
+
git add package.json pnpm-lock.yaml CHANGELOG.md
|
|
51
53
|
git commit -m "发布 0.5.10:short release summary"
|
|
52
54
|
```
|
|
53
55
|
|
|
@@ -71,7 +73,7 @@ gh run watch <run-id> --repo foxden-app/foxclaw --exit-status
|
|
|
71
73
|
After success, verify npm and GitHub Releases:
|
|
72
74
|
|
|
73
75
|
```bash
|
|
74
|
-
|
|
76
|
+
pnpm view @foxden-app/foxclaw version
|
|
75
77
|
gh release view v0.5.10 --repo foxden-app/foxclaw --json tagName,name,url,publishedAt,isDraft,isPrerelease
|
|
76
78
|
```
|
|
77
79
|
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# FoxClaw 架构复审与重构
|
|
2
|
+
|
|
3
|
+
日期:2026-10-06。基线:v0.12.0。
|
|
4
|
+
|
|
5
|
+
## 判断
|
|
6
|
+
|
|
7
|
+
保留后端适配器 + 共享调度的方向,但 v0.12.0 还没有形成完整的后端边界。新增 DSH 时必须同时修改 Antigravity 控制器、调度器、启动逻辑及多处面板分支。问题不是目录名称,而是执行身份、会话状态、界面入口和资源清理由不同地方分别决定。
|
|
8
|
+
|
|
9
|
+
本轮改动任务调度、通道契约、持久任务日志、资源归属,并提取存量控制器的独立功能。Telegram 为主通道;微信保留文字入口,完整迁移等待观察消息方案落定。存量数据库和导入路径继续兼容。
|
|
10
|
+
|
|
11
|
+
## 当前边界
|
|
12
|
+
|
|
13
|
+
```mermaid
|
|
14
|
+
flowchart TD
|
|
15
|
+
Main[main.ts:运行时组装] --> Bridge[bridge/unified_bridge:存量 Codex / AGY 功能接入]
|
|
16
|
+
Main --> Definition[后端定义:adapter / defaults / commands / createUi]
|
|
17
|
+
Bridge --> Registry[BackendRegistry:注册与面板生命周期]
|
|
18
|
+
Definition --> Registry
|
|
19
|
+
Registry --> UI[BackendUi:模型、权限、历史与审批面板]
|
|
20
|
+
UI --> Host[BackendUiHost:有限的界面操作]
|
|
21
|
+
Host --> Orchestrator[Orchestrator:任务调度与交付]
|
|
22
|
+
Orchestrator --> ScopeOps[ScopeOperations:每会话串行操作]
|
|
23
|
+
Orchestrator --> SPI[Engine SPI:后端执行、事件、取消]
|
|
24
|
+
Orchestrator --> Store[BridgeStore:会话、任务日志、持久队列]
|
|
25
|
+
Orchestrator --> Channel[ChannelPort:消息与交互能力]
|
|
26
|
+
Main --> Supervisor[RuntimeSupervisor:依赖逆序清理]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- `core/engine_spi.ts` 定义执行契约和后端声明;原生推理档位使用字符串,不受 Codex 枚举限制。
|
|
30
|
+
- `core/backend_registry.ts` 保持后端执行身份稳定,允许发现逻辑刷新展示元数据;注册失败不会残留半个后端,清理统一执行且只执行一次。
|
|
31
|
+
- `core/backend_ui.ts` 定义面板接口与操作端口。后端面板不再依赖整个调度器实现。全局服务命令优先于后端命令;后端回调归属由注册的界面声明。
|
|
32
|
+
- `dsh/backend.ts` 提供一份 DSH 定义,共享 Bot 与独立 Bot 均复用它。统一控制器无需导入或构造 DSH。
|
|
33
|
+
- `bridge/unified_bridge.ts` 是存量后端的组合层,不再挂在 Antigravity 引擎目录下。旧导入路径保留为兼容转发。
|
|
34
|
+
- `core/access.ts` 是权限策略的领域逻辑,Codex 适配器将当前设置传入原生线程和任务请求。
|
|
35
|
+
|
|
36
|
+
新增后端应在组装处注入定义。调度器不应再增加 `adapter.id === 某后端` 来处理附件、取消、默认推理档位或菜单。
|
|
37
|
+
|
|
38
|
+
## 状态约束与修复
|
|
39
|
+
|
|
40
|
+
### 会话操作
|
|
41
|
+
|
|
42
|
+
启动、插话、中断、新会话、切换后端和队列领取按 scope 串行执行;不同 scope 独立。任务从启动准备到最终回答交付都保留占用状态,避免两个消息在准备阶段同时启动任务。
|
|
43
|
+
|
|
44
|
+
所有事件回调验证任务对象的所有权,忽略已取消或被替换任务的会话 ID、增量、错误和终态。取消前先屏蔽旧任务回调,并等待适配器返回的取消承诺完成后释放槽位。取消失败保留占用,不能自动启动重叠任务。Codex / OpenCode 的启动阶段取消也会结束等待者并释放监听器;DSH 无法及时取消时关闭其自有进程。
|
|
45
|
+
|
|
46
|
+
执行中或仍有排队任务时不能切换后端。未启用的已选后端不会静默退回其他执行器,原会话与设置保留,用户可通过 `/backend` 重新选择。新后端的首次使用清除旧后端权限及模型覆盖;返回时恢复该后端保存的配置。
|
|
47
|
+
|
|
48
|
+
### 通道收件箱与持久队列
|
|
49
|
+
|
|
50
|
+
Telegram 更新在分类、准备附件和等待会话锁之前写入持久收件箱。通道只在处理完成后推进收取位置;重启先恢复未完成收件,再接收新更新。处理成功后清除原始载荷,保留收件标识用于去重;原生任务日志另行去重,避免收件重放导致重复执行工具。
|
|
51
|
+
|
|
52
|
+
新队列载荷记录版本、原始 prompt、后端、工作目录和已落盘附件。已有文本数组格式继续可读。
|
|
53
|
+
|
|
54
|
+
队列状态为 `queued → processing → completed / failed / cancelled`,只有实际执行和交付结束才进入终态。任务日志为 `accepted → queued / running → delivery_pending → completed / failed / cancelled`,另外记录 `awaiting_confirmation`。普通输入、显式排队和插话在等待会话锁之前保存原始输入、附件引用、模型、权限和后端配置;队列写入与任务关联使用同一数据库事务。队列已领取、任务日志仍为 queued 时可确认尚未调用执行器,重启重新排队。上下文不匹配会失败并提示。
|
|
55
|
+
|
|
56
|
+
附件只在通道入口落盘,原始文本与附件清单交给适配器;适配器决定使用原生图片还是文件提示。JSON 文件不再被调度器统一过滤。OAuth 文件导入仅由 Antigravity 的入站界面处理。
|
|
57
|
+
|
|
58
|
+
### 重启与交付行为(本地实现,尚未部署)
|
|
59
|
+
|
|
60
|
+
- 已接受但尚未启动:恢复原始输入与配置,再准备附件。
|
|
61
|
+
- 已保存原生结果:只重试剩余结果交付,不再次执行工具。
|
|
62
|
+
- 已开始但结果未知:保留输入与附件,暂停该会话队列,提供 `/recover continue|retry|cancel` 和按钮。继续会要求模型检查已有工作;重试可能重复操作。该保守恢复策略随 v0.13.0 启用。
|
|
63
|
+
- 最终消息逐块保存交付进度。消息平台成功发送却丢失确认时,恢复可能重复一条回答;不能保证平台交付恰好一次,但不会为了补发结果重跑工具。
|
|
64
|
+
- 启动时按 scope 归属导入旧预览和 processing 队列,不触碰其他 Bot 的记录。
|
|
65
|
+
|
|
66
|
+
### 通道与资源
|
|
67
|
+
|
|
68
|
+
`ChannelPort`、入站事件和附件类型独立于 Telegram。Telegram 自行处理寻址、命令菜单与原生消息编号;无按钮通道可把操作转换成有 scope 归属、有效期、单次使用约束的文字选择。不可编辑通道不推送每段增量。
|
|
69
|
+
|
|
70
|
+
`RuntimeSupervisor` 从分配起登记资源,覆盖部分启动失败,按消费者到依赖逆序关闭,继续清理其他资源并收集错误。数据库最后关闭、进程锁最后释放。关闭信号只执行一次;Telegram 长轮询可取消并等待退出。原生 RPC 监听器由控制面拥有,停止时移除并等待已开始的审批、通知、观察轮询及定时后台操作完成;共享原生客户端由运行时组装层关闭。客户端分配后立即登记,即使后续初始化失败也会清理。
|
|
71
|
+
|
|
72
|
+
Codex 控制面挂在后端注册界面下,负责账号、原生面板和审批,不再启动另一套任务恢复逻辑,也不会为统一调度器拥有的任务启动第二个渲染器。多 Bot 共享 RPC 时只处理自己拥有的会话。Antigravity 账号面板与会话/观察服务已独立提取,观察轮询在停止时等待结束。
|
|
73
|
+
|
|
74
|
+
### 展示依据
|
|
75
|
+
|
|
76
|
+
默认档位、Boost 和逐轮 token 统计由后端定义声明,模型可携带自己的推理档位。Codex 模型列表完全使用服务端返回结果,移除硬编码补入的模型。状态与模型入口使用共享回调,具体面板由已选后端渲染。
|
|
77
|
+
|
|
78
|
+
## 已拆分与明确保留的边界
|
|
79
|
+
|
|
80
|
+
- Codex 提取用量缓存服务、配额服务、原生面板服务,以及账号文件、账号展示、交互解析、工具展示等模块。控制器约从 14,000 行降至 10,000 行,仍保留存量会话、观察与鉴权协调,不能称为全部技术债归零。
|
|
81
|
+
- AGY 提取账号面板和会话/观察服务,统一组合层约从 2,500 行降至 1,600 行。DSH 继续通过独立后端定义接入。
|
|
82
|
+
- 微信仍使用存量 Codex 会话核心,已增加文字选择;没有自动获得完整多后端能力。按用户优先级暂不迁移其观察执行路径。
|
|
83
|
+
- 调度器本身仍承担较多任务恢复和交付工作,后续可沿任务日志与交付服务边界提取。通道收件箱已补齐收取到分类之间的恢复缺口;平台消息交付仍不承诺恰好一次。
|
|
84
|
+
- 独立 OpenCode 控制器仍使用存量任务流程,未完整迁移持久任务日志;已有 OpenCode 执行适配器与统一执行契约兼容,但不能据此声称独立 Bot 已达标。
|
|
85
|
+
- `main.ts` 仍组装鉴权同步与各 Bot 状态;资源退出责任已集中,组装代码可继续按运行时工厂提取。
|
|
86
|
+
|
|
87
|
+
## 四项完成标准的验收范围
|
|
88
|
+
|
|
89
|
+
| 标准 | Telegram 统一任务路径 | 证据与边界 |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| 新增后端不改其他后端 | 达到 | 注入后端定义与界面工厂;未知后端的默认档位、面板、回调和执行通过契约测试 |
|
|
92
|
+
| 新增通道不改执行器 | 达到 | 入站事件、附件与消息能力为通用契约;未知通道可使用同一个后端,执行器不导入 Telegram 文件工具 |
|
|
93
|
+
| 任务全程可恢复 | 达到有边界的恢复要求 | 持久收件箱 → 接受与排队 → 原生配置 → 结果与交付游标;原生结果未知时暂停并要求确认,不能承诺任意外部工具恰好执行一次 |
|
|
94
|
+
| 资源有唯一负责人 | 达到已迁移路径要求 | 运行时拥有共享客户端和数据库;控制面拥有监听与后台操作;调度器拥有任务槽位;Telegram 通道拥有草稿和停止关联;部分启动失败和停止竞态已有测试 |
|
|
95
|
+
|
|
96
|
+
验收范围为 Telegram 的 Codex / Antigravity / DSH 统一任务路径。微信存量执行路径、独立 OpenCode 控制器和外部会话观察展示仍有遗留边界,因此全仓库四项标准尚未全部达成。
|
|
97
|
+
|
|
98
|
+
Telegram 已实现单条进度卡、停止操作与完成后的折叠执行摘要。私聊优先使用原生临时草稿,不支持时回退持久消息卡;群聊编辑同一持久消息。停止保留排队任务,并保留已生成内容;最终移除旧停止操作。草稿编号不写成持久消息编号,最终交付前等待正在进行的预览编辑。大工具摘要按完整格式行限长,避免拆坏折叠标签。个人临时设置面板和微信观察摘要尚未启用。
|
|
99
|
+
|
|
100
|
+
官方功能依据和接入状态见 [Telegram 主通道](telegram-experience.md)。
|
|
101
|
+
|
|
102
|
+
## 验证
|
|
103
|
+
|
|
104
|
+
回归覆盖每会话并发启动、跨会话独立执行、取消完成屏障、取消失败、旧回调隔离、新会话与启动竞态、终态重复事件、最终回答交付期间排队、附件队列重启恢复、所有后端切换限制、原生权限 RPC、注册清理与禁用后端保护。另保留全量测试,并运行真实 DSH ACP 控制面集成测试。
|
|
105
|
+
|
|
106
|
+
v0.13.0 发布前全量回归 547 项:545 通过、2 跳过。任务生命周期、长摘要、控制面审批与后台清理专项 40 项全部通过;准备阶段预览释放测试也已纳入全量回归。pnpm lint、typecheck、build 通过;使用编译产物的真实 DSH ACP 控制面集成测试通过(模型切换、权限保存、恢复、取消、桥接插件加载)。Telegram 新停止字段、收取确认顺序、草稿与卡片降级、过期按钮隔离均有模拟接口验证;未向真实 Bot 发送测试消息,手机交互尚需上线验收。上述改动纳入 v0.13.0 正式版。
|
package/docs/zh/release.md
CHANGED
|
@@ -16,38 +16,40 @@
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
git status --short --branch
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
node -p "require('./package.json').name + '@' + require('./package.json').version"
|
|
20
|
+
pnpm view @foxden-app/foxclaw version
|
|
21
21
|
git tag --list 'v*' --sort=-v:refname | head
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
确认目标版本还没有发布,也没有远端 tag:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
27
|
+
pnpm view @foxden-app/foxclaw@0.5.10 version 2>/dev/null || true
|
|
28
28
|
git ls-remote --tags origin refs/tags/v0.5.10
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
使用 `packageManager` 固定的 pnpm 版本,以 `pnpm install --frozen-lockfile` 安装依赖。发布流水线仅在 registry 鉴权和发布步骤使用 npm。
|
|
32
|
+
|
|
31
33
|
运行与发布 workflow 对齐的本地校验:
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
pnpm lint
|
|
37
|
+
pnpm typecheck
|
|
38
|
+
pnpm test
|
|
39
|
+
pnpm pack --pack-destination /tmp/foxclaw-release
|
|
38
40
|
git diff --check
|
|
39
41
|
```
|
|
40
42
|
|
|
41
|
-
`
|
|
43
|
+
`pnpm pack` 会执行 `prepack` 构建并创建发布包。使用 `tar -tzf /tmp/foxclaw-release/*.tgz` 检查包含 `CHANGELOG.md`。
|
|
42
44
|
|
|
43
45
|
## 准备版本
|
|
44
46
|
|
|
45
|
-
1. 更新 `package.json` 和 `
|
|
47
|
+
1. 更新 `package.json` 和 `pnpm-lock.yaml` 的版本号。
|
|
46
48
|
2. 在 `CHANGELOG.md` 顶部新增版本条目,包含 `### 中文` 和 `### English` 小节。
|
|
47
49
|
3. 提交发布 commit,推荐格式:
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
|
-
git add package.json
|
|
52
|
+
git add package.json pnpm-lock.yaml CHANGELOG.md
|
|
51
53
|
git commit -m "发布 0.5.10:一句话说明"
|
|
52
54
|
```
|
|
53
55
|
|
|
@@ -71,7 +73,7 @@ gh run watch <run-id> --repo foxden-app/foxclaw --exit-status
|
|
|
71
73
|
成功后确认 npm 和 GitHub Release:
|
|
72
74
|
|
|
73
75
|
```bash
|
|
74
|
-
|
|
76
|
+
pnpm view @foxden-app/foxclaw version
|
|
75
77
|
gh release view v0.5.10 --repo foxden-app/foxclaw --json tagName,name,url,publishedAt,isDraft,isPrerelease
|
|
76
78
|
```
|
|
77
79
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Telegram 主通道:能力评估与接入顺序
|
|
2
|
+
|
|
3
|
+
日期:2026-10-06。Telegram 是主使用通道;微信保留文字菜单基础,观察模式的消息收纳方案明确后再扩展。
|
|
4
|
+
|
|
5
|
+
## 官方能力与 FoxClaw 的用途
|
|
6
|
+
|
|
7
|
+
官方最新列出的版本为 Bot API 10.3(2026-08-24)。10.1 加入富消息,10.2 加入群内定向临时消息,10.3 增加草稿停止控制和禁用按钮。[官方更新记录](https://core.telegram.org/bots/api#recent-changes)
|
|
8
|
+
|
|
9
|
+
| 优先级 | 能力 | 产品用途 | 当前状态与边界 |
|
|
10
|
+
| --- | --- | --- | --- |
|
|
11
|
+
| P0 | 编辑消息、富消息 | 一条任务进度卡,完成后换成结果;保留模型、权限、审批入口 | 统一任务路径已实现;私聊草稿与群聊持久卡分别管理,结果交付前结束预览。存量观察展示待收敛 |
|
|
12
|
+
| P1 | 草稿原生停止按钮 | 手机直接停止正在生成的回复 | 已接入。只停止对应任务,保留排队任务;群聊和草稿不支持时使用卡片按钮。等待原生取消完成后释放任务槽位 |
|
|
13
|
+
| P1 | 折叠内容、结构化块 | 摘要常驻,工具过程和长日志折叠;需要时查看完整结果 | 统一任务已实现回答在前、执行摘要折叠在后;长摘要限长,长回答按需分块。外部观察卡待统一 |
|
|
14
|
+
| P1 | 禁用按钮 | 正在切换账号、启动或取消任务时明确展示暂不可用的操作 | 待接入。后端仍必须验证操作有效性,展示状态不能代替校验 |
|
|
15
|
+
| P2 | 群内仅本人可见的临时面板 | 账号、模型和个人设置不占公共群消息流 | 待接入;需要独立处理临时消息标识、回调用户与删除/编辑接口 |
|
|
16
|
+
| P2 | 复制文本按钮 | 复制工作目录、恢复命令、任务编号 | 按场景加入,优先采用菜单可直接完成的操作 |
|
|
17
|
+
|
|
18
|
+
草稿停止使用 `can_stop`、`keep_on_stop` 和 `stopped_message_generation` 更新。草稿限私聊且是临时预览,最终回答仍需发送持久消息。停止事件只携带聊天、主题和草稿编号,必须与当前任务匹配,忽略过期事件。[草稿接口](https://core.telegram.org/bots/api#sendrichmessagedraft)、[停止事件](https://core.telegram.org/bots/api#messagegenerationstopped)
|
|
19
|
+
|
|
20
|
+
禁用按钮和颜色由 Telegram 键盘类型支持;群内个人面板需要定向临时消息及其专用编辑接口。[键盘按钮](https://core.telegram.org/bots/api#inlinekeyboardbutton)、[临时消息参数](https://core.telegram.org/bots/api#ephemeralmessageparameters)
|
|
21
|
+
|
|
22
|
+
不把这些功能一次性塞入共享调度器。Telegram 通道声明展示能力并转换事件;调度器只处理任务状态、操作归属和取消结果;各后端提供自己的模型、权限与审批能力。
|
|
23
|
+
|
|
24
|
+
## 推荐的任务与观察展示
|
|
25
|
+
|
|
26
|
+
1. 每项任务维护一条进度卡:引擎、阶段、耗时、最近一项工具活动、停止入口。
|
|
27
|
+
2. 增量内容合并、节流编辑,普通工具活动不新增聊天消息。
|
|
28
|
+
3. 审批单独展示,保持明确的任务归属;完成后更新或撤销过期操作。
|
|
29
|
+
4. 最终结果显示结论与必要证据,长过程折叠;文件按需提供。
|
|
30
|
+
5. 观察外部会话沿用相同的信息结构,但保持只读语义。新增输入应明确排队或接管,不因展示重构而暗改。
|
|
31
|
+
|
|
32
|
+
本轮已落地“单条进度卡 → 停止操作 → 完成后折叠摘要”,覆盖 Telegram 的 Codex / AGY / DSH 统一任务路径。草稿使用同一个编号刷新,运行期间保持更新;完成或停止后清除草稿并发送持久结果。停止事件验证允许的私聊、主题和当前草稿;群聊停止回调还验证用户与具体任务编号。旧按钮与旧草稿不会停止后来启动的任务。
|
|
33
|
+
|
|
34
|
+
暂未接入定向临时设置面板和禁用按钮,存量外部会话观察展示也未统一。原生 API 能力有自动化模拟验证,手机上的实际交互效果需要上线后由用户验收。
|
|
35
|
+
|
|
36
|
+
## 微信进入实用阶段的条件
|
|
37
|
+
|
|
38
|
+
微信无法原地编辑进度卡,建议采用“开始提示 → 必要里程碑 → 最终摘要”。合并重复工具消息,不逐段推送生成文本;失败、审批和需要用户介入时即时提示。
|
|
39
|
+
|
|
40
|
+
已接受使用文字菜单和命令。本轮增加有会话归属、有效期和单次使用约束的 `/choose` 操作。统一观察摘要、历史整理和完整多后端接入保留为后续工作,不先扩大微信使用范围。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foxden-app/foxclaw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Foxden local execution claw for controlling Codex, OpenCode, Antigravity, and DeepSeek Harness from trusted chat interfaces.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
38
|
-
"build": "
|
|
38
|
+
"build": "pnpm clean && tsc -p tsconfig.build.json",
|
|
39
39
|
"dev": "tsx src/main.ts serve",
|
|
40
40
|
"serve": "node dist/main.js serve",
|
|
41
41
|
"start-service": "node dist/main.js start",
|
|
@@ -52,20 +52,23 @@
|
|
|
52
52
|
"typecheck": "tsc --noEmit",
|
|
53
53
|
"lint": "eslint .",
|
|
54
54
|
"test": "node --test --import tsx $(find src -name '*.test.ts' -print)",
|
|
55
|
-
"prepack": "
|
|
55
|
+
"prepack": "pnpm build"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
59
59
|
"@opencode-ai/sdk": "1.18.15",
|
|
60
60
|
"dotenv": "^16.6.1",
|
|
61
|
-
"qrcode-terminal": "^0.12.0"
|
|
61
|
+
"qrcode-terminal": "^0.12.0",
|
|
62
|
+
"semver": "7.7.4"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@eslint/js": "^9.39.0",
|
|
65
66
|
"@types/node": "^24.12.0",
|
|
67
|
+
"@types/semver": "7.7.1",
|
|
66
68
|
"eslint": "^9.39.0",
|
|
67
69
|
"tsx": "^4.19.3",
|
|
68
70
|
"typescript": "5.9.3",
|
|
69
71
|
"typescript-eslint": "^8.58.0"
|
|
70
|
-
}
|
|
72
|
+
},
|
|
73
|
+
"packageManager": "pnpm@10.33.2"
|
|
71
74
|
}
|