Skip to content

opencode 中运行lark-event技能, 监听一个条消息, 然后自动回复 #1131

@HWliao

Description

@HWliao

Waits for one private message in .

$ lark-cli event consume im.message.receive_v1 --as bot --max-events 1 --timeout 10m --jq 'select(.chat_type=="p2p" and .message_type=="text") | {message_id, chat_id, sender_id, create_time, content}'
[event] consuming as cli_aa9cc8f851b95cb2 (cli_aa9cc8f851b95cb2)
[event] stdin closed — shutting down. consume treats stdin EOF as exit signal (wired for AI subprocess callers). To keep running: pass --max-events/--timeout for bounded run, or keep stdin open (e.g. < /dev/tty interactive, < <(tail -f /dev/null) script), or stop via SIGTERM instead of closing stdin.
[event] local bus not found; checking remote connections...
[event] remote connection check failed: connection check: API call failed: Get "https://open.feishu.cn/open-apis/event/v1/connection": context canceled (proceeding to start local bus)
[event] started bus daemon pid=8992 (auto-exits 30s after last consumer)
Error: context canceled

在子进程中运行bash命令是报错

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain/eventEvent subscription domaindomain/imPR touches the im domain

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions