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:
@@ -597,11 +597,16 @@ function parseRuntimeState(value: unknown): DoubaoRuntimeState | null {
|
||||
}
|
||||
|
||||
async function loadDoubaoRuntimeState(context: Parameters<MonitorAdapter["query"]>[0]): Promise<DoubaoRuntimeState> {
|
||||
if (!context.view) {
|
||||
throw new Error("doubao_view_required");
|
||||
}
|
||||
const view = context.view;
|
||||
|
||||
context.reportProgress("doubao.bootstrap_view");
|
||||
await ensureViewLoaded(context.view, DOUBAO_REFERER, context.signal);
|
||||
await ensureViewLoaded(view, DOUBAO_REFERER, context.signal);
|
||||
|
||||
context.reportProgress("doubao.read_runtime_state");
|
||||
const state = await context.view.webContents.executeJavaScript(
|
||||
const state = await view.webContents.executeJavaScript(
|
||||
`(() => {
|
||||
try {
|
||||
const safeParse = (value) => {
|
||||
@@ -711,7 +716,19 @@ function buildAdapterError(
|
||||
|
||||
export const doubaoAdapter: MonitorAdapter = {
|
||||
provider: "doubao",
|
||||
executionMode: "view",
|
||||
async query(context, payload) {
|
||||
if (!context.view) {
|
||||
return {
|
||||
status: "failed",
|
||||
summary: "豆包监测缺少页面执行上下文。",
|
||||
error: buildAdapterError(
|
||||
"doubao_view_required",
|
||||
"doubao_view_required",
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
const questionText = extractQuestionText(payload);
|
||||
const runtimeState = await loadDoubaoRuntimeState(context);
|
||||
const requestBody = buildDoubaoRequestBody(questionText, runtimeState);
|
||||
|
||||
Reference in New Issue
Block a user