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
@@ -7,7 +7,7 @@ import { deviceIdFromPublicKey, getPublicSystemInfo, type PublicSystemInfo } fro
const DISCOVERY_VERSION = 1
export const HERMES_DISCOVERY_PORT = 48640
const DISCOVERY_PORT_OFFSET = 40_000
const DEFAULT_HTTP_PORTS = [8648, 8748]
const DEFAULT_HTTP_PORTS = [8648]
const DEFAULT_SCAN_TIMEOUT_MS = 1000
type DiscoverySocket = dgram.Socket
@@ -22,7 +22,7 @@ export type LanDeviceInfo = PublicSystemInfo & {
last_seen_at: string
}
export type LanEndpointKind = 'web' | 'desktop' | 'custom'
export type LanEndpointKind = 'web' | 'custom'
export type LanDiscoveryState = {
scanning: boolean
@@ -101,7 +101,6 @@ function discoveryPortsForHttpPorts(httpPorts: number[]): number[] {
}
export function getLanEndpointKind(httpPort: number, currentPort = config.port): LanEndpointKind {
if (httpPort === 8748) return 'desktop'
if (httpPort === 8648 || httpPort === currentPort) return 'web'
return 'custom'
}
@@ -278,7 +277,7 @@ function normalizeDevice(data: any, sourceAddress: string, responseMs: number, s
const deviceId = typeof data.device_id === 'string' && data.device_id ? data.device_id : ''
const devicePublicKey = typeof data.device_public_key === 'string' ? data.device_public_key : ''
if (!deviceId || !devicePublicKey || deviceIdFromPublicKey(devicePublicKey) !== deviceId) return null
const endpointKind = data.endpoint_kind === 'web' || data.endpoint_kind === 'desktop' || data.endpoint_kind === 'custom'
const endpointKind = data.endpoint_kind === 'web' || data.endpoint_kind === 'custom'
? data.endpoint_kind
: getLanEndpointKind(httpPort)
const url = `http://${sourceAddress}:${httpPort}`