Files
bot/docs/zh-CN/channels/nextcloud-talk.md
zeekay acaeda400a Eradicate OpenClaw — resolve merge conflicts and finish the rebrand
Three coordinated things:

1. Resolve the committed upstream/main merge conflicts. 94 files were
   sitting with raw <<<<<<< HEAD ... >>>>>>> upstream/main blocks. Every
   conflict had HanzoBot/Bot on HEAD and OpenClaw on upstream. Resolved
   by keeping HEAD everywhere — 540 conflict blocks.

2. Rewrite remaining OpenClaw text refs.
     OPENCLAW   → HANZO_BOT
     OpenClaw   → HanzoBot          (PascalCase type identifiers)
     openclaw   → bot               (codebase convention — botToken,
                                    botUsername etc.; avoids invalid
                                    hyphenated JS identifiers)
     openclaw[_]/openclaw[A-Z] → bot[_]/bot[A-Z]   (compound)
     ai.openclaw.x → ai.hanzo.bot.x  (JVM package path)

3. Delete or rename openclaw-named file paths (116 of them). Dead
   duplicates with a Bot-named canonical from the partial migration:
   deleted. Otherwise renamed.
     ai/openclaw/**           → deleted (ai/hanzo/bot/** canonical)
     Sources/OpenClaw*/       → deleted (Sources/Bot* canonical)
     Tests/OpenClawIPCTests/  → deleted (Tests/BotIPCTests canonical)
     OpenClawKit/             → deleted (BotKit canonical)
     openclaw-tools.*.ts      → deleted (bot-tools.*.ts canonical)
     openclaw-root.ts etc.    → deleted (bot-root.ts canonical)
     types.openclaw.ts        → deleted (types.bot.ts canonical)
     extensions/*/openclaw.plugin.json → renamed hanzo-bot.plugin.json
     docs/start/openclaw.md   → renamed hanzo-bot.md (+ zh-CN)
     docs/assets/openclaw-*.png, whatsapp-openclaw*.jpg → deleted
     scripts/.../openclaw-*   → deleted (bot/hanzo-bot parallels)
     openclaw.mjs             → deleted (hanzo-bot.mjs is package.bin)

Then patched 65 broken JS/TS import strings where hanzo-bot had ended
up inside an import path ('./types.hanzo-bot.js' → './types.bot.js'
etc., since the on-disk filename uses the brand-neutral bot- prefix).

Pre-existing lint debt cleaned up to get oxlint --type-aware to 0/0:
removed the dead i18n test that referenced a path no longer existing;
defined the missing DIDConfig and WalletConfig types in types.base.ts
(they were imported but never declared); dropped unused imports;
collapsed redundant type assertion and a tautological meta.bot lookup
that the openclaw→bot rename made redundant.

The a2ui.bundle.js generated artifact is kept at its pre-rebrand
contents — it gets regenerated by 'pnpm canvas:a2ui:bundle' from
sources I cannot rebuild in this commit; the source side is clean.

Verified: 0 occurrences of openclaw (case-insensitive) in tree source
content, 0 file or directory paths with openclaw in the name; oxlint
--type-aware src test reports 0/0.
2026-05-11 17:56:29 -07:00

5.1 KiB
Raw Permalink Blame History

read_when, summary, title, x-i18n
read_when summary title x-i18n
开发 Nextcloud Talk 渠道功能时
Nextcloud Talk 支持状态、功能和配置 Nextcloud Talk
generated_at model provider source_hash source_path workflow
2026-02-03T10:04:00Z claude-opus-4-5 pi 21b7b9756c4356a76dc0f14c10e44ed74a284cf3badf87e2df75eb88d8a90c31 channels/nextcloud-talk.md 15

Nextcloud Talk(插件)

状态:通过插件支持(webhook 机器人)。支持私信、房间、表情回应和 Markdown 消息。

需要插件

Nextcloud Talk 以插件形式提供,不包含在核心安装包中。

通过 CLI 安装(npm 仓库):

hanzo-bot plugins install @hanzo/bot-nextcloud-talk

本地检出安装(从 git 仓库运行时):

hanzo-bot plugins install ./extensions/nextcloud-talk

如果你在配置/新手引导过程中选择了 Nextcloud Talk,并且检测到 git 检出, HanzoBot 将自动提供本地安装路径。

详情:插件

快速设置(新手)

  1. 安装 Nextcloud Talk 插件。
  2. 在你的 Nextcloud 服务器上创建机器人:
    ./occ talk:bot:install "HanzoBot" "<shared-secret>" "<webhook-url>" --feature reaction
    
  3. 在目标房间设置中启用机器人。
  4. 配置 HanzoBot:
    • 配置项:channels.nextcloud-talk.baseUrl + channels.nextcloud-talk.botSecret
    • 或环境变量:NEXTCLOUD_TALK_BOT_SECRET(仅默认账户)
  5. 重启 Gateway 网关(或完成新手引导)。

最小配置:

{
  channels: {
    "nextcloud-talk": {
      enabled: true,
      baseUrl: "https://cloud.example.com",
      botSecret: "shared-secret",
      dmPolicy: "pairing",
    },
  },
}

注意事项

  • 机器人无法主动发起私信。用户必须先向机器人发送消息。
  • Webhook URL 必须可被 Gateway 网关访问;如果在代理后面,请设置 webhookPublicUrl。
  • 机器人 API 不支持媒体上传;媒体以 URL 形式发送。
  • Webhook 载荷无法区分私信和房间;设置 apiUser + apiPassword 以启用房间类型查询(否则私信将被视为房间)。

访问控制(私信)

  • 默认:channels.nextcloud-talk.dmPolicy = "pairing"。未知发送者将收到配对码。
  • 批准方式:
    • hanzo-bot pairing list nextcloud-talk
    • hanzo-bot pairing approve nextcloud-talk <CODE>
  • 公开私信:channels.nextcloud-talk.dmPolicy="open" 加上 channels.nextcloud-talk.allowFrom=["*"]。

房间(群组)

  • 默认:channels.nextcloud-talk.groupPolicy = "allowlist"(需要提及触发)。
  • 使用 channels.nextcloud-talk.rooms 设置房间白名单:
{
  channels: {
    "nextcloud-talk": {
      rooms: {
        "room-token": { requireMention: true },
      },
    },
  },
}
  • 如需禁止所有房间,保持白名单为空或设置 channels.nextcloud-talk.groupPolicy="disabled"。

功能支持

功能 状态
私信 支持
房间 支持
话题 不支持
媒体 仅 URL
表情回应 支持
原生命令 不支持

配置参考(Nextcloud Talk)

完整配置:配置

提供商选项:

  • channels.nextcloud-talk.enabled:启用/禁用渠道启动。
  • channels.nextcloud-talk.baseUrl:Nextcloud 实例 URL。
  • channels.nextcloud-talk.botSecret:机器人共享密钥。
  • channels.nextcloud-talk.botSecretFile:密钥文件路径。
  • channels.nextcloud-talk.apiUser:用于房间查询的 API 用户(私信检测)。
  • channels.nextcloud-talk.apiPassword:用于房间查询的 API/应用密码。
  • channels.nextcloud-talk.apiPasswordFile:API 密码文件路径。
  • channels.nextcloud-talk.webhookPort:webhook 监听端口(默认:8788)。
  • channels.nextcloud-talk.webhookHost:webhook 主机(默认:0.0.0.0)。
  • channels.nextcloud-talk.webhookPath:webhook 路径(默认:/nextcloud-talk-webhook)。
  • channels.nextcloud-talk.webhookPublicUrl:外部可达的 webhook URL。
  • channels.nextcloud-talk.dmPolicy:pairing | allowlist | open | disabled。
  • channels.nextcloud-talk.allowFrom:私信白名单(用户 ID)。open 需要 "*"。
  • channels.nextcloud-talk.groupPolicy:allowlist | open | disabled。
  • channels.nextcloud-talk.groupAllowFrom:群组白名单(用户 ID)。
  • channels.nextcloud-talk.rooms:每个房间的设置和白名单。
  • channels.nextcloud-talk.historyLimit:群组历史记录限制(0 表示禁用)。
  • channels.nextcloud-talk.dmHistoryLimit:私信历史记录限制(0 表示禁用)。
  • channels.nextcloud-talk.dms:每个私信的覆盖设置(historyLimit)。
  • channels.nextcloud-talk.textChunkLimit:出站文本分块大小(字符数)。
  • channels.nextcloud-talk.chunkMode:length(默认)或 newline,在长度分块前按空行(段落边界)分割。
  • channels.nextcloud-talk.blockStreaming:禁用此渠道的分块流式传输。
  • channels.nextcloud-talk.blockStreamingCoalesce:分块流式传输合并调优。
  • channels.nextcloud-talk.mediaMaxMb:入站媒体大小上限(MB)。