feat: Implement Qwen adapter and enhance AI platform detection
- Added a new Qwen adapter to facilitate monitoring through Playwright, leveraging internal text/chat managers. - Updated account detection logic to recognize Qwen sessions based on persisted cookies, improving binding reliability. - Relaxed authentication requirements for monitor tasks, allowing anonymous execution for certain AI platforms. - Enhanced the generic AI platform detection to include Qwen-specific logic, ensuring accurate session identification. - Modified the monitoring dashboard to include runtime state indicating if the current user's desktop client is online. - Updated various files including `account-binder.ts`, `runtime-controller.ts`, and `monitoring_service.go` to support new features and improvements.
This commit is contained in:
+49
@@ -2,6 +2,26 @@
|
||||
|
||||
## Session: 2026-04-20
|
||||
|
||||
### Phase 20: Tracking Collect-Now Repair
|
||||
- **Status:** complete
|
||||
- Actions taken:
|
||||
- Re-read the `admin-web` tracking page, monitoring API client, and tenant monitoring handler/service chain to isolate why `立即采集` still depended on the removed browser-plugin runtime.
|
||||
- Confirmed the frontend was still blocking on `monitoring-plugin` readiness and trying to kickoff a plugin cycle even though monitoring collection is now meant to run silently through `desktop-client`.
|
||||
- Added monitoring dashboard runtime state so the page now knows whether the current logged-in user's own desktop client is online.
|
||||
- Tightened `collect-now` server validation to only accept requests when the current actor has an online desktop client, instead of falling back to another online client in the same workspace.
|
||||
- Updated `TrackingView.vue` to remove the plugin kickoff path, call only the backend `collect-now` endpoint, and disable the CTA with an explicit reason tooltip when brand/keyword/client-online requirements are not met.
|
||||
- Added the missing `desktop_client_offline` frontend error mapping plus new i18n strings for the button gating reasons.
|
||||
- Files created/modified:
|
||||
- `task_plan.md` (updated)
|
||||
- `findings.md` (updated)
|
||||
- `progress.md` (updated)
|
||||
- `apps/admin-web/src/views/TrackingView.vue` (updated)
|
||||
- `apps/admin-web/src/i18n/messages/zh-CN.ts` (updated)
|
||||
- `apps/admin-web/src/i18n/messages/en-US.ts` (updated)
|
||||
- `apps/admin-web/src/lib/errors.ts` (updated)
|
||||
- `packages/shared-types/src/index.ts` (updated)
|
||||
- `server/internal/tenant/app/monitoring_service.go` (updated)
|
||||
|
||||
### Phase 15: Desktop Scheduler Design & Integration
|
||||
- **Status:** complete
|
||||
- Actions taken:
|
||||
@@ -49,6 +69,35 @@
|
||||
- `server/internal/tenant/app/desktop_task_service.go` (updated)
|
||||
- `server/internal/tenant/app/publish_job_service.go` (updated)
|
||||
|
||||
### Phase 18: Qwen Adapter & Auth Relaxation
|
||||
- **Status:** complete
|
||||
- Actions taken:
|
||||
- Ported the browser-extension `qwen` monitoring flow into a new desktop Playwright adapter that drives Tongyi's in-page managers via `page.evaluate()` and extracts answer/source data from `__qianwenChatAPI`.
|
||||
- Registered the new `qwen` monitor adapter in the desktop runtime so monitor tasks can execute through the hidden Playwright CDP layer.
|
||||
- Tightened generic AI auth fingerprinting to ignore CSRF-only cookies like `XSRF-TOKEN`, which Qwen sets even for anonymous visits.
|
||||
- Added a Qwen-specific bind detector so the auth window can auto-close once a real session footprint is present, even if the page has not yet rendered an obvious avatar/name signal.
|
||||
- Updated monitor preflight policy so only `yuanbao`, `kimi`, and `deepseek` require active login before execution; `qwen`, `doubao`, and `wenxin` are allowed to run anonymously when needed.
|
||||
- Files created/modified:
|
||||
- `task_plan.md` (updated)
|
||||
- `findings.md` (updated)
|
||||
- `progress.md` (updated)
|
||||
- `apps/desktop-client/src/main/adapters/qwen.ts` (created)
|
||||
- `apps/desktop-client/src/main/adapters/index.ts` (updated)
|
||||
- `apps/desktop-client/src/main/runtime-controller.ts` (updated)
|
||||
- `apps/desktop-client/src/main/account-binder.ts` (updated)
|
||||
|
||||
### Phase 19: Qwen Verification & Delivery
|
||||
- **Status:** complete
|
||||
- Actions taken:
|
||||
- Verified `pnpm --filter @geo/desktop-client typecheck` passes after the Qwen adapter, bind-flow, and auth-policy updates.
|
||||
- Verified `pnpm --filter @geo/desktop-client build` passes after the same changes.
|
||||
- Followed up on a real Qwen bind stall reported by the user, inspected the machine's persisted `pending-qwen-*` partition, and confirmed logged-in cookies like `tongyi_sso_ticket`, `tongyi_sso_ticket_hash`, and `b-user-id` are present.
|
||||
- Reworked Qwen account detection so bind/probe can succeed from those persisted auth cookies even when the page nickname/avatar heuristics do not trigger.
|
||||
- Files created/modified:
|
||||
- `task_plan.md` (updated)
|
||||
- `findings.md` (updated)
|
||||
- `progress.md` (updated)
|
||||
|
||||
## Session: 2026-04-04
|
||||
|
||||
### Phase 13: Prompt Centralization
|
||||
|
||||
Reference in New Issue
Block a user