@lark-project/meegle 1.0.8 → 1.0.10

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/CHANGELOG.md CHANGED
@@ -8,6 +8,19 @@ versioned section on each npm release.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [v1.0.10] - 2026-06-25
12
+
13
+ ### Fixed
14
+
15
+ - `mywork todo` now adds an actionable troubleshooting suggestion when the backend returns `get action info fail`, pointing users to refresh command metadata and pass `--asset-key` for multi-workspace accounts.
16
+ - Meegle runtime flags such as `--refresh` and `--profile` are no longer forwarded as backend tool parameters when passed explicitly on dynamic commands.
17
+
18
+ ## [v1.0.9] - 2026-06-11
19
+
20
+ ### Added
21
+
22
+ - `attachment +download` now performs an extra integrity check on the downloaded file and aborts — writing nothing to disk — when the file fails validation or cannot be verified. A failed check returns a `CLIENT_FILE_SIGN_MISMATCH` error and an unverifiable response returns `CLIENT_FILE_SIGN_UNVERIFIED`; both carry a retry hint.
23
+
11
24
  ## [v1.0.8] - 2026-06-09
12
25
 
13
26
  ### Added
package/README.md CHANGED
@@ -85,7 +85,15 @@ The default `meegle auth login` uses an arrow-key host picker plus a browser OAu
85
85
  npm install -g @lark-project/meegle
86
86
  ```
87
87
 
88
- **Step 2 — Persist the host**
88
+ **Step 2 — Install the Agent Skill**
89
+
90
+ > Recommended for AI-agent workflows, optional for direct CLI use. The skill teaches agents how to choose and run `meegle` commands correctly.
91
+
92
+ ```bash
93
+ npx skills add larksuite/meegle-cli -y -g
94
+ ```
95
+
96
+ **Step 3 — Persist the host**
89
97
 
90
98
  ```bash
91
99
  meegle config set host <host>
@@ -93,7 +101,7 @@ meegle config set host <host>
93
101
 
94
102
  Examples of `<host>`: `project.feishu.cn`, `meegle.com`, or your self-hosted tenant domain such as `your-tenant.example.com`.
95
103
 
96
- **Step 3 — Log in with Device Code**
104
+ **Step 4 — Log in with Device Code**
97
105
 
98
106
  > Run this command in the background. It prints an authorization URL — extract it and send it to the user. The command exits automatically once the user completes authorization in the browser.
99
107
 
@@ -107,7 +115,7 @@ Alternatively, pass the host inline each time without persisting it:
107
115
  meegle auth login --device-code --host <host>
108
116
  ```
109
117
 
110
- **Step 4 — Verify**
118
+ **Step 5 — Verify**
111
119
 
112
120
  ```bash
113
121
  meegle auth status
@@ -332,6 +340,11 @@ meegle mywork todo --action done --page-num 1
332
340
  meegle mywork todo --action overdue --page-num 1
333
341
  ```
334
342
 
343
+ If `mywork todo` fails with `get action info fail`, refresh command metadata first:
344
+ `meegle --refresh mywork todo --action this_week --page-num 1`. If your account
345
+ belongs to multiple workspaces, pass the workspace key explicitly:
346
+ `meegle mywork todo --action this_week --page-num 1 --asset-key Asset_xxx`.
347
+
335
348
  ### Querying Work Items
336
349
 
337
350
  ```bash
@@ -474,6 +487,18 @@ meegle attachment +download "$URL" \
474
487
  --output ./local.pdf --overwrite
475
488
  ```
476
489
 
490
+ **Integrity check (`+download`)**: `+download` performs an extra integrity check
491
+ on each downloaded file and aborts — writing nothing — if the file fails
492
+ validation or cannot be verified. On a failed check you get a
493
+ `CLIENT_FILE_SIGN_MISMATCH` error (unverifiable response →
494
+ `CLIENT_FILE_SIGN_UNVERIFIED`); both are transient, so just retry.
495
+
496
+ **Custom headers / env routing**: any custom headers configured for the active
497
+ profile are applied to the download GET as well as the preprocess call, so an
498
+ environment-routing header pins the whole download to the same environment. Auth
499
+ headers are stripped before the GET so the token never reaches the
500
+ object-storage host.
501
+
477
502
  `+upload` returns a JSON object with the file token and metadata:
478
503
 
479
504
  ```json
package/README.zh-CN.md CHANGED
@@ -85,7 +85,15 @@ meegle inspect workitem.create
85
85
  npm install -g @lark-project/meegle
86
86
  ```
87
87
 
88
- **Step 2 — 持久化 host**
88
+ **Step 2 — 安装 Agent Skill**
89
+
90
+ > 推荐用于 AI Agent 场景;如果只是手动使用 CLI,则是可选步骤。Skill 会教 Agent 正确选择和执行 `meegle` 命令。
91
+
92
+ ```bash
93
+ npx skills add larksuite/meegle-cli -y -g
94
+ ```
95
+
96
+ **Step 3 — 持久化 host**
89
97
 
90
98
  ```bash
91
99
  meegle config set host <host>
@@ -93,7 +101,7 @@ meegle config set host <host>
93
101
 
94
102
  `<host>` 示例:`project.feishu.cn`、`meegle.com`,或自建租户域名(如 `your-tenant.example.com`)。
95
103
 
96
- **Step 3 — Device Code 登录**
104
+ **Step 4 — Device Code 登录**
97
105
 
98
106
  > 建议后台执行。命令会输出授权 URL —— 提取后发给用户,用户在浏览器完成授权后命令自动退出。
99
107
 
@@ -107,7 +115,7 @@ meegle auth login --device-code
107
115
  meegle auth login --device-code --host <host>
108
116
  ```
109
117
 
110
- **Step 4 — 验证**
118
+ **Step 5 — 验证**
111
119
 
112
120
  ```bash
113
121
  meegle auth status
@@ -332,6 +340,11 @@ meegle mywork todo --action done --page-num 1
332
340
  meegle mywork todo --action overdue --page-num 1
333
341
  ```
334
342
 
343
+ 如果 `mywork todo` 返回 `get action info fail`,先刷新命令元数据:
344
+ `meegle --refresh mywork todo --action this_week --page-num 1`。如果账号同时属于多个工作区,
345
+ 请显式传入工作区 key:
346
+ `meegle mywork todo --action this_week --page-num 1 --asset-key Asset_xxx`。
347
+
335
348
  ### 查询工作项
336
349
 
337
350
  ```bash
@@ -468,6 +481,15 @@ meegle attachment +download "$URL" \
468
481
  --output ./local.pdf --overwrite
469
482
  ```
470
483
 
484
+ **完整性校验(`+download`)**:`+download` 会对下载的文件做一次额外的完整性校验,
485
+ 若校验失败或无法校验则中止下载、不写任何文件。校验不通过时返回
486
+ `CLIENT_FILE_SIGN_MISMATCH` 错误(无法校验时为 `CLIENT_FILE_SIGN_UNVERIFIED`);
487
+ 两者都是临时问题,重试即可。
488
+
489
+ **自定义头 / 环境路由**:当前 profile 配置的自定义头会同时作用于下载 GET 与预处理调用,
490
+ 从而用环境路由头把整条下载固定到同一环境。GET 前会剥掉 auth 相关头,
491
+ 确保 token 不会发到对象存储所在的主机。
492
+
471
493
  `+upload` 输出 JSON 对象,包含 file_token 与文件元信息:
472
494
 
473
495
  ```json
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-project/meegle",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Agent-First CLI for Meegle (Lark Project)",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/larksuite/meegle-cli#readme",