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

3.2 KiB

last_updated, owner, status, summary, title, x-i18n
last_updated owner status summary title x-i18n
2026-01-05 hanzo-bot complete 加固 cron.add 输入处理,对齐 schema,改进 cron UI/智能体工具 Cron Add 加固
generated_at model provider source_hash source_path workflow
2026-02-03T07:47:26Z claude-opus-4-5 pi d7e469674bd9435b846757ea0d5dc8f174eaa8533917fc013b1ef4f82859496d experiments/plans/cron-add-hardening.md 15

Cron Add 加固 & Schema 对齐

背景

最近的 Gateway 网关日志显示重复的 cron.add 失败,参数无效(缺少 sessionTarget、wakeMode、payload,以及格式错误的 schedule)。这表明至少有一个客户端(可能是智能体工具调用路径)正在发送包装的或部分指定的任务负载。另外,TypeScript 中的 cron 提供商枚举、Gateway 网关 schema、CLI 标志和 UI 表单类型之间存在漂移,加上 cron.status 的 UI 不匹配(期望 jobCount 而 Gateway 网关返回 jobs)。

目标

  • 通过规范化常见的包装负载并推断缺失的 kind 字段来停止 cron.add INVALID_REQUEST 垃圾。
  • 在 Gateway 网关 schema、cron 类型、CLI 文档和 UI 表单之间对齐 cron 提供商列表。
  • 使智能体 cron 工具 schema 明确,以便 LLM 生成正确的任务负载。
  • 修复 Control UI cron 状态任务计数显示。
  • 添加测试以覆盖规范化和工具行为。

非目标

  • 更改 cron 调度语义或任务执行行为。
  • 添加新的调度类型或 cron 表达式解析。
  • 除了必要的字段修复外,不大改 cron 的 UI/UX。

发现(当前差距)

  • Gateway 网关中的 CronPayloadSchema 排除了 signal + imessage,而 TS 类型包含它们。
  • Control UI CronStatus 期望 jobCount,但 Gateway 网关返回 jobs。
  • 智能体 cron 工具 schema 允许任意 job 对象,导致格式错误的输入。
  • Gateway 网关严格验证 cron.add 而不进行规范化,因此包装的负载会失败。

变更内容

  • cron.add 和 cron.update 现在规范化常见的包装形式并推断缺失的 kind 字段。
  • 智能体 cron 工具 schema 与 Gateway 网关 schema 匹配,减少无效负载。
  • 提供商枚举在 Gateway 网关、CLI、UI 和 macOS 选择器之间对齐。
  • Control UI 使用 Gateway 网关的 jobs 计数字段显示状态。

当前行为

  • **规范化:**包装的 data/job 负载被解包;schedule.kind 和 payload.kind 在安全时被推断。
  • **默认值:**当缺失时,为 wakeMode 和 sessionTarget 应用安全默认值。
  • **提供商:**Discord/Slack/Signal/iMessage 现在在 CLI/UI 中一致显示。

参见 Cron 任务 了解规范化的形式和示例。

验证

  • 观察 Gateway 网关日志中 cron.add INVALID_REQUEST 错误是否减少。
  • 确认 Control UI cron 状态在刷新后显示任务计数。

可选后续工作

  • 手动 Control UI 冒烟测试:为每个提供商添加一个 cron 任务 + 验证状态任务计数。

开放问题

  • cron.add 是否应该接受来自客户端的显式 state(当前被 schema 禁止)?
  • 我们是否应该允许 webchat 作为显式投递提供商(当前在投递解析中被过滤)?