From 3825f3dcdb0a5c0ddccc7583e1150fc3b9ca8b37 Mon Sep 17 00:00:00 2001 From: Yanxin Lu Date: Tue, 31 Mar 2026 13:20:10 -0700 Subject: [PATCH] move himalaya wrapper from skills/himalaya/ to scripts/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The himalaya skill is a third-party ClawhHub package — putting custom scripts inside it risks conflicts on updates. The wrapper is local customization, so it belongs in scripts/ alongside email_processor. --- MEMORY.md | 17 ++++++++++++----- TOOLS.md | 4 ++-- .../himalaya/scripts => scripts}/himalaya.sh | 2 +- skills/calendar/scripts/cal_tool.py | 2 +- skills/himalaya/SKILL.md | 2 +- 5 files changed, 17 insertions(+), 10 deletions(-) rename {skills/himalaya/scripts => scripts}/himalaya.sh (98%) diff --git a/MEMORY.md b/MEMORY.md index 6511550..647d7f8 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -4,9 +4,14 @@ _这份文件记录持续性项目和重要状态,跨会话保留。_ ## 📝 重要规则 -### 邮件发送规则(v2) -- **youlu@luyanxin.com → mail@luyx.org**: 直接发送,无需确认(用户 SimpleLogin 别名) -- 其他所有对外邮件: 仍需确认 +### 邮件发送规则(v3) +- **绝不向不在通讯录中的地址发送任何邮件**(日历邀请和普通邮件均适用) +- 发送邮件/邀请时使用通讯录名称(如 `小橘子:work`),不要手写邮箱地址 +- 通讯录管理: `contacts.sh list/add/delete/resolve`(`skills/contacts/`) +- 添加联系人和发送邮件是**独立操作**,不要在同一次请求中先 add 再 send +- 普通邮件使用 himalaya 包装器(`scripts/himalaya.sh`),自动校验收件人 +- **youlu@luyanxin.com → mail@luyx.org**: 直接发送,无需确认(用户 SimpleLogin 别名,需在通讯录中) +- 其他所有对外邮件: 确认后再发送 ### 代码审查规则 写/改/部署代码前,必须先确认: @@ -73,7 +78,7 @@ _这份文件记录持续性项目和重要状态,跨会话保留。_ ### 3. 日历邀请 + CalDAV 同步 **状态**: 运行中 **创建**: 2026-03-18 -**更新**: 2026-03-25(添加 RRULE 支持 + 事件管理 + 安全规则) +**更新**: 2026-03-31(收件人校验移至 contacts 技能 + himalaya 包装器) **配置**: - 技能: `~/.openclaw/workspace/skills/calendar/` - 日历数据: `~/.openclaw/workspace/calendars/` (home/work/tasks/journals) @@ -103,9 +108,11 @@ _这份文件记录持续性项目和重要状态,跨会话保留。_ | 项目 | 位置 | |------|------| | 邮件处理器 | `~/.openclaw/workspace/scripts/email_processor/` | +| 通讯录 | `~/.openclaw/workspace/skills/contacts/`(数据: `contacts/default/`)| | 日历/待办 | `~/.openclaw/workspace/skills/calendar/` | | 日历数据 | `~/.openclaw/workspace/calendars/` (home=事件, tasks=待办) | +| himalaya 包装器 | `~/.openclaw/workspace/scripts/himalaya.sh` | --- -_最后更新: 2026-03-25_ +_最后更新: 2026-03-31_ diff --git a/TOOLS.md b/TOOLS.md index 335b1c4..fd9df7f 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -28,14 +28,14 @@ Skills define _how_ tools work. This file is for _your_ specifics — the stuff **本地配置:** - 二进制:`~/.local/bin/himalaya` -- **安全包装器**:`~/.openclaw/workspace/skills/himalaya/scripts/himalaya.sh`(验证收件人) +- **安全包装器**:`~/.openclaw/workspace/scripts/himalaya.sh`(验证收件人) - 配置:`~/.config/himalaya/config.toml` - 文档:`~/.openclaw/workspace/skills/himalaya/SKILL.md` **重要:发送邮件时必须使用包装器,不要直接调用 himalaya** ```bash -HIMALAYA=~/.openclaw/workspace/skills/himalaya/scripts/himalaya.sh +HIMALAYA=~/.openclaw/workspace/scripts/himalaya.sh $HIMALAYA envelope list --page-size 20 # 列出邮件(直接透传) $HIMALAYA message read # 读取邮件(直接透传) diff --git a/skills/himalaya/scripts/himalaya.sh b/scripts/himalaya.sh similarity index 98% rename from skills/himalaya/scripts/himalaya.sh rename to scripts/himalaya.sh index a8f320c..746b43d 100755 --- a/skills/himalaya/scripts/himalaya.sh +++ b/scripts/himalaya.sh @@ -46,7 +46,7 @@ if [[ -z "$HIMALAYA" ]]; then exit 1 fi -CONTACTS="$(cd "$(dirname "$0")/../../contacts/scripts" && pwd)/contacts.py" +CONTACTS="$(cd "$(dirname "$0")/../skills/contacts/scripts" && pwd)/contacts.py" # --------------------------------------------------------------------------- # Helpers diff --git a/skills/calendar/scripts/cal_tool.py b/skills/calendar/scripts/cal_tool.py index 396eeed..6503a80 100644 --- a/skills/calendar/scripts/cal_tool.py +++ b/skills/calendar/scripts/cal_tool.py @@ -65,7 +65,7 @@ def _sync_calendar(): print("Warning: CalDAV sync failed (will retry on next heartbeat)") -HIMALAYA_WRAPPER = Path(__file__).resolve().parent.parent.parent / "himalaya" / "scripts" / "himalaya.sh" +HIMALAYA_WRAPPER = Path(__file__).resolve().parent.parent.parent.parent / "scripts" / "himalaya.sh" def _send_email(email_str, account=None): diff --git a/skills/himalaya/SKILL.md b/skills/himalaya/SKILL.md index 7faa8e4..54308a2 100644 --- a/skills/himalaya/SKILL.md +++ b/skills/himalaya/SKILL.md @@ -22,7 +22,7 @@ Use the wrapper script (`scripts/himalaya.sh`) instead of calling `himalaya` dir - Everything else: `envelope list`, `message read`, `message delete`, `folder`, `flag`, `attachment`, `account`, etc. ```bash -HIMALAYA=~/.openclaw/workspace/skills/himalaya/scripts/himalaya.sh +HIMALAYA=~/.openclaw/workspace/scripts/himalaya.sh # All commands work the same as `himalaya` $HIMALAYA envelope list