将调度内核标识从 SimpleLite 全面重命名为 Simple3。
配置段/环境变量、Launcher、健康检查 API、OpenAPI 与前后端文案同步;兼容探测旧 SimpleLite 进程名。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,7 +7,7 @@ export interface HealthInfo {
|
||||
uptimeSec: number
|
||||
}
|
||||
|
||||
export interface SimpleLiteDiagnostics {
|
||||
export interface Simple3Diagnostics {
|
||||
enabled: boolean
|
||||
isRunning: boolean
|
||||
lastLaunchMode?: string | null
|
||||
@@ -18,7 +18,7 @@ export interface SimpleLiteDiagnostics {
|
||||
deployHint?: string | null
|
||||
}
|
||||
|
||||
export interface SimpleLiteLaunchResult {
|
||||
export interface Simple3LaunchResult {
|
||||
started: boolean
|
||||
status: string
|
||||
detail: string
|
||||
@@ -30,29 +30,26 @@ export function getHealth() {
|
||||
return http.get<HealthInfo>('/health')
|
||||
}
|
||||
|
||||
export function getSimpleLiteDiagnostics() {
|
||||
return http.get<SimpleLiteDiagnostics>('/health/simplelite')
|
||||
export function getSimple3Diagnostics() {
|
||||
return http.get<Simple3Diagnostics>('/health/simple3')
|
||||
}
|
||||
|
||||
export function stopSimpleLite() {
|
||||
return http.post<{ killed: number; diagnostics: SimpleLiteDiagnostics }>('/health/simplelite/stop')
|
||||
export function stopSimple3() {
|
||||
return http.post<{ killed: number; diagnostics: Simple3Diagnostics }>('/health/simple3/stop')
|
||||
}
|
||||
|
||||
export function restartSimpleLite(launchMode: LaunchMode) {
|
||||
return http.post<{ restart: SimpleLiteLaunchResult; diagnostics: SimpleLiteDiagnostics }>(
|
||||
'/health/simplelite/restart',
|
||||
export function restartSimple3(launchMode: LaunchMode) {
|
||||
return http.post<{ restart: Simple3LaunchResult; diagnostics: Simple3Diagnostics }>(
|
||||
'/health/simple3/restart',
|
||||
null,
|
||||
{ params: { launchMode }, timeout: 60_000 }
|
||||
)
|
||||
}
|
||||
|
||||
/** 从诊断/会话 runMode 推断重启时使用的 launchMode。 */
|
||||
/** Simple3 仅 Web;重启一律 WebOnly(保留函数签名供旧调用方)。 */
|
||||
export function resolveRestartLaunchMode(
|
||||
lastLaunchMode: string | null | undefined,
|
||||
runMode: RunMode | null | undefined
|
||||
_lastLaunchMode?: string | null,
|
||||
_runMode?: RunMode | null
|
||||
): LaunchMode {
|
||||
const mode = (lastLaunchMode ?? '').toLowerCase()
|
||||
if (mode === 'web') return 'WebOnly'
|
||||
if (mode === 'web+local') return 'DesktopAndWeb'
|
||||
return runMode === 'WebOnly' ? 'WebOnly' : 'DesktopAndWeb'
|
||||
return 'WebOnly'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user