Awada channel setup

From TeamWiseFlow/xiaobei · View interactive version

Awada channel setup is an AI agent skill from the GitHub repository TeamWiseFlow/xiaobei. 配置 Awada 账号、crew 路由及默认启用的 CustomerDB hook,检查消息权限、本地 slash、标准媒体与统一动作接口。用于用户或 main 明确选定 Awada 后的启用和修复。

How to use this skill

Skill file

Awada Relay V2 配置

用户或 main 选定 Awada 后使用本技能;channel 选择仍由用户决定。启用 Awada channel 时,配置并验证 CustomerDB hook 是标准动作,不再单独询问是否启用;仅用户明确要求不启用或已有明确停用设置时跳过。Awada 是本项目局部插件,默认连接 https://relay.openclaw-for-business.com/api/v2/awada。所有账号使用相同动作和参数格式;不询问服务端底层实现,不按账号筛掉能力,也不在本地预判某个业务动作是否支持。执行支持和限制由 Awada server 返回。

配置前

预览和应用

awada-channel-setup --project-root <项目根> --account-id <账号> --agent-id sales-cs --dry-run
awada-channel-setup --project-root <项目根> --account-id <账号> --agent-id sales-cs

先审阅脱敏预览,再在用户已授权的配置范围内应用。已有 lane 会保留;显式 --lane "" 恢复服务端默认,其他 lane 使用 --lane <laneId>。脚本统一处理以下动作,不要手拼 JSON 或覆盖整段数组:

新客服账号默认 dmPolicy: open、allowFrom: ["*"]、groupPolicy: disabled,用于公开私聊接待。已有显式策略保持原值。调整权限时显式传 --dm-policy、重复 --allow-from 或 --group-policy;选 pairing 时按 OpenClaw 配对流程授权客户,不能声称已公开接待。open 必须含 "*",allowlist 不能为空。群聊的允许名单和 @ 策略按实际需求配置;插件的 open 群默认无需 @,allowlist 群默认要求 @,显式 requireMention 优先。

CustomerDB hook 标准配置与验收

脚本默认完成以下配置,不要求用户另选开关:

脱敏预览必须检查 customerdb、customerdbHooks 和 customerdbSetup。正常结果应为 enabled,且会话访问授权为 true。用户明确不启用时才允许 skipped_by_request;已有明确停用设置返回 existing_disabled,交付时说明仍停用,不擅自重新启用。--without-customerdb 只跳过本次配置并保留现有段落,不能据此声称已停用原来运行的 hook;明确要求停用已有同一归属的 hook 时,设置该段 enabled=false,保留客户数据及其他账号配置。

在已授权的重载/重启后,核对 Gateway 没有 hook blocked / DB init failed 错误,并确认 before_prompt_build 已注册;获准验证私聊时确认 [CustomerDB] 注入和建档。客户回复仅结束 sent_once,pending 保留;cron/heartbeat 不执行客户回复处理。/payment_success、/club_join 随 hook 功能注册,不在 commands.json 重复配置。返回 channel 状态和 hook 配置/注册/业务验证结果;仅 channel 已连接不算完整验收。

日志排障

媒体与本地命令

生效与验证

脚本不重启 Gateway。按用户已确认的维护窗口和部署方式处理重载/重启;用户已授权时延续该授权,不重复询问。若当前仅获准源码开发,不应用运行配置、不重启或切换服务。

配置后请 main 执行 sales-cs-enablement check-channel --account-id <账号> --probe;该工具属于 main 的 sales-cs-manager。它只读取 V2 health 和带 key 的 capabilities,不发送消息。IT 也可在已启用插件且具备权限时用 awada_api 核对 health/capabilities。静态配置通过、WS 已连接和客户收发成功是三个独立结果;检查输出不代表实号验收。

完整契约和迁移说明见 <项目根>/awada/README.md、docs/AWADA-CLIENT-TRANSPORT.md。

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.