mirror of
https://github.com/larksuite/cli.git
synced 2026-07-07 09:11:44 +08:00
Add BotInfo() method on RuntimeContext that lazily fetches the current app's bot open_id and display name from /bot/v3/info on first call, cached via sync.OnceValues for the lifetime of the process. - BotInfo struct (OpenID, AppName) in Identity section of runner.go - fetchBotInfo() uses DoAPIAsBot for consistent header injection - CanBot() on CliConfig gates the call when bot identity is unavailable - Nil guard prevents panic in test contexts - Full test coverage via httpmock.Registry + mounted shortcuts Change-Id: I40ac710fb52d13939853f71827a5cbdbddd4f80f