You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
calendar +search-event rejects bot identity during local shortcut validation, even though the underlying Search Event API and the generated calendar events search_event command support bot access. This prevents agents from locating events in calendars accessible to the application, including events created and managed by the application itself.
The generated command schema advertises both identities:
{
"access_tokens": ["bot", "user"]
}
Before this change, the shortcut fails before making an API request:
$ lark-cli calendar +search-event --as bot --query "application-owned test event"--as bot is not supported, this command only supports: user
The generated command succeeds with the same bot identity and returns an event created in the application's primary calendar:
$ lark-cli calendar events search_event --as bot --calendar-id primary \ --data '{"query":"application-owned test event"}'
# success: the application-owned event is returned
After changing the shortcut identity declaration, a locally built CLI successfully finds the same event through calendar +search-event --as bot.
This isolates the failure to the shortcut's local AuthTypes declaration rather than the Open Platform API or application permissions.
Scope and permission boundary
This change does not expand calendar visibility. User identity continues to search calendars accessible to the user; bot identity searches only calendars accessible to the application. Bot identity does not automatically gain access to users' personal calendars.
Changes
Allow calendar +search-event to run with user or bot identity.
Clarify the identity-specific visibility boundary in the calendar Skill.
Add a bot dry-run E2E contract test.
Add a self-contained live E2E workflow: create an event as bot, find it with +search-event, then clean it up.
Refresh the Calendar E2E command inventory and coverage metrics.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You have signed the CLA already but the status is still pending? Let us recheck it.
The calendar +search-event shortcut now permits bot authorization. Documentation clarifies identity-specific search scope, and end-to-end tests cover bot dry-run requests and event discovery workflows. Calendar coverage records are updated accordingly.
Changes
Calendar Search Event
Layer / File(s)
Summary
Search-event authorization and identity scope shortcuts/calendar/calendar_search_event.go, skills/lark-calendar/SKILL.md
The shortcut accepts both user and bot callers, and documentation distinguishes user calendar access from application-owned calendar access.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domain/calendarPR touches the calendar domainsize/MSingle-domain feat or fix with limited business impact
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
calendar +search-eventrejects bot identity during local shortcut validation, even though the underlying Search Event API and the generatedcalendar events search_eventcommand support bot access. This prevents agents from locating events in calendars accessible to the application, including events created and managed by the application itself.Official API: https://open.larkoffice.com/document/server-docs/calendar-v4/calendar-event/search
Evidence
The generated command schema advertises both identities:
{ "access_tokens": ["bot", "user"] }Before this change, the shortcut fails before making an API request:
The generated command succeeds with the same bot identity and returns an event created in the application's primary calendar:
After changing the shortcut identity declaration, a locally built CLI successfully finds the same event through
calendar +search-event --as bot.This isolates the failure to the shortcut's local
AuthTypesdeclaration rather than the Open Platform API or application permissions.Scope and permission boundary
This change does not expand calendar visibility. User identity continues to search calendars accessible to the user; bot identity searches only calendars accessible to the application. Bot identity does not automatically gain access to users' personal calendars.
Changes
calendar +search-eventto run withuserorbotidentity.+search-event, then clean it up.Test Plan
make unit-testgo vet ./...gofmt -l .produces no outputgo mod tidyproduces nogo.mod/go.sumchangesgolangci-lint --new-from-rev=origin/mainreports0 issuesRelated Issues
Summary by CodeRabbit
New Features
Tests
Documentation