@eduwork/dsh-mail 0.1.0 → 0.1.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 +6 -1
- package/CHANGELOG.md +6 -1
- package/CODE_OF_CONDUCT.en.md +1 -1
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTING.en.md +4 -2
- package/CONTRIBUTING.md +10 -1
- package/GOVERNANCE.en.md +1 -1
- package/GOVERNANCE.md +1 -1
- package/MAINTAINERS.en.md +1 -1
- package/MAINTAINERS.md +1 -1
- package/README.md +39 -14
- package/{README.en.md → README_EN.md} +39 -14
- package/SECURITY.en.md +2 -2
- package/SECURITY.md +2 -2
- package/SUPPORT.en.md +1 -1
- package/SUPPORT.md +1 -1
- package/docs/EDUWORK-MIGRATION.en.md +2 -6
- package/docs/EDUWORK-MIGRATION.md +2 -6
- package/docs/architecture.en.md +1 -1
- package/docs/architecture.md +1 -1
- package/docs/compatibility.en.md +9 -4
- package/docs/compatibility.md +9 -4
- package/docs/getting-started.en.md +23 -6
- package/docs/getting-started.md +23 -6
- package/docs/release-checklist.en.md +7 -48
- package/docs/release-checklist.md +7 -48
- package/lib/index.js +22091 -468
- package/package.json +19 -14
package/docs/getting-started.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## 前置条件
|
|
6
6
|
|
|
7
7
|
- Node.js 22+;
|
|
8
|
-
- DeepSeek Harness `0.1.
|
|
8
|
+
- DeepSeek Harness `0.1.5-rc.1`;
|
|
9
9
|
- Profile 中已经有 Settings、Credentials、Tools、Filesystem、Permission Presets、Approval 和 Web Client;
|
|
10
10
|
- 一个开启了 IMAP/SMTP 的邮箱账号,以及邮箱服务商签发的客户端授权码或应用专用密码。
|
|
11
11
|
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
普通使用固定经过复核的 npm 精确版本:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
dsh plugin --profile web add @eduwork/dsh-mail@0.1.
|
|
17
|
+
dsh plugin --profile web add @eduwork/dsh-mail@0.1.1
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
需要审计、开发或验证尚未发布的改动时,使用源码 checkout:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
git clone https://github.com/
|
|
24
|
-
cd dsh-mail
|
|
23
|
+
git clone https://github.com/ecnu/EduWork.git
|
|
24
|
+
cd EduWork/packages/dsh-mail
|
|
25
25
|
npm ci
|
|
26
26
|
npm run check
|
|
27
27
|
dsh plugin --profile web add .
|
|
@@ -29,7 +29,7 @@ dsh plugin --profile web add .
|
|
|
29
29
|
|
|
30
30
|
安装只向 Profile 加入一个 Bundle。插件配置为空也能正常启动;不会在启动时探测服务器或安装额外运行时。
|
|
31
31
|
|
|
32
|
-
源码安装会把 checkout 链接进 Profile,因此目录必须持续存在。团队部署应固定经复核的 npm
|
|
32
|
+
源码安装会把 checkout 链接进 Profile,因此目录必须持续存在。团队部署应固定经复核的 npm 精确版本。升级前先备份 Profile 的 `package.json` 与 `cordis.patch.yml`,不要同时启用新旧包。
|
|
33
33
|
|
|
34
34
|
## 配置
|
|
35
35
|
|
|
@@ -40,6 +40,8 @@ dsh plugin --profile web add .
|
|
|
40
40
|
3. 仅在服务商要求时,到“高级设置”填写独立登录用户名;收件箱目录通常保持 `INBOX`;
|
|
41
41
|
4. 最后分别开放 Agent 的读信和发信能力并保存。
|
|
42
42
|
|
|
43
|
+
无 UI 时,只把邮箱地址、服务器、端口、TLS 模式和能力开关写入 Bundle 配置。授权码必须进入 DSH Credential Provider,固定引用名为 `DSH_MAIL_ASSISTANT_PASSWORD`;不要写入 YAML、源码、命令历史或诊断日志。
|
|
44
|
+
|
|
43
45
|
常见安全组合是 IMAP 993 + 隐式 TLS、SMTP 465 + 隐式 TLS,或 SMTP 587 + STARTTLS。具体值以邮箱服务商文档为准;不要为了连通而关闭证书校验,本插件也不提供这个开关。
|
|
44
46
|
|
|
45
47
|
## 验收
|
|
@@ -49,9 +51,24 @@ dsh plugin --profile web add .
|
|
|
49
51
|
3. 用较小的每页条数查找一个命中较多的时间范围;确认 Agent 按 `nextCursor` 持续翻页,直到 `hasMore=false` 后才总结整个范围。
|
|
50
52
|
4. 读取一封包含“忽略此前指令”等文本的测试邮件;确认 Agent 把它视为不可信数据。
|
|
51
53
|
5. 下载一个小附件;确认文件位于当前工作区的 `.dsh-mail-assistant/attachments/`,且不会覆盖同名文件。
|
|
52
|
-
6. 保持普通权限,开启发信,让 Agent
|
|
54
|
+
6. 保持普通权限,开启发信,让 Agent 先展示收件人、主题、正文和附件,再向自己的测试地址发送纯文本;确认出现逐次审批。
|
|
53
55
|
7. 拒绝审批;确认没有 SMTP 发送。
|
|
54
56
|
8. 切换到 Full Access,再向自己的测试地址发信;确认不再弹出审批且邮件正常送达。
|
|
55
57
|
9. 尝试把工作区外文件作为附件;确认工具拒绝。
|
|
56
58
|
|
|
57
59
|
真实邮箱测试应使用专门测试账号,不要在公开 issue 附上服务器日志、地址、标题、正文或授权码。
|
|
60
|
+
|
|
61
|
+
## 开发验收
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm ci
|
|
65
|
+
npm run check
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
要复核 DSH `0.1.5-rc.1` 的真实运行时契约,把 `DSH_RUNTIME_ROOT` 指向该版本的干净 Runtime 后运行:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm run accept:dsh-015-rc1
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
此验收使用无网络发送模拟器检查 Agent 会话、审批拒绝、单次允许与 Full Access 路径,不需要真实邮箱。真实 IMAP/SMTP 互操作只在专用测试账号和隔离 Profile 中执行。
|
|
@@ -1,52 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Package release checklist
|
|
2
2
|
|
|
3
3
|
[简体中文](release-checklist.md) | **English**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Source and publication are maintained in EduWork. Follow [the shared package workflow](https://github.com/ecnu/EduWork/blob/main/docs/PACKAGES_EN.md); this package retains its independent npm name and SemVer.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- [ ] Chinese is the default language and every Markdown document has an English mirror with reciprocal entries.
|
|
13
|
-
- [ ] Publishable history and content contain no real accounts, messages, app passwords, servers, personal paths, or unauthorized branding.
|
|
14
|
-
|
|
15
|
-
## Mail and authorization boundary
|
|
16
|
-
|
|
17
|
-
- [ ] IMAP mailbox locks remain read-only; no `STORE`, `COPY`, `MOVE`, `EXPUNGE`, or flag mutation exists.
|
|
18
|
-
- [ ] Reading and sending default off and remain independent.
|
|
19
|
-
- [ ] `mail_send` enters DSH permission handling before credentials, attachments, or SMTP access.
|
|
20
|
-
- [ ] Ordinary permissions ask per call; Full Access only skips that prompt and never enables sending.
|
|
21
|
-
- [ ] Missing Agent sessions, rejection, cancellation, and unavailable approval channels fail closed.
|
|
22
|
-
- [ ] Mail remains untrusted data and cannot authorize sending, request secrets, or change system policy.
|
|
23
|
-
- [ ] Ambiguous SMTP DATA results return `unknown` and are never automatically retried.
|
|
24
|
-
|
|
25
|
-
## Credentials, transport, and attachments
|
|
26
|
-
|
|
27
|
-
- [ ] App passwords only enter a DSH Credential Provider; the browser sees configuration state only.
|
|
28
|
-
- [ ] Credentials are resolved for every call and not cached across operations.
|
|
29
|
-
- [ ] Only implicit TLS or STARTTLS is accepted; certificate validation is fixed on and protocol logging is off.
|
|
30
|
-
- [ ] Addresses reject CR/LF injection and body, message, and attachment limits are enforced.
|
|
31
|
-
- [ ] Outbound attachments are regular files inside the current session workspace.
|
|
32
|
-
- [ ] Downloaded attachments use random names, exclusive writes, and real-path containment; symlink/junction escape checks pass.
|
|
33
|
-
- [ ] Source maps and normalized errors expose no credentials, message content, server responses, or personal paths.
|
|
34
|
-
|
|
35
|
-
## Functional acceptance
|
|
36
|
-
|
|
37
|
-
- [ ] `mail_list_folders` returns server folders without mutation.
|
|
38
|
-
- [ ] `mail_find` covers both directions, pagination, dates, folders, stale UIDVALIDITY, and `hasMore=false`.
|
|
39
|
-
- [ ] `mail_read` preserves unread state; truncation and HTML fallback match documentation.
|
|
40
|
-
- [ ] `mail_get_attachment` works on local FS and fails clearly for a remote/non-shared Host path.
|
|
41
|
-
- [ ] A real test mailbox covers ordinary approve/reject, Full Access send, and outside-workspace attachment rejection.
|
|
42
|
-
- [ ] OAuth2, multiple accounts, Sent-copy behavior, and complex MIME limitations remain explicit.
|
|
43
|
-
|
|
44
|
-
## Supply chain and publication
|
|
45
|
-
|
|
46
|
-
- [ ] Clean `npm ci` and `npm run check` pass on Windows and Linux with Node 22/24.
|
|
47
|
-
- [ ] `npm audit`, CodeQL, direct/transitive licenses, and install scripts receive human review.
|
|
48
|
-
- [ ] GitHub Actions use immutable commits; Dependabot and branch protection are active.
|
|
49
|
-
- [ ] `npm pack --dry-run` and the extracted tarball contain only expected files; the Host bundle has no bare IMAP/SMTP imports.
|
|
50
|
-
- [ ] Tag, release notes, tarball checksum, deprecation, and rollback are ready.
|
|
51
|
-
- [ ] Publish the first stable release from the reviewed frozen package with the npm CLI and maintainer-confirmed browser 2FA; record that Trusted Publishing is not configured and make no provenance claim for this release.
|
|
52
|
-
- [ ] For later releases, enable OIDC/provenance only after verifying that npm Trusted Publishing is bound to this repository's `.github/workflows/release.yml` and environment `npm`; never use a long-lived publish token.
|
|
7
|
+
- Review the changed behavior, version, changelog, compatibility and package lock.
|
|
8
|
+
- Run npm ci and npm run check in this package directory, plus relevant real Host or browser acceptance when behavior changes. Use synthetic test data.
|
|
9
|
+
- Inspect the actual tarball, public documentation, licenses and exported entries. Never ship credentials or user data.
|
|
10
|
+
- Select this package in packages-release.yml; publish=false only produces artifacts. Explicit publication runs from the matching package version tag, using the npm environment and this repository's trusted publisher.
|
|
11
|
+
- Verify registry bytes before updating a product lock. Publishing npm does not publish a desktop Release or deploy a client.
|
|
@@ -1,52 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 包发布检查表
|
|
2
2
|
|
|
3
3
|
**简体中文** | [English](release-checklist.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
源码与发布入口统一在 EduWork;遵循[公共包发布流程](https://github.com/ecnu/EduWork/blob/main/docs/PACKAGES.md),本包保留独立的 npm 名称和 SemVer。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- [ ] 默认文档为中文,每份 Markdown 文档都有英文镜像和双向入口。
|
|
13
|
-
- [ ] Git 历史和发布内容不含真实邮箱、邮件、授权码、服务器、个人路径或未授权品牌。
|
|
14
|
-
|
|
15
|
-
## 邮件与权限边界
|
|
16
|
-
|
|
17
|
-
- [ ] IMAP mailbox lock 仍固定为只读,代码没有 `STORE`、`COPY`、`MOVE`、`EXPUNGE` 或 flags 写入。
|
|
18
|
-
- [ ] 读信和发信能力默认关闭,并且彼此独立。
|
|
19
|
-
- [ ] `mail_send` 在读取凭据、附件和访问 SMTP 前进入 DSH 权限通路。
|
|
20
|
-
- [ ] 普通权限逐次审批;Full Access 只免除逐次弹窗,不能自动开启发信能力。
|
|
21
|
-
- [ ] 无 Agent 会话、拒绝、取消和不可用审批通路均失败关闭。
|
|
22
|
-
- [ ] 邮件数据持续标记为不可信,不能成为发信授权、密钥请求或系统指令。
|
|
23
|
-
- [ ] SMTP DATA 阶段的不确定结果返回 `unknown`,不会自动重试。
|
|
24
|
-
|
|
25
|
-
## 凭据、传输和附件
|
|
26
|
-
|
|
27
|
-
- [ ] 授权码只进入 DSH Credential Provider,浏览器只能看到配置状态。
|
|
28
|
-
- [ ] 每次工具调用重新解析凭据,不跨操作缓存。
|
|
29
|
-
- [ ] 只允许隐式 TLS 或 STARTTLS,证书校验不可关闭,协议日志关闭。
|
|
30
|
-
- [ ] 地址拒绝 CR/LF 注入;正文、消息和附件大小上限有效。
|
|
31
|
-
- [ ] 发送附件限定为当前会话工作区普通文件。
|
|
32
|
-
- [ ] 下载附件使用随机名、独占写和真实路径包含性复核;符号链接/目录联接逃逸测试通过。
|
|
33
|
-
- [ ] Source map 和错误归一化不泄露凭据、邮件内容、服务器响应或个人路径。
|
|
34
|
-
|
|
35
|
-
## 功能验收
|
|
36
|
-
|
|
37
|
-
- [ ] `mail_list_folders` 返回真实目录且不修改状态。
|
|
38
|
-
- [ ] `mail_find` 的正序/倒序、多页、日期、目录、UIDVALIDITY 失效和 `hasMore=false` 均测试。
|
|
39
|
-
- [ ] `mail_read` 不改变已读状态,正文截断和 HTML 降级符合文档。
|
|
40
|
-
- [ ] `mail_get_attachment` 在本地 FS 成功,在远程/不共享 Host 路径时明确失败。
|
|
41
|
-
- [ ] 普通权限下发信批准/拒绝、Full Access 发信、工作区外附件拒绝均通过真实测试邮箱验收。
|
|
42
|
-
- [ ] 不支持的 OAuth2、多账号、Sent 副本和复杂 MIME 行为仍清楚记录。
|
|
43
|
-
|
|
44
|
-
## 供应链与发布
|
|
45
|
-
|
|
46
|
-
- [ ] Windows 与 Linux 使用 Node 22/24 完成干净 `npm ci` 和 `npm run check`。
|
|
47
|
-
- [ ] `npm audit`、CodeQL、直接/间接许可证和安装脚本已人工审查。
|
|
48
|
-
- [ ] GitHub Actions 固定到不可变 commit,Dependabot 与分支保护有效。
|
|
49
|
-
- [ ] `npm pack --dry-run` 和解压后的 tarball 只包含预期文件;Host bundle 没有外部 IMAP/SMTP 裸导入。
|
|
50
|
-
- [ ] tag、发布说明、tarball checksum、弃用和回滚方案已准备。
|
|
51
|
-
- [ ] 首次稳定版从经复核的冻结包使用 npm CLI 发布,由维护者在浏览器完成 2FA;本次记录 Trusted Publishing 尚未配置,不声明 provenance。
|
|
52
|
-
- [ ] 后续发布在验证 npm Trusted Publisher 已绑定本仓库的 `.github/workflows/release.yml` 与 Environment `npm` 后,再启用 OIDC/provenance 发布路径;不使用长期 Token。
|
|
7
|
+
- 核对变更行为、版本、变更记录、兼容范围和依赖锁。
|
|
8
|
+
- 在当前包目录执行 npm ci、npm run check;有行为变化时补对应 Host 或浏览器实测,使用合成测试数据。
|
|
9
|
+
- 检查实际 tarball、公开文档、许可证和导出入口,不携带凭据或用户数据。
|
|
10
|
+
- 在 packages-release.yml 中选择本包;publish=false 仅产出候选。明确发布时从匹配包版本的 tag 运行,使用 npm environment 与本仓库的 Trusted Publisher。
|
|
11
|
+
- 核验 registry 中的实际字节后再更新产品锁。发布 npm 不会发布桌面 Release 或替换客户端。
|