Files
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

4.9 KiB
Raw Permalink Blame History

read_when, summary, title, x-i18n
read_when summary title x-i18n
制作或验证 HanzoBot macOS 发布版本
更新 Sparkle appcast 或订阅源资源
HanzoBot macOS 发布清单(Sparkle 订阅源、打包、签名) macOS 发布
generated_at model provider source_hash source_path workflow
2026-02-01T21:33:17Z claude-opus-4-5 pi 703c08c13793cd8c96bd4c31fb4904cdf4ffff35576e7ea48a362560d371cb30 platforms/mac/release.md 15

HanzoBot macOS 发布(Sparkle)

本应用现已支持 Sparkle 自动更新。发布构建必须经过 Developer ID 签名、压缩,并发布包含签名的 appcast 条目。

前提条件

  • 已安装 Developer ID Application 证书(示例:Developer ID Application: <Developer Name> (<TEAMID>))。
  • 环境变量 SPARKLE_PRIVATE_KEY_FILE 已设置为 Sparkle ed25519 私钥路径(公钥已嵌入 Info.plist)。如果缺失,请检查 ~/.profile。
  • 用于 xcrun notarytool 的公证凭据(钥匙串配置文件或 API 密钥),以实现通过 Gatekeeper 安全分发的 DMG/zip。
    • 我们使用名为 hanzo-bot-notary 的钥匙串配置文件,由 shell 配置文件中的 App Store Connect API 密钥环境变量创建:
      • APP_STORE_CONNECT_API_KEY_P8、APP_STORE_CONNECT_KEY_ID、APP_STORE_CONNECT_ISSUER_ID
      • echo "$APP_STORE_CONNECT_API_KEY_P8" | sed 's/\\n/\n/g' > /tmp/hanzo-bot-notary.p8
      • xcrun notarytool store-credentials "hanzo-bot-notary" --key /tmp/hanzo-bot-notary.p8 --key-id "$APP_STORE_CONNECT_KEY_ID" --issuer "$APP_STORE_CONNECT_ISSUER_ID"
  • 已安装 pnpm 依赖(pnpm install --config.node-linker=hoisted)。
  • Sparkle 工具通过 SwiftPM 自动获取,位于 apps/macos/.build/artifacts/sparkle/Sparkle/bin/(sign_update、generate_appcast 等)。

构建与打包

注意事项:

  • APP_BUILD 映射到 CFBundleVersion/sparkle:version;保持纯数字且单调递增(不含 -beta),否则 Sparkle 会将其视为相同版本。
  • 默认为当前架构($(uname -m))。对于发布/通用构建,设置 BUILD_ARCHS="arm64 x86_64"(或 BUILD_ARCHS=all)。
  • 使用 scripts/package-mac-dist.sh 生成发布产物(zip + DMG + 公证)。使用 scripts/package-mac-app.sh 进行本地/开发打包。
# 从仓库根目录运行;设置发布 ID 以启用 Sparkle 订阅源。
# APP_BUILD 必须为纯数字且单调递增,以便 Sparkle 正确比较。
BUNDLE_ID=bot.molt.mac \
APP_VERSION=2026.1.27-beta.1 \
APP_BUILD="$(git rev-list --count HEAD)" \
BUILD_CONFIG=release \
SIGN_IDENTITY="Developer ID Application: <Developer Name> (<TEAMID>)" \
scripts/package-mac-app.sh

# 打包用于分发的 zip(包含资源分支以支持 Sparkle 增量更新)
ditto -c -k --sequesterRsrc --keepParent dist/HanzoBot.app dist/HanzoBot-2026.1.27-beta.1.zip

# 可选:同时构建适合用户使用的样式化 DMG(拖拽到 /Applications)
scripts/create-dmg.sh dist/HanzoBot.app dist/HanzoBot-2026.1.27-beta.1.dmg

# 推荐:构建 + 公证/装订 zip + DMG
# 首先,创建一次钥匙串配置文件:
#   xcrun notarytool store-credentials "hanzo-bot-notary" \
#     --apple-id "<apple-id>" --team-id "<team-id>" --password "<app-specific-password>"
NOTARIZE=1 NOTARYTOOL_PROFILE=hanzo-bot-notary \
BUNDLE_ID=bot.molt.mac \
APP_VERSION=2026.1.27-beta.1 \
APP_BUILD="$(git rev-list --count HEAD)" \
BUILD_CONFIG=release \
SIGN_IDENTITY="Developer ID Application: <Developer Name> (<TEAMID>)" \
scripts/package-mac-dist.sh

# 可选:随发布一起提供 dSYM
ditto -c -k --keepParent apps/macos/.build/release/HanzoBot.app.dSYM dist/HanzoBot-2026.1.27-beta.1.dSYM.zip

Appcast 条目

使用发布说明生成器,以便 Sparkle 渲染格式化的 HTML 说明:

SPARKLE_PRIVATE_KEY_FILE=/path/to/ed25519-private-key scripts/make_appcast.sh dist/HanzoBot-2026.1.27-beta.1.zip https://raw.githubusercontent.com/hanzo-bot/hanzo-bot/main/appcast.xml

从 CHANGELOG.md(通过 scripts/changelog-to-html.sh)生成 HTML 发布说明,并将其嵌入 appcast 条目。 发布时,将更新后的 appcast.xml 与发布资源(zip + dSYM)一起提交。

发布与验证

  • 将 HanzoBot-2026.1.27-beta.1.zip(和 HanzoBot-2026.1.27-beta.1.dSYM.zip)上传到标签 v2026.1.27-beta.1 对应的 GitHub 发布。
  • 确保原始 appcast URL 与内置的订阅源匹配:https://raw.githubusercontent.com/hanzo-bot/hanzo-bot/main/appcast.xml。
  • 完整性检查:
    • curl -I https://raw.githubusercontent.com/hanzo-bot/hanzo-bot/main/appcast.xml 返回 200。
    • curl -I <enclosure url> 在资源上传后返回 200。
    • 在之前的公开构建版本上,从 About 选项卡运行"Check for Updates…",验证 Sparkle 能正常安装新构建。

完成定义:已签名的应用 + appcast 已发布,从旧版本的更新流程正常工作,且发布资源已附加到 GitHub 发布。