mirror of
https://github.com/larksuite/cli.git
synced 2026-09-14 18:42:53 +08:00
12fdf21137
Replace the provider-level flat RequiredScopes set with per-identity declaration (IdentitySpec.Scopes, never serialized into the card): user and bot each declare their own set, and the preflight resolves the required scopes from the RESOLVED identity before reading the granted list, so an identity with no declared scopes skips the check entirely -- for bot that also skips the app-version TenantScopes fetch. Register now rejects duplicate identity types (ambiguous once scopes attach to identities) and empty/duplicate scopes within one identity; agenttest conformance mirrors the same rules. The check itself is unchanged: all-or-nothing per identity, missing_scope error shape and identity-specific remediation hints as before, --dry-run untouched. New fixture fakesplit (user declares one scope, bot none) pins the per-identity resolution and the bot fetch skip. Skill docs updated to the per-identity wording.