export interface UnifiedChannel { id: string ref?: string name: string parentId?: string } export interface UnifiedMessage { id: string ref?: string channelId: string channelRef?: string author: string content: string timestamp: string } export interface Workspace { id: string name: string } export interface AuthHint { command: string description: string } export interface AuthIO { print(message: string): void prompt(label: string, options?: { secret?: boolean }): Promise } export interface PlatformAdapter { readonly name: string login(): Promise getChannels(): Promise getMessages(channelId: string, limit?: number): Promise sendMessage(channelId: string, text: string): Promise startListening?(onMessage: (msg: UnifiedMessage) => void): Promise stopListening?(): void getWorkspaces?(): Promise switchWorkspace?(workspaceId: string): Promise getCurrentWorkspace?(): Workspace | null getAuthHint(): AuthHint authenticate(io: AuthIO): Promise }