mirror of
https://github.com/larksuite/cli.git
synced 2026-09-14 18:42:53 +08:00
feat/sidecar-remote-https
6 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d92f0a2204 |
feat(mail): add read receipt support (--request-receipt, +send-receipt, +decline-receipt)
End-to-end RFC 3798 Message Disposition Notification support, covering
both sides of the receipt flow — requesting a receipt when composing, and
responding to one (send or decline) when reading.
Request side (compose)
- New --request-receipt flag on +send / +reply / +reply-all / +forward /
+draft-create / +draft-edit. When set, the outgoing EML carries a
Disposition-Notification-To header (RFC 3798) addressed to the resolved
sender. Recipient mail clients may prompt the user, auto-send a receipt,
or silently ignore — delivery is not guaranteed.
- requireSenderForRequestReceipt gates the flag against a controlled
sender address resolved BEFORE the orig.headTo fallback in +reply /
+reply-all / +forward, so the DNT cannot silently land on someone else
in CC / shared-mailbox flows.
Response side
- +send-receipt: build a system-templated reply for messages carrying the
READ_RECEIPT_REQUEST label (-607). Subject / recipient / sent / read
time layout matches the Lark client; body is non-customizable — receipt
bodies are system templates by industry convention; free-form notes
belong in +reply. Risk:"high-risk-write" + --yes required.
- +decline-receipt: clear READ_RECEIPT_REQUEST without sending anything
(mirrors the client's "不发送" / "Don't send" button). Idempotent on
re-run; Risk:"write" — no --yes needed.
Read-path hints
- +message / +messages / +thread emit a stderr hint when surfacing a
mail carrying READ_RECEIPT_REQUEST, exposing BOTH response paths
(+send-receipt --yes / +decline-receipt) so agents present a real
choice to the user instead of silently auto-sending.
Guard rails
- +send / +reply / +reply-all / +forward stay draft-by-default and
require --confirm-send to send, gated by a dynamic scope check for
mail:user_mailbox.message:send (absent from the default scope set so
draft-only flows don't need the sensitive permission).
- All header-bound user input (sender / display name / recipient /
subject) goes through CR/LF rejection plus Bidi / zero-width / line-
separator guards, mirroring emlbuilder.validateHeaderValue, to block
header injection and visual spoofing.
- Hint output strips terminal control characters (CR, LF) from any
untrusted field embedded into the user-visible suggestion.
Backend coupling
- Outgoing receipt EML carries the private header
X-Lark-Read-Receipt-Mail: 1. The data-access backend parses it into
BodyExtra.IsReadReceiptMail; DraftSend then applies READ_RECEIPT_SENT
(-608) and clears READ_RECEIPT_REQUEST (-607) from the original
message, closing the client-side banner.
- en receipts require backend TCC SubjectPrefixListForAdvancedSearch to
include "Read Receipt:" for conversation-view aggregation; zh prefix
("已读回执:") is already configured.
Docs: new reference pages for +send-receipt / +decline-receipt;
--request-receipt noted on each compose-side reference; SKILL.md
workflow (section 9) describes the full privacy-safe decision tree on
both sides.
Tests cover emlbuilder DispositionNotificationTo / IsReadReceiptMail
helpers, receiptMetaLabels (zh / en), buildReceiptSubject, text and HTML
body generators (with HTML escaping and Bidi guards), header-injection
defenses, sender-resolution gating (CC-only / shared-mailbox regression),
hint emission paths, and the full +send-receipt / +decline-receipt happy
+ idempotent paths via httpmock.
|
||
|
|
cb301a3d1a |
feat(mail): add draft preview URL to draft operations (#438)
* feat(mail): add draft preview URL to draft operations - Add draftPreviewURL helpers for send-preview link generation - Integrate preview_url output in +draft-create, +draft-edit, +reply, +forward, +reply-all shortcuts - Add unit tests (7 test cases, all passing) Change-Id: Ie3cbb8f96b308aae225bc69f4c3fc2226af0c230 * fix(mail): derive draft preview url from meta service Change-Id: Ibd10767bf4e4de7f453fff72487fe25090e14605 * fix: streamline mail draft and send outputs Change-Id: I75a969af29fa862bdf94947a3aa775d6eebee812 * fix(mail): keep draft reference on create and update Change-Id: Ie5787cf255ec2347c49f0a271209c1a2e4008fe3 * docs: refine mail draft link guidance for skills Change-Id: Ieaa5afef310edd5253f07eef06678b7a5db38fc0 * fix(mail): return draft reference for save flows Change-Id: Ied6031a05bdefecdcf60b09f66c5d3947d849f83 * refactor(mail): unify draft save output handling Change-Id: I400b8f9df97d614b33da3cbdde410ef615444741 * fix(mail): surface automation disable reason Change-Id: I23293fe6c2febf248c58ea14c87c05dde49872a1 * feat: flatten mail automation send disable output Change-Id: I747bf54bc3251387b05d94f87fe61da958d78104 * fix(mail): address review feedback for draft docs and tests Change-Id: I690df5612f36681c1690645d375c5c5e3ef9ca60 * test(mail): reuse upstream send-scope test factory Change-Id: I7f73956696c5405d8eb81fcd2128f0e9898ea539 * refactor(mail): merge recall fields into send output helper Change-Id: I5af612d70b05a3c0d8abbc9561fe76bb83b5b359 * fix(mail): omit raw recall status from send output Change-Id: I2918226a0eb68a45f6cc4ea997e1c941d8c16d52 * style(mail): format send output tests Change-Id: I8e0ec37aac48bcda6b5ad948f397d184a2a4d81d * test(mail): cover draft reference output flows Change-Id: Idd8abdb84613727a24e3fccb7b329e69566bc890 |
||
|
|
be79485fe3 |
feat: mail support scheduled send (#534)
feat: mail support scheduled send (#534) |
||
|
|
03ba542a60 |
Revert "feat: mail support scheduled send (#449)" (#492)
This reverts commit
|
||
|
|
44e7b5b477 |
feat: mail support scheduled send (#449)
feat: mail support scheduled send |
||
|
|
83dfb068ad |
feat: open-source lark-cli — the official CLI for Lark/Feishu
Change-Id: I113d9cdb5403cec347efe4595415e34a18b7decf |