docs(wiki): route node resolution through shortcut - #2132
Conversation
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@35ee824f7650cc24033d60b99ef573713b73315d🧩 Skill updatenpx skills add larksuite/cli#docs/wiki-node-get-routing -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2132 +/- ##
==========================================
+ Coverage 75.85% 76.00% +0.14%
==========================================
Files 958 966 +8
Lines 101701 102541 +840
==========================================
+ Hits 77150 77933 +783
- Misses 18684 18704 +20
- Partials 5867 5904 +37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe pull request updates Wiki URL resolution guidance across Drive, Slides, and Wiki skills. It replaces direct ChangesWiki resolution guidance
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
e12a095 to
6f542aa
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
skills/lark-drive/references/lark-drive-apply-permission.md (1)
73-73: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep this guidance at the caller/API level.
This line exposes shortcut internals, including path-parameter handling and
type=wiki. That detail can become stale and couples this Drive reference to implementation behavior. State only that callers can pass a Wiki URL directly, and usewiki +node-getwhen they needdata.obj_tokenanddata.obj_typefor a non-Wiki permission request.Based on learnings: keep Lark CLI skill guidance concise and avoid internal implementation or compatibility details.
🤖 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-drive/references/lark-drive-apply-permission.md` at line 73, 简化该段调用说明:说明调用者可直接传入 Wiki URL;若需针对非 Wiki 类型申请权限,先使用 wiki +node-get 获取 data.obj_token 和 data.obj_type,再将这些值用于后续请求。移除路径参数、shortcut、type=wiki、身份复用及底层兼容性等实现细节。Source: Learnings
🤖 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 `@skills/lark-drive/references/lark-drive-apply-permission.md`:
- Line 73: 简化该段调用说明:说明调用者可直接传入 Wiki URL;若需针对非 Wiki 类型申请权限,先使用 wiki +node-get 获取
data.obj_token 和
data.obj_type,再将这些值用于后续请求。移除路径参数、shortcut、type=wiki、身份复用及底层兼容性等实现细节。
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8dac7ce3-5b3d-4c26-9b86-0661b4961172
📒 Files selected for processing (4)
skills/lark-drive/references/lark-drive-apply-permission.mdskills/lark-slides/SKILL.mdskills/lark-wiki/SKILL.mdskills/lark-wiki/references/lark-wiki-delete-space.md
🚧 Files skipped from review as they are similar to previous changes (3)
- skills/lark-wiki/references/lark-wiki-delete-space.md
- skills/lark-slides/SKILL.md
- skills/lark-wiki/SKILL.md
8e19aae to
fb607fc
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
skills/lark-drive/references/lark-drive-apply-permission.md (1)
73-73: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove shortcut implementation details from this reference.
Keep the caller contract: pass a Wiki URL directly, or resolve it with
wiki +node-getwhendata.obj_tokenanddata.obj_typeare required. Do not document that the shortcut maps the token to a specific API path andtype=wiki.🤖 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-drive/references/lark-drive-apply-permission.md` at line 73, Update the reference text to remove implementation details about the shortcut mapping tokens to an API path and using type=wiki. Preserve the caller contract: accept a Wiki URL directly, or use wiki +node-get with the same identity when data.obj_token and data.obj_type are needed before passing the resolved values to the permission command.Source: Learnings
🤖 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-drive/references/lark-drive-apply-permission.md`:
- Line 73: Update the guidance around the wiki node resolution flow to keep
permission application user-only: remove the instruction to switch both commands
to --as bot, and explicitly state that drive +apply-permission must continue
using --as user even when node resolution uses another identity.
---
Nitpick comments:
In `@skills/lark-drive/references/lark-drive-apply-permission.md`:
- Line 73: Update the reference text to remove implementation details about the
shortcut mapping tokens to an API path and using type=wiki. Preserve the caller
contract: accept a Wiki URL directly, or use wiki +node-get with the same
identity when data.obj_token and data.obj_type are needed before passing the
resolved values to the permission command.
🪄 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 Plus
Run ID: 78b233b4-7ee5-42e1-ae05-c4aa81579967
📒 Files selected for processing (4)
skills/lark-drive/references/lark-drive-apply-permission.mdskills/lark-slides/SKILL.mdskills/lark-wiki/SKILL.mdskills/lark-wiki/references/lark-wiki-delete-space.md
🚧 Files skipped from review as they are similar to previous changes (3)
- skills/lark-wiki/references/lark-wiki-delete-space.md
- skills/lark-wiki/SKILL.md
- skills/lark-slides/SKILL.md
fangshuyu-768
left a comment
There was a problem hiding this comment.
Re-reviewed the latest head. The previously reported Wiki object type propagation issue is fixed, and the targeted skill/semantic and Wiki/Drive tests pass.
Summary
Route explicit Wiki node resolution through
wiki +node-getinstead of teaching agents to call the rawwiki spaces get_nodecommand. This makes the preferred shortcut discoverable in high-frequency Wiki guidance while preservingdrive +inspectas the canonical token inference and resource-routing entry point.Changes
wiki +node-getand the correspondingdata.*envelope fields.drive +inspectrouting guidance and its canonical token inference behavior.get_nodeusage only as an explicit schema-first fallback in the Wiki skill.Test Plan
go test ./internal/qualitygate/skillscan ./internal/qualitygate/semanticgo run . wiki +node-get --node-token <wiki-url> --as user --format json --dry-runemits the expectedGET /open-apis/wiki/v2/spaces/get_noderequest.bash scripts/semantic-review-workflow.test.shgit diff --checkRelated Issues
Summary by CodeRabbit