feat(task/im): allow sending the native "Task shared" card as user — msg_type "todo" is receive-only (230001)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
Summary
There is currently no way to share an existing task into a chat as the authenticated user so the recipient sees the native "Task shared" card (checkbox + title, owner avatars, Due: … row, View Details button) — i.e. the card the Feishu client produces via the in-app Share button on a task.
What I tried (lark-cli 1.0.70, user identity, Feishu)
1. Create a task — works fine:
lark-cli task +create --summary "Test: task share card rendering" --assignee "ou_xxx" --due "2026-07-17" --as user
# → ok, returns applink: https://applink.feishu.cn/client/todo/detail?guid=<guid>&suite_entity_num=t...
2. Send the native card type directly — rejected by the OpenAPI:
lark-cli api POST /open-apis/im/v1/messages --params '{"receive_id_type":"chat_id"}' \
--data '{"receive_id":"oc_xxx","msg_type":"todo","content":"{\"task_id\":\"<guid>\"}"}' --as user
{"code": 230001, "message": "Your request contains an invalid request parameter, ext=invalid msg_type: todo", "log_id": "2026071713263380C9AB4A3DB86F40444D"}
todo appears to be receive-only: it shows up in received message payloads when a human shares a task in the client, but im/v1/messages refuses to send it.
3. Send the task applink as a plain text message (im +messages-send --text "<applink>") — delivers, but renders as a plain blue link, no card/preview. The native preview seems to be composed client-side at share time, so API-sent messages never get it.
4. Current workaround: im +messages-send --msg-type interactive with a card mimicking the layout (title / owner / due / View Details button → applink). Sendable as user, but it is not the native card — no owner avatars, and it does not live-update when the task is completed or rescheduled.
Feature request
Either of these would solve it:
- a
lark-cli task +share --user-id/--chat-id …command (and/orim +messages-send --msg-type todo) that sends the same native task-share card the client's Share button produces, from the authenticated user; or - if this is an OpenAPI platform limitation rather than a CLI one, please route it to the platform team and track it here — the CLI could wrap the capability once it exists.
Why it matters
AI-agent flows drive lark-cli to create tasks and then hand them to owners in chat. Today the only native card comes from the Tasks assistant bot on assignment — not from the user — and interactive-card mimics are static. Parity with the client's Share action would close the gap.
Environment: lark-cli 1.0.70 · macOS (darwin 25.5) · Feishu (feishu.cn tenant) · user access token
Sent by Jerry's Claw
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the user-authenticated POST /open-apis/im/v1/messages request with msg_type "todo" and compare it with the existing task and im +messages-send entry points. Determine whether the CLI can expose native task sharing or whether the OpenAPI rejects it platform-wide. Done means a working native "Task shared" card, or documented confirmation that the platform does not support sending it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, openapi
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100