[Feature] event consume: support im.chat.access_event.bot_p2p_chat_entered_v1
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
What
Please add im.chat.access_event.bot_p2p_chat_entered_v1 (user enters bot P2P chat) to the EventKey whitelist of lark-cli event consume.
Currently (v1.0.85):
$ lark-cli event consume im.chat.access_event.bot_p2p_chat_entered_v1 --as bot
{
"ok": false,
"error": {
"type": "validation",
"subtype": "invalid_argument",
"message": "unknown EventKey: im.chat.access_event.bot_p2p_chat_entered_v1",
"hint": "Run 'lark-cli event list' to see available keys."
}
}
The platform side is fully ready — the scope (im:chat.access_event.bot_p2p_chat:read) and the event subscription can both be configured in the developer console, but the event never reaches event consume because it is not in the CLI's whitelist. There is no bypass flag.
Docs: https://open.feishu.cn/document/group/chat-member/event/bot_p2p_chat_entered
Why
This event fires the moment a user opens the bot's P2P chat window, which enables a very natural "greet-on-enter" UX for chat-based agents: refresh the latest task status card the instant the user comes back, without the user having to send a message first. For long-running AI agent bots this is the single best moment to re-sync state.
Context
We build an IM gateway for local AI coding agents (all Feishu calls go through lark-cli, zero SDK dependencies). Everything else we needed — im.message.receive_v1, card.action.trigger, im.message.reaction.created_v1 — is already consumable today. This is the only gap. Thanks!
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
Start at the lark-cli event consume command and its EventKey whitelist, comparing the existing event keys named in the issue. Add im.chat.access_event.bot_p2p_chat_entered_v1 so event list shows it and event consume accepts it without the unknown EventKey validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100