feat: add dual-layer versioning to WebDAV sync (protocol v2 + db-v6)

Separate protocol version from database compatibility version in WebDAV
sync paths. Upload writes to v2/db-v6/<profile>, download falls back to
legacy v2/<profile> when current path has no data. Extend manifest with
optional dbCompatVersion field and add legacy layout detection to UI.
This commit is contained in:
Jason
2026-03-08 19:33:20 +08:00
parent bf40b0138c
commit c0737f2cfe
8 changed files with 330 additions and 67 deletions
+8 -2
View File
@@ -169,7 +169,7 @@ export interface VisibleApps {
openclaw: boolean;
}
// WebDAV v2 同步状态
// WebDAV 同步状态
export interface WebDavSyncStatus {
lastSyncAt?: number | null;
lastError?: string | null;
@@ -179,7 +179,7 @@ export interface WebDavSyncStatus {
lastRemoteManifestHash?: string | null;
}
// WebDAV v2 同步配置
// WebDAV 同步配置
export interface WebDavSyncSettings {
enabled?: boolean;
autoSync?: boolean;
@@ -191,14 +191,20 @@ export interface WebDavSyncSettings {
status?: WebDavSyncStatus;
}
export type RemoteSnapshotLayout = "current" | "legacy";
// 远端快照信息(下载前预览)
export interface RemoteSnapshotInfo {
deviceName: string;
createdAt: string;
snapshotId: string;
version: number;
protocolVersion: number;
dbCompatVersion?: number | null;
compatible: boolean;
artifacts: string[];
layout: RemoteSnapshotLayout;
remotePath: string;
}
// 应用设置类型(用于设置对话框与 Tauri API)