@lark-project/meegle 1.0.25 → 1.0.26

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,16 @@ versioned section on each npm release.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [v1.0.26] - 2026-10-14
12
+
13
+ ### Added
14
+
15
+ - Added `meegle telemetry status` to show whether failed-command diagnostics are enabled under the current local settings, disclosure record, environment override and cached policy.
16
+
17
+ ### Fixed
18
+
19
+ - First-use diagnostics disclosure is written to stderr and saved in non-interactive CI, Agent and redirected invocations, allowing default-enabled collection to take effect. Explicit `telemetry enable` completes any missing disclosure before enabling the local switch and reports disclosure failures as errors.
20
+
11
21
  ## [v1.0.25] - 2026-10-13
12
22
 
13
23
  ### Added
package/README.md CHANGED
@@ -1032,7 +1032,7 @@ Dynamic discovery accepts nullable JSON Schema types such as `"type": ["string",
1032
1032
 
1033
1033
  ## Failed-command diagnostics
1034
1034
 
1035
- After a one-time notice in an interactive terminal, Meegle CLI collects sampled diagnostics for final root commands that fail. Successful commands are not collected in schema v1. Collection never includes command argument values, tokens, file paths, request or response bodies, or error messages.
1035
+ Failed-command diagnostics are enabled by default. On first use, Meegle CLI writes a one-time notice to stderr and saves its record, including in CI, Agent and redirected invocations; stdout remains reserved for command results. After the notice is successfully written and saved, Meegle CLI collects sampled diagnostics for final root commands that fail. Successful commands are not collected in schema v1. Collection never includes command argument values, tokens, file paths, request or response bodies, or error messages.
1036
1036
 
1037
1037
  The foreground command selects a diagnostic event and hands it to a detached maintenance process. That process queues the event without scanning historical events, then performs cleanup, policy refresh and upload when due. The foreground does not wait for queue/sequence locks, event writes or network delivery. Command return is not confirmation that its event has been queued. Policy is refreshed at most every 12 hours (with a 1-hour retry after an unhealthy refresh). Pending events are isolated by profile and host. Background cleanup removes expired events and the oldest excess events to meet the global limits of 7 days, 1,000 events and 5 MiB. Writes can temporarily exceed these limits until maintenance runs. While the current profile/host has queued events, subsequent commands can trigger global cleanup once a minute, independently of credentials and the one-hour upload retry interval. Recording a new failure during upload cooldown does not retry the network request. Policy refresh also triggers maintenance. Switching to an empty queue does not itself schedule cleanup of inactive profiles. No resident daemon runs after the CLI exits.
1038
1038
 
@@ -1047,9 +1047,12 @@ Control collection locally:
1047
1047
  ```bash
1048
1048
  meegle telemetry disable # also clears queued events
1049
1049
  meegle telemetry enable
1050
+ meegle telemetry status # defaults to {"enabled": true} or {"enabled": false}
1050
1051
  ```
1051
1052
 
1052
- Set `MEEGLE_TELEMETRY=disabled` to disable it for the current environment. The CLI journey event is separate from MCP server telemetry; when available, a structured backend `logid` is included only as a correlation reference.
1053
+ Explicit `enable` first writes and saves the current notice if it has not been recorded, then enables the local switch. Notice output or persistence failure returns an error without reporting successful enablement. `status` returns only whether collection is currently allowed, considering the local switch, disclosure record, environment override and locally stored policy snapshot for the current profile/host. It does not resolve credentials or refresh policy over the network, and supports `--format json|table|ndjson` (or `-o`). `enabled=true` does not confirm that any diagnostic has been uploaded.
1054
+
1055
+ Set `MEEGLE_TELEMETRY=disabled` to disable it for the current environment and suppress automatic disclosure. Explicit `enable` can still complete disclosure and enable the local switch, but does not override the environment variable or remote policy restrictions. The CLI journey event is separate from MCP server telemetry; when available, a structured backend `logid` is included only as a correlation reference.
1053
1056
 
1054
1057
  ## FAQ
1055
1058
 
package/README.zh-CN.md CHANGED
@@ -999,7 +999,7 @@ Policy 拒绝遵循显式结构化输出格式,并使用稳定错误码 `CLIEN
999
999
 
1000
1000
  ## 失败命令诊断
1001
1001
 
1002
- 在交互终端展示一次性告知后,Meegle CLI 会按策略采集最终执行失败的根命令诊断;V1 不采集成功命令。采集内容不包含命令参数值、Token、文件路径、请求/响应 Body 或错误消息。
1002
+ Meegle CLI 默认开启失败命令诊断。首次运行时会向 stderr 输出一次性告知并保存记录,包括 CI、Agent 和输出重定向等非交互环境;stdout 保留给命令结果。告知成功输出并保存后,会按策略采集最终执行失败的根命令诊断;V1 不采集成功命令。采集内容不包含命令参数值、Token、文件路径、请求/响应 Body 或错误消息。
1003
1003
 
1004
1004
  前台命令筛选诊断事件后,交给独立维护进程。后台不扫描历史事件即可完成单条入队,再按原有条件进行清理、策略刷新与上报。前台不等待队列锁、序号锁、事件写盘或网络投递;命令返回不代表事件已经入队。有效策略最多每 12 小时刷新一次;刷新不健康时每 1 小时重试。待上报事件按 profile + host 隔离,后台按 7 天、1000 条、5 MiB 的全局限制清理过期和最旧事件;维护运行前允许临时超限。当前 profile/host 有积压时,后续命令最多每分钟触发一次全局清理,不依赖凭证,也不受上报一小时重试间隔限制。上报冷却期间仍可记录新错误,但不会因此重试网络请求。策略到期也会触发维护;切到空队列本身不会触发其他 profile 的清理。CLI 退出后没有常驻守护进程。
1005
1005
 
@@ -1014,9 +1014,12 @@ Policy 拒绝遵循显式结构化输出格式,并使用稳定错误码 `CLIEN
1014
1014
  ```bash
1015
1015
  meegle telemetry disable # 同时清空待上报队列
1016
1016
  meegle telemetry enable
1017
+ meegle telemetry status # 默认输出 {"enabled": true} 或 {"enabled": false}
1017
1018
  ```
1018
1019
 
1019
- 设置 `MEEGLE_TELEMETRY=disabled` 可在当前环境关闭。CLI 端到端事件与 MCP 服务端埋点彼此独立;存在后端 `logid` 时,只把它作为结构化关联字段。
1020
+ 显式执行 `enable` 时,如果尚未完成当前版本的告知,会先输出并保存告知,再开启本地开关;告知输出或保存失败时返回错误,不提示开启成功。`status` 仅返回当前是否允许采集,综合本地开关、告知记录、环境变量和当前 profile/host 的本地策略快照判断,不查询凭证或联网刷新策略;支持 `--format json|table|ndjson`(或 `-o`)。`enabled=true` 不代表某条诊断已经上传成功。
1021
+
1022
+ 设置 `MEEGLE_TELEMETRY=disabled` 可在当前环境关闭,并跳过自动告知;显式 `enable` 仍可完成告知和开启本地开关,但不会覆盖该环境变量或远端策略的限制。CLI 端到端事件与 MCP 服务端埋点彼此独立;存在后端 `logid` 时,只把它作为结构化关联字段。
1020
1023
 
1021
1024
  ## 常见问题
1022
1025
 
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.25",
3
+ "version": "1.0.26",
4
4
  "description": "Agent-First CLI for Meegle (Lark Project)",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/larksuite/meegle-cli#readme",