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:
@@ -140,6 +140,35 @@ export async function checkHealth(): Promise<HealthResponse> {
|
||||
return request<HealthResponse>('/health')
|
||||
}
|
||||
|
||||
export interface HermesCliStatus {
|
||||
available: boolean
|
||||
bin?: string
|
||||
}
|
||||
|
||||
let cliProbePromise: Promise<boolean> | null = null
|
||||
|
||||
async function probeHermesCli(): Promise<boolean> {
|
||||
try {
|
||||
const res = await request<HermesCliStatus>('/api/hermes/cli-status')
|
||||
return res.available !== false
|
||||
} catch {
|
||||
// Fail open: probe errors (older servers, mocked backends) must not block the app.
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
/** Cached per page load; the router guard probes once before showing the app. */
|
||||
export function checkHermesCliAvailable(): Promise<boolean> {
|
||||
if (!cliProbePromise) {
|
||||
cliProbePromise = probeHermesCli()
|
||||
}
|
||||
return cliProbePromise
|
||||
}
|
||||
|
||||
export function resetHermesCliProbe(): void {
|
||||
cliProbePromise = null
|
||||
}
|
||||
|
||||
export async function triggerUpdate(): Promise<{ success: boolean; message: string }> {
|
||||
return request<{ success: boolean; message: string }>('/api/hermes/update', { method: 'POST' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user