feat(desktop): drop parked review flow, add publish management

SaaS 侧人工审核后才创建 publish job,desktop 不再做二次审核:移除
manual/waiting_user/parked/from_parked 状态机与 LeaseFromParked 查询,
desktop client 只执行发布并新增"发布管理"页(待发布队列 / 历史 / 再次
发送)。同时抽离 @geo/publisher-platforms 共享适配器包、新增 Redis-based
desktop_presence 与 publish_record_support,刷新 admin-web 发布弹窗与
媒体库;plan A / spec 文档同步口径。
This commit is contained in:
2026-04-20 09:52:48 +08:00
parent b16e9f0bd1
commit a617d39a4a
93 changed files with 5519 additions and 3594 deletions
@@ -69,6 +69,19 @@ function rememberPersistedPartition(accountId: string, partition: string): void
});
}
function forgetPersistedPartition(accountId: string): string | null {
const current = readPersistedPartitions();
const partition = current[accountId] ?? null;
if (!partition) {
return null;
}
const next = { ...current };
delete next[accountId];
writePersistedPartitions(next);
return partition;
}
function partitionFor(accountId: string): string {
return `persist:acc-${accountId}`;
}
@@ -166,6 +179,37 @@ export function forgetSessionHandle(accountId: string): void {
registry.delete(accountId);
}
export async function clearSessionHandle(accountId: string): Promise<void> {
const active = registry.get(accountId);
const persistedPartition = forgetPersistedPartition(accountId);
const partition = active?.partition ?? persistedPartition;
registry.delete(accountId);
if (!partition) {
return;
}
const target = prepareSession(session.fromPartition(partition));
try {
await target.clearStorageData();
} catch (error) {
console.warn("[desktop-session] clearStorageData failed", { accountId, partition, error });
}
try {
await target.clearCache();
} catch (error) {
console.warn("[desktop-session] clearCache failed", { accountId, partition, error });
}
try {
await target.cookies.flushStore();
} catch (error) {
console.warn("[desktop-session] flushStore failed", { accountId, partition, error });
}
}
export function getSessionHandle(accountId: string): SessionHandle | undefined {
return registry.get(accountId);
}