mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-21 21:05:09 +00:00
16 lines
426 B
TypeScript
16 lines
426 B
TypeScript
import { defineExtensionMessaging } from '@webext-core/messaging'
|
|
import type { McpTool } from '@/lib/mcp/client'
|
|
|
|
type ServerMessagesProtocol = {
|
|
checkHealth(): { healthy: boolean }
|
|
fetchMcpTools(): { tools: McpTool[]; error?: string }
|
|
}
|
|
|
|
/**
|
|
* @public
|
|
*/
|
|
const { sendMessage, onMessage } =
|
|
defineExtensionMessaging<ServerMessagesProtocol>()
|
|
|
|
export { sendMessage as sendServerMessage, onMessage as onServerMessage }
|