feat(vc): add agent meeting join, leave, and events shortcuts#824
Conversation
Change-Id: Ic5d64067eb48670fa6636841cd00cbfa9b0bf3e7
Add vc +meeting-events for bot meeting activity queries with page-all pagination support and tested pretty/json output.
… vague wording" This reverts commit 9845fc4.
Teach the lark-vc-agent skill to recognize OAPI's new gray-miss signal for the three agent meeting commands (`+meeting-join`, `+meeting-leave`, `+meeting-events`) and route the user to the early-bird group instead of treating it as a permission error. When CLI stderr JSON returns `error.code=20017 / ErrNotInGray`, the agent renders the fixed early-bird invite link `https://go.larkoffice.com/join-chat/2f4nb0e1-fe00-4f67-bed7-25beaf533fbd`. The user manual is intentionally not surfaced yet. Scope-related errors still follow the existing `auth login --scope` flow with no early-bird copy mixed in. lark-shared and other skills are not touched, so the guidance stays scoped to the agent meeting commands only.
📝 WalkthroughWalkthroughAdds three VC agent shortcuts: +meeting-join (join by 9-digit meeting number), +meeting-leave (leave by long meeting_id), and +meeting-events (list/paginate in-meeting events with pretty/JSON output); includes validators, API calls, timeline rendering, tests, and documentation. ChangesVC Agent In-Meeting Commands
Sequence Diagram(s)sequenceDiagram
participant CLI as lark-cli (vc shortcut)
participant VCAPI as VC API
participant Timeline as TimelineBuilder
CLI->>VCAPI: GET /open-apis/vc/v1/bots/events (meeting_id,page_size,page_token,start_time,end_time)
VCAPI-->>CLI: paginated response {events, has_more, page_token}
CLI->>Timeline: compact payloads, parse timestamps, build sorted entries
Timeline-->>CLI: pretty timeline or JSON payload (includes page_token when returned)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@98d557cb1ca5bb1615267529898abc13106d0573🧩 Skill updatenpx skills add larksuite/cli#feat/vc_agent_meeting -y -g |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@shortcuts/vc/vc_meeting_events_test.go`:
- Around line 243-244: Multiple test flag setups use `_ =
runtime.Cmd.Flags().Set(...)`, which discards errors and can hide broken test
configuration; replace each discarded call (all occurrences of
runtime.Cmd.Flags().Set in this test file) with proper error handling by
capturing the returned error (e.g., err := runtime.Cmd.Flags().Set(...)) and
failing the test on error (use t.Fatalf or require.NoError(t, err)) so any flag
name/type changes surface immediately during test setup. Ensure every `_ =
runtime.Cmd.Flags().Set(...)` in this file is updated accordingly.
In `@shortcuts/vc/vc_meeting_events.go`:
- Around line 60-67: Add page-size validation to the Validate function by
calling meetingEventsPageSize(runtime) alongside validateMeetingEventsMeetingID
and parseMeetingEventsTimeRange so invalid `--page-size` values fail early;
update the Validate block (the Validate func in vc_meeting_events.go) to invoke
meetingEventsPageSize(runtime) and return any error it yields before proceeding
to DryRun/Execute, ensuring buildMeetingEventsParams no longer is the sole
validator for page size.
In `@shortcuts/vc/vc_meeting_leave.go`:
- Around line 27-31: The validator for the "meeting-id" flag currently only
checks for empty strings; update the Validate function that reads
runtime.Str("meeting-id") to reject non-numeric or non-positive-integer values
(same rule used by the +meeting-events validator) so malformed inputs like URLs
or "abc" fail locally; implement this by parsing the value as an integer (or
using the shared isPositiveInt helper/regexp used by +meeting-events) and return
common.FlagErrorf("--meeting-id must be a positive integer") on failure,
otherwise return nil.
In `@skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md`:
- Line 227: Update the troubleshooting note for error `10005 bot is not in
meeting` to provide an executable fallback example: show a concrete `vc meeting
get` invocation that includes `--with-participants` plus a `--params` JSON
containing the required `meeting_id` (e.g., `{"meeting_id":"<9‑digit id>"}`) so
readers can run it directly; reference the exact command and flags (`vc meeting
get`, `--with-participants`, `--params`) and replace the vague suggestion with
this runnable example and brief guidance to substitute the real meeting id.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1847e337-d595-47b3-957e-18d4c7c721cb
📒 Files selected for processing (12)
shortcuts/vc/shortcuts.goshortcuts/vc/vc_meeting_events.goshortcuts/vc/vc_meeting_events_test.goshortcuts/vc/vc_meeting_join.goshortcuts/vc/vc_meeting_leave.goshortcuts/vc/vc_meeting_test.goskills/lark-vc-agent/SKILL.mdskills/lark-vc-agent/references/lark-vc-agent-meeting-events.mdskills/lark-vc-agent/references/lark-vc-agent-meeting-join.mdskills/lark-vc-agent/references/lark-vc-agent-meeting-leave.mdskills/lark-vc/SKILL.mdskills/lark-vc/references/lark-vc-recording.md
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md (1)
224-224:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse an executable
vc meeting getexample in troubleshooting.Line 224 recommends
vc meeting get --with-participantsas a fallback, but this command requiresmeeting_idin--paramsto be actionable.Suggested wording
-| `10005 bot is not in meeting` | bot 从未真实入会该会议;或会议已结束但 bot 从未在会中出现过 | 先 `+meeting-join --meeting-number <9位号>` 真实入会再查;如果会议已经结束且当时 bot 没进过会,本接口也拉不到数据。**如果只是想看参会人快照,改用 `vc meeting get --with-participants`**(不依赖 bot 身份参会) | +| `10005 bot is not in meeting` | bot 从未真实入会该会议;或会议已结束但 bot 从未在会中出现过 | 先 `+meeting-join --meeting-number <9位号>` 真实入会再查;如果会议已经结束且当时 bot 没进过会,本接口也拉不到数据。**如果只是想看参会人快照,改用 `lark-cli vc meeting get --params '{"meeting_id":"<id>","with_participants":true}'`**(不依赖 bot 身份参会) |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md` at line 224, Update the troubleshooting note to include an executable example for the fallback `vc meeting get --with-participants` by showing how to pass the required meeting identifier via `--params` (e.g., `--params '{"meeting_id":"<9-digit-meeting-id>"}'`); mention that `--meeting_id` (or `meeting_id`) is required and show the full example invocation so users can run it directly when they cannot join the meeting as the bot.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/lark-vc-agent/SKILL.md`:
- Around line 1-10: The YAML frontmatter uses incorrect delimiters and escaped
brackets causing pipeline failure: replace the opening delimiter `***` and
closing `-----------------------------` with standard `---` lines, and unescape
the `bins` value so it reads bins: ["lark-cli"] (remove the backslashes). Update
the SKILL.md frontmatter block (look for the top YAML block containing
name/version/description/metadata/requires/bins) to use proper `---` delimiters
and a normal YAML array for `bins`.
---
Duplicate comments:
In `@skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md`:
- Line 224: Update the troubleshooting note to include an executable example for
the fallback `vc meeting get --with-participants` by showing how to pass the
required meeting identifier via `--params` (e.g., `--params
'{"meeting_id":"<9-digit-meeting-id>"}'`); mention that `--meeting_id` (or
`meeting_id`) is required and show the full example invocation so users can run
it directly when they cannot join the meeting as the bot.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 788fac03-32b9-4ab0-b1f6-022ce2177302
📒 Files selected for processing (4)
skills/lark-vc-agent/SKILL.mdskills/lark-vc-agent/references/lark-vc-agent-meeting-events.mdskills/lark-vc-agent/references/lark-vc-agent-meeting-join.mdskills/lark-vc-agent/references/lark-vc-agent-meeting-leave.md
✅ Files skipped from review due to trivial changes (1)
- skills/lark-vc-agent/references/lark-vc-agent-meeting-join.md
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #824 +/- ##
==========================================
+ Coverage 65.67% 65.77% +0.10%
==========================================
Files 513 516 +3
Lines 47655 48625 +970
==========================================
+ Hits 31297 31985 +688
- Misses 13652 13881 +229
- Partials 2706 2759 +53 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
shortcuts/vc/vc_meeting_events_test.go (1)
21-30: ⚡ Quick winUse the standard test factory in the runtime helper
newMeetingEventsRuntime()currently bypasses the shared unit-test factory path. For consistency with repository test harness behavior, prefer building this helper aroundcmdutil.TestFactory(t, defaultConfig())as well.As per coding guidelines "
**/*_test.go: Usecmdutil.TestFactory(t, config)for test factories in unit tests."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@shortcuts/vc/vc_meeting_events_test.go` around lines 21 - 30, Refactor newMeetingEventsRuntime to use the shared test factory: change its signature to accept *testing.T and replace the direct call to common.TestNewRuntimeContext(cmd, defaultConfig()) with a factory created via cmdutil.TestFactory(t, defaultConfig()); keep the same cobra.Command setup (flags "meeting-id", "start", "end", "page-token", "page-size", "page-all") and construct/return the RuntimeContext using that cmdutil factory so tests follow the repository test harness convention.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@shortcuts/vc/vc_meeting_events_test.go`:
- Around line 21-30: Refactor newMeetingEventsRuntime to use the shared test
factory: change its signature to accept *testing.T and replace the direct call
to common.TestNewRuntimeContext(cmd, defaultConfig()) with a factory created via
cmdutil.TestFactory(t, defaultConfig()); keep the same cobra.Command setup
(flags "meeting-id", "start", "end", "page-token", "page-size", "page-all") and
construct/return the RuntimeContext using that cmdutil factory so tests follow
the repository test harness convention.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 386f2c0d-3d15-4a4f-ab91-778b55d92a23
📒 Files selected for processing (4)
shortcuts/vc/vc_meeting_events.goshortcuts/vc/vc_meeting_events_test.goskills/lark-vc-agent/references/lark-vc-agent-meeting-events.mdskills/lark-vc/references/lark-vc-search.md
✅ Files skipped from review due to trivial changes (1)
- skills/lark-vc/references/lark-vc-search.md
🚧 Files skipped from review as they are similar to previous changes (1)
- shortcuts/vc/vc_meeting_events.go
Summary
Add
vcagent meeting shortcuts for bot join, leave, and in-meeting event retrieval. This PR introduces a minimal end-to-end workflow for agent-based meeting participation and documents when to use the newlark-vc-agentskill versus the existinglark-vcskill.Changes
vc +meeting-jointo let a bot join an in-progress meeting by 9-digit meeting numbervc +meeting-leaveto let a bot leave a meeting bymeeting_idvc +meeting-eventsto list in-meeting bot events with pagination,--page-all, and pretty timeline outputvcshortcut setskills/lark-vc-agentand supporting references to document routing, scope requirements, gray-release handling, and meeting lifecycle guidancelark-vcdocs to clarify the boundary between post-meeting queries and in-meeting agent actionsTest Plan
env GOROOT=/data00/home/houzhicong/sdk/go1.23.0 make unit-test)env GOROOT=/data00/home/houzhicong/sdk/go1.23.0 make build)./lark-cli vc --help)Related Issues
Summary by CodeRabbit
New Features
Documentation
Tests