用于开发 BlueBubbles 渠道插件时使用。插件目录为 extensions/bluebubbles/,入口 index.ts;渠道实现位于 src/channel.ts,webhook 处理在 src/monitor.ts(通过 api.registerHttpHandler 注册),REST 辅助在 src/send.ts 与 src/probe.ts,运行时桥接在 src/runtime.ts(经 api.runtime 设置),引导目录项在 src/channels/plugins/catalog.ts。应使用内部辅助函数而非直接调用原始 API:probeBlueBubbles 做健康检查,sendMessageBlueBubbles 发送文本,resolveChatGuidForTarget 查找会话,sendBlueBubblesReaction 发送 tapback,sendBlueBubblesTyping 与 markBlueBubblesChatRead 处理正在输入与已读,downloadBlueBubblesAttachment 处理入站媒体,buildBlueBubblesApiUrl 与 blueBubblesFetchWithTimeout 提供共享 REST 基础。webhook 方面,BlueBubbles 向网关 HTTP 服务器发送 JSON;需防御性归一化发送者与会话 ID(各版本负载不同),跳过标记为自身发送的消息,经插件运行时与 thinkfleetbot/plugin-sdk 辅助路由到核心回复管线;附件或贴纸在文本为空时使用 media:... 占位符,并通过入站上下文中的 MediaUrl(s) 附带媒体路径。核心配置项包括 channels.bluebubbles.serverUrl、channels.bluebubbles.password、channels.bluebubbles.webhookPath;动作开关 channels.bluebubbles.actions.reactions 默认为 true。消息工具说明:react 动作除 messageId 外还需 target(电话号码或会话标识),例如 action=react target=+15551234567 messageId=ABC123 emoji=❤️。资料未提供安装命令、定价、平台限制等更多信息。
bluebubbles
智能体与模型
更新于 10-16 07:57