docs(wiki): document space member APIs in lark-wiki skill#417
docs(wiki): document space member APIs in lark-wiki skill#417fangshuyu-768 merged 1 commit intomainfrom
Conversation
📝 WalkthroughWalkthroughAdded documentation to Changes
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR extends Confidence Score: 5/5Documentation-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
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]
Reviews (3): Last reviewed commit: "docs: add wiki member operations to lark..." | Re-trigger Greptile |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@fbc3d5996596641d81467d9ef3cb4f847acb7a26🧩 Skill updatenpx skills add larksuite/cli#feat/wiki_space_members_meta_api -y -g |
6c838d7 to
6ad00b2
Compare
Change-Id: I5f8d930c25a650e26e7250269add2809b2b7f343
6ad00b2 to
fbc3d59
Compare
There was a problem hiding this comment.
🧹 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.
Change-Id: I5f8d930c25a650e26e7250269add2809b2b7f343
Summary
Update the
lark-wikiskill to surface wiki space member management capabilities that are already available in the CLI. This makes the skill routing and permission guidance match the currentwiki membersandwiki spacescommand surface.Changes
lark-wikiskill description to include wiki space member managementwiki members create,wiki members delete, andwiki members listspacesandnodessections so the API resource list is easier to scanTest Plan
lark xxxcommand works as expectedManual verification:
./lark-cli wiki --help./lark-cli wiki members --help./lark-cli wiki spaces --help./lark-cli schema wiki.members.create./lark-cli schema wiki.members.delete./lark-cli schema wiki.members.listnode scripts/skill-format-check/index.js skillsRelated Issues
Summary by CodeRabbit