feat(monitoring): dispatch monitoring tasks to desktop via AMQP outbox

Replace SSE /desktop/events with priority AMQP dispatch for monitoring
runs, and add phase1/phase2 infrastructure so desktop workers can lease,
resume, report, skip, and cancel monitoring tasks over the existing
dispatch WebSocket.

- Add monitoring collect outbox worker and phase2 desktop task fields
- Add /desktop/monitoring/tasks/{lease,resume,result,skip,cancel} routes
- Introduce execution-devtools and network-observer on desktop runtime
- Refactor runtime-controller, LoginView, and doubao adapter for the new flow
- Add channelName column to tracking views

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-22 00:24:21 +08:00
parent 749b6b99cd
commit 4142c53fa6
57 changed files with 7897 additions and 985 deletions
+19 -1
View File
@@ -233,7 +233,8 @@ export interface DesktopTaskEventMessage {
| "task_extended"
| "task_completed"
| "task_canceled"
| "task_reconciled";
| "task_reconciled"
| "task_control";
task_id: string;
job_id: string;
workspace_id: number;
@@ -252,6 +253,13 @@ export interface DesktopTaskEventMessage {
| "unknown"
| "aborted";
kind: "publish" | "monitor";
priority?: number;
lane?: string;
interrupt_generation?: number;
signal_only?: boolean;
control?: "interrupt_requested";
reason?: string;
replacement_task_id?: string | null;
updated_at: string;
}
@@ -786,6 +794,8 @@ export interface MonitoringLeaseTask {
run_mode: string;
trigger_source: string;
business_date: string;
priority?: number;
lane?: string;
lease_token: string;
lease_expires_at: string;
}
@@ -1195,6 +1205,14 @@ export interface MonitoringCollectNowResponse {
leased_task_count: number;
completed_task_count: number;
has_effective_snapshot: boolean;
request_id?: string;
target_client_id?: string;
affected_task_count?: number;
promoted_task_count?: number;
aborted_queued_count?: number;
interrupt_requested_count?: number;
interrupt_generation?: number;
ttl_expires_at?: string;
message: string;
}