docs(lark-shared): split into references and fix exit-10/auth drift#1433
docs(lark-shared): split into references and fix exit-10/auth drift#1433sang-neo03 wants to merge 5 commits into
Conversation
lark-shared is force-read by nearly every lark-* skill, so this slims the
always-loaded core (169->89 lines) and moves low-frequency detail into
on-demand references/, while fixing doc-vs-implementation drifts.
- Move split-flow auth, exit-10 mechanics, and config-init/qrcode detail
into references/{auth-split-flow,high-risk-approval,config-init}.md;
add a reference index to the entry.
- Keep safety in the entry: exit-10 gate + safe default (never silently
add --yes), qrcode-on-auth-URL, split-flow rules, argv-only retry.
- Fix exit-10 guidance: key on exit code 10; accept both flat
(type=confirmation_required) and typed (type=confirmation+subtype)
envelopes; read the confirm flag from hint and append to the original
argv instead of hardcoding --yes (config bind uses --force); action is
error.action (typed) or error.risk.action (flat).
- Distinguish permission_violations (raw API) vs missing_scopes (CLI).
- Complete _notice fields; switch description to Chinese; bump to 1.1.0.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThree markdown files in ChangesLark shared skill workflow documentation refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1433 +/- ##
==========================================
+ Coverage 72.83% 72.87% +0.04%
==========================================
Files 732 737 +5
Lines 69140 69465 +325
==========================================
+ Hits 50356 50624 +268
- Misses 15003 15039 +36
- Partials 3781 3802 +21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@6568abcff4716d5ae8645cffaa28df3f70ce2819🧩 Skill updatenpx skills add larksuite/cli#docs/lark-shared-progressive-disclosure -y -g |
Trim the always-loaded exit-10 section: drop dense parentheticals and move mechanism detail (action field location, error-shape identification, do-not-copy-hint-example, --dry-run) to references/high-risk-approval.md behind a one-line pointer. Keep the safety tripwire (exit 10 = gate, never silently add --yes), the consent/reject flow, and the flag-from-hint / argv-array / no-sh-c retry rule in the entry.
Reframe the entry reference index from topic descriptions to trigger conditions (when X -> read Y), so the agent loads the right reference at the moment it is needed instead of skipping it after reading only a topic line.
Apply the skill quality spec to existing content (no new rules added): - Single-source the URL/QR-code rule in the security section; the auth and config sections reference it instead of restating. - Remove the now-redundant config-init reference (its content already lives in the config-init and security sections of the entry). - Prefix lark-shared's own reference files with lark-shared- per the reference-naming rule. - Move identity routing to the top of the body.
Summary
lark-sharedis force-read by nearly everylark-*skill, so its token cost is paid on almost every Feishu task. This restructures it into a slim always-loaded core (169 → 89 lines) plus on-demandreferences/, and fixes several doc-vs-implementation drifts surfaced during code review.Changes
references/{auth-split-flow,high-risk-approval,config-init}.md, loaded on demand vialark-cli skills read. Add a reference index to the entry.--yes), QR-code on any auth/config URL, split-flow rules, argv-only retry (nosh -c).10; accept both the flat (type=confirmation_required) and typed (type=confirmation+subtype=confirmation_required) envelopes; read the confirm flag fromhintand append it to the original argv instead of hardcoding--yes(config binduses--force). Operation name iserror.action(typed) orerror.risk.action(flat).permission_violations(raw API block) vsmissing_scopes(CLI structured error)._noticefields (current/latest/message/command); switchdescriptionto Chinese; bump version to1.1.0.Test Plan
skills read lark-shared/skills list lark-sharedresolve the slim entry plus all references on a clean host.not found in skill= 0); the failures observed were pre-existing environment / stale-gold cases, not regressions.internal/cmdutil/confirm.go,errs/types.go,cmd/auth/login.go,cmd/config/bind.go).Related Issues
None.
Summary by CodeRabbit
--as uservs--as bot) and explicit split-flow workflow for agent-mediated authentication.