fix(btmsg): convert positional column access to named, fix camelCase mismatch

CRITICAL: get_agents() used SELECT * positional index 7 for status,
but column 7 is system_prompt (column 8 is status). Converted all
query functions in btmsg.rs and bttask.rs to named column access.

Fixed BtmsgAgent/BtmsgMessage TypeScript interfaces to use camelCase
matching Rust serde(rename_all = camelCase). Updated CommsTab consumer.
This commit is contained in:
Hibryda 2026-03-11 21:54:19 +01:00
parent 32f6d7eadf
commit 93c2cdf434
4 changed files with 99 additions and 88 deletions

View file

@ -10,23 +10,23 @@ export interface BtmsgAgent {
id: string;
name: string;
role: string;
group_id: string;
groupId: string;
tier: number;
model: string | null;
status: string;
unread_count: number;
unreadCount: number;
}
export interface BtmsgMessage {
id: string;
from_agent: string;
to_agent: string;
fromAgent: string;
toAgent: string;
content: string;
read: boolean;
reply_to: string | null;
created_at: string;
sender_name?: string;
sender_role?: string;
replyTo: string | null;
createdAt: string;
senderName?: string;
senderRole?: string;
}
export interface BtmsgFeedMessage {