@lark-apaas/coding-miaoda-sandbox-skills 0.1.0-dev.28c4f05 → 0.1.0-dev.4e64c13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/miaoda/animation-skill/SKILL.md +348 -0
- package/miaoda/authz-cli/SKILL.md +1 -0
- package/miaoda/charts-skill/SKILL.md +264 -0
- package/miaoda/creative-to-fullstack/SKILL.md +157 -0
- package/miaoda/creative-to-fullstack/references/artifact-signals.md +46 -0
- package/miaoda/creative-to-fullstack/references/ui-to-function.md +134 -0
- package/miaoda/data-analysis/SKILL.md +151 -0
- package/miaoda/data-analysis/references/json-output-specification.md +277 -0
- package/miaoda/data-analysis/references/post-analysis-guide.md +77 -0
- package/miaoda/data-analysis/references/python-analysis-reference.md +272 -0
- package/miaoda/data-analysis/references/tmp-file-management-guide.md +100 -0
- package/miaoda/debug-investigation/SKILL.md +21 -18
- package/miaoda/extract-json-schema/SKILL.md +147 -0
- package/miaoda/lark-apps/SKILL.md +37 -0
- package/miaoda/lark-apps/references/openapi-key.md +80 -0
- package/miaoda/lark-apps-authz/SKILL.md +292 -0
- package/miaoda/lark-apps-authz/references/permission-points.md +39 -0
- package/miaoda/lark-apps-authz/references/role.md +122 -0
- package/miaoda/lark-apps-db/SKILL.md +226 -0
- package/miaoda/lark-apps-db/references/full-reference.md +302 -0
- package/miaoda/lark-apps-file/SKILL.md +216 -0
- package/miaoda/lark-apps-ops/SKILL.md +62 -0
- package/miaoda/lark-apps-ops/references/lark-apps-access-scope-get.md +30 -0
- package/miaoda/lark-apps-ops/references/lark-apps-access-scope-set.md +40 -0
- package/miaoda/lark-apps-ops/references/lark-apps-cache.md +62 -0
- package/miaoda/lark-apps-ops/references/lark-apps-env.md +46 -0
- package/miaoda/lark-apps-ops/references/lark-apps-local-dev.md +25 -0
- package/miaoda/lark-apps-ops/references/lark-apps-member.md +93 -0
- package/miaoda/lark-apps-ops/references/lark-apps-observability.md +46 -0
- package/miaoda/lark-apps-ops/references/lark-apps-plugin-install.md +36 -0
- package/miaoda/lark-apps-ops/references/lark-apps-plugin-list.md +23 -0
- package/miaoda/lark-apps-ops/references/lark-apps-plugin-uninstall.md +25 -0
- package/miaoda/lark-apps-ops/references/lark-apps-release-create.md +30 -0
- package/miaoda/lark-apps-ops/references/lark-apps-release-get.md +28 -0
- package/miaoda/lark-apps-ops/references/lark-apps-release-list.md +31 -0
- package/miaoda/lark-apps-ops/references/lark-apps-update.md +30 -0
- package/miaoda/lark-apps-ops/references/openapi-key.md +80 -0
- package/miaoda/miaoda-file/SKILL.md +1 -0
- package/miaoda/miaoda-sql/SKILL.md +6 -2
- package/miaoda/performance-review/SKILL.md +144 -0
- package/miaoda/performance-review/references/business-analyzer.md +139 -0
- package/miaoda/performance-review/references/examples.md +107 -0
- package/miaoda/reviewer-usage/SKILL.md +111 -0
- package/miaoda/testing-guide/SKILL.md +218 -0
- package/miaoda-design/lark-apps-comment/SKILL.md +110 -0
- package/miaoda-design/lark-apps-ops/SKILL.md +45 -0
- package/miaoda-design/lark-apps-ops/references/lark-apps-release-create.md +51 -0
- package/miaoda-design/lark-apps-ops/references/lark-apps-release-get.md +28 -0
- package/miaoda-design/lark-apps-ops/references/lark-apps-release-list.md +31 -0
- package/miaoda-design/lark-apps-ops/references/lark-apps-update.md +33 -0
- package/{shared → miaoda-modern}/lark-apps/SKILL.md +5 -5
- package/miaoda-modern/lark-apps/references/openapi-key.md +80 -0
- package/miaoda-modern/lark-apps-ops/SKILL.md +62 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-access-scope-get.md +30 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-access-scope-set.md +40 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-cache.md +62 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-env.md +46 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-local-dev.md +25 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-member.md +93 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-observability.md +46 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-plugin-install.md +36 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-plugin-list.md +23 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-plugin-uninstall.md +25 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-release-create.md +30 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-release-get.md +28 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-release-list.md +31 -0
- package/miaoda-modern/lark-apps-ops/references/lark-apps-update.md +30 -0
- package/{shared/lark-apps → miaoda-modern/lark-apps-ops}/references/openapi-key.md +3 -3
- package/miaoda-modern/memory/SKILL.md +86 -0
- package/package.json +1 -1
- package/shared/lark-cli/SKILL.md +221 -0
- package/shared/lark-cli/lark-base/README.md +56 -0
- package/shared/lark-cli/lark-base/references/lark-base-commands.md +108 -0
- package/shared/lark-cli/lark-calendar/README.md +158 -0
- package/shared/lark-cli/lark-calendar/references/lark-calendar-meeting.md +30 -0
- package/shared/lark-cli/lark-calendar/references/lark-calendar-room-find.md +108 -0
- package/shared/lark-cli/lark-calendar/references/lark-calendar-suggestion.md +120 -0
- package/shared/lark-cli/lark-contact/README.md +35 -0
- package/shared/lark-cli/lark-contact/references/lark-contact-get-user.md +13 -0
- package/shared/lark-cli/lark-contact/references/lark-contact-search-user.md +121 -0
- package/shared/lark-cli/lark-doc/README.md +67 -0
- package/shared/lark-cli/lark-doc/references/lark-doc-fetch.md +138 -0
- package/shared/lark-cli/lark-doc/references/lark-doc-history.md +61 -0
- package/shared/lark-cli/lark-drive/README.md +129 -0
- package/shared/lark-cli/lark-drive/references/lark-drive-files-list.md +183 -0
- package/shared/lark-cli/lark-im/README.md +84 -0
- package/shared/lark-cli/lark-im/references/lark-im-chat-list.md +140 -0
- package/shared/lark-cli/lark-im/references/lark-im-chat-members-list.md +84 -0
- package/shared/lark-cli/lark-im/references/lark-im-chat-search.md +135 -0
- package/shared/lark-cli/lark-im/references/lark-im-reactions.md +232 -0
- package/shared/lark-cli/lark-minutes/README.md +51 -0
- package/shared/lark-cli/lark-minutes/references/lark-minutes-download.md +130 -0
- package/shared/lark-cli/lark-sheets/README.md +173 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-changeset.md +105 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-chart.md +45 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-conditional-format.md +42 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-filter-view.md +49 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-filter.md +42 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-float-image.md +43 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-formula-verify.md +64 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-history.md +70 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-pivot-table.md +44 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-read-data.md +216 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-search-replace.md +67 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-sheet-structure.md +52 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-sparkline.md +47 -0
- package/shared/lark-cli/lark-sheets/references/lark-sheets-workbook.md +69 -0
- package/shared/lark-cli/lark-sheets/scripts/sheets_df.py +32 -0
- package/shared/lark-cli/lark-slides/README.md +86 -0
- package/shared/lark-cli/lark-slides/references/lark-slides-history.md +105 -0
- package/shared/lark-cli/lark-slides/references/lark-slides-xml-presentation-slide-get.md +108 -0
- package/shared/lark-cli/lark-slides/references/lark-slides-xml-presentations-get.md +77 -0
- package/shared/lark-cli/lark-task/README.md +93 -0
- package/shared/lark-cli/lark-task/references/lark-task-get-my-tasks.md +57 -0
- package/shared/lark-cli/lark-task/references/lark-task-get-related-tasks.md +49 -0
- package/shared/lark-cli/lark-task/references/lark-task-search.md +36 -0
- package/shared/lark-cli/lark-task/references/lark-task-tasklist-search.md +35 -0
- package/shared/lark-cli/lark-vc/README.md +40 -0
- package/shared/lark-cli/lark-vc/references/lark-vc-recording.md +31 -0
- package/shared/lark-cli/lark-whiteboard/README.md +35 -0
- package/shared/lark-cli/lark-whiteboard/references/lark-whiteboard-export.md +59 -0
- package/shared/lark-cli/lark-wiki/README.md +50 -0
- package/shared/lark-cli/lark-wiki/references/lark-wiki-node-get.md +59 -0
- package/shared/lark-cli/lark-wiki/references/lark-wiki-node-list.md +95 -0
- package/shared/lark-cli/lark-wiki/references/lark-wiki-space-list.md +68 -0
- package/miaoda-design/attachment/SKILL.md +0 -58
- /package/{shared → miaoda}/memory/SKILL.md +0 -0
- /package/{shared → miaoda-modern}/animation-skill/SKILL.md +0 -0
- /package/{shared → miaoda-modern}/charts-skill/SKILL.md +0 -0
- /package/{shared → miaoda-modern}/data-analysis/SKILL.md +0 -0
- /package/{shared → miaoda-modern}/data-analysis/references/json-output-specification.md +0 -0
- /package/{shared → miaoda-modern}/data-analysis/references/post-analysis-guide.md +0 -0
- /package/{shared → miaoda-modern}/data-analysis/references/python-analysis-reference.md +0 -0
- /package/{shared → miaoda-modern}/data-analysis/references/tmp-file-management-guide.md +0 -0
- /package/{shared → miaoda-modern}/extract-json-schema/SKILL.md +0 -0
- /package/{shared → miaoda-modern}/performance-review/SKILL.md +0 -0
- /package/{shared → miaoda-modern}/performance-review/references/business-analyzer.md +0 -0
- /package/{shared → miaoda-modern}/performance-review/references/examples.md +0 -0
- /package/{shared → miaoda-modern}/reviewer-usage/SKILL.md +0 -0
- /package/{shared → miaoda-modern}/testing-guide/SKILL.md +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# whiteboard +export(导出画板)
|
|
2
|
+
|
|
3
|
+
导出画板内容,支持导出为预览图片、SVG 矢量图、提取 PlantUML/Mermaid 代码,或获取飞书 OpenAPI 原生画板节点格式。
|
|
4
|
+
|
|
5
|
+
## 参数
|
|
6
|
+
|
|
7
|
+
| 参数 | 必填 | 说明 |
|
|
8
|
+
|----------------------|----|------------------------------------------------------------------------|
|
|
9
|
+
| `--whiteboard-token` | 是 | 画板 token,需要拥有画板的读权限 |
|
|
10
|
+
| `--output-type` | 是 | 输出格式:`preview`(预览图片)、`svg`(SVG 矢量图)、`source`(PlantUML/Mermaid 代码)、`raw`(OpenAPI 原生画板节点格式) |
|
|
11
|
+
| `--output` | 否 | 输出路径。当 `--output-type preview` 时必填;当 `--output-type svg/source/raw` 时可选,不填则直接输出到终端 |
|
|
12
|
+
| `--overwrite` | 否 | 覆盖已存在的文件,默认为 false |
|
|
13
|
+
|
|
14
|
+
## 输出格式
|
|
15
|
+
|
|
16
|
+
- `preview`:预览图片。保存时会根据接口实际返回的 `Content-Type` 决定扩展名,例如 `image/jpeg` 会保存为 `.jpg`。
|
|
17
|
+
- `svg`:导出画板为标准 SVG 矢量图。注意:导出为纯视觉快照,思维导图层级、表格结构、连接器绑定等语义信息会丢失。
|
|
18
|
+
- `source`:PlantUML/Mermaid 代码。仅限画板内有且仅有一个 PlantUML/Mermaid 图时,才可导出代码,否则会在返回值中告知不存在/有多个节点。
|
|
19
|
+
- `raw`:飞书 OpenAPI 原生画板节点格式。这一 json 格式适合查看画板节点的原始结构,不适合直接编辑复杂布局或内容。
|
|
20
|
+
- 需要把节点结构交给后续处理时,用 `--output <file>` 写入文件:文件里是裸的节点 JSON;直接输出到终端的结果会多一层 `{ ok, identity, data }` 包装,两者形状不同,别混用。
|
|
21
|
+
|
|
22
|
+
## 示例
|
|
23
|
+
|
|
24
|
+
### 示例 1:导出画板为预览图片
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
lark-cli whiteboard +export \
|
|
28
|
+
--whiteboard-token "wbcnxxxxxxxx" \
|
|
29
|
+
--output-type preview \
|
|
30
|
+
--output ./preview
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 示例 2:提取画板中的代码并直接输出
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
lark-cli whiteboard +export \
|
|
37
|
+
--whiteboard-token "wbcnxxxxxxxx" \
|
|
38
|
+
--output-type source
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 示例 3:导出画板为 SVG 矢量图
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
lark-cli whiteboard +export \
|
|
45
|
+
--whiteboard-token "wbcnxxxxxxxx" \
|
|
46
|
+
--output-type svg \
|
|
47
|
+
--output ./whiteboard.svg \
|
|
48
|
+
--as user
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 示例 4:导出画板原始节点结构到文件
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
lark-cli whiteboard +export \
|
|
55
|
+
--whiteboard-token "wbcnxxxxxxxx" \
|
|
56
|
+
--output-type raw \
|
|
57
|
+
--output ./nodes.json \
|
|
58
|
+
--overwrite
|
|
59
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# wiki (v2)
|
|
2
|
+
|
|
3
|
+
## 身份说明
|
|
4
|
+
|
|
5
|
+
知识空间和节点是用户的个人资源,本 skill 的所有命令统一显式带 `--as user`。`--as` 的默认值是
|
|
6
|
+
`auto`,不显式指定时可能不按用户身份解析,导致列出的是应用可见的空间而非用户自己的;所以下面
|
|
7
|
+
的每条命令与示例都带 `--as user`(`my_library` 个人文档库更是只在 `--as user` 下才有效)。
|
|
8
|
+
|
|
9
|
+
## 快速决策
|
|
10
|
+
|
|
11
|
+
- 用户要**按特定主题 / 关键词 / 内容线索查找资料并收集到知识库节点或新建知识库节点下**:先用 Drive 全量搜索召回,再按 Wiki 目标解析、确认和移动;不要只用 Wiki 节点列表做局部遍历。
|
|
12
|
+
- 用户要**整理 / 盘点 / 归类 / 重构知识库、个人文档库、文档库目录或 Wiki 节点结构**,或要生成整理方案、目标目录树、移动计划时,不要只使用 Wiki 节点 API;应先完成 Drive / Wiki / 个人文档库的统一入口解析、资源盘点、分类计划、写前确认和结果验证。
|
|
13
|
+
- 用户给的是知识库 URL(`.../wiki/<token>`)且要查节点详情:用 `lark-cli wiki +node-get --node-token '<url>' --as user --format json` 解析出 `node_token` / `obj_token` / `space_id`。**获取或解析 Wiki 节点统一优先用 `+node-get`**,包括只为拿到 `space_id`、`node_token`、`obj_token`、`obj_type` 的中间步骤——从返回的 `data.space_id` 读空间 ID。只有当任务确实需要 `+node-get` 未输出的原始响应字段时,才回退到 `wiki spaces get_node`(读 `data.node.space_id`),且回退前先跑 `lark-cli schema wiki.spaces.get_node`。节点解析与后续操作必须使用同一身份。
|
|
14
|
+
- 截断的 wiki node token 会被直接拒绝:不要把肉眼截短、复制不全的 token 拼进 `--node-token` 试探,先要回完整 URL 或 token。
|
|
15
|
+
- 用户要列出 Wiki 节点:先用 `lark-cli wiki +space-list --as user` 拿数字 `space_id`,再用 `lark-cli wiki +node-list --space-id <space_id> --as user`。不要把 wiki URL、node token、doc token、名称直接当 `--space-id`。钻子节点时 `--parent-node-token` 必须是 wiki node token;如果用户给的是 docx/sheet/base URL,先用 `lark-cli wiki +node-get --node-token <url> --as user` 解析出 `node_token`。
|
|
16
|
+
- `wiki +node-list` 命中 `invalid_parameters`、`not_found`、`permission_denied` 时,不要重复调用同一参数;按 hint 修 `space_id` / `parent_node_token` / 权限。只有 `rate_limit` 才做退避重试。
|
|
17
|
+
- 用户要**查看 / 列出空间成员**:先拿到数字 `space_id`(见上,用 `+space-list` 或 `+node-get` 解析),再调用 `wiki members list`(先 `lark-cli schema wiki.members.list` 查参数结构,再 `lark-cli wiki members list ... --as user`);多成员场景按返回的 `page_token` 翻页。这是只读查询,不涉及成员的增删。
|
|
18
|
+
|
|
19
|
+
## Shortcuts(推荐优先使用)
|
|
20
|
+
|
|
21
|
+
Shortcut 是对常用只读查询的高级封装(`lark-cli wiki +<verb> [flags]`)。有 Shortcut 的操作优先使用。
|
|
22
|
+
|
|
23
|
+
| Shortcut | 说明 |
|
|
24
|
+
|----------|------|
|
|
25
|
+
| [`+space-list`](references/lark-wiki-space-list.md) | List all wiki spaces accessible to the caller |
|
|
26
|
+
| [`+node-list`](references/lark-wiki-node-list.md) | List wiki nodes in a space or under a parent node (supports pagination) |
|
|
27
|
+
| [`+node-get`](references/lark-wiki-node-get.md) | Get a wiki node's details by node_token / obj_token / Lark URL |
|
|
28
|
+
|
|
29
|
+
## API Resources
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
lark-cli schema wiki.<resource>.<method> # 调用原生 API 前必须先查看 --data / --params 参数结构,不要猜测字段格式
|
|
33
|
+
lark-cli wiki <resource> <method> [flags] # 调用 API
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
沙箱里 wiki 域**仅以下只读 API 可用**,不要臆造其它 service/resource/method 组合:
|
|
37
|
+
|
|
38
|
+
### spaces
|
|
39
|
+
|
|
40
|
+
- `get` — 获取知识空间信息
|
|
41
|
+
- `get_node` — 获取知识空间节点信息
|
|
42
|
+
- `list` — 获取知识空间列表
|
|
43
|
+
|
|
44
|
+
### members
|
|
45
|
+
|
|
46
|
+
- `list` — 获取知识空间成员列表
|
|
47
|
+
|
|
48
|
+
### nodes
|
|
49
|
+
|
|
50
|
+
- `list` — 获取知识空间子节点列表
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# lark-wiki +node-get
|
|
2
|
+
|
|
3
|
+
Get a wiki node's details by `node_token`, `obj_token`, or a Lark URL. Use this as the "what am I about to touch?" read step before deciding where a node lives.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
lark-cli wiki +node-get \
|
|
9
|
+
--node-token <node_token | obj_token | Lark URL> \
|
|
10
|
+
[--obj-type <doc|docx|sheet|bitable|mindnote|slides|file>] \
|
|
11
|
+
[--space-id <space_id>] \
|
|
12
|
+
[--format json|pretty|table|csv|ndjson] \
|
|
13
|
+
[--as user]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Flags
|
|
17
|
+
|
|
18
|
+
| Flag | Type | Required | Default | Description |
|
|
19
|
+
|------|------|----------|---------|-------------|
|
|
20
|
+
| `--node-token` | string | **Yes** | — | `node_token`, cloud-doc `obj_token`, or a Lark URL embedding one (e.g. `https://feishu.cn/wiki/<token>` or `https://feishu.cn/docx/<token>`). |
|
|
21
|
+
| `--token` | string | — (deprecated) | — | Deprecated original name; still accepted for backward compatibility but emits a `Flag --token has been deprecated, use --node-token instead` warning on stderr. New scripts should use `--node-token`. |
|
|
22
|
+
| `--obj-type` | enum | No | — | Needed when `--node-token` is a raw `obj_token`; auto-inferred from typed Lark URLs. If omitted for a raw token, the shortcut treats it as a wiki `node_token`. |
|
|
23
|
+
| `--space-id` | string | No | — | Optional cross-check: fail if the resolved node does not live in this space |
|
|
24
|
+
| `--format` | enum | No | `json` | `json` / `pretty` / `table` / `csv` / `ndjson` |
|
|
25
|
+
| `--as` | enum | No | `auto` | Identity `user`; wiki is user-centric → always pass `--as user` |
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"space_id": "7160145948494381236",
|
|
32
|
+
"node_token": "wikcnEXAMPLE",
|
|
33
|
+
"obj_token": "docxEXAMPLE",
|
|
34
|
+
"obj_type": "docx",
|
|
35
|
+
"node_type": "origin",
|
|
36
|
+
"parent_node_token": "wikcnPARENT",
|
|
37
|
+
"origin_node_token": "",
|
|
38
|
+
"title": "Design Spec",
|
|
39
|
+
"has_child": true,
|
|
40
|
+
"creator": "ou_xxx",
|
|
41
|
+
"owner": "ou_yyy",
|
|
42
|
+
"obj_edit_time": "1700000000",
|
|
43
|
+
"obj_create_time": "1690000000",
|
|
44
|
+
"node_create_time": "1690000001",
|
|
45
|
+
"updated_at": "2023-11-14T22:13:20Z"
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Notes
|
|
50
|
+
|
|
51
|
+
- The underlying API is `GET /open-apis/wiki/v2/spaces/get_node`. For a `node_token` no `obj_type` is sent; for an `obj_token` the `obj_type` (explicit or URL-inferred) is required.
|
|
52
|
+
- `creator` falls back to `creator` when `node_creator` is absent. `updated_at` is `obj_edit_time` formatted as RFC3339.
|
|
53
|
+
- No `url` is returned: `get_node` does not provide one and a synthesized `www.feishu.cn/wiki/<node_token>` link is non-canonical/misleading for a read command. Use `node_token` / `obj_token` as the identifiers.
|
|
54
|
+
- Prefer this shortcut over the raw `wiki spaces get_node` API for every node-resolution step, including when you only need `space_id` — read it from `data.space_id` (the raw API nests it under `data.node.space_id`).
|
|
55
|
+
- A truncated `node_token` is rejected outright rather than sent as a lookup. If the token you were given looks cut off, ask for the full URL or token instead of retrying variants.
|
|
56
|
+
|
|
57
|
+
## Required Scope
|
|
58
|
+
|
|
59
|
+
`wiki:node:retrieve`
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# lark-wiki +node-list
|
|
2
|
+
|
|
3
|
+
List wiki nodes in a space or under a specific parent node. **Default fetches a single page** (large knowledge bases can have thousands of nodes — opt into `--page-all` explicitly with an eye on `--page-limit`).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Default: single page of root nodes
|
|
9
|
+
lark-cli wiki +node-list --space-id <SPACE_ID> --as user
|
|
10
|
+
|
|
11
|
+
# Drill into a sub-directory (still single page by default)
|
|
12
|
+
lark-cli wiki +node-list --space-id <SPACE_ID> --parent-node-token <NODE_TOKEN> --as user
|
|
13
|
+
|
|
14
|
+
# Drill with a wiki URL (CLI normalizes /wiki/<token> to node_token)
|
|
15
|
+
lark-cli wiki +node-list --space-id <SPACE_ID> --parent-node-token "https://feishu.cn/wiki/wikcn_xxx" --as user
|
|
16
|
+
|
|
17
|
+
# Personal document library (user identity only)
|
|
18
|
+
lark-cli wiki +node-list --space-id my_library --as user
|
|
19
|
+
|
|
20
|
+
# Walk every page (capped by --page-limit, default 10)
|
|
21
|
+
lark-cli wiki +node-list --space-id <SPACE_ID> --page-all --as user
|
|
22
|
+
|
|
23
|
+
# Walk every page with a higher cap
|
|
24
|
+
lark-cli wiki +node-list --space-id <SPACE_ID> --page-all --page-limit 30 --as user
|
|
25
|
+
|
|
26
|
+
# Resume from a cursor
|
|
27
|
+
lark-cli wiki +node-list --space-id <SPACE_ID> --page-token <TOKEN> --as user
|
|
28
|
+
|
|
29
|
+
# Pretty / table output
|
|
30
|
+
lark-cli wiki +node-list --space-id <SPACE_ID> --format pretty --as user
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Flags
|
|
34
|
+
|
|
35
|
+
| Flag | Type | Required | Default | Description |
|
|
36
|
+
|------|------|----------|---------|-------------|
|
|
37
|
+
| `--space-id` | string | **Yes** | — | Numeric wiki space ID. Use `my_library` for personal document library (user only) |
|
|
38
|
+
| `--parent-node-token` | string | No | — | Parent wiki node token, or a `/wiki/<token>` URL; omit to list the space root |
|
|
39
|
+
| `--page-size` | int | No | 50 | Page size, 1-50 |
|
|
40
|
+
| `--page-token` | string | No | — | Page cursor; implies single-page fetch (no auto-pagination) |
|
|
41
|
+
| `--page-all` | bool | No | `false` | Automatically paginate through all pages (capped by `--page-limit`) |
|
|
42
|
+
| `--page-limit` | int | No | 10 | Max pages with `--page-all` (0 = unlimited) |
|
|
43
|
+
| `--format` | enum | No | `json` | `json` / `pretty` / `table` / `csv` / `ndjson` |
|
|
44
|
+
| `--as` | enum | No | `auto` | Identity `user`; wiki is user-centric → always pass `--as user` (`my_library` requires `--as user`) |
|
|
45
|
+
|
|
46
|
+
## Output
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"ok": true,
|
|
51
|
+
"data": {
|
|
52
|
+
"nodes": [
|
|
53
|
+
{
|
|
54
|
+
"space_id": "6946843325487912356",
|
|
55
|
+
"node_token": "wikcn_EXAMPLE_TOKEN",
|
|
56
|
+
"obj_token": "doccn_EXAMPLE_TOKEN",
|
|
57
|
+
"obj_type": "docx",
|
|
58
|
+
"parent_node_token": "",
|
|
59
|
+
"node_type": "origin",
|
|
60
|
+
"title": "Getting Started",
|
|
61
|
+
"has_child": true
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"has_more": false,
|
|
65
|
+
"page_token": ""
|
|
66
|
+
},
|
|
67
|
+
"meta": { "count": 1 }
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
When the default single-page fetch (or `--page-all` capped by `--page-limit`) does not exhaust the upstream cursor, `has_more=true` and `page_token=<cursor>` so the caller can resume via `--page-token` or by increasing `--page-limit`.
|
|
72
|
+
|
|
73
|
+
## Traverse the wiki tree
|
|
74
|
+
|
|
75
|
+
To list all content recursively, call `+node-list` again with each node's `node_token` as `--parent-node-token` when `has_child` is `true`.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Step 1: list root nodes
|
|
79
|
+
lark-cli wiki +node-list --space-id 6946843325487912356 --as user
|
|
80
|
+
|
|
81
|
+
# Step 2: drill into a node that has children
|
|
82
|
+
lark-cli wiki +node-list --space-id 6946843325487912356 --parent-node-token wikcn_EXAMPLE_TOKEN --as user
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Notes
|
|
86
|
+
|
|
87
|
+
- `--space-id my_library` is a per-user alias and only valid with `--as user`.
|
|
88
|
+
- `--space-id` is a numeric wiki `space_id`. Do not pass a wiki URL, wiki node token, document token, or title. Use `lark-cli wiki +space-list --as user` to discover it.
|
|
89
|
+
- `--parent-node-token` must resolve to a wiki node token. If you have a docx/sheet/base/file URL, first run `lark-cli wiki +node-get --node-token <url> --as user` and use the returned `node_token`.
|
|
90
|
+
- Treat `invalid_parameters` (`space_id is not int`, `invalid page_token`), `not_found` (`node not found by parent node token`), and `permission_denied` as terminal for the current arguments. Fix the argument or permission before retrying.
|
|
91
|
+
- For `rate_limit`, stop immediate retries and retry later with exponential backoff or a smaller `--page-limit`.
|
|
92
|
+
|
|
93
|
+
## Required Scope
|
|
94
|
+
|
|
95
|
+
`wiki:node:retrieve`
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# lark-wiki +space-list
|
|
2
|
+
|
|
3
|
+
List wiki spaces accessible to the caller. **Default fetches a single page** (matches the rest of the CLI's list shortcuts); pass `--page-all` to walk every page.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Default: single page (first up to --page-size items)
|
|
9
|
+
lark-cli wiki +space-list --as user
|
|
10
|
+
|
|
11
|
+
# Walk every page (capped by --page-limit, default 10)
|
|
12
|
+
lark-cli wiki +space-list --page-all --as user
|
|
13
|
+
|
|
14
|
+
# Walk every page, no cap (use with care if you have many spaces)
|
|
15
|
+
lark-cli wiki +space-list --page-all --page-limit 0 --as user
|
|
16
|
+
|
|
17
|
+
# Resume from a specific cursor (single-page fetch regardless of --page-all)
|
|
18
|
+
lark-cli wiki +space-list --page-token <TOKEN> --as user
|
|
19
|
+
|
|
20
|
+
# Pretty / table / csv / ndjson output
|
|
21
|
+
lark-cli wiki +space-list --format pretty --as user
|
|
22
|
+
lark-cli wiki +space-list --format table --as user
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Flags
|
|
26
|
+
|
|
27
|
+
| Flag | Type | Default | Description |
|
|
28
|
+
|------|------|---------|-------------|
|
|
29
|
+
| `--page-size` | int | 50 | Page size, 1-50 |
|
|
30
|
+
| `--page-token` | string | — | Page cursor; implies single-page fetch (no auto-pagination) |
|
|
31
|
+
| `--page-all` | bool | `false` | Automatically paginate through all pages (capped by `--page-limit`) |
|
|
32
|
+
| `--page-limit` | int | 10 | Max pages with `--page-all` (0 = unlimited) |
|
|
33
|
+
| `--format` | enum | `json` | `json` / `pretty` / `table` / `csv` / `ndjson` |
|
|
34
|
+
| `--as` | enum | `auto` | Identity `user`; wiki is user-centric → always pass `--as user` |
|
|
35
|
+
|
|
36
|
+
## Output
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"ok": true,
|
|
41
|
+
"data": {
|
|
42
|
+
"spaces": [
|
|
43
|
+
{
|
|
44
|
+
"space_id": "6946843325487912356",
|
|
45
|
+
"name": "Engineering Wiki",
|
|
46
|
+
"description": "...",
|
|
47
|
+
"space_type": "team",
|
|
48
|
+
"visibility": "private",
|
|
49
|
+
"open_sharing": "closed"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"has_more": false,
|
|
53
|
+
"page_token": ""
|
|
54
|
+
},
|
|
55
|
+
"meta": { "count": 1 }
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
When the default single-page fetch (or `--page-all` capped by `--page-limit`) does not exhaust the upstream cursor, `has_more=true` and `page_token=<cursor>` so the caller can resume via `--page-token` or by increasing `--page-limit`.
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- **The underlying API never returns the my_library personal library**; resolve it via `lark-cli wiki spaces get --params '{"space_id":"my_library"}' --as user`.
|
|
64
|
+
- Use `space_id` from the output as `--space-id` for `+node-list`.
|
|
65
|
+
|
|
66
|
+
## Required Scope
|
|
67
|
+
|
|
68
|
+
`wiki:space:retrieve`
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: attachment
|
|
3
|
-
description: "Use when user mentions attachments, uploaded files, or shared files. Handles preprocessing: listing, extracting archives, and reading files in .agent/{conversation_id}/attachments directory."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Attachment Preprocessing
|
|
7
|
-
|
|
8
|
-
Preprocess user-uploaded attachments to make them accessible for subsequent workflows.
|
|
9
|
-
|
|
10
|
-
**Important**: This skill only handles attachment preprocessing (listing, extracting, reading). Subsequent processing workflows should be determined based on the extracted file contents.
|
|
11
|
-
|
|
12
|
-
## Storage Location
|
|
13
|
-
|
|
14
|
-
```text
|
|
15
|
-
.agent/{conversation_id}/attachments/
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Preprocessing Steps
|
|
19
|
-
|
|
20
|
-
### 1. List Attachments
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
ls -la .agent/{conversation_id}/attachments/
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### 2. Handle Archives
|
|
27
|
-
|
|
28
|
-
For `.zip` and other archive files, preview first then extract:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# Preview contents
|
|
32
|
-
unzip -l .agent/{conversation_id}/attachments/archive.zip
|
|
33
|
-
|
|
34
|
-
# Extract in place
|
|
35
|
-
unzip -o .agent/{conversation_id}/attachments/archive.zip -d .agent/{conversation_id}/attachments/
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### 3. Read Files
|
|
39
|
-
|
|
40
|
-
Use the Read tool to read text file contents.
|
|
41
|
-
|
|
42
|
-
## What Happens Next
|
|
43
|
-
|
|
44
|
-
After preprocessing, **determine subsequent processing based on file contents**:
|
|
45
|
-
|
|
46
|
-
- Code files → May need analysis, refactoring, or project integration
|
|
47
|
-
- Config files → May need to apply to project configuration
|
|
48
|
-
- Data files → May need data analysis or visualization
|
|
49
|
-
- Image files → May need to copy to project resource directories
|
|
50
|
-
- Document files → May need reading, comprehension, or information extraction
|
|
51
|
-
|
|
52
|
-
**This skill does not prescribe specific processing methods** — determine based on user intent and file contents.
|
|
53
|
-
|
|
54
|
-
## Notes
|
|
55
|
-
|
|
56
|
-
- All operations are confined to `.agent/{conversation_id}/attachments/` directory
|
|
57
|
-
- Use `offset` and `limit` parameters when reading large files
|
|
58
|
-
- Attachments may be cleaned up after conversation ends
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|