feat: 完成 TraceMemo v2.2.0 品牌身份与数据迁移升级

- 将 WechatExplorer 产品身份升级为 TraceMemo
- 更新 appId、Runtime Identity、Reader Skill 和 API 环境变量
- 增加旧用户数据、Knowledge、Token 与 AI Provider 安全迁移
- 保留 Windows WeFlow 和旧版配置兼容
- 完善首次启动迁移测试及 v2.2.0 发布文档
- 移除 macOS Intel x64 构建与发布支持
This commit is contained in:
Wxw-Gu
2026-08-11 17:52:57 +08:00
parent 0c1d859e1b
commit cf3f115124
39 changed files with 1837 additions and 545 deletions
+18 -16
View File
@@ -3,10 +3,12 @@ import { existsSync, promises as fs } from 'fs'
import { dirname, join } from 'path'
import { isPackagedRuntime } from '../runtime-mode'
const SKILL_RELATIVE_PATH = join('skill', 'wechatexplorer-reader', 'SKILL.md')
const GITHUB_URL =
'https://github.com/Wxw-Gu/WechatExplorer/tree/main/docs/skill/wechatexplorer-reader'
const SKILL_VERSION = 'v1.1'
const SKILL_RELATIVE_PATHS = [
join('skill', 'tracememo-reader', 'SKILL.md'),
join('skill', 'wechatexplorer-reader', 'SKILL.md')
]
const GITHUB_URL = 'https://github.com/Wxw-Gu/WechatExplorer/tree/main/docs/skill/tracememo-reader'
const SKILL_VERSION = 'v1.2'
type SkillResourceSource = 'development' | 'bundled'
@@ -54,19 +56,19 @@ function uniqueCandidates(candidates: SkillCandidate[]): SkillCandidate[] {
export function getSkillCandidates(environment?: SkillPathEnvironment): SkillCandidate[] {
const runtime = environment || currentEnvironment()
const developmentPaths = [
join(runtime.appPath, 'docs', SKILL_RELATIVE_PATH),
join(runtime.cwd, 'docs', SKILL_RELATIVE_PATH),
join(dirname(runtime.appPath), 'docs', SKILL_RELATIVE_PATH)
]
const developmentPaths = SKILL_RELATIVE_PATHS.flatMap((relativePath) => [
join(runtime.appPath, 'docs', relativePath),
join(runtime.cwd, 'docs', relativePath),
join(dirname(runtime.appPath), 'docs', relativePath)
])
const execDirectory = dirname(runtime.execPath)
const bundledPaths = [
join(runtime.resourcesPath, SKILL_RELATIVE_PATH),
join(runtime.resourcesPath, 'resources', SKILL_RELATIVE_PATH),
join(dirname(runtime.appPath), SKILL_RELATIVE_PATH),
join(execDirectory, 'resources', SKILL_RELATIVE_PATH),
join(dirname(execDirectory), 'Resources', SKILL_RELATIVE_PATH)
]
const bundledPaths = SKILL_RELATIVE_PATHS.flatMap((relativePath) => [
join(runtime.resourcesPath, relativePath),
join(runtime.resourcesPath, 'resources', relativePath),
join(dirname(runtime.appPath), relativePath),
join(execDirectory, 'resources', relativePath),
join(dirname(execDirectory), 'Resources', relativePath)
])
return uniqueCandidates(
runtime.packaged
? bundledPaths.map((path) => ({ path, source: 'bundled' }))