@lark-project/meegle 1.0.5 → 1.0.6

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,12 @@ versioned section on each npm release.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [v1.0.6] - 2026-05-28
12
+
13
+ ### Changed
14
+
15
+ - `auth status` now issues a lightweight `tools/list` call to validate the token against the server, instead of only checking whether a token string is present locally. Cron / CI preflights that previously saw `authenticated: true` followed by an immediate `401` on the next business call now get the correct verdict up front. JSON output gains a `reason` field on failure (`no local token` / `token rejected by server` / `server unreachable: <err>`). A new exit code `2` indicates the server was unreachable (network, timeout, 5xx) — distinct from exit `1` which still covers missing or rejected tokens. There is no opt-out flag: offline status inspection is intentionally no longer supported.
16
+
11
17
  ## [v1.0.5] - 2026-05-20
12
18
 
13
19
  ### Added
package/README.md CHANGED
@@ -289,7 +289,7 @@ The agent consults the skill, picks the right `meegle` commands, and runs them f
289
289
  |---------|-------------|
290
290
  | `auth login` | Log in (browser or `--device-code`) |
291
291
  | `auth logout` | Log out |
292
- | `auth status` | View login status |
292
+ | `auth status` | View login status (validates the token against the server) |
293
293
 
294
294
  ### config — Configuration
295
295
 
@@ -757,13 +757,30 @@ The terminal displays a QR code and authorization code. Scan with your phone to
757
757
  ### Other Auth Commands
758
758
 
759
759
  ```bash
760
- # Check login status
760
+ # Check login status (issues a lightweight tools/list call to validate the
761
+ # token against the server — safe to use as a cron preflight)
761
762
  meegle auth status
762
763
 
763
764
  # Log out
764
765
  meegle auth logout
765
766
  ```
766
767
 
768
+ `auth status` exit codes and `reason` field let scripts (cron jobs, CI
769
+ preflights) react correctly without having to parse human text:
770
+
771
+ | Exit | `reason` | Meaning | Recommended action |
772
+ |------|----------|---------|--------------------|
773
+ | 0 | — | Token is present locally and accepted by the server | Proceed |
774
+ | 1 | `no local token` | No token stored | Run `meegle auth login` |
775
+ | 1 | `token rejected by server` | Token expired or revoked; refresh exhausted | Run `meegle auth login` |
776
+ | 2 | `server unreachable: <err>` | Network, timeout, or 5xx — the call itself failed | Retry later; do not re-login |
777
+
778
+ JSON output example (`auth status --format json`) on a rejected token:
779
+
780
+ ```json
781
+ {"authenticated": false, "host": "meegle.com", "reason": "token rejected by server"}
782
+ ```
783
+
767
784
  ## Configuration
768
785
 
769
786
  ### Config File
package/README.zh-CN.md CHANGED
@@ -289,7 +289,7 @@ Agent 会参考 skill,自动选择合适的 `meegle` 命令执行。配合 `--
289
289
  |------|------|
290
290
  | `auth login` | 登录(浏览器或 `--device-code`) |
291
291
  | `auth logout` | 登出 |
292
- | `auth status` | 查看登录状态 |
292
+ | `auth status` | 查看登录状态(会向服务端发一次校验请求,确认 token 真实可用) |
293
293
 
294
294
  ### config — 配置域
295
295
 
@@ -734,13 +734,30 @@ meegle auth login --device-code
734
734
  ### 其他认证命令
735
735
 
736
736
  ```bash
737
- # 查看登录状态
737
+ # 查看登录状态(会向服务端发一次轻量 tools/list 调用校验 token,可作为
738
+ # cron 任务的 preflight)
738
739
  meegle auth status
739
740
 
740
741
  # 登出
741
742
  meegle auth logout
742
743
  ```
743
744
 
745
+ `auth status` 退出码与 `reason` 字段配合,让 cron / CI preflight 脚本
746
+ 不用解析人类可读文本即可分支处理:
747
+
748
+ | 退出码 | `reason` | 含义 | 建议动作 |
749
+ |--------|----------|------|----------|
750
+ | 0 | — | 本地有 token 且服务端校验通过 | 继续执行 |
751
+ | 1 | `no local token` | 本地无 token | 执行 `meegle auth login` |
752
+ | 1 | `token rejected by server` | token 已过期或被撤销(refresh 也救不回来) | 执行 `meegle auth login` |
753
+ | 2 | `server unreachable: <err>` | 网络、超时、5xx —— 调用本身失败 | 稍后重试,不要重新登录 |
754
+
755
+ JSON 输出示例(`auth status --format json`),token 被拒:
756
+
757
+ ```json
758
+ {"authenticated": false, "host": "meegle.com", "reason": "token rejected by server"}
759
+ ```
760
+
744
761
  ## 配置
745
762
 
746
763
  ### 配置文件
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/bin/meegle.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-project/meegle",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Agent-First CLI for Meegle (Lark Project)",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/larksuite/meegle-cli#readme",