feishu-cli-messaging

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

飞书即时消息

Feishu Instant Messaging

加载工作流后,将其中
references/
scripts/
templates/
examples/
相对路径按该
workflow.md
所在目录解析;执行脚本时使用解析后的实际路径,不要依赖当前 shell 目录。
After loading the workflow, resolve the relative paths of
references/
,
scripts/
,
templates/
, and
examples/
based on the directory where this
workflow.md
is located; use the resolved actual path when executing scripts, and do not rely on the current shell directory.

路由

Routing

意图读取文件
发送、回复、转发、加急、flag、资源下载
references/workflows/msg/workflow.md
历史消息、详情、Reaction、Pin、撤回、群和成员
references/workflows/chat/workflow.md
设计和生成 V2 interactive 卡片 JSON
references/workflows/card/workflow.md
订阅和消费实时事件
references/workflows/event/workflow.md
发送交互卡片时先读取 card 构造 JSON,再读取 msg 发送。搜索历史消息关键词时读取
../feishu-cli-platform/references/workflows/search/workflow.md
IntentFile to Read
Send, reply, forward, urgent messaging, flag, resource download
references/workflows/msg/workflow.md
Historical messages, details, Reaction, Pin, recall, groups and members
references/workflows/chat/workflow.md
Design and generate V2 interactive card JSON
references/workflows/card/workflow.md
Subscribe to and consume real-time events
references/workflows/event/workflow.md
When sending interactive cards, first read the card construction JSON, then read the msg to send. When searching keywords in historical messages, read
../feishu-cli-platform/references/workflows/search/workflow.md
.

执行规则

Execution Rules

  1. 发送前确认接收者类型和 ID;不要把 email、open_id、chat_id 混用。
  2. 群发、加急和删除消息有外部影响,先展示目标和数量。
  3. msg send
    msg reply
    共用内容快捷参数;本地图片、文件、Opus 音频、MP4 视频会先上传, 任一文件缺失、格式非法或上传失败都会阻止提交消息。
    --upload-images
    同时适用于两条命令。
  4. 进入既有话题必须使用
    msg reply <om_xxx>
    omt_xxx
    仅用于话题查询/转发,不能作为
    msg send
    的接收者。普通消息群开启新话题时才加
    --reply-in-thread
  5. 发送与回复重试都使用同一
    --idempotency-key
    ;媒体上传可能重做,但服务端幂等键防止 可见消息重复。只有命令返回非空
    message_id
    才判定成功。
  6. 外部群 232033 的排错读取
    references/workflows/chat/references/external-chat.md
  7. 卡片草稿与发送候选分开校验;发送前必须运行 card workflow 的
    lint_card.py --strict
    ,不得发送含占位符、示例 ID、假链接或未接通回调按钮的卡片。
  8. 用户点名卡片风格时使用 card workflow 内置的 19 个预设;使用本地头图或图标素材时, lint 与实际的
    msg send
    /
    msg reply
    都传
    --upload-images
    ,不要固化跨租户
    img_key
  1. Confirm the recipient type and ID before sending; do not mix up email, open_id, and chat_id.
  2. Group messaging, urgent messaging, and message deletion have external impacts; display the targets and quantities first.
  3. msg send
    and
    msg reply
    share content shortcut parameters; local images, files, Opus audio, and MP4 videos will be uploaded first. Any missing file, illegal format, or upload failure will prevent message submission.
    --upload-images
    applies to both commands.
  4. To enter an existing thread, must use
    msg reply <om_xxx>
    ;
    omt_xxx
    is only used for thread query/forwarding and cannot be used as the recipient of
    msg send
    . Add
    --reply-in-thread
    only when starting a new thread in a regular message group.
  5. Use the same
    --idempotency-key
    for retries of sending and replying; media uploads may be redone, but the server-side idempotency key prevents duplicate visible messages. Success is only determined when the command returns a non-empty
    message_id
    .
  6. For troubleshooting external group 232033, read
    references/workflows/chat/references/external-chat.md
    .
  7. Validate card drafts and sending candidates separately; before sending, must run
    lint_card.py --strict
    from the card workflow, and do not send cards containing placeholders, sample IDs, fake links, or unconnected callback buttons.
  8. Use the 19 built-in presets in the card workflow when the user specifies a card style; when using local header images or icon materials, pass
    --upload-images
    for both lint and actual
    msg send
    /
    msg reply
    , and do not hardcode cross-tenant
    img_key
    .