feat: status dashboard categories/ordering + live usage dashboard

- Add getChannelMeta to Discord channel (batch guild fetch)
- Status dashboard groups by Discord category, sorts by position
- Add live usage dashboard (CPU, memory, disk, uptime) with message edit
- Fix 4 failing discord.test.ts tests (sendMessage format, image fetch mock)
This commit is contained in:
Eyejoker
2026-03-13 23:42:45 +09:00
parent 27d4ea05dc
commit 7dcb3fe1e4
5 changed files with 307 additions and 32 deletions

View File

@@ -65,6 +65,12 @@ export interface TaskRunLog {
// --- Channel abstraction ---
export interface ChannelMeta {
position: number;
category: string;
categoryPosition: number;
}
export interface Channel {
name: string;
connect(): Promise<void>;
@@ -79,6 +85,8 @@ export interface Channel {
sendAndTrack?(jid: string, text: string): Promise<string | null>;
// Optional: sync group/chat names from the platform.
syncGroups?(force: boolean): Promise<void>;
// Optional: get channel metadata (position, category) for ordering.
getChannelMeta?(jids: string[]): Promise<Map<string, ChannelMeta>>;
}
// Callback type that channels use to deliver inbound messages