Skip to content

feat(vc): add agent meeting join, leave, and events shortcuts#824

Merged
zhicong666-bytedance merged 45 commits into
mainfrom
feat/vc_agent_meeting
May 11, 2026
Merged

feat(vc): add agent meeting join, leave, and events shortcuts#824
zhicong666-bytedance merged 45 commits into
mainfrom
feat/vc_agent_meeting

Conversation

@zhicong666-bytedance
Copy link
Copy Markdown
Collaborator

@zhicong666-bytedance zhicong666-bytedance commented May 11, 2026

Summary

Add vc agent 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 new lark-vc-agent skill versus the existing lark-vc skill.

Changes

  • Add vc +meeting-join to let a bot join an in-progress meeting by 9-digit meeting number
  • Add vc +meeting-leave to let a bot leave a meeting by meeting_id
  • Add vc +meeting-events to list in-meeting bot events with pagination, --page-all, and pretty timeline output
  • Register the new meeting shortcuts under the vc shortcut set
  • Add unit tests covering join/leave/events behavior, pagination, output, and validation
  • Add skills/lark-vc-agent and supporting references to document routing, scope requirements, gray-release handling, and meeting lifecycle guidance
  • Update lark-vc docs to clarify the boundary between post-meeting queries and in-meeting agent actions

Test Plan

  • Unit tests pass (env GOROOT=/data00/home/houzhicong/sdk/go1.23.0 make unit-test)
  • Manual local verification against a real meeting session
  • Local binary builds successfully (env GOROOT=/data00/home/houzhicong/sdk/go1.23.0 make build)
  • CLI help shows the new shortcuts (./lark-cli vc --help)

Related Issues

  • None

Summary by CodeRabbit

  • New Features

    • Added VC commands: +meeting-join (join by 9‑digit meeting number, optional password), +meeting-leave (leave by meeting ID), and +meeting-events (retrieve in-meeting events with time-range, pagination, pretty/JSON output).
  • Documentation

    • Added skill docs and reference guides detailing usage, boundaries, permissions, examples, pagination rules, and output formats.
  • Tests

    • Added comprehensive tests for validation, dry-run, execution, pagination, formatting, and edge cases.

Review Change Stack

zhaoleibd and others added 30 commits May 11, 2026 17:48
Change-Id: Ic5d64067eb48670fa6636841cd00cbfa9b0bf3e7
Add vc +meeting-events for bot meeting activity queries with page-all pagination support and tested pretty/json output.
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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

📝 Walkthrough

Walkthrough

Adds 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.

Changes

VC Agent In-Meeting Commands

Layer / File(s) Summary
Meeting Join Shortcut
shortcuts/vc/vc_meeting_join.go
Validates --meeting-number as exactly 9 digits, constructs join payload (trim, join_type, optional --password), and implements DryRun/Execute with formatted output including returned meeting fields.
Meeting Leave Shortcut
shortcuts/vc/vc_meeting_leave.go
Validates and trims --meeting-id, builds DryRun/Execute POST to /open-apis/vc/v1/bots/leave, normalizes nil responses, and prints success message.
Meeting Events Shortcut
shortcuts/vc/vc_meeting_events.go
Validates --meeting-id and optional --start/--end, supports --page-size (clamped 20–100) and --page-all auto-pagination, builds query params, fetches single or paginated responses, compacts empty-array fields, constructs a stable sorted timeline by time/sequence, renders per-event summaries (participant join/leave, transcript, chat, magic share) and pretty/JSON outputs with meeting context and relative offsets.
Shortcut Registry
shortcuts/vc/shortcuts.go
Registers VCMeetingJoin, VCMeetingLeave, and VCMeetingEvents in the shortcuts slice.
Join/Leave Tests
shortcuts/vc/vc_meeting_test.go
Tests for meeting-number validator, buildMeetingJoinBody behavior (trim/omit password), command validation, DryRun output, Execute with API stubs (request capture, response handling), pretty/JSON outputs, trimming, and API error propagation.
Events Tests
shortcuts/vc/vc_meeting_events_test.go
Helpers and HTTP stubs; event fixtures (participant joined ongoing, chat multi-message, magic share); unit tests for summary helpers; validation tests (meeting-id, time ordering, page-size/page-all); buildMeetingEventsParams clamping/override tests; DryRun, JSON aggregation/pruning, pretty rendering, page_token printing, and empty-results handling.
Skill Documentation
skills/lark-vc-agent/SKILL.md, skills/lark-vc-agent/references/*, skills/lark-vc/SKILL.md, skills/lark-vc/references/*
Adds lark-vc-agent skill docs and detailed references for join/events/leave; updates lark-vc docs to clarify boundaries, routing by intent, constraints, examples, and required scopes.

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)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • zhaoleibd
  • hugang-lark

🐰 Three new meeting tricks we hop to bring,
Join and leave and livestream the ring,
Paginated events in a neat timeline show,
Docs and tests align — off we go!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.52% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding three new VC agent shortcuts (join, leave, events) without vague terms or unnecessary detail.
Description check ✅ Passed The description covers all required template sections: Summary (motivation and scope), Changes (listing all main changes with detail), Test Plan (checkmarks for unit tests, manual verification, and build), and Related Issues (explicitly states None).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/vc_agent_meeting

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added domain/vc PR touches the vc domain size/XL Architecture-level or global-impact change labels May 11, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@98d557cb1ca5bb1615267529898abc13106d0573

🧩 Skill update

npx skills add larksuite/cli#feat/vc_agent_meeting -y -g

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4ba39ef and 370f631.

📒 Files selected for processing (12)
  • shortcuts/vc/shortcuts.go
  • shortcuts/vc/vc_meeting_events.go
  • shortcuts/vc/vc_meeting_events_test.go
  • shortcuts/vc/vc_meeting_join.go
  • shortcuts/vc/vc_meeting_leave.go
  • shortcuts/vc/vc_meeting_test.go
  • skills/lark-vc-agent/SKILL.md
  • skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md
  • skills/lark-vc-agent/references/lark-vc-agent-meeting-join.md
  • skills/lark-vc-agent/references/lark-vc-agent-meeting-leave.md
  • skills/lark-vc/SKILL.md
  • skills/lark-vc/references/lark-vc-recording.md

Comment thread shortcuts/vc/vc_meeting_events_test.go Outdated
Comment thread shortcuts/vc/vc_meeting_events.go
Comment thread shortcuts/vc/vc_meeting_leave.go
Comment thread skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Use an executable vc meeting get example in troubleshooting.

Line 224 recommends vc meeting get --with-participants as a fallback, but this command requires meeting_id in --params to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 370f631 and 8539c97.

📒 Files selected for processing (4)
  • skills/lark-vc-agent/SKILL.md
  • skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md
  • skills/lark-vc-agent/references/lark-vc-agent-meeting-join.md
  • skills/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

Comment thread skills/lark-vc-agent/SKILL.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

❌ Patch coverage is 66.84709% with 245 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.77%. Comparing base (25c72ce) to head (98d557c).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
shortcuts/vc/vc_meeting_events.go 63.86% 202 Missing and 39 partials ⚠️
shortcuts/vc/vc_meeting_join.go 95.55% 1 Missing and 1 partial ⚠️
shortcuts/vc/vc_meeting_leave.go 91.66% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
shortcuts/vc/vc_meeting_events_test.go (1)

21-30: ⚡ Quick win

Use 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 around cmdutil.TestFactory(t, defaultConfig()) as well.

As per coding guidelines "**/*_test.go: Use cmdutil.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

📥 Commits

Reviewing files that changed from the base of the PR and between 6f7da6d and 98d557c.

📒 Files selected for processing (4)
  • shortcuts/vc/vc_meeting_events.go
  • shortcuts/vc/vc_meeting_events_test.go
  • skills/lark-vc-agent/references/lark-vc-agent-meeting-events.md
  • skills/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

@zhicong666-bytedance zhicong666-bytedance merged commit db1a3fc into main May 11, 2026
22 checks passed
@zhicong666-bytedance zhicong666-bytedance deleted the feat/vc_agent_meeting branch May 11, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/vc PR touches the vc domain size/XL Architecture-level or global-impact change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants