Skip to content

docs(wiki): document space member APIs in lark-wiki skill#417

Merged
fangshuyu-768 merged 1 commit intomainfrom
feat/wiki_space_members_meta_api
Apr 13, 2026
Merged

docs(wiki): document space member APIs in lark-wiki skill#417
fangshuyu-768 merged 1 commit intomainfrom
feat/wiki_space_members_meta_api

Conversation

@liujinkun2025
Copy link
Copy Markdown
Collaborator

@liujinkun2025 liujinkun2025 commented Apr 11, 2026

Summary

Update the lark-wiki skill to surface wiki space member management capabilities that are already available in the CLI. This makes the skill routing and permission guidance match the current wiki members and wiki spaces command surface.

Changes

  • Expand the lark-wiki skill description to include wiki space member management
  • Document wiki members create, wiki members delete, and wiki members list
  • Add the corresponding member permission scopes to the skill permission table
  • Tidy the spaces and nodes sections so the API resource list is easier to scan

Test Plan

  • Unit tests pass
  • Manual local verification confirms the lark xxx command works as expected

Manual verification:

  • Ran ./lark-cli wiki --help
  • Ran ./lark-cli wiki members --help
  • Ran ./lark-cli wiki spaces --help
  • Ran ./lark-cli schema wiki.members.create
  • Ran ./lark-cli schema wiki.members.delete
  • Ran ./lark-cli schema wiki.members.list
  • Ran node scripts/skill-format-check/index.js skills

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Added guidance for managing wiki space members, including member addition workflows and hard-limit rules for department+bot scenarios.
    • Introduced a quick decision flow to resolve space IDs from wiki URLs and to select correct member types/execution order.
    • Documented new member-focused API endpoints: create, list, and delete, with required access scopes.
    • Clarified identity inputs and prerequisite checks before member creation.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact labels Apr 11, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 11, 2026

📝 Walkthrough

Walkthrough

Added documentation to skills/lark-wiki/SKILL.md covering wiki space member management (create/list/delete), member-specific guidance and decision flow, a member addition process for deriving identity inputs, a new members API resource with scopes, and minor formatting tweaks. (≤50 words)

Changes

Cohort / File(s) Summary
Wiki Skill Documentation
skills/lark-wiki/SKILL.md
Expanded scope to include space member management. Added sections: “成员管理硬限制”, “快速决策”, “成员添加流程” (deriving open_id/chat_id/optional user_id/union_id and open_department_id via department search API), delay before calling wiki members create until feasibility confirmed. Introduced members API resource with create, delete, list and mapped scopes (wiki:member:create/update/retrieve). Minor formatting changes to spaces/nodes bullets.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Client as Wiki CLI/SDK
  participant DeptAPI as Departments Search API
  participant WikiAPI as Wiki Members API

  User->>Client: provide wiki URL + desired member info
  Client->>DeptAPI: resolve open_department_id (if dept target)
  DeptAPI-->>Client: department identity / failure
  Client->>Client: decide member_type and identity feasibility
  alt feasible
    Client->>WikiAPI: members.create (open_id/chat_id/department_id)
    WikiAPI-->>Client: success / member_id
    Client-->>User: success confirmation
  else not feasible
    Client-->>User: instruct alternate action / stop
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hopped through docs, a little cheer,
New members found and welcomed here,
IDs in paw, I checked each gate,
Create, list, remove — no guess or fate,
A tidy wiki trail to celebrate.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: documenting space member APIs in the lark-wiki skill, which matches the primary objective of the PR.
Description check ✅ Passed The description includes all required template sections with substantial content: clear summary, detailed changes list, comprehensive test plan with manual verification steps, and related issues section.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/wiki_space_members_meta_api

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 11, 2026

Greptile Summary

This PR extends skills/lark-wiki/SKILL.md to document the existing wiki members CLI commands (create, delete, list), adds routing guidance for resolving space IDs from wiki URLs, and captures the known bot/department limitation. Scopes in the updated permissions table (wiki:member:create, wiki:member:update, wiki:member:retrieve) are all confirmed present in internal/registry/scope_priorities.json, and the cross-skill shortcuts referenced (contact +search-user, im +chat-search) both exist in their respective skill files.

Confidence Score: 5/5

Documentation-only change; all scopes and shortcuts are verified against live registry data — safe to merge.

No code is modified. All three new scopes (wiki:member:create, wiki:member:update, wiki:member:retrieve) exist in scope_priorities.json. Cross-skill shortcuts (contact +search-user, im +chat-search) are confirmed present. The bot/department limitation is correctly called out. No P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
skills/lark-wiki/SKILL.md Adds member management documentation (hard limits, decision flow, member-addition workflow) and a members API resource section with verified scopes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User request: manage wiki members] --> B{Input type?}
    B -->|Wiki URL| C[wiki spaces get_node\nparams: token]
    C --> D[Obtain space_id]
    B -->|Already have space_id| D
    D --> E{Member target type?}
    E -->|User| F[contact +search-user\nresult: open_id\nmember_type: openid]
    E -->|Group| G[im +chat-search\nresult: chat_id\nmember_type: openchat]
    E -->|Department| H{Identity?}
    H -->|as user| I[api POST departments/search\nresult: open_department_id\nmember_type: opendepartmentid]
    H -->|as bot| J[NOT SUPPORTED\nInform user and stop]
    F --> K[wiki members create]
    G --> K
    I --> K
    K --> L[Member added to space]
Loading

Reviews (3): Last reviewed commit: "docs: add wiki member operations to lark..." | Re-trigger Greptile

Comment thread skills/lark-wiki/SKILL.md
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2026

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/wiki_space_members_meta_api -y -g

@liujinkun2025 liujinkun2025 force-pushed the feat/wiki_space_members_meta_api branch from 6c838d7 to 6ad00b2 Compare April 12, 2026 14:46
Change-Id: I5f8d930c25a650e26e7250269add2809b2b7f343
@liujinkun2025 liujinkun2025 force-pushed the feat/wiki_space_members_meta_api branch from 6ad00b2 to fbc3d59 Compare April 13, 2026 06:04
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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-wiki/SKILL.md (1)

17-19: 建议给“官方限制”补一个权威出处

这里是强约束规则,建议附一条可追溯来源(如对应 OpenAPI 文档链接或 CLI schema 证据),避免后续维护时被误改或争议。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-wiki/SKILL.md` around lines 17 - 19, Add a concrete authoritative
reference for the "官方限制" claim: find and link the official OpenAPI spec or CLI
schema that documents tenant_access_token limitations (or a specific section
that states bot identity cannot use opendepartmentid), and update the SKILL.md
text near the lines mentioning `--as bot`, `tenant_access_token`,
`opendepartmentid`, `lark-cli wiki members create`, and `--as user` to include
that link or citation; ensure the wording clearly ties the rule to the cited
source (e.g., "根据 OpenAPI 文档(link)...") so reviewers and future maintainers can
verify the restriction.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@skills/lark-wiki/SKILL.md`:
- Around line 17-19: Add a concrete authoritative reference for the "官方限制"
claim: find and link the official OpenAPI spec or CLI schema that documents
tenant_access_token limitations (or a specific section that states bot identity
cannot use opendepartmentid), and update the SKILL.md text near the lines
mentioning `--as bot`, `tenant_access_token`, `opendepartmentid`, `lark-cli wiki
members create`, and `--as user` to include that link or citation; ensure the
wording clearly ties the rule to the cited source (e.g., "根据 OpenAPI
文档(link)...") so reviewers and future maintainers can verify the restriction.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3554d2d3-496e-473a-908f-b243d4aff02f

📥 Commits

Reviewing files that changed from the base of the PR and between 6ad00b2 and fbc3d59.

📒 Files selected for processing (1)
  • skills/lark-wiki/SKILL.md

@fangshuyu-768 fangshuyu-768 merged commit bb79572 into main Apr 13, 2026
12 checks passed
@fangshuyu-768 fangshuyu-768 deleted the feat/wiki_space_members_meta_api branch April 13, 2026 06:33
yxzhaao pushed a commit to yxzhaao/cli that referenced this pull request Apr 14, 2026
Change-Id: I5f8d930c25a650e26e7250269add2809b2b7f343
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/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants