mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-18 12:07:01 +08:00
feat: 集成 Agent Hub 微信机器人能力
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
export type AgentHubRuntimeStatus = 'starting' | 'online' | 'offline' | 'error'
|
||||
export type WechatConnectorStatus =
|
||||
| 'checking'
|
||||
| 'disconnected'
|
||||
| 'starting'
|
||||
| 'waiting_scan'
|
||||
| 'scanned'
|
||||
| 'online'
|
||||
| 'error'
|
||||
|
||||
export interface AgentHubStatus {
|
||||
hub: AgentHubRuntimeStatus
|
||||
connector: WechatConnectorStatus
|
||||
qrCodeDataUrl?: string
|
||||
accountId?: string
|
||||
wechatUserId?: string
|
||||
error?: string
|
||||
updatedAt: number
|
||||
dataApi?: 'checking' | 'online' | 'offline'
|
||||
databaseReady?: boolean
|
||||
}
|
||||
|
||||
export interface AgentHubActionResult {
|
||||
success: boolean
|
||||
status: AgentHubStatus
|
||||
error?: string
|
||||
}
|
||||
|
||||
export type AgentHubLogSource = 'agent-hub' | 'wechat-connector' | 'system'
|
||||
export type AgentHubLogLevel = 'info' | 'warn' | 'error'
|
||||
|
||||
export interface AgentHubLogEntry {
|
||||
id: number
|
||||
timestamp: number
|
||||
source: AgentHubLogSource
|
||||
level: AgentHubLogLevel
|
||||
message: string
|
||||
}
|
||||
@@ -11,7 +11,10 @@ export const LOCAL_API_ENDPOINTS = {
|
||||
},
|
||||
'group-snapshot': { method: 'GET', path: '/api/v1/group_snapshot', queryKeys: ['md5'] },
|
||||
resolve: { method: 'GET', path: '/api/v1/resolve', queryKeys: ['q'] },
|
||||
report: { method: 'POST', path: '/api/v1/report', queryKeys: [] }
|
||||
report: { method: 'POST', path: '/api/v1/report', queryKeys: [] },
|
||||
'agent-status': { method: 'GET', path: '/api/v1/agent/status', queryKeys: [] },
|
||||
'agent-group-report': { method: 'POST', path: '/api/v1/agent/group-report', queryKeys: [] },
|
||||
'agent-send': { method: 'POST', path: '/api/v1/agent/send', queryKeys: [] }
|
||||
} as const
|
||||
|
||||
export type LocalApiEndpointId = keyof typeof LOCAL_API_ENDPOINTS
|
||||
|
||||
Reference in New Issue
Block a user