docs: refresh mail skill API resources#1922
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughExpanded ChangesMail documentation
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@cc2035874dc899d15dd3d60fa550359d52b7b858🧩 Skill updatenpx skills add infeng/cli#feat/323c64b -y -g |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
skills/lark-mail/SKILL.md (1)
19-19: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winCarve out
+draft-sendfrom the universal--confirm-sendrule.This wording implies every sending command defaults to draft mode and uses
--confirm-send, but+draft-sendsends existing drafts and has its own explicit-confirmation contract. Clarify the exception to prevent callers from applying the wrong workflow or sending without the required confirmation.Proposed clarification
-- **草稿(Draft)**:未发送的邮件。所有发送类命令默认保存为草稿,加 `--confirm-send` 才实际发送。 +- **草稿(Draft)**:未发送的邮件。Compose 类发送命令默认保存为草稿,加 `--confirm-send` 才实际发送;`+draft-send` / `drafts.send` 是发送已有草稿的例外,同样必须先取得用户明确确认。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@skills/lark-mail/SKILL.md` at line 19, Update the “草稿(Draft)” documentation to explicitly exclude +draft-send from the universal --confirm-send draft workflow. State that +draft-send sends existing drafts under its own explicit-confirmation requirement, while preserving the existing default behavior for other sending commands.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/lark-mail/references/lark-mail-draft-send.md`:
- Line 63: Update the partial-failure documentation around the retry guidance
and JSON output description to define the exact envelope containing ok, sent,
failed, counts, and account-level aborted/abort_error fields. Explicitly
distinguish successfully sent, failed, and unattempted draft IDs—especially
those skipped by --stop-on-error—and instruct callers to retry only failed
drafts after confirming sent drafts were delivered; when aborted is true,
resolve the account-level failure before retrying.
In `@skills/lark-mail/SKILL.md`:
- Around line 299-309: Update the calendar invitation example near the mail send
command so it matches the “save draft, then send after confirmation” wording:
remove the immediate-send behavior or show distinct draft and confirmed-send
commands, and replace the past 2026-05-10 event date with a clearly future
placeholder/date.
- Around line 152-167: Update the candidate-confirmation requirement in the
search-result handling instructions so it applies only when one or more matches
are found. Preserve the existing no-match behavior: inform the user no results
were found and suggest changing the keyword or providing an email address
directly.
---
Outside diff comments:
In `@skills/lark-mail/SKILL.md`:
- Line 19: Update the “草稿(Draft)” documentation to explicitly exclude
+draft-send from the universal --confirm-send draft workflow. State that
+draft-send sends existing drafts under its own explicit-confirmation
requirement, while preserving the existing default behavior for other sending
commands.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8b9957dd-75a0-4b8a-86f1-842f0c5718f3
📒 Files selected for processing (2)
skills/lark-mail/SKILL.mdskills/lark-mail/references/lark-mail-draft-send.md
Change-Type: ci-fix
| | `user_mailboxes.search` | `mail:user_mailbox.message:readonly` | | ||
| | `user_mailbox.allow_sender.batch_create` | `mail:user_mailbox.message:modify` | | ||
| | `user_mailbox.allow_sender.batch_remove` | `mail:user_mailbox.message:modify` | | ||
| | `user_mailbox.allow_sender.list` | `mail:user_mailbox.message:modify` | |
There was a problem hiding this comment.
🤖 AI Review | [P2 正确性] list 方法权限表写成了 modify
larksuite-cli-registry 在 registry-conf/registry-config.yaml:529 和 :535 给 user_mailbox.allow_sender.list / blocked_sender.list 配的是 mail:user_mailbox.message:readonly,但这里的 skill 权限表写成了 modify。Agent 按文档申请权限时会把只读查询误导成写权限,导致最小授权和用户预期都不一致。
修复建议: 将这两行 list scope 改为 mail:user_mailbox.message:readonly,保留 batch_create / batch_remove 为 modify。
如有疑问或认为判断不准确,欢迎直接回复讨论。
|
🤖 AI Review | CR 汇总 | 有风险(1 个 P2) 本次新增 1 个文档正确性问题:用户级黑白名单两个 list 方法的权限表与 registry 不一致,建议修复后合入。 |
Updates the mail skill documentation with expanded mailbox workflows and refreshed API command guidance.
Summary by CodeRabbit
+draft-senddocumentation (dry runs, stop-on-error vs abort behavior, partial-failure envelopes, and retry guidance).