docs(lark-mail): document per-user allow/block sender lists#821
Conversation
Surface the new user-level allow/block sender resources alongside the upcoming Meta API + lark-cli registry entries (see lark/idl and lark/larksuite-cli-registry branches harness/01kr69s0jf1vekkkdj7ktepezs). - Update SKILL frontmatter description with 信任发件人/屏蔽发件人/allow sender/block sender keywords so the skill router picks up natural- language requests. - Add a core concept entry that calls out the per-user scope, the 2000 total / 100 per call quota, the black/white mutual exclusion, and the reason_code enum surfaced via failed_items. - Add user_mailbox.allow_senders / user_mailbox.blocked_senders sections to the API Resources list, mirroring the parent path used by user_mailbox.message.*. - Extend the permissions table with the six new methods reusing the mail:user_mailbox.message:readonly / :modify scopes. The fully generated SKILL.md + meta_data.json that codegen produces from lark/larksuite-cli-registry's make all project=mail will land in a follow-up commit once IDL + Meta review are merged.
📝 WalkthroughWalkthroughDocumentation for a new per-user sender allow/block list feature added to the Lark Mail skill, including feature overview, core concept definitions covering matching rules and mutual exclusivity, API resource specifications for create/list/delete operations with batch constraints, and corresponding permission scope mappings. ChangesAllow/Block Sender Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #821 +/- ##
==========================================
+ Coverage 65.67% 65.91% +0.23%
==========================================
Files 513 513
Lines 47655 48145 +490
==========================================
+ Hits 31297 31734 +437
- Misses 13652 13676 +24
- Partials 2706 2735 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@279ddfc67dcd3c3b3b90d0ebc4f0108a6df3d1fa🧩 Skill updatenpx skills add infeng/cli#harness/01kr69s0jf1vekkkdj7ktepezs -y -g |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
skills/lark-mail/SKILL.md (1)
25-25: 💤 Low valueExcellent documentation of the allow/block sender feature.
This core concept entry provides comprehensive coverage of the feature's behavior:
- Clear explanation of mutual exclusivity between allow and block lists
- Explicit quota constraints (2000 total entries, 100 per batch)
- Well-defined error handling with stable
reason_codeenum values- Important distinction from tenant-level resources noted
The documentation follows the established pattern from other core concept entries and provides all necessary information for users and developers to understand the feature's constraints and behavior.
Optional: Consider restructuring for improved readability
If desired, the dense paragraph could be broken into sub-bullets to improve scannability:
- **黑白名单(Allow / Block Sender)**:用户级「信任发件人 / 屏蔽发件人」配置,作用于该邮箱的收信链路。 - **资源管理**:通过 `user_mailbox.allow_senders` / `user_mailbox.blocked_senders` 资源管理,支持 `batch_create` / `list` / `batch_delete` - **条目类型**:支持精确邮箱地址(`sender_type=1`)或整个域(`sender_type=2`) - **互斥规则**:同一发件人不能同时在两个名单里,加入一侧会自动从对侧移除 - **配额限制**:单用户黑白合计上限 2000,单次写入最多 100 条 - **错误处理**:超限项以稳定的 `reason_code`(`INVALID` / `SELF_ADDRESS` / `SELF_DOMAIN` / `CONFLICT_BLOCK` / `QUOTA_EXCEEDED`)返回在 `failed_items` 里 - **作用范围**:仅影响指定 `user_mailbox_id` 的邮箱,与租户级资源数据分离However, keeping it as a single paragraph is also acceptable for maintaining consistency with other core concept entries.
🤖 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 25, The paragraph is clear but dense; split it into a short header plus sub-bullets to improve scannability by breaking out the key parts: "资源管理" referencing user_mailbox.allow_senders / user_mailbox.blocked_senders and supported operations (batch_create/list/batch_delete); "条目类型" referencing sender_type (1 = address, 2 = domain); "互斥规则" explaining automatic removal from the opposite list and referencing CONFLICT_BLOCK; "配额限制" calling out the 2000 total and 100 per-batch limits and QUOTA_EXCEEDED; and "错误处理/作用范围" referencing failed_items, reason_code enum (INVALID / SELF_ADDRESS / SELF_DOMAIN / CONFLICT_BLOCK / QUOTA_EXCEEDED), user_mailbox_id, and separation from tenant-level allowed_sender/blocked_sender — keep the same content/terminology but convert to sub-bullets for readability.
🤖 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.
Nitpick comments:
In `@skills/lark-mail/SKILL.md`:
- Line 25: The paragraph is clear but dense; split it into a short header plus
sub-bullets to improve scannability by breaking out the key parts: "资源管理"
referencing user_mailbox.allow_senders / user_mailbox.blocked_senders and
supported operations (batch_create/list/batch_delete); "条目类型" referencing
sender_type (1 = address, 2 = domain); "互斥规则" explaining automatic removal from
the opposite list and referencing CONFLICT_BLOCK; "配额限制" calling out the 2000
total and 100 per-batch limits and QUOTA_EXCEEDED; and "错误处理/作用范围" referencing
failed_items, reason_code enum (INVALID / SELF_ADDRESS / SELF_DOMAIN /
CONFLICT_BLOCK / QUOTA_EXCEEDED), user_mailbox_id, and separation from
tenant-level allowed_sender/blocked_sender — keep the same content/terminology
but convert to sub-bullets for readability.
Summary
This PR is docs-only so the skill router picks up natural-language requests (
信任发件人 / 屏蔽发件人 / allow sender / block sender) ahead of the auto-generated artifacts landing.Changes
skills/lark-mail/SKILL.mddescriptionextended with the new keywordsreason_codeenum (INVALID/SELF_ADDRESS/SELF_DOMAIN/CONFLICT_BLOCK/QUOTA_EXCEEDED)user_mailbox.allow_senders/user_mailbox.blocked_senders— each withbatch_create/list/batch_deletemail:user_mailbox.message:readonly/modifyscopesNo new scopes were introduced; both lists reuse the existing
user_mailbox.message:*scope family for parity with how the Lark email client manages these lists today.Test plan
skills/lark-mail/SKILL.mdrenders cleanly in Claude Code's skill picker (visible new keywords trigger correctly)skills/lark-mail/SKILL.mdSummary by CodeRabbit