Commit Graph

11 Commits

Author SHA1 Message Date
74184056c4 fix(mail-operations): 按现行邮件服务路由修正技能文档(1.0.6) (#194)
## 背景 / Background

发票整理 Agent 在隔离开发实例里真机整理 QQ 邮箱时,按内置技能 `mail-operations` 的写法调用 IMAP
附件下载,拿到 400 `Missing required parameters`:技能写的请求体是 `{email, uid, folder,
partId}`,而 `POST /imap/attachment` 从 2026-03 创建起就只认 `{email, messageId,
attachmentId, folder?}`。顺着这一处,对照 desirecore origin/dev(`c1e2c5ac0`)的
`lib/mail-service/` 与 `MailOperations` 工具把整份技能逐条核对了一遍。

While a real-mailbox run of the invoice agent was downloading QQ Mail
attachments, the builtin `mail-operations` skill's IMAP attachment body
(`{email, uid, folder, partId}`) returned 400; the route has always
taken `{email, messageId, attachmentId, folder?}`. This PR re-audits the
whole skill against the current mail service routes.

## 改动 / Changes

共修正 27 处不一致:会直接导致调用失败 9 处、会误导能力判断 10 处、措辞 8 处。主要有:

- **调用入口**:改为 `MailOperations`(path 带 `/api`,capability
由工具注入);原文的固定端口、「无需认证」、`curl -k` 都不成立
- **附件**:body 字段更正;必须带 `save_to` 落盘(不带会被工具拒绝返回),回执给出路径、字节数、SHA-256
- **参数位置**:`messages/fetch`、`/sync`、IMAP 草稿发送的 `email`(以及 `/sync` 的
`provider`)放查询串;IMAP 草稿收件人是逗号分隔的 `to` / `cc`,更新草稿会换成新 uid
- **folder**:IMAP 单封操作要用 `GET /imap/folders` 返回的服务器路径,列表里的归一化值会 500
- **规则**:operator 是 `matches_regex`(未知 operator 恒为 false
且创建时不校验);`archive` / `move_to_folder` / `forward_to` / `star` 是空操作
- **搜索**:三个 provider 都支持,只查本地缓存、`q` 只匹配主题;Gmail 全文检索改用 `messages/fetch`
的 `query`
- **IMAP 仅收信账户**:`allowUnverifiedSmtp`、`smtp_verification_failed`、409
`smtp_unverified`、`verify-smtp`(失败也返回 200)
- **离线队列**:不会自动入队或处理,只改本地,`processed` 计数不代表执行
- 响应字段名(`toRecipients`、`bodyPreview` 等)、同步状态文件、`/imap/test` 返回形态等措辞修正
- 版本 1.0.6;新增 `market.required_client_version: 10.0.148` 与 sidecar
`compatibility.requiredClientVersion`——`MailOperations`(10.0.95)、`save_to`
与 Outlook/IMAP search(10.0.146)、`imap:<uid>` / fetch `offset` / folder
归一化(10.0.148)分版本上线,旧客户端按新文档操作会静默失败,门控让它们保留旧版

## 验证 / Verification

- 写补丁与审查由两个独立子代理完成:审查方对 9 处致命项全部、另外 13 处抽查逐条对照代码行,均成立;审查意见(最低客户端版本、IMAP
更新草稿换 uid、`/sync` 参数、Gmail 远程检索、`verify-smtp` 返回形态、离线队列计数、响应示例矛盾)已全部采纳
- 各项最低版本用 `git tag --contains` 对照发布 tag 复核
- `translate.py --check`:en-US human-locked 且 hash 新鲜(`source_hash` 按
`compute_source_hash` 重算)
- `validate-i18n`:0 error,123 warning(与 main 基线相同)
- `validate_catalog_metadata --require-complete`:0 error
- `git diff --check` 通过;新增行只有 `example.com` 占位地址,无真实邮箱、姓名、公司名或长数字编号

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-09-29 05:07:39 -04:00
8f7953948f fix: 补齐市场静态事实并保持旧客户端兼容 (#184)
## 中文

补齐已有 owner 与已锁定上游内容可证明的许可证、技能类型和收录版本。保留 Anthropic Source Available
和其他附加条件,不把所有内容统一标为 MIT,不提升 listing-only 的安装准入。

README 保留最新的双语结构及以 manifest 为准的数量口径,增加静态目录不存访问量、下载量、评分或 Stars 的边界。

发布兼容性:**本 PR 不包含**两支团队新增的本地化字段,也不包含微信支付 `latestVersion:
1.0`;旧客户端会拒绝这些新字段,另以待发布 PR 保留,等匹配客户端发布后再合并。

验证:47 项目录校验测试、19 项 i18n 测试、5 项合集生成测试通过;完整目录/i18n/翻译新鲜度检查通过,6
个固定来源合集的生成检查通过,2 个浮动来源按既有规则明确跳过。发现并修复了生成器在 Windows 使用反斜杠造成的误报:输出改为 POSIX
路径,比较规则不放宽、不重写合集数据。

## English

Fill only license, type and listed-release facts supported by existing
owners or pinned upstream content. Preserve custom license restrictions
and acquisition eligibility. Keep the current bilingual README and
manifest-derived inventory; do not author usage analytics.

This PR deliberately excludes localized team fields and the two-part
WeChat Pay version that older clients reject. Those changes remain
pending a compatible client release.

Validation passes: 47 catalog-validator tests, 19 i18n tests, five
collection-generator tests, complete catalog and translation checks, and
generated inventory checks for six pinned collections. Two mutable
sources remain explicitly skipped. Fix Windows-generated path separators
without weakening comparison or changing declared children.
2026-09-22 01:09:03 +08:00
1b002e5778 强化市场校验与索引元数据
合并市场索引、分类、i18n 校验、skill-creator 工具和已修改 skill 版本号更新。
2026-07-07 21:14:31 +08:00
xyx
3301913a9f feat(mail-operations): 补充邮箱服务 UI 入口说明 v1.0.4 (#30)
## Summary / 摘要

- Add "How to Access the Email Service" section to `SKILL.md` and
`SKILL.zh-CN.md`, guiding users to navigate via Resource Explorer →
Emails card
- 在中英文技能文件中新增「如何进入邮箱服务」章节,说明通过资源管理器→邮箱卡片进入邮箱管理界面

## Changes / 变更

- `skills/mail-operations/SKILL.md`: add "How to Access the Email
Service" section, version 1.0.3 → 1.0.4
- `skills/mail-operations/SKILL.zh-CN.md`: add「如何进入邮箱服务」章节
- `manifest.json`: version 1.2.5 → 1.2.6
2026-06-20 11:30:56 +08:00
xyx
5767c8f867 fix: 为 #16 路径替换涉及的技能补 per-skill version (#22)
## 背景 / Background

#16 (4f7037a) 将 16 个 SKILL.md 的 `~/.desirecore` 路径批量替换为
`${DESIRECORE_ROOT}`,但只升了 `manifest.json`,**未升任何 per-skill version**。

客户端按 SKILL.md frontmatter 的 per-skill `version` 做 semver 同步:version
不变即判定「无更新」而永久跳过,导致已升级用户的全局技能正文停留在替换前的旧内容(与线上不同步)。

#16 (4f7037a) bulk-replaced `~/.desirecore` with `${DESIRECORE_ROOT}` in
16 SKILL.md files but only bumped `manifest.json`, leaving every
per-skill `version` untouched. Clients sync by per-skill semver, so an
unchanged version is treated as "no update" and skipped forever —
upgraded users' global skills stay frozen on pre-replacement content.

## 改动 / Changes

- 对 #16 触及且至今仍未升号的 **14 个在册技能** 各 patch +1
- `manifest.json` 1.2.2 → 1.2.3(沿用 #16「内容改动同步升 manifest」的约定)
- 退役技能 `minimax-image-gen` / `minimax-tts`(不在 builtin-skills.json,不下发)跳过
- diff 为纯 version 行,未触动正文

Bumps the 14 in-manifest skills changed by #16 that were never
version-bumped; manifest 1.2.2 → 1.2.3; retired skills skipped.
Version-line-only diff.
2026-06-03 17:46:13 +08:00
xyx
eab5c824a5 fix: replace hardcoded ~/.desirecore paths with ${DESIRECORE_ROOT} variable (#16)
## Summary

- 将所有技能文件中的硬编码 `~/.desirecore/` 和 `$HOME/.desirecore/` 路径替换为
`${DESIRECORE_ROOT}/` 变量
- 递增 manifest.json version 至 1.2.1

## Why

dev 模式下 `DESIRECORE_HOME=~/.desirecore-dev`,硬编码路径导致技能读取错误的端口文件和目录。主仓库的
`variable-substitutor.ts` 会在运行时将 `${DESIRECORE_ROOT}` 替换为实际根目录。

## Test plan

- [ ] `npm run dev` 启动后触发任意技能,确认端口路径解析为
`~/.desirecore-dev/agent-service.port`
- [ ] prod 模式确认路径为 `~/.desirecore/agent-service.port`

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-29 15:36:19 +08:00
8bdda4afb1 feat: skills i18n 改造(schemaVersion 1.1,零向后兼容) (#1)
* feat: skills i18n 改造 — schemaVersion 1.1,零向后兼容

把 21 个 skills + 1 个 agent + manifest/categories 全量迁移到 schemaVersion 1.1
的 i18n 结构,配套 CI AI 翻译流水线(GitHub Models)与本地工具链。

## 关键变更

### 数据结构(破坏性,schemaVersion 1.0 → 1.1)
- SKILL.md: 顶层 name 改为 ASCII slug(== 目录名,符合 agentskills.io 规范);
  中文显示名/short_desc/description 全部迁入 metadata.i18n.<locale>
- agents/<id>/agent.json: shortDesc/fullDesc/tags/persona.{role,traits} 迁入
  i18n.<locale>;changelog[].changes 改为 { <locale>: string[] } 对象
- categories.json: 每个分类的 label/description 迁入 i18n.<locale>,顶层只剩
  color/icon
- manifest.json: 加 supportedLocales / defaultLocale;顶层 description 迁入
  i18n.<locale>

### Body 文件结构
- 根 SKILL.md = frontmatter + default_locale (en-US) body
- SKILL.<locale>.md = 各 locale 的 markdown body(首行 <!-- locale: xx --> 自校验)

### 工具链(scripts/i18n/)
- glossary.json: zh→en 术语表 + do_not_translate 白名单
- schema/skill-frontmatter.schema.json: i18n frontmatter JSON Schema
- validate-i18n.py: 8 条校验规则(name 合规 / locale 完整性 / hash 一致性等)
- translate.py: GitHub Models / Anthropic 双 backend,sha256 增量翻译
- migrate.py: 一次性迁移脚本(旧格式 → i18n 结构)

### CI(.github/workflows/)
- i18n-validate.yml: PR 触发跑 validate + translate --check
- i18n-translate.yml: PR 触发用 GitHub Models(默认 openai/gpt-5-mini)翻译缺失
  locale,自动追加 commit;可切到 ANTHROPIC_API_KEY 走 Claude

### 文档
- docs/I18N.md: 作者贡献指南(schema 说明 / 提交流程 / 常见问题)
- README.md: 加多语言段落

## 验证

- uv run scripts/i18n/validate-i18n.py: OK,49 文件 0 错误
- uv run scripts/i18n/translate.py --check: 0 stale locale
- 21 skills 标题数 zh-CN == en-US 严格对齐(最大 66=66)
- skills-ref 规范校验:全部通过(顶层 name ASCII slug + description 单字段)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(i18n): 修复 PR #1 review 反馈的 6 项问题

- schema: translated_by 正则放宽为 ^(human|ai:[A-Za-z0-9._:/-]+)$,接受
  'ai:github:openai/gpt-5-mini' 这类 backend:model 形式(CI 翻译输出格式)
- README + docs/I18N.md: 修正"CI 用 Claude API"误导描述,正确说明默认是
  GitHub Models(openai/gpt-5-mini)+ GITHUB_TOKEN,可选切到 Anthropic
- skills/minimax-tts/SKILL.md & SKILL.zh-CN.md: 删除多余的 ``` 闭合,避免
  Markdown 后续渲染错乱
- skills/docx/SKILL.md: 翻译时丢失的 • Unicode escape 示例已恢复,
  与 zh-CN 版本对齐

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:26:33 +08:00
3bed41d7a1 fix: 全局技能 disable-model-invocation 改为 true,按需加载减少 system prompt 体积
13 个技能从 false(自动注入 ~160KB)改为 true(按需加载),
大幅减少每次 LLM 请求的 system prompt token 占用。

涉及技能(版本号 patch +1):
- create-agent 2.4.1→2.4.2
- delete-agent 2.4.1→2.4.2
- discover-agent 2.5.1→2.5.2
- docx 1.0.1→1.0.2
- frontend-design 1.0.1→1.0.2
- mail-operations 1.0.1→1.0.2
- manage-skills 1.0.1→1.0.2
- pdf 1.0.1→1.0.2
- pptx 1.0.1→1.0.2
- s3-storage-operations 2.0.1→2.0.2
- skill-creator 1.0.0→1.0.1
- update-agent 3.0.1→3.0.2
- xlsx 1.0.1→1.0.2
2026-04-13 16:28:52 +08:00
aa6b1389fe fix: 为 9 个 skill 补全 L0/L1/L2 分层结构,版本号 +1
按照 desirecore-format.md 规范,为以下 skill 添加标准分层结构:
- docx (1.0.0→1.0.1), pdf (1.0.0→1.0.1), pptx (1.0.0→1.0.1), xlsx (1.0.0→1.0.1)
- frontend-design (1.0.0→1.0.1), mail-operations (1.0.0→1.0.1)
- environment-setup (1.1.0→1.1.1), web-access (1.1.0→1.1.1)
- manage-teams (1.2.0→1.2.1)

每个文件增加 L0(一句话摘要)、L1(概述与使用场景)、L2(详细规范)三层,
原有技术内容保持不变,metadata.updated_at 更新为 2026-04-13。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:33:56 +08:00
9cde6c0c7d fix: 补全邮箱操作技能缺失的 API(附件下载、草稿管理、Gmail 标签) 2026-04-10 19:26:48 +08:00
bfb21b3d11 feat: 新增邮箱操作全局内建技能 (mail-operations)
- 支持 Gmail / Outlook / IMAP (QQ、163 等) 全部邮件操作
- 包含账户管理、邮件收发、搜索、标签/分类、草稿、自动规则、附件下载
- 支持 auto_reply 和 agent_handle 两种自动化规则动作
- 从原始 1357 行文档优化为 342 行 SKILL.md,表格化 API 参考
- risk_level: medium(涉及发送邮件等写操作)
- 注册到 builtin-skills.json 清单
2026-04-10 19:15:56 +08:00