@eduwork/dsh-mail 0.2.1 → 0.2.2
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.en.md +5 -0
- package/CHANGELOG.md +5 -0
- package/docs/architecture.en.md +1 -1
- package/docs/architecture.md +1 -1
- package/lib/index.js +213 -101180
- package/lib/mail-client-Ds1-sIH5.js +100905 -0
- package/lib/sanitize-wTSdOMM5.js +85 -0
- package/package.json +1 -1
package/CHANGELOG.en.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](CHANGELOG.md) | **English**
|
|
4
4
|
|
|
5
|
+
## 0.2.2 — 2026-10-24
|
|
6
|
+
|
|
7
|
+
- Load mail protocol and parsing libraries on the first mail tool call, reducing module evaluation during plugin startup; concurrent calls share module loading.
|
|
8
|
+
- Preserve read-only IMAP, reading/sending switches, send approvals and attachment permission boundaries, including existing failure and cancellation handling.
|
|
9
|
+
|
|
5
10
|
## 0.2.1 — 2026-10-22
|
|
6
11
|
|
|
7
12
|
- Show email-send and attachment-save approval prompts in the active DSH UI language (Chinese or English), using the official approval panel.
|
package/CHANGELOG.md
CHANGED
package/docs/architecture.en.md
CHANGED
|
@@ -56,7 +56,7 @@ This trades a small amount of latency for simpler credential rotation, cleanup,
|
|
|
56
56
|
|
|
57
57
|
Outbound attachments use `ctx.fs`: resolve from the session `cwd`, verify containment, require a regular file, enforce an aggregate size bound, then use bounded `readBytes`.
|
|
58
58
|
|
|
59
|
-
The Host artifact embeds the IMAP/SMTP
|
|
59
|
+
The Host artifact embeds the IMAP/SMTP and mail parsing libraries in a separate bundled module, loaded on the first mail tool execution. The startup entry still registers settings, tools, and permission checks. Users do not install a second protocol runtime after npm, source-package, or offline-product installation.
|
|
60
60
|
|
|
61
61
|
DSH `0.2.1-rc.2` does not expose `writeBytes`. Attachment download therefore requires a local Host filesystem. The plugin resolves the logical destination with `ctx.fs`, creates the directory, resolves real workspace and directory paths, rechecks containment to reject pre-existing symlinks or junctions, and finally performs a random-name `wx` exclusive write. Replace this local adapter when DSH provides an official binary-write seam.
|
|
62
62
|
|
package/docs/architecture.md
CHANGED
|
@@ -64,7 +64,7 @@ handle 用于完整性检查和防误用,不是授权令牌,也不包含密
|
|
|
64
64
|
|
|
65
65
|
发送附件完全走 `ctx.fs`:以会话 `cwd` 解析、验证包含关系、检查普通文件、累计大小,再通过 `readBytes` 有界读取。
|
|
66
66
|
|
|
67
|
-
Host
|
|
67
|
+
Host 产物把 IMAP/SMTP 和邮件解析依赖编入包内的独立模块,首次执行邮件工具时才加载。启动入口仍注册设置、工具和权限检查。通过 npm、源码包或产品离线装配安装后,终端用户不需要再安装 Node 依赖。
|
|
68
68
|
|
|
69
69
|
DSH `0.2.1-rc.2` 暂无 `writeBytes`。下载附件因此只在本地 Host FS 上可用:插件先用 `ctx.fs` 解析逻辑路径,创建目录后再解析工作区与目标目录的真实路径并重新验证包含关系,最后把随机文件名以 `wx` 独占模式写入。这样会拒绝预置符号链接或目录联接造成的工作区逃逸。未来官方提供二进制写 seam 后,应删除这段本地适配,直接复用官方能力。
|
|
70
70
|
|