Files
bot/docs/zh-CN/platforms/mac/permissions.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

1.9 KiB
Raw Permalink Blame History

read_when, summary, title, x-i18n
read_when summary title x-i18n
调试缺失或卡住的 macOS 权限提示
打包或签名 macOS 应用
更改 Bundle ID 或应用安装路径
macOS 权限持久化(TCC)和签名要求 macOS 权限
generated_at model provider source_hash source_path workflow
2026-02-01T21:32:58Z claude-opus-4-5 pi d012589c0583dd0b3792d695f3f71a6ff265704cf02a3b79f8c4a5b14712e6aa platforms/mac/permissions.md 15

macOS 权限(TCC)

macOS 权限授予是脆弱的。TCC 将权限授予与应用的代码签名、Bundle 标识符和磁盘路径关联。如果其中任何一项发生变化,macOS 会将该应用视为新应用,可能会丢弃或隐藏权限提示。

稳定权限的要求

  • 相同路径:从固定位置运行应用(对于 HanzoBot,为 dist/HanzoBot.app)。
  • 相同 Bundle 标识符:更改 Bundle ID 会创建新的权限身份。
  • 已签名的应用:未签名或临时签名的构建不会持久化权限。
  • 一致的签名:使用真实的 Apple Development 或 Developer ID 证书,以确保签名在多次构建之间保持稳定。

临时签名每次构建都会生成新的身份。macOS 会忘记之前的授权,提示可能完全消失,直到清除过期条目为止。

权限提示消失时的恢复清单

  1. 退出应用。
  2. 在系统设置 -> 隐私与安全性中移除该应用条目。
  3. 从相同路径重新启动应用并重新授予权限。
  4. 如果提示仍未出现,使用 tccutil 重置 TCC 条目后重试。
  5. 某些权限仅在完全重启 macOS 后才会重新出现。

重置示例(根据需要替换 Bundle ID):

sudo tccutil reset Accessibility bot.molt.mac
sudo tccutil reset ScreenCapture bot.molt.mac
sudo tccutil reset AppleEvents

如果你正在测试权限,请始终使用真实证书签名。临时签名的构建仅适用于不需要权限的快速本地运行。