Skip to content

docs(wiki): route node resolution through shortcut - #2132

Merged
liujinkun2025 merged 7 commits into
mainfrom
docs/wiki-node-get-routing
Aug 5, 2026
Merged

docs(wiki): route node resolution through shortcut#2132
liujinkun2025 merged 7 commits into
mainfrom
docs/wiki-node-get-routing

Conversation

@liujinkun2025

@liujinkun2025 liujinkun2025 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Route explicit Wiki node resolution through wiki +node-get instead of teaching agents to call the raw wiki spaces get_node command. This makes the preferred shortcut discoverable in high-frequency Wiki guidance while preserving drive +inspect as the canonical token inference and resource-routing entry point.

Changes

  • Update Wiki member and space-resolution guidance to use wiki +node-get and the corresponding data.* envelope fields.
  • Keep node resolution on the same identity as the downstream operation, defaulting to user unless a bot view is explicitly requested.
  • Align the delete-space, Drive permission, and Slides references with the same shortcut-first guidance for explicit Wiki node resolution.
  • Preserve the shared drive +inspect routing guidance and its canonical token inference behavior.
  • Keep raw get_node usage only as an explicit schema-first fallback in the Wiki skill.

Test Plan

  • Unit tests pass: go test ./internal/qualitygate/skillscan ./internal/qualitygate/semantic
  • Manual local verification confirms go run . wiki +node-get --node-token <wiki-url> --as user --format json --dry-run emits the expected GET /open-apis/wiki/v2/spaces/get_node request.
  • bash scripts/semantic-review-workflow.test.sh
  • git diff --check

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Updated Wiki and Slides guidance for resolving links and retrieving node information.
    • Standardized lookup behavior across supported Wiki workflows.
    • Improved identification of spaces, pages, nodes, and underlying content types.
    • Added a validated fallback when the preferred lookup cannot provide required details.
    • Clarified that link resolution and follow-up actions use the same identity context.
    • Existing confirmation and deletion safeguards remain unchanged.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/L Large or sensitive change across domains or core paths labels Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@35ee824f7650cc24033d60b99ef573713b73315d

🧩 Skill update

npx skills add larksuite/cli#docs/wiki-node-get-routing -y -g

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.00%. Comparing base (ebdeda8) to head (35ee824).
⚠️ Report is 6 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The pull request updates Wiki URL resolution guidance across Drive, Slides, and Wiki skills. It replaces direct spaces get_node usage with wiki +node-get, reads top-level response fields, and documents identity consistency and fallback behavior.

Changes

Wiki resolution guidance

Layer / File(s) Summary
Standardize Wiki node resolution
skills/lark-wiki/SKILL.md, skills/lark-drive/references/lark-drive-apply-permission.md, skills/lark-slides/SKILL.md
The documentation uses wiki +node-get for Wiki URL resolution. Drive and Slides guidance reads top-level obj_token and obj_type fields. Wiki guidance prefers the shortcut and allows a schema-validated fallback.
Update space deletion resolution
skills/lark-wiki/SKILL.md, skills/lark-wiki/references/lark-wiki-delete-space.md
Space deletion guidance reads top-level space_id from wiki +node-get. Node resolution and deletion use the same identity. Existing deletion safeguards remain documented.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes routing Wiki node resolution through the shortcut.
Description check ✅ Passed The description covers the summary, changes, test plan, and related issues with sufficient detail.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/wiki-node-get-routing

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@liujinkun2025
liujinkun2025 force-pushed the docs/wiki-node-get-routing branch from e12a095 to 6f542aa Compare July 31, 2026 07:43
Comment thread skills/lark-drive/references/lark-drive-apply-permission.md Outdated
Comment thread skills/lark-wiki/SKILL.md Outdated
Comment thread skills/lark-drive/references/lark-drive-apply-permission.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
skills/lark-drive/references/lark-drive-apply-permission.md (1)

73-73: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep 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 use wiki +node-get when they need data.obj_token and data.obj_type for 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6f542aa and 8e19aae.

📒 Files selected for processing (4)
  • skills/lark-drive/references/lark-drive-apply-permission.md
  • skills/lark-slides/SKILL.md
  • skills/lark-wiki/SKILL.md
  • skills/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

@liujinkun2025
liujinkun2025 force-pushed the docs/wiki-node-get-routing branch from 8e19aae to fb607fc Compare August 3, 2026 09:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
skills/lark-drive/references/lark-drive-apply-permission.md (1)

73-73: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove shortcut implementation details from this reference.

Keep the caller contract: pass a Wiki URL directly, or resolve it with wiki +node-get when data.obj_token and data.obj_type are required. Do not document that the shortcut maps the token to a specific API path and type=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

📥 Commits

Reviewing files that changed from the base of the PR and between 8e19aae and fb607fc.

📒 Files selected for processing (4)
  • skills/lark-drive/references/lark-drive-apply-permission.md
  • skills/lark-slides/SKILL.md
  • skills/lark-wiki/SKILL.md
  • skills/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

Comment thread skills/lark-drive/references/lark-drive-apply-permission.md Outdated
Comment thread skills/lark-slides/SKILL.md
Comment thread skills/lark-drive/references/lark-drive-apply-permission.md Outdated

@fangshuyu-768 fangshuyu-768 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@liujinkun2025
liujinkun2025 merged commit bdb1964 into main Aug 5, 2026
29 checks passed
@liujinkun2025
liujinkun2025 deleted the docs/wiki-node-get-routing branch August 5, 2026 13:53
@liangshuo-1 liangshuo-1 mentioned this pull request Aug 5, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants