feat(doubao): implement challenge handling and monitoring improvements
Desktop Client Build / Resolve Build Metadata (push) Successful in 26s
Frontend CI / Frontend (push) Successful in 3m12s
Backend CI / Backend (push) Failing after 10m8s
Desktop Client Build / Build Desktop Client (push) Successful in 23m53s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 26s
Desktop Client Build / Resolve Build Metadata (push) Successful in 26s
Frontend CI / Frontend (push) Successful in 3m12s
Backend CI / Backend (push) Failing after 10m8s
Desktop Client Build / Build Desktop Client (push) Successful in 23m53s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 26s
- Added classification for `doubao_challenge_required` as a challenge in platform-auth-adapters. - Enhanced account action summaries to include specific messages for Doubao human verification. - Introduced monitoring functions to filter out blocked platforms based on account health. - Updated task leasing to support platform-specific filtering for monitor tasks. - Refined issue aggregation in HomeView to consolidate Doubao challenge failures into a single actionable item. - Improved backend logic to handle platform IDs in task leasing requests and responses. - Added tests for new functionality, ensuring proper handling of Doubao challenges and task leasing logic.
This commit is contained in:
+67
@@ -826,3 +826,70 @@
|
||||
- Searched `apps/desktop-client/out/main/bootstrap.cjs` for `wO`, `_0x...`, `stringArray`, `javascript-obfuscator`, and `['evaluate']`; no obfuscator helper traces were present after `build:obf`.
|
||||
- Scoped implementation to tenant publish task list/retry endpoints plus a new admin-web `/publish-management` page under 内容管理.
|
||||
- Noted existing dirty files in i18n/Knowledge/TemplateWizard/config/swagger/knowledge service and will avoid reverting or overwriting unrelated changes.
|
||||
|
||||
## 2026-06-23T23:54:39+08:00 - Doubao thinking-reference fallback
|
||||
|
||||
- Investigated the Doubao monitor failure where the answer page showed "已完成思考 / 搜索 N 个关键词,参考 N 篇资料" links but the adapter returned `unknown`.
|
||||
- Current Doubao behavior observed from user screenshots:
|
||||
- citation/source links now live inside the thinking block rather than next to the final answer;
|
||||
- one answer can contain multiple "搜索 X 个关键词,参考 Y 篇资料" groups;
|
||||
- "已完成思考,参考 N 篇资料" is a broad thinking summary control, while the search groups hold the concrete blue source links;
|
||||
- already-expanded groups may still show a chevron, so clicking blindly can collapse useful references.
|
||||
- Updated `apps/desktop-client/src/main/adapters/doubao.ts` so `/chat/completion` and `text/event-stream` responses remain the preferred SSE source, while a high-quality page answer can be used when SSE has not finished.
|
||||
- Strengthened page fallback to expand/reference-scan Doubao's thinking search groups, skip already-expanded nearby-link groups, merge multiple thinking reference groups, and filter favicon/asset CDN links.
|
||||
- Added helper coverage in `doubao.test.ts` for unfinished SSE + usable page answer, finished SSE precedence, recoverable timeout with anchored page answer, and multi-group thinking references.
|
||||
- Follow-up fix: the `unknown` message "未从正文或思维链兜底抓到可提交答案,仅抓到参考资料" still happened because the implementation only used `domAnswer` as the fallback answer and did not submit `domReasoning`. The adapter now allows a high-quality thinking-chain text fallback when SSE/page answer text is missing but references and anchored page context were captured.
|
||||
- Local anonymous Playwright could open Doubao only to the logged-out/home page, so live account-specific MCP/page content was not directly readable in this session.
|
||||
- Verification passed:
|
||||
- `pnpm --filter @geo/desktop-client exec vitest run src/main/adapters/doubao.test.ts`
|
||||
- `pnpm --filter @geo/desktop-client typecheck`
|
||||
- `pnpm --filter @geo/desktop-client test`
|
||||
- `git diff --check`
|
||||
|
||||
## 2026-06-24T01:20:00+08:00 - Doubao SSE capture and challenge handling
|
||||
|
||||
- Confirmed from the latest user screenshot that Doubao can trigger an official-site image captcha after a prompt is submitted. This is an account/platform challenge, not an answer parsing failure.
|
||||
- Hardened `apps/desktop-client/src/main/adapters/doubao.ts`:
|
||||
- capture Doubao `/chat/completion` SSE in-page through fetch/XHR stream cloning and keep SSE as the primary answer/source path;
|
||||
- keep DOM/page extraction as fallback, including thinking/reference panels for `search_results` without promoting reference lists to `answer`;
|
||||
- verify composer write/readback before sending, avoid selecting voice/microphone controls as send buttons, and add a Playwright keyboard/mouse submit fallback when the page does not observe the user question;
|
||||
- detect Doubao captcha/risk-control surfaces such as image selection, drag-to-area, human verification, security verification, and frequent-access prompts;
|
||||
- return `doubao_challenge_required` as failed/non-retryable AI platform authorization when a captcha is visible, so the desktop UI alerts the user instead of writing `unknown`.
|
||||
- Updated `apps/desktop-client/src/main/platform-auth-adapters.ts` so `doubao_challenge_required` is classified as a challenge.
|
||||
- Updated `apps/desktop-client/src/main/runtime-controller.ts` so Doubao challenge states show a specific user-facing activity: complete Doubao human verification in the desktop client before continuing collection.
|
||||
- Verification passed:
|
||||
- `pnpm --filter @geo/desktop-client exec vitest run src/main/adapters/doubao.test.ts src/main/platform-auth-adapters.test.ts`
|
||||
- `pnpm --filter @geo/desktop-client typecheck`
|
||||
- `git diff --check`
|
||||
- `pnpm --filter @geo/desktop-client build`
|
||||
- Remote SSH to `39.105.229.239` with the provided credentials failed with authentication failure, so remote logs/deployment could not be inspected in this pass.
|
||||
|
||||
## 2026-06-24T02:22:00+08:00 - Doubao captcha display, admission, and default mode
|
||||
|
||||
- Updated desktop HomeView issue aggregation so Doubao human-verification/account challenge failures collapse into one actionable item: "豆包需要人工验证"; the summary count now follows displayed issue rows instead of raw failed task rows.
|
||||
- Added monitor admission filtering for blocked AI platforms:
|
||||
- desktop runtime computes an eligible monitor platform whitelist from current local account health;
|
||||
- Doubao `challenge_required`/expired/revoked states are excluded from local monitor selection, desktop-task monitor lease fallback, legacy monitoring lease fallback, and resume calls;
|
||||
- other AI platforms remain eligible, so a Doubao captcha no longer blocks Qwen/Kimi/DeepSeek/etc. work.
|
||||
- Extended `/api/desktop/tasks/lease` with optional `platform_ids` for monitor leases and filtered the server-side monitor candidate SQL by that whitelist.
|
||||
- Changed Doubao execution to use the default visible mode directly:
|
||||
- removed active in-page switching to "专家"/"思考" and removed deep-think selection parameters from Doubao query execution;
|
||||
- `provider_model` now reports `doubao-web-fast` for default/fast and for any observed expert label, with no `doubao-web-expert` remaining.
|
||||
- Verification passed:
|
||||
- `pnpm --filter @geo/desktop-client exec vitest run src/main/adapters/doubao.test.ts src/main/platform-auth-adapters.test.ts`
|
||||
- `pnpm --filter @geo/desktop-client typecheck`
|
||||
- `pnpm --filter @geo/desktop-client build`
|
||||
- `cd server && go test ./internal/tenant/app ./internal/tenant/transport`
|
||||
- `git diff --check`
|
||||
|
||||
## 2026-06-24T02:29:25+08:00 - Doubao DOM source strictness
|
||||
|
||||
- Refined Doubao citation extraction after the user clarified that captcha/risk-control pages may legitimately have no reference sources.
|
||||
- Kept SSE as the preferred and broad source path, including structured references that embed Doubao redirect URLs in source payloads.
|
||||
- Tightened DOM/page fallback so `search_results` only comes from real link/card URLs and redirect URL attributes; gray search-query/explanatory text such as "search N keywords, reference N sources" is no longer converted into citation sources.
|
||||
- Removed the page-side fallback that scraped arbitrary `http` URLs from element text, so expanded blue reference links are still captured while gray search keyword text is ignored.
|
||||
- Verification passed:
|
||||
- `pnpm --filter @geo/desktop-client exec vitest run src/main/adapters/doubao.test.ts src/main/platform-auth-adapters.test.ts`
|
||||
- `pnpm --filter @geo/desktop-client typecheck`
|
||||
- `pnpm --filter @geo/desktop-client build`
|
||||
- `git diff --check`
|
||||
|
||||
Reference in New Issue
Block a user