feat: 修复定时日报错误通知微信机器人功能

增加定时日报debug
修复定时日报历史头像显示并区分定时日报标题
This commit is contained in:
Wxw-Gu committed 2026-09-02 15:01:03 +08:00
1 parent 1c8bbae1f0
commit 7c8b45a24a
32 files changed
+2975 -213

No files matched your search

+91 -1
View File
@@ -10,7 +10,79 @@ export type ScheduledReportMessageType =
| 'share'
| 'system'
export type ScheduledReportMemberNameMode = 'groupNickname' | 'wechatNickname' | 'remark'
export type ScheduledReportExecutionStatus = 'running' | 'success' | 'failed'
export type ScheduledReportExecutionStatus =
| 'running'
| 'success'
| 'waiting_to_send'
| 'partial_success'
| 'failed'
| 'waiting_for_recovery'
| 'skipped'
export type ScheduledReportExecutionStage =
| 'precheck'
| 'data'
| 'ai'
| 'report'
| 'persist'
| 'send'
| 'notify'
export type ScheduledReportSendStatus = 'pending' | 'success' | 'failed' | 'unavailable'
export type ScheduledReportNotificationStatus =
| 'pending'
| 'sent'
| 'failed'
| 'not_needed'
| 'suppressed'
export type ScheduledReportNotificationType = 'failure' | 'partial_success' | 'recovery'
export type ScheduledReportNotificationSeverity = 'info' | 'warning' | 'error'
export type ScheduledReportNotificationDeliveryStatus = 'pending' | 'sent' | 'failed' | 'suppressed'
export type ScheduledReportNotificationCapabilityReason =
| 'agent_hub_offline'
| 'connector_offline'
| 'recipient_not_bound'
| 'send_failed'
| 'settings_persist_failed'
export interface ScheduledReportNotificationSettings {
enabled: boolean
}
export interface ScheduledReportNotificationSettingsResult {
success: boolean
data: ScheduledReportNotificationSettings
reason?: ScheduledReportNotificationCapabilityReason
error?: string
}
export interface ScheduledReportNotificationCapability {
ready: boolean
recipient?: string
reason?: ScheduledReportNotificationCapabilityReason
error?: string
}
export interface ScheduledReportNotification {
id: string
executionId: string
taskId: string
type: ScheduledReportNotificationType
severity: ScheduledReportNotificationSeverity
title: string
message: string
dedupeKey: string
channel: 'agent_hub'
recipient?: string
status: ScheduledReportNotificationDeliveryStatus
createdAt: string
sentAt?: string
attempts: number
lastError?: string
suppressedAt?: string
}
export interface ScheduledReportTask {
id: string
@@ -37,12 +109,30 @@ export interface ScheduledReportTask {
export interface ScheduledReportExecution {
id: string
taskId: string
/** Missing on old executions; normalized reads treat them as scheduled runs. */
triggerType?: 'scheduled' | 'manual'
startedAt: string
finishedAt?: string
status: ScheduledReportExecutionStatus
error?: string
message?: string
scheduledSlot?: string
currentStage?: ScheduledReportExecutionStage
failedStage?: ScheduledReportExecutionStage
errorCode?: string
technicalMessage?: string
userTitle?: string
userMessage?: string
suggestedAction?: string
retryable?: boolean
retryCount?: number
reportId?: string
htmlPath?: string
pngPath?: string
sendTarget?: string
sendStatus?: ScheduledReportSendStatus
sendError?: string
notificationStatus?: ScheduledReportNotificationStatus
}
export interface ScheduledReportCreateInput {