Phase 004: remove the desktop shell, website tooling, and bundled hermes CLI

- Drop all desktop/Electron branches, scripts, and UI (title bar, pets,
  desktop bridge); LAN endpoint kind is now web/custom only
- Replace the bundled hermes CLI with user-side installation: add
  GET /api/hermes/cli-status plus a HermesMissingView onboarding guide
- Remove the version-management UI (snapshots handled by git) and prune
  dead website/mcu/claude scripts and lockfile entries
This commit is contained in:
2026-10-16 15:33:56 +08:00
parent 8c1ddf415f
commit 4701bf0ad0
49 changed files with 354 additions and 2403 deletions
@@ -110,12 +110,12 @@ function runtimePlatformKey(platformName = process.platform, archName = process.
return `${osLabel}-${archName}`
}
function desktopRuntimeRoot(): string {
return join(config.appHome, 'desktop-runtime')
function runtimeVersionRoot(): string {
return join(config.appHome, 'versions')
}
function activeVersionPath(): string {
return join(desktopRuntimeRoot(), ACTIVE_VERSION_FILE)
return join(runtimeVersionRoot(), ACTIVE_VERSION_FILE)
}
function downloadBaseUrl(): string {
@@ -179,7 +179,7 @@ function missingRuntimeFiles(root: string): string[] {
}
export function listInstalledRuntimeVersions(active = readActiveVersionManifest()): InstalledRuntimeVersion[] {
const root = join(desktopRuntimeRoot(), 'hermes')
const root = join(runtimeVersionRoot(), 'hermes')
if (!existsSync(root)) return []
const currentPlatform = runtimePlatformKey()
@@ -356,11 +356,11 @@ export async function downloadRuntimeVersion(version: string, source: VersionDow
const assetName = asset.name
const assetUrl = downloadAssetUrl(assetName, releaseTag, source)
const targetRoot = join(desktopRuntimeRoot(), 'hermes', cleanVersion, platform)
const archive = join(desktopRuntimeRoot(), `${basename(assetName)}.download`)
const tempRoot = join(desktopRuntimeRoot(), `.runtime-download-${process.pid}-${Date.now()}`)
const targetRoot = join(runtimeVersionRoot(), 'hermes', cleanVersion, platform)
const archive = join(runtimeVersionRoot(), `${basename(assetName)}.download`)
const tempRoot = join(runtimeVersionRoot(), `.runtime-download-${process.pid}-${Date.now()}`)
mkdirSync(desktopRuntimeRoot(), { recursive: true })
mkdirSync(runtimeVersionRoot(), { recursive: true })
rmSync(tempRoot, { recursive: true, force: true })
mkdirSync(tempRoot, { recursive: true })
@@ -405,12 +405,12 @@ export async function downloadWebUiVersion(version: string, source: VersionDownl
const manifestUrl = downloadAssetUrl(manifestName, releaseTag, source)
onProgress?.({ stage: 'resolve', message: 'runtimeVersions.jobStage.resolveWebUi' })
const manifest = await fetchJson<{ asset?: { sha256?: string; size?: number } }>(manifestUrl)
const archive = join(desktopRuntimeRoot(), `${assetName}.download`)
const tempRoot = join(desktopRuntimeRoot(), `.webui-download-${process.pid}-${Date.now()}`)
const archive = join(runtimeVersionRoot(), `${assetName}.download`)
const tempRoot = join(runtimeVersionRoot(), `.webui-download-${process.pid}-${Date.now()}`)
const targetRoot = join(config.appHome, 'webui', cleanVersion)
const assetUrl = downloadAssetUrl(assetName, releaseTag, source)
mkdirSync(desktopRuntimeRoot(), { recursive: true })
mkdirSync(runtimeVersionRoot(), { recursive: true })
rmSync(tempRoot, { recursive: true, force: true })
mkdirSync(tempRoot, { recursive: true })