feat(update): add Onebox self-upgrade flow

This commit is contained in:
2026-05-24 11:49:43 +00:00
parent 4812621376
commit 05235ec284
10 changed files with 487 additions and 48 deletions
+23
View File
@@ -4,7 +4,30 @@
import type { TPlatformServiceType, TPlatformServiceStatus } from './platform.ts';
export interface IOneboxUpdateStatus {
currentVersion: string;
latestVersion: string | null;
updateAvailable: boolean;
checkedAt: number;
releaseUrl: string;
changelogUrl: string;
error?: string;
}
export interface IOneboxUpgradeStartResult {
accepted: boolean;
currentVersion: string;
targetVersion: string;
message: string;
pid?: number;
logPath?: string;
}
export interface ISystemStatus {
onebox: {
version: string;
update: IOneboxUpdateStatus;
};
docker: {
running: boolean;
version: unknown;
+13
View File
@@ -13,3 +13,16 @@ export interface IReq_GetSystemStatus extends plugins.typedrequestInterfaces.imp
status: data.ISystemStatus;
};
}
export interface IReq_StartOneboxUpgrade extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_StartOneboxUpgrade
> {
method: 'startOneboxUpgrade';
request: {
identity: data.IIdentity;
};
response: {
upgrade: data.IOneboxUpgradeStartResult;
};
}