Files
cindy/apps/desktop/src/shared/piKernel.ts
Chris Zhang 188412e97b feat(pi): 增加内核版本管理与正式版恢复 (#4913)
* feat(pi): add kernel version management and persistent recovery

Signed-off-by: zqchris <chrisz83@gmail.com>

* test(pi): distinguish host permissions from target asset platform

Signed-off-by: zqchris <chrisz83@gmail.com>

* chore(design): refresh inventory after upstream merge

Signed-off-by: zqchris <chrisz83@gmail.com>

---------

Signed-off-by: zqchris <chrisz83@gmail.com>
Co-authored-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-09-23 16:24:36 +07:00

27 lines
819 B
TypeScript

/** Device-local Pi runtime management. No paths or download URLs cross IPC. */
export type PiKernelSource = 'official' | 'upstream';
export type PiKernelPhase = 'lookup' | 'download' | 'verify' | 'activate';
export interface PiKernelRelease {
version: string;
size?: number;
publishedAt?: string;
releaseUrl?: string;
}
export interface PiKernelCheck {
release: PiKernelRelease | null;
checkedAt: number | null;
error: boolean;
}
export interface PiKernelState {
currentVersion: string | null;
restartRequired: boolean;
official: PiKernelCheck;
upstream: PiKernelCheck;
operation: { source: PiKernelSource; phase: PiKernelPhase } | null;
}
export interface PiKernelInstallRequest {
source: PiKernelSource;
/** The exact version shown when the user chose to install. */
version: string;
}