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:
@@ -3,22 +3,20 @@ import type { Session, WebContentsView } from "electron";
|
||||
|
||||
export type AdapterTaskPhase = "initial" | "resume";
|
||||
export type AdapterCompletionStatus = "succeeded" | "failed" | "unknown";
|
||||
export type AdapterExecutionMode = "session" | "view" | "playwright";
|
||||
|
||||
export interface AdapterContext {
|
||||
taskId: string;
|
||||
accountId: string;
|
||||
session: Session;
|
||||
view: WebContentsView;
|
||||
view: WebContentsView | null;
|
||||
signal: AbortSignal;
|
||||
mode: "auto" | "manual";
|
||||
phase: AdapterTaskPhase;
|
||||
reportProgress(stage: string): void;
|
||||
}
|
||||
|
||||
export interface PublishAdapterContext extends AdapterContext {
|
||||
article: DesktopArticleContent & {
|
||||
publish_type: "publish" | "draft";
|
||||
};
|
||||
article: DesktopArticleContent;
|
||||
}
|
||||
|
||||
export interface AdapterExecutionResult {
|
||||
@@ -26,15 +24,16 @@ export interface AdapterExecutionResult {
|
||||
summary: string;
|
||||
payload?: Record<string, JsonValue>;
|
||||
error?: Record<string, JsonValue>;
|
||||
reviewUrl?: string | null;
|
||||
}
|
||||
|
||||
export interface PublishAdapter {
|
||||
platform: string;
|
||||
executionMode?: AdapterExecutionMode;
|
||||
publish(context: PublishAdapterContext, payload: Record<string, unknown>): Promise<AdapterExecutionResult>;
|
||||
}
|
||||
|
||||
export interface MonitorAdapter {
|
||||
provider: string;
|
||||
executionMode?: AdapterExecutionMode;
|
||||
query(context: AdapterContext, payload: Record<string, unknown>): Promise<AdapterExecutionResult>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user