dsh-lark-bot 0.19.4 → 0.19.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/README.md CHANGED
@@ -353,7 +353,17 @@ npx dsh-lark-bot@latest upgrade --profile dsh-lark --yes
353
353
  - `--force`:无法访问 npm(离线)时按当前运行版本重装;
354
354
  - `--no-guardian`:跳过守护升级;
355
355
  - **runtime profile 一致性修复**:升级后自动把 `dsh-lark-sdk` / `dsh-lark-acp` 的
356
- own-package 链接重指到新版本,并当场幂等重装版本陈旧的 SDK server / ACP 依赖。
356
+ own-package 链接重指到新版本,并当场强制刷新 runtime profile 及被链接主插件中版本陈旧或物理
357
+ 内容损坏的 SDK server / ACP 依赖;修复目标以 dsh profile 中重新读取并验证的安装包为准,
358
+ 不会链接到临时 npx worker。npm/npx 扁平依赖按 Node 的真实模块解析结果校验;pnpm 安装则先
359
+ 解引用 profile 中的包链接,再从 `.pnpm` 物理包目录解析其依赖,避免误判缺失并强制重装;
360
+ - **托管环境 pnpm 一致性**:执行 `dsh plugin add` 前读取既有 profile 的
361
+ `node_modules/.modules.yaml`,把其中记录的精确 pnpm 版本同步到 profile `package.json`,避免
362
+ Corepack 因 source-managed dsh 的工作目录选择另一 pnpm 主版本并触发
363
+ `ERR_PNPM_UNEXPECTED_STORE`;全新 profile 不会被提前创建 manifest;
364
+ - **受管服务安全重载**:更新 worker 的临时 callback URL/token 与 npx/npm package-bin PATH 不会写入持久
365
+ service env 或 Guardian unit;Guardian 仅保留 Node 所在目录及稳定的用户/系统 PATH。只有飞书通道、
366
+ callback server 和 Guardian 心跳均已就绪后才确认更新成功。
357
367
 
358
368
  无需交互确认时加 `--yes`(非交互环境不带 `--yes` 会安全中止)。其余方式:
359
369
 
package/README_EN.md CHANGED
@@ -94,7 +94,7 @@ question-card buttons. If an existing app was created by an older flow, enable c
94
94
  Console → Events & Callbacks → Callback Configuration and publish the app again. Without it, messages still work
95
95
  while card clicks never reach the bot.
96
96
 
97
- `setup` automatically: locates your local dsh → pre-approves pnpm's build policy (protobufjs) → runs the standard `dsh plugin --profile dsh-lark add dsh-lark-bot@<version>` (pinned to the running package) → installs the safety-net guardian system service. One command installs everything.
97
+ `setup` automatically: locates your local dsh → pre-approves pnpm's build policy (protobufjs; an existing profile is also pinned to the exact pnpm release recorded by its install metadata, preventing Corepack/store-major conflicts) → runs the standard `dsh plugin --profile dsh-lark add dsh-lark-bot@<version>` (pinned to the running package) → installs the safety-net guardian system service. A fresh profile is still initialized by dsh. One command installs everything.
98
98
 
99
99
  > **No public IP / domain / server / tunneling required** (Feishu outbound WebSocket long connection); works on Linux / macOS / Windows.
100
100
  > With an existing PersonalAgent app you can skip the QR step (see Configuration): `DSH_LARK_APP_ID=cli_xxx DSH_LARK_APP_SECRET=<secret> DSH_LARK_TENANT=feishu dsh --profile dsh-lark`
@@ -358,12 +358,16 @@ npx dsh-lark-bot@latest upgrade --profile dsh-lark --yes
358
358
  - `--rollback`: reinstall the version recorded before the last upgrade (`~/.dsh-lark/upgrade-state.json`);
359
359
  - `--force`: reinstall the running version when npm is unreachable (offline);
360
360
  - `--no-guardian`: skip the guardian upgrade;
361
- - **Runtime-profile consistency repair**: after upgrading, the own-package links of `dsh-lark-sdk` / `dsh-lark-acp` are re-pointed and stale SDK-server / ACP dependencies are idempotently reinstalled immediately.
361
+ - **Runtime-profile consistency repair**: after `dsh plugin add`, the upgrader re-reads and verifies the exact target installed in the dsh profile, then re-points `dsh-lark-sdk` / `dsh-lark-acp` only to that stable package root—never to the transient npx worker—and refreshes stale SDK-server / ACP dependencies.
362
+ - **npm/npx/pnpm layout support**: npm/npx-flat dependencies use Node's actual module resolution; pnpm package links are resolved to their physical `.pnpm` target before dependency validation, avoiding false corruption reports and unnecessary forced installs.
363
+ - **Corepack-managed dsh compatibility**: before installing into an existing profile, the exact pnpm release from `node_modules/.modules.yaml` is persisted to `package.json#packageManager`, preventing a source-managed dsh working directory from selecting an incompatible pnpm store major.
362
364
 
363
365
  Pass `--yes` to skip the interactive confirmation (non-interactive runs fail closed without it). Alternatives:
364
366
 
365
367
  - Plugin: re-run `setup` (or `dsh plugin --profile <name> add dsh-lark-bot`) to pull the latest npm release.
366
368
  - Safety-net guardian: installed / upgraded together with `upgrade` / `setup` (idempotent), or standalone via `dsh-lark-bot guardian install`.
369
+ - Managed reloads never persist the update worker's npx/npm package-bin paths into the service environment or
370
+ Guardian unit. Guardian keeps only the Node directory and stable user/system PATH entries.
367
371
  - CLI tool (optional): `npm i -g dsh-lark-bot@latest`; not needed when using `npx`.
368
372
  - Restart the profile after upgrading (when not using `--restart`): `dsh --profile dsh-lark`.
369
373