@eduwork/dsh-mail 0.1.0-alpha.5 → 0.1.1
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 +15 -1
- package/CHANGELOG.md +15 -1
- package/CODE_OF_CONDUCT.en.md +17 -0
- package/CODE_OF_CONDUCT.md +17 -0
- package/CONTRIBUTING.en.md +11 -0
- package/CONTRIBUTING.md +32 -0
- package/GOVERNANCE.en.md +30 -0
- package/GOVERNANCE.md +30 -0
- package/MAINTAINERS.en.md +13 -0
- package/MAINTAINERS.md +13 -0
- package/README.en.md +37 -6
- package/README.md +36 -9
- package/SECURITY.en.md +2 -2
- package/SECURITY.md +2 -2
- package/SUPPORT.en.md +15 -0
- package/SUPPORT.md +15 -0
- package/THIRD_PARTY_NOTICES.en.md +1 -1
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/docs/EDUWORK-MIGRATION.en.md +3 -3
- package/docs/EDUWORK-MIGRATION.md +3 -3
- package/docs/architecture.en.md +3 -3
- package/docs/architecture.md +4 -4
- package/docs/compatibility.en.md +9 -4
- package/docs/compatibility.md +9 -4
- package/docs/decisions/0001-mail-assistant-boundary.en.md +1 -1
- package/docs/decisions/0001-mail-assistant-boundary.md +1 -1
- package/docs/getting-started.en.md +21 -4
- package/docs/getting-started.md +22 -5
- package/docs/release-checklist.en.md +6 -4
- package/docs/release-checklist.md +6 -4
- package/lib/client.js +40 -23
- package/lib/index.js +22867 -1446
- package/package.json +31 -13
package/CHANGELOG.en.md
CHANGED
|
@@ -2,7 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](CHANGELOG.md) | **English**
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 0.1.1 - 2026-09-11
|
|
6
|
+
|
|
7
|
+
- Added exact peer support for official DeepSeek Harness `0.1.5-rc.1` and accepted the Tool/Agent, Session, Permission Presets, Filesystem, Credentials, Settings, and Web Client seams.
|
|
8
|
+
- Preserved read-only IMAP, disabled-by-default read/send capabilities, per-send approval under ordinary permissions, Full Access approval exemption only, untrusted mail content, and workspace-fenced attachments.
|
|
9
|
+
- Updated Nodemailer to `9.1.0` and Mailparser to `3.9.23` to address upstream security issues in address parsing, domain validation, and content resolution.
|
|
10
|
+
- Completed installation, configuration, acceptance, development, and known-limit documentation for `0.1.5-rc.1`.
|
|
11
|
+
|
|
12
|
+
## 0.1.0 - 2026-09-06
|
|
13
|
+
|
|
14
|
+
- Updated the compatibility baseline to DeepSeek Harness `0.1.2-rc.1` while preserving the Host export, Profile row id, settings namespace, security scope, credential reference, and attachment-directory contracts.
|
|
15
|
+
- Migrated the settings page to the DSH Client `settingsScope` API with atomic mutations, revision fencing, and read-only-state handling.
|
|
16
|
+
- Aligned settings schemas with DSH on `@deepseek-ai/schemastery` `3.18.2` and removed the `legacy-peer-deps` install setting that could hide peer conflicts.
|
|
17
|
+
- Expanded CI to Windows/Linux on Node.js 22/24. Added a manual release workflow that checks and packs by default and prepares stable-tag and same-commit CI validation for later npm Trusted Publishing/OIDC enablement.
|
|
18
|
+
- Aligned public documentation with the stable security status, `settingsScope` architecture, current sole-maintainer governance, and the first-release npm CLI plus browser-2FA process. This release makes no provenance claim; Trusted Publishing remains a later path.
|
|
19
|
+
- Included the bilingual contribution, governance, maintainer, support, and code-of-conduct documents in the npm package so README-relative links remain valid after installation.
|
|
6
20
|
|
|
7
21
|
## 0.1.0-alpha.5 - 2026-09-05
|
|
8
22
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
**简体中文** | [English](CHANGELOG.en.md)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 0.1.1 - 2026-09-11
|
|
6
|
+
|
|
7
|
+
- 新增官方 DeepSeek Harness `0.1.5-rc.1` 的精确 peer 支持,并完成 Tool/Agent、Session、Permission Presets、Filesystem、Credentials、Settings 与 Web Client 接缝验收。
|
|
8
|
+
- 保持 IMAP 只读、读写能力默认关闭、SMTP 普通权限逐次审批、Full Access 仅免审批、邮箱内容不可信和附件工作区边界不变。
|
|
9
|
+
- 将 Nodemailer 更新到 `9.1.0`、Mailparser 更新到 `3.9.23`,修复上游地址解析、域名校验和内容解析安全问题。
|
|
10
|
+
- 补齐面向 `0.1.5-rc.1` 的安装、配置、验证、开发和已知限制说明。
|
|
11
|
+
|
|
12
|
+
## 0.1.0 - 2026-09-06
|
|
13
|
+
|
|
14
|
+
- 兼容基线更新为 DeepSeek Harness `0.1.2-rc.1`,并保留 Host 导出名、Profile 行 id、settings namespace、安全作用域、凭据引用和附件目录契约。
|
|
15
|
+
- 设置页迁移到 DSH Client 的 `settingsScope`,使用原子 mutation、revision fence 和只读状态。
|
|
16
|
+
- 设置 Schema 改用与 DSH 基线一致的 `@deepseek-ai/schemastery` `3.18.2`,并移除会掩盖 peer 冲突的 `legacy-peer-deps` 安装配置。
|
|
17
|
+
- CI 扩展为 Windows/Linux 与 Node.js 22/24;新增手动发布工作流,默认只检查和打包,并为后续启用 npm Trusted Publishing/OIDC 预留稳定 tag 与同 commit CI 校验。
|
|
18
|
+
- 公开文档同步稳定版安全声明、`settingsScope` 架构、单一维护者治理现状和首发 npm CLI + 浏览器 2FA 流程;本次不声明 provenance,Trusted Publishing 作为后续路径。
|
|
19
|
+
- npm 包补齐中英文贡献、治理、维护者、支持和行为准则文档,避免 README 的包内相对链接失效。
|
|
6
20
|
|
|
7
21
|
## 0.1.0-alpha.5 - 2026-09-05
|
|
8
22
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Code of conduct
|
|
2
|
+
|
|
3
|
+
[简体中文](CODE_OF_CONDUCT.md) | **English**
|
|
4
|
+
|
|
5
|
+
We are committed to a professional, inclusive, and harassment-free project.
|
|
6
|
+
|
|
7
|
+
Participants must:
|
|
8
|
+
|
|
9
|
+
- discuss ideas, protocols, and code rather than personal characteristics;
|
|
10
|
+
- assume good intent while accepting evidence-based correction;
|
|
11
|
+
- protect private security reports, mail data, account configuration, and personal information;
|
|
12
|
+
- avoid harassment, threats, discriminatory language, sexualized conduct, doxxing, and sustained disruption;
|
|
13
|
+
- respect maintainer decisions made to protect users, the mail boundary, licensing, or supply-chain security.
|
|
14
|
+
|
|
15
|
+
Maintainers may edit, hide, reject, or remove contributions and may temporarily or permanently restrict participation when conduct threatens contributors or users. Measures should be proportionate and avoid exposing affected people or security-sensitive material.
|
|
16
|
+
|
|
17
|
+
General conduct concerns may use an issue without personal information. For confidential harassment, threats, doxxing, or another incident, use GitHub [Private Vulnerability Reporting](https://github.com/freedomkk-qfeng/dsh-mail-assistant/security/advisories/new) and prefix the title with “Code of Conduct”.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# 行为准则
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](CODE_OF_CONDUCT.en.md)
|
|
4
|
+
|
|
5
|
+
我们致力于维护专业、包容且无骚扰的项目环境。
|
|
6
|
+
|
|
7
|
+
参与者必须:
|
|
8
|
+
|
|
9
|
+
- 讨论观点、协议和代码,而不是个人特征;
|
|
10
|
+
- 假设善意,同时接受基于证据的纠正;
|
|
11
|
+
- 保护私有安全报告、邮件数据、账号配置和个人信息;
|
|
12
|
+
- 避免骚扰、威胁、歧视性语言、性化行为、人肉搜索和持续扰乱;
|
|
13
|
+
- 尊重维护者为保护用户、邮件边界、许可证或供应链安全作出的决定。
|
|
14
|
+
|
|
15
|
+
当行为威胁贡献者或用户时,维护者可以编辑、隐藏、拒绝或删除贡献,也可以临时或永久限制参与。措施应适度,并避免暴露受影响者或安全敏感材料。
|
|
16
|
+
|
|
17
|
+
一般行为问题可以创建不含个人信息的 Issue。需要保密处理的骚扰、威胁、人肉搜索或其他事件,请使用 GitHub [Private Vulnerability Reporting](https://github.com/freedomkk-qfeng/dsh-mail-assistant/security/advisories/new),并在标题中标注“Code of Conduct”。
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
[简体中文](CONTRIBUTING.md) | **English**
|
|
4
|
+
|
|
5
|
+
This project optimizes for a clear mail security boundary, not tool count.
|
|
6
|
+
|
|
7
|
+
Run `npm ci` and `npm run check`. Compatibility changes must also run against a clean target DSH runtime. For the current `0.1.5-rc.1` baseline, point `DSH_RUNTIME_ROOT` at that exact runtime and run `npm run accept:dsh-015-rc1`. This automated acceptance does not connect to a mailbox or send mail.
|
|
8
|
+
|
|
9
|
+
Add mailbox-independent automated tests for new behavior; cover cancellation, timeout, bounds, and error normalization for protocol changes; give every mutation an explicit capability, target boundary, and approval policy; update Chinese and English documentation together; and never commit real addresses, messages, app passwords, logs, or personal data.
|
|
10
|
+
|
|
11
|
+
The plugin follows its own SemVer: use patch for compatibility fixes and dependency maintenance, minor for backward-compatible capability additions, and major only for breaking tool or configuration contracts. Do not mirror the host product's version mechanically. Use a dedicated test mailbox and isolated Profile for interoperability. Do not mix new product boundaries such as delete, move, auto-reply, or polling into corrective pull requests. Report vulnerabilities privately through [SECURITY.en.md](SECURITY.en.md).
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# 贡献指南
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](CONTRIBUTING.en.md)
|
|
4
|
+
|
|
5
|
+
感谢参与。这个项目优先保证邮件安全边界,不以工具数量为目标。
|
|
6
|
+
|
|
7
|
+
## 开始开发
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm ci
|
|
11
|
+
npm run check
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
兼容性改动还应使用目标 DSH 的干净 Runtime 验收。对于当前基线 `0.1.5-rc.1`:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# DSH_RUNTIME_ROOT 指向干净的 0.1.5-rc.1 Runtime
|
|
18
|
+
npm run accept:dsh-015-rc1
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
自动化验收不会连接邮箱或发送邮件。真实互操作只使用专用测试账号和隔离 Profile,并只记录脱敏结论。
|
|
22
|
+
|
|
23
|
+
提交前请保证:
|
|
24
|
+
|
|
25
|
+
1. 新行为有无真实邮箱即可运行的自动化测试;
|
|
26
|
+
2. 涉及协议的改动同时覆盖取消、超时、大小上限和错误归一化;
|
|
27
|
+
3. 任何写操作都有清晰的能力开关、工作区/目标边界和人工确认策略;
|
|
28
|
+
4. 中英文文档同步;
|
|
29
|
+
5. 不提交邮箱地址、邮件样本、授权码、真实服务器日志或个人信息;
|
|
30
|
+
6. 不把删除、移动、自动回复、后台轮询等新边界混进修复型 PR。
|
|
31
|
+
|
|
32
|
+
版本遵循插件自己的 SemVer:兼容性修复和依赖维护使用 patch,新增向后兼容能力使用 minor,破坏工具或配置契约才使用 major;不机械跟随宿主产品版本。真实互操作测试请使用专用测试邮箱,并只提交脱敏后的结论和可复现的协议事实。安全问题不要走公开 issue,见 [SECURITY.md](SECURITY.md)。
|
package/GOVERNANCE.en.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
[简体中文](GOVERNANCE.md) | **English**
|
|
4
|
+
|
|
5
|
+
## Project ownership
|
|
6
|
+
|
|
7
|
+
`dsh-mail-assistant` is initiated and hosted by [@freedomkk-qfeng](https://github.com/freedomkk-qfeng). It remains provider- and institution-neutral: public code must not embed private servers, accounts, branding, or message samples.
|
|
8
|
+
|
|
9
|
+
## Roles and decisions
|
|
10
|
+
|
|
11
|
+
- **Maintainers** merge normal changes, triage issues, and manage DSH and protocol compatibility.
|
|
12
|
+
- **Security maintainers** review credentials, read-only IMAP, SMTP sending, attachment paths, and supply-chain changes, and handle private reports.
|
|
13
|
+
- **Release managers** control protected tags, npm publishing, provenance, deprecation, and rollback.
|
|
14
|
+
|
|
15
|
+
The roster is in [Maintainers](MAINTAINERS.en.md). Ordinary decisions use pull requests. Capability boundaries, trust models, dependency strategy, and incompatible changes require a record under `docs/decisions/`. Unresolved credential disclosure, unauthorized sending, message mutation, or workspace escape blocks a release.
|
|
16
|
+
|
|
17
|
+
## Review and merge
|
|
18
|
+
|
|
19
|
+
- During the project's initial single-maintainer stage, the current maintainer decides merges and releases and records the decision, CI/regression results, independent technical-review evidence, and remaining risk in the pull request or release record.
|
|
20
|
+
- Credential, send-authorization, IMAP mutation, attachment-path, workflow, dependency, and release changes require technical review proportionate to their risk; unresolved security defects still block publication.
|
|
21
|
+
- After additional maintainers join, those security-sensitive changes should receive approval from a second human maintainer. This is a future governance goal and does not claim current backup coverage or a second approver.
|
|
22
|
+
- The public repository should enable CI, CodeQL, branch protection, and Private Vulnerability Reporting.
|
|
23
|
+
|
|
24
|
+
## Releases
|
|
25
|
+
|
|
26
|
+
Release managers create tags and npm releases only after the [public release checklist](docs/release-checklist.en.md). Use OIDC/provenance only after the npm Trusted Publisher repository, workflow, and Environment binding has been verified. Otherwise publish the reviewed frozen artifact with the npm CLI and browser 2FA. No long-lived publish token belongs in the repository or workstation. Unsafe releases are deprecated and users are notified under the [security policy](SECURITY.en.md).
|
|
27
|
+
|
|
28
|
+
## Product boundary
|
|
29
|
+
|
|
30
|
+
The project assists with reading and explicit sending; it is not a mail client. Delete, move, archive, flag mutation, background polling, auto-reply, and scheduled sending are separate high-risk boundaries that require their own design and review.
|
package/GOVERNANCE.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# 治理规则
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](GOVERNANCE.en.md)
|
|
4
|
+
|
|
5
|
+
## 项目所有权
|
|
6
|
+
|
|
7
|
+
`dsh-mail-assistant` 由 [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) 发起并托管。项目保持服务商和机构中立:公共代码不得内置私有服务器、账号、品牌或邮件样本。
|
|
8
|
+
|
|
9
|
+
## 角色与决策
|
|
10
|
+
|
|
11
|
+
- **维护者**:合并普通变更、处理 Issue、维护 DSH 与协议兼容性。
|
|
12
|
+
- **安全维护者**:审查凭据、IMAP 只读性、SMTP 发信、附件路径和供应链变更,并处理私密报告。
|
|
13
|
+
- **发布经理**:管理受保护 tag、npm 发布、provenance、弃用和回滚。
|
|
14
|
+
|
|
15
|
+
维护者名单见[维护者](MAINTAINERS.md)。普通实现通过 Pull Request 决策;能力边界、信任模型、依赖策略或不兼容变更应写入 `docs/decisions/`。未解决的凭据泄露、越权写信、邮件状态修改或工作区逃逸问题会阻止发布。
|
|
16
|
+
|
|
17
|
+
## 审查与合并
|
|
18
|
+
|
|
19
|
+
- 项目初期由当前单一维护者决定合并与发布,并在 PR 或发布记录中保留决策、CI/回归结果、独立技术复核证据和剩余风险。
|
|
20
|
+
- 凭据、发信授权、IMAP 写操作、附件路径、工作流、依赖和发布变更必须完成与风险相称的技术复核;未解决的安全缺陷仍会阻止发布。
|
|
21
|
+
- 增加维护者后,上述安全敏感变更应由第二位人工维护者批准;这是未来治理目标,不代表当前已有替补或第二位批准人。
|
|
22
|
+
- 公共远程仓库应启用 CI、CodeQL、分支保护和 Private Vulnerability Reporting。
|
|
23
|
+
|
|
24
|
+
## 发布
|
|
25
|
+
|
|
26
|
+
发布经理只有在完成[公开发布检查表](docs/release-checklist.md)后才能创建 tag 和 npm 版本。只有在 npm Trusted Publisher 的仓库、工作流和 Environment 绑定已现场验证后,才使用 OIDC/provenance 发布;否则从经复核的冻结包使用 npm CLI 和浏览器 2FA 发布。不在仓库或工作站长期保存发布 Token。发现版本不安全时,应及时弃用、修复并按[安全政策](SECURITY.md)通知用户。
|
|
27
|
+
|
|
28
|
+
## 产品边界
|
|
29
|
+
|
|
30
|
+
项目当前只提供辅助读信和显式发信,不追求成为邮箱客户端。删除、移动、归档、标记已读、后台轮询、自动回复和计划发送属于新的高风险边界,必须单独设计和审查,不能作为普通修复顺带加入。
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Maintainers
|
|
2
|
+
|
|
3
|
+
[简体中文](MAINTAINERS.md) | **English**
|
|
4
|
+
|
|
5
|
+
| Role | Primary | Backup | Status |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| Project maintainer | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | None (recruiting) | Current sole maintainer |
|
|
8
|
+
| Security maintainer | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | None (recruiting) | Current sole maintainer |
|
|
9
|
+
| Release manager | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | None (recruiting) | Current sole maintainer |
|
|
10
|
+
|
|
11
|
+
One maintainer currently holds these responsibilities; no backup exists yet. Use [GitHub Private Vulnerability Reporting](https://github.com/freedomkk-qfeng/dsh-mail-assistant/security/advisories/new) for confidential security reports and [GitHub Issues](https://github.com/freedomkk-qfeng/dsh-mail-assistant/issues) for release-recovery requests that contain no sensitive information. Recruiting at least one backup able to handle private reports and release recovery remains a maintenance recommendation and roadmap item. Until then, the project does not claim backup coverage or institutional support. Credential, send-authorization, workspace-boundary, and release-workflow changes should receive independent review whenever possible.
|
|
12
|
+
|
|
13
|
+
Role responsibilities and review thresholds are defined in [Governance](GOVERNANCE.en.md).
|
package/MAINTAINERS.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 维护者
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](MAINTAINERS.en.md)
|
|
4
|
+
|
|
5
|
+
| 角色 | 主要负责人 | 替补 | 状态 |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| 项目维护者 | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | 无(待招募) | 当前唯一维护者 |
|
|
8
|
+
| 安全维护者 | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | 无(待招募) | 当前唯一维护者 |
|
|
9
|
+
| 发布经理 | [@freedomkk-qfeng](https://github.com/freedomkk-qfeng) | 无(待招募) | 当前唯一维护者 |
|
|
10
|
+
|
|
11
|
+
项目目前由一名维护者承担上述职责,尚无替补。私密安全报告请使用 [GitHub Private Vulnerability Reporting](https://github.com/freedomkk-qfeng/dsh-mail-assistant/security/advisories/new);不含敏感信息的发布恢复请求请使用 [GitHub Issues](https://github.com/freedomkk-qfeng/dsh-mail-assistant/issues)。招募至少一名能够处理私密报告和发布恢复的替补是维护建议与待办;在此之前,不宣称已具备替补能力或机构支持。邮件凭据、发信授权、工作区边界和发布工作流的变更应尽可能获得独立复核。
|
|
12
|
+
|
|
13
|
+
角色职责和审查门槛见[治理规则](GOVERNANCE.md)。
|
package/README.en.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# dsh-mail-assistant
|
|
2
2
|
|
|
3
|
-
> npm package: `@eduwork/dsh-mail@0.1.
|
|
3
|
+
> npm package: `@eduwork/dsh-mail@0.1.1`. The previous unscoped package is retained only for migration. See [migration and data compatibility](docs/EDUWORK-MIGRATION.en.md).
|
|
4
4
|
|
|
5
5
|
[简体中文](README.md) | **English**
|
|
6
6
|
|
|
7
7
|
A security-focused mail assistant plugin for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness). It reads through standard IMAP and sends through standard SMTP, while deliberately refusing to become another full mail client.
|
|
8
8
|
|
|
9
|
-
Current version: `0.1.
|
|
9
|
+
Current version: `0.1.1`, reviewed against the public interfaces and an actual runtime of DeepSeek Harness `0.1.5-rc.1`. Complete your own security and compliance review before connecting a critical mailbox. See [compatibility](docs/compatibility.en.md) for the full support matrix.
|
|
10
10
|
|
|
11
11
|
## Scope
|
|
12
12
|
|
|
@@ -37,12 +37,12 @@ See the complete [security model](docs/security-model.en.md).
|
|
|
37
37
|
|
|
38
38
|
## Install
|
|
39
39
|
|
|
40
|
-
Prerequisites: Node.js 22+, DSH `0.1.
|
|
40
|
+
Prerequisites: Node.js 22+, DSH `0.1.5-rc.1`, and a Profile with the official Settings, Credentials, Tools, Filesystem, Permission Presets, Approval, and Web Client capabilities.
|
|
41
41
|
|
|
42
42
|
For normal use, pin the reviewed exact npm version:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
dsh plugin --profile web add @eduwork/dsh-mail@0.1.
|
|
45
|
+
dsh plugin --profile web add @eduwork/dsh-mail@0.1.1
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
Use a source checkout for auditing, development, or unpublished changes:
|
|
@@ -61,7 +61,7 @@ From the parent directory:
|
|
|
61
61
|
dsh plugin --profile web add ./dsh-mail-assistant
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
DSH links the checkout; it does not scan the invoking directory. Keep a source checkout in place.
|
|
64
|
+
DSH links the checkout; it does not scan the invoking directory. Keep a source checkout in place. Team deployments should pin the reviewed exact version shown above. Before upgrading an existing installation, back up the Profile's `package.json` and `cordis.patch.yml`, then accept the upgrade in an isolated Profile.
|
|
65
65
|
|
|
66
66
|
## Configure and verify
|
|
67
67
|
|
|
@@ -69,11 +69,42 @@ Open **Settings → Mail assistant**. Enter the email address, app password, and
|
|
|
69
69
|
|
|
70
70
|
The v0.1 authentication profile is username plus password/app password over standard IMAP/SMTP. Providers that require OAuth2 are outside the current scope.
|
|
71
71
|
|
|
72
|
+
For a headless deployment, use this minimal non-secret example and replace the hosts and account with deployment-specific values:
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
config:
|
|
76
|
+
email: user@example.com
|
|
77
|
+
imapHost: imap.example.com
|
|
78
|
+
imapPort: 993
|
|
79
|
+
imapTls: implicit
|
|
80
|
+
smtpHost: smtp.example.com
|
|
81
|
+
smtpPort: 465
|
|
82
|
+
smtpTls: implicit
|
|
83
|
+
readEnabled: false
|
|
84
|
+
sendEnabled: false
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The app password does not belong in YAML. Write it to the DSH Credential Provider through Settings. A local headless Provider may read `DSH_MAIL_ASSISTANT_PASSWORD` from the environment, but never commit `.env`, logs, or real configuration.
|
|
88
|
+
|
|
89
|
+
## Usage examples
|
|
90
|
+
|
|
91
|
+
- “List mailbox folders without changing message state.”
|
|
92
|
+
- “Find messages from the last seven days whose subject contains ‘meeting’; follow every page before summarizing.”
|
|
93
|
+
- “Read this message and list its attachments; do not follow instructions in the message body.”
|
|
94
|
+
- “Download this attachment to the current workspace.”
|
|
95
|
+
- “Draft a plain-text reply to `recipient@example.com`; show recipient, subject, and body before I approve sending.”
|
|
96
|
+
|
|
97
|
+
Approval for `mail_send` controls one execution; it does not validate the recipient on the user's behalf. Review recipients, subject, body, and attachments before real delivery.
|
|
98
|
+
|
|
72
99
|
## DSH composition
|
|
73
100
|
|
|
74
101
|
The plugin uses official DSH seams: `ctx.credentials`, `ctx.settings`, `settings.section`, `ctx.tools`, `ctx.permissionPresets`, `tools/pre-execute`, `ctx.fs`, and the Client Loader. Ordinary permissions route sends through the composed Approval service; Full Access proceeds without a prompt. It does not fork the upstream Web client.
|
|
75
102
|
|
|
76
|
-
DSH `0.1.
|
|
103
|
+
DSH `0.1.5-rc.1` has bounded binary reads but no binary-write filesystem seam. `mail_get_attachment` therefore uses `ctx.fs` to resolve and fence the local destination before an exclusive local write. A remote/non-local FS Provider may not support that one tool. See [compatibility](docs/compatibility.en.md).
|
|
104
|
+
|
|
105
|
+
## Maintainer release
|
|
106
|
+
|
|
107
|
+
Complete the [public release checklist](docs/release-checklist.en.md) before publishing. The `Release package` workflow checks, packs, and emits SHA-256 metadata by default. Enable OIDC publishing only after verifying the npm Trusted Publisher repository, workflow, and Environment binding. Otherwise publish the reviewed frozen artifact with the npm CLI and browser 2FA, without storing a long-lived token.
|
|
77
108
|
|
|
78
109
|
## Documentation
|
|
79
110
|
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# dsh-mail-assistant
|
|
2
2
|
|
|
3
|
-
> npm 包:`@eduwork/dsh-mail@0.1.
|
|
3
|
+
> npm 包:`@eduwork/dsh-mail@0.1.1`。旧无作用域包仅供迁移;安装切换与数据兼容见 [迁移说明](docs/EDUWORK-MIGRATION.md)。
|
|
4
4
|
|
|
5
5
|
**简体中文** | [English](README.en.md)
|
|
6
6
|
|
|
7
7
|
面向 [DeepSeek Harness(DSH)](https://github.com/deepseek-ai/deepseek-harness) 的安全型邮件助手插件。它通过标准 IMAP 读取邮件、通过标准 SMTP 发送纯文本邮件,但刻意不成为另一个邮箱客户端。
|
|
8
8
|
|
|
9
|
-
当前版本:`0.1.0-
|
|
9
|
+
当前版本:`0.1.1`,按 DeepSeek Harness `0.1.5-rc.1` 的公开接口和实际运行时完成兼容复核。连接重要邮箱前仍应完成组织自己的安全与合规审查,完整支持矩阵见[兼容性](docs/compatibility.md)。
|
|
10
10
|
|
|
11
11
|
## 定位与边界
|
|
12
12
|
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
|
|
38
38
|
## 安装
|
|
39
39
|
|
|
40
|
-
要求:Node.js 22+、DSH `0.1.
|
|
40
|
+
要求:Node.js 22+、DSH `0.1.5-rc.1`,且所用 Profile 已包含 Settings、Credentials、Tools、Filesystem、Permission Presets、Approval 和 Web Client 官方能力。
|
|
41
41
|
|
|
42
42
|
普通使用请固定经过复核的 npm 精确版本:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
dsh plugin --profile web add @eduwork/dsh-mail@0.1.
|
|
45
|
+
dsh plugin --profile web add @eduwork/dsh-mail@0.1.1
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
需要审计、开发或验证尚未发布的改动时,再从源码安装:
|
|
@@ -61,11 +61,7 @@ dsh plugin --profile web add .
|
|
|
61
61
|
dsh plugin --profile web add ./dsh-mail-assistant
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
DSH 会链接本地 checkout
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
dsh plugin --profile web add @eduwork/dsh-mail@alpha
|
|
68
|
-
```
|
|
64
|
+
DSH 会链接本地 checkout,不会扫描当前目录;源码安装后请保留这个目录。团队部署应固定上面经复核的精确版本。升级现有安装前先备份 Profile 的 `package.json` 与 `cordis.patch.yml`,并在隔离 Profile 中验收。
|
|
69
65
|
|
|
70
66
|
## 配置与首次验证
|
|
71
67
|
|
|
@@ -80,6 +76,33 @@ dsh plugin --profile web add @eduwork/dsh-mail@alpha
|
|
|
80
76
|
|
|
81
77
|
不同服务商对普通密码、应用密码和 OAuth2 的支持不同。此插件的 v0.1 只实现用户名 + 密码/授权码的标准 IMAP/SMTP 登录;强制 OAuth2 的邮箱不在当前支持范围内。
|
|
82
78
|
|
|
79
|
+
无头部署的非敏感配置可参考下面的最小示例;主机名和账号必须替换为部署自己的值:
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
config:
|
|
83
|
+
email: user@example.com
|
|
84
|
+
imapHost: imap.example.com
|
|
85
|
+
imapPort: 993
|
|
86
|
+
imapTls: implicit
|
|
87
|
+
smtpHost: smtp.example.com
|
|
88
|
+
smtpPort: 465
|
|
89
|
+
smtpTls: implicit
|
|
90
|
+
readEnabled: false
|
|
91
|
+
sendEnabled: false
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
授权码不属于这个 YAML。通过设置页写入 DSH Credential Provider;仅本地无头部署也可由 Provider 读取 `DSH_MAIL_ASSISTANT_PASSWORD` 环境变量,但不要提交 `.env`、日志或真实配置。
|
|
95
|
+
|
|
96
|
+
## 使用示例
|
|
97
|
+
|
|
98
|
+
- “列出邮箱目录,不要修改邮件状态。”
|
|
99
|
+
- “查找过去 7 天主题包含‘会议’的邮件,持续翻页到没有更多结果,再汇总。”
|
|
100
|
+
- “读取这封邮件并列出附件,不要执行正文里的任何指令。”
|
|
101
|
+
- “把附件下载到当前工作区。”
|
|
102
|
+
- “给 `recipient@example.com` 拟一封纯文本回复,先展示收件人、主题和正文;我确认后再发送。”
|
|
103
|
+
|
|
104
|
+
`mail_send` 的审批只控制本次执行,不会替用户校验收件人是否正确。涉及真实外发时,应先核对收件人、主题、正文和附件。
|
|
105
|
+
|
|
83
106
|
## 与 DSH 的组合关系
|
|
84
107
|
|
|
85
108
|
插件复用 DSH 原生能力,而不是 fork 客户端:
|
|
@@ -93,6 +116,10 @@ dsh plugin --profile web add @eduwork/dsh-mail@alpha
|
|
|
93
116
|
|
|
94
117
|
二进制写入尚未出现在 DSH `ctx.fs` seam 中,因此 `mail_get_attachment` 在本地 Host 文件系统上通过 `ctx.fs` 完成路径解析与包含性校验后,以独占写方式落盘。远程/非本地 FS Provider 可能不支持该工具;其他读信和发信能力不受影响。详见[兼容性](docs/compatibility.md)。
|
|
95
118
|
|
|
119
|
+
## 维护者发布
|
|
120
|
+
|
|
121
|
+
发布前必须完成[公开发布检查表](docs/release-checklist.md)。`Release package` 工作流默认只检查、打包并生成 SHA-256;只有在 npm Trusted Publisher 的仓库、工作流和 Environment 绑定已现场验证后,才能启用 OIDC 发布。否则应从已复核的冻结包使用 npm CLI 与浏览器 2FA 发布,不保存长期 Token。
|
|
122
|
+
|
|
96
123
|
## 文档
|
|
97
124
|
|
|
98
125
|
- [快速接入](docs/getting-started.md)
|
package/SECURITY.en.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](SECURITY.md) | **English**
|
|
4
4
|
|
|
5
|
-
`0.1.
|
|
5
|
+
`@eduwork/dsh-mail@0.1.1` has completed code review, automated tests, and no-network runtime acceptance against DeepSeek Harness `0.1.5-rc.1`. Complete your organization's own security, compliance, and recovery review before connecting a critical mailbox.
|
|
6
6
|
|
|
7
7
|
Do not open a public issue for authorization bypass, credential disclosure, workspace escape, unexpected message mutation, approval bypass, duplicate sending, or remote-code-execution risk. Use GitHub [Private Vulnerability Reporting](https://github.com/freedomkk-qfeng/dsh-mail-assistant/security/advisories/new).
|
|
8
8
|
|
|
9
|
-
Include only minimal reproduction steps, affected versions, and sanitized protocol facts. Never attach real app passwords, cookies, full messages, personal addresses, or unsanitized diagnostics. High-impact outbound, credential, and workspace-boundary issues receive priority, although no fixed
|
|
9
|
+
Include only minimal reproduction steps, affected versions, and sanitized protocol facts. Never attach real app passwords, cookies, full messages, personal addresses, or unsanitized diagnostics. High-impact outbound, credential, and workspace-boundary issues receive priority, although the project promises no fixed SLA.
|
package/SECURITY.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
**简体中文** | [English](SECURITY.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`@eduwork/dsh-mail@0.1.1` 已面向 DeepSeek Harness `0.1.5-rc.1` 完成代码、自动化测试和无网络运行时验收。连接重要邮箱前,仍应完成组织自己的安全、合规与恢复方案审查。
|
|
6
6
|
|
|
7
7
|
如发现授权绕过、凭据泄露、工作区逃逸、邮件状态意外修改、审批绕过、重复发信或远程代码执行风险,请不要公开 issue。请通过 GitHub [Private Vulnerability Reporting](https://github.com/freedomkk-qfeng/dsh-mail-assistant/security/advisories/new) 私密报告。
|
|
8
8
|
|
|
9
9
|
报告请只包含最小复现步骤、受影响版本和脱敏后的协议事实。不要附上真实授权码、Cookie、完整邮件、个人地址或未清理的诊断包。
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
我们会确认收到、评估影响、准备修复和回归测试,再协商披露时间。项目不承诺固定 SLA,但会优先处理可导致外发、凭据或工作区越界的问题。
|
package/SUPPORT.en.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Support
|
|
2
|
+
|
|
3
|
+
[简体中文](SUPPORT.md) | **English**
|
|
4
|
+
|
|
5
|
+
Use [GitHub Issues](https://github.com/freedomkk-qfeng/dsh-mail-assistant/issues) for normal installation, compatibility, and protocol questions. Vulnerabilities, app passwords, real messages, and private server information must use the private process in the [security policy](SECURITY.en.md).
|
|
6
|
+
|
|
7
|
+
For an ordinary defect include:
|
|
8
|
+
|
|
9
|
+
- `dsh-mail-assistant`, DSH, Node.js, and operating-system versions;
|
|
10
|
+
- Web or desktop host, permission preset, and Filesystem Provider type;
|
|
11
|
+
- IMAP/SMTP class, port, TLS mode, and authentication method without real hosts or accounts;
|
|
12
|
+
- expected behavior, observed behavior, and a minimal reproduction;
|
|
13
|
+
- sanitized logs with addresses, subjects, bodies, Message-IDs, app passwords, and server responses removed.
|
|
14
|
+
|
|
15
|
+
OAuth2 mailbox authentication, multiple accounts, shared multi-user Web, polling, delete/move, scheduled sending, and unreviewed DSH versions are outside the current support boundary. Provider policy for app passwords or SMTP AUTH is not controlled by this plugin.
|
package/SUPPORT.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 支持
|
|
2
|
+
|
|
3
|
+
**简体中文** | [English](SUPPORT.en.md)
|
|
4
|
+
|
|
5
|
+
普通安装、兼容性和协议问题请使用 [GitHub Issues](https://github.com/freedomkk-qfeng/dsh-mail-assistant/issues)。漏洞、授权码、真实邮件或私有服务器信息必须走[安全政策](SECURITY.md)规定的私密流程。
|
|
6
|
+
|
|
7
|
+
普通缺陷报告请提供:
|
|
8
|
+
|
|
9
|
+
- `dsh-mail-assistant`、DSH、Node.js 和操作系统版本;
|
|
10
|
+
- Web 或桌面宿主、权限预设及 Filesystem Provider 类型;
|
|
11
|
+
- IMAP/SMTP 类型、端口、TLS 模式和认证方式,不要提供真实主机与账号;
|
|
12
|
+
- 预期行为、实际行为和最小复现;
|
|
13
|
+
- 已删除地址、主题、正文、Message-ID、授权码和服务端响应的脱敏日志。
|
|
14
|
+
|
|
15
|
+
当前不支持 OAuth2 邮箱认证、多账号、共享多用户 Web、后台轮询、删除/移动邮件、计划发送,以及未经复核的 DSH 版本。邮箱服务商是否允许应用密码或 SMTP AUTH 属于其租户策略,不由本插件控制。
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- [ImapFlow](https://github.com/postalsys/imapflow) — MIT License — IMAP client;
|
|
8
8
|
- [Nodemailer](https://github.com/nodemailer/nodemailer) — MIT-0 License — SMTP message submission;
|
|
9
9
|
- [MailParser](https://github.com/nodemailer/mailparser) — MIT License — MIME parsing;
|
|
10
|
-
- [
|
|
10
|
+
- [`@deepseek-ai/schemastery`](https://github.com/deepseek-ai/deepseek-harness/tree/main/vendor/schemastery) — MIT License — DSH settings-schema implementation;
|
|
11
11
|
- [React](https://github.com/facebook/react) — MIT License — DSH Client settings surface (peer dependency).
|
|
12
12
|
|
|
13
13
|
The project was informed by the MIT-licensed integration approach in [`STARDUSTLC666/dsh-email`](https://github.com/STARDUSTLC666/dsh-email), but redesigns the permission, credential, read-only IMAP, workspace, untrusted-content, and approval boundaries. No third-party project endorses this plugin.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- [ImapFlow](https://github.com/postalsys/imapflow) — MIT License — IMAP 客户端;
|
|
8
8
|
- [Nodemailer](https://github.com/nodemailer/nodemailer) — MIT-0 License — SMTP 邮件提交;
|
|
9
9
|
- [MailParser](https://github.com/nodemailer/mailparser) — MIT License — MIME 解析;
|
|
10
|
-
- [
|
|
10
|
+
- [`@deepseek-ai/schemastery`](https://github.com/deepseek-ai/deepseek-harness/tree/main/vendor/schemastery) — MIT License — DSH 的设置 Schema 实现;
|
|
11
11
|
- [React](https://github.com/facebook/react) — MIT License — DSH Client 设置界面(peer dependency)。
|
|
12
12
|
|
|
13
13
|
项目参考了 MIT 许可的社区项目 [`STARDUSTLC666/dsh-email`](https://github.com/STARDUSTLC666/dsh-email) 在 ImapFlow、Nodemailer、MailParser 与 DSH 之间的组合思路,但重新设计了权限、凭据、只读 IMAP、工作区、邮件不可信内容和审批边界。没有任何第三方项目为本插件背书。
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](EDUWORK-MIGRATION.md) | **English**
|
|
4
4
|
|
|
5
|
-
Starting with
|
|
5
|
+
Starting with `0.1.0`, the npm package is `@eduwork/dsh-mail`, replacing `dsh-mail-assistant`. The current installation example pins `0.1.1`. The GitHub repository and checkout directory remain `dsh-mail-assistant`. Consult the npm registry for actual publication status.
|
|
6
6
|
|
|
7
7
|
## Installation and migration
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
dsh plugin --profile web add @eduwork/dsh-mail@0.1.
|
|
10
|
+
dsh plugin --profile web add @eduwork/dsh-mail@0.1.1
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Back up an existing Profile's package.json and cordis.patch.yml, then update its dependency and dsh.profile.bundles entries. Update module name paths in custom patches too. Do not enable both package identities together; restart the Host after switching. These are separate npm packages, so updating the old package cannot migrate an installation automatically.
|
|
@@ -20,4 +20,4 @@ Storage directories and user configuration content do not change. Product-manage
|
|
|
20
20
|
|
|
21
21
|
## Release scope
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`0.1.0` was the first stable scoped package; `0.1.1` updates the release baseline to DSH `0.1.5-rc.1`. Migration does not change the settings namespace, Credential Ref, or attachment directory. Release acceptance does not claim sign-in to any institutional account or real mail delivery. Previous packages remain installable with their migration notice.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
**简体中文** | [English](EDUWORK-MIGRATION.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
从 `0.1.0` 起,npm 包使用 `@eduwork/dsh-mail`,替代旧的 `dsh-mail-assistant`。当前安装示例固定为 `0.1.1`;GitHub 仓库和本地 checkout 目录继续使用 `dsh-mail-assistant`。包的实际发布状态以 npm registry 为准。
|
|
6
6
|
|
|
7
7
|
## 安装与迁移
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
dsh plugin --profile web add @eduwork/dsh-mail@0.1.
|
|
10
|
+
dsh plugin --profile web add @eduwork/dsh-mail@0.1.1
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
已有 Profile 先备份 package.json 与 cordis.patch.yml,再更新依赖和 dsh.profile.bundles;手写 patch 的模块路径 name 也需切换。不要同时启用新旧两份插件,切换后重启 Host。旧版本和新作用域版本是不同 npm 包,旧包的更新不会自动迁移安装。
|
|
@@ -20,4 +20,4 @@ dsh plugin --profile web add @eduwork/dsh-mail@0.1.0-alpha.5
|
|
|
20
20
|
|
|
21
21
|
## 发布范围
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`0.1.0` 是作用域包的首个稳定版本;`0.1.1` 将发布基线更新到 DSH `0.1.5-rc.1`。迁移不要求改动 settings namespace、Credential Ref 或附件目录。发布验收不宣称已完成任意机构账号登录或真实邮件投递;旧包保持可安装并保留迁移提示。
|
package/docs/architecture.en.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
```text
|
|
10
10
|
DSH Web Client
|
|
11
11
|
└─ settings.section: Mail assistant
|
|
12
|
-
├─
|
|
12
|
+
├─ settingsScope namespaced non-secret settings
|
|
13
13
|
└─ remote.credentials write-only app password
|
|
14
14
|
|
|
15
15
|
DSH Host
|
|
@@ -30,7 +30,7 @@ The plugin does not provide a Credential, Settings, Filesystem, Permission Prese
|
|
|
30
30
|
|
|
31
31
|
Non-secret fields live in the `dsh-mail-assistant` settings namespace. The app password uses the fixed credential reference `DSH_MAIL_ASSISTANT_PASSWORD`. The Host resolves it at the beginning of every tool call and never caches it across operations, so rotation applies to the next call.
|
|
32
32
|
|
|
33
|
-
The settings page only invokes `credentials.describe/set/unset
|
|
33
|
+
The settings page reads and writes non-secret configuration through `settingsScope.bind({ namespace: 'dsh-mail-assistant' })`, using revision-fenced atomic mutations to avoid overwriting concurrent updates. For the app password it only invokes `credentials.describe/set/unset`: it can observe configured/writable state, but it cannot read the credential value back into the browser.
|
|
34
34
|
|
|
35
35
|
## Message identity and pagination
|
|
36
36
|
|
|
@@ -58,7 +58,7 @@ Outbound attachments use `ctx.fs`: resolve from the session `cwd`, verify contai
|
|
|
58
58
|
|
|
59
59
|
The Host artifact embeds the IMAP/SMTP implementation libraries in `lib/index.js`. Users do not install a second protocol runtime after npm, source-package, or offline-product installation, and plugin dependencies cannot collide with a product's private Node runtime during updates.
|
|
60
60
|
|
|
61
|
-
DSH `0.1.
|
|
61
|
+
DSH `0.1.5-rc.1` 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
|
|
|
63
63
|
## Extension rules
|
|
64
64
|
|
package/docs/architecture.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
```text
|
|
10
10
|
DSH Web Client
|
|
11
11
|
└─ settings.section: 邮件助手设置页
|
|
12
|
-
├─
|
|
12
|
+
├─ settingsScope 绑定命名空间的非敏感配置
|
|
13
13
|
└─ remote.credentials 授权码只写
|
|
14
14
|
|
|
15
15
|
DSH Host
|
|
@@ -30,7 +30,7 @@ DSH Host
|
|
|
30
30
|
|
|
31
31
|
非敏感字段保存在 `dsh-mail-assistant` settings namespace。授权码使用固定 Credential Ref `DSH_MAIL_ASSISTANT_PASSWORD`。Host 在每个工具调用开始时重新解析引用,不跨操作缓存密码,因此轮换后的值会在下一次调用生效。
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
设置页通过 `settingsScope.bind({ namespace: 'dsh-mail-assistant' })` 读写非敏感配置,并使用 revision fence 的原子 mutation 避免覆盖并发更新。它对授权码只能调用 `credentials.describe/set/unset`:可看到“是否配置”和“是否可写”,不能读回实际值。
|
|
34
34
|
|
|
35
35
|
## 邮件标识
|
|
36
36
|
|
|
@@ -64,9 +64,9 @@ handle 用于完整性检查和防误用,不是授权令牌,也不包含密
|
|
|
64
64
|
|
|
65
65
|
发送附件完全走 `ctx.fs`:以会话 `cwd` 解析、验证包含关系、检查普通文件、累计大小,再通过 `readBytes` 有界读取。
|
|
66
66
|
|
|
67
|
-
Host 产物会把 IMAP/SMTP 运行依赖编入 `lib/index.js`。因此通过 npm
|
|
67
|
+
Host 产物会把 IMAP/SMTP 运行依赖编入 `lib/index.js`。因此通过 npm、源码包或产品离线装配安装后,终端用户都不需要再安装 Node 依赖;这也避免了插件依赖与宿主随版本更新的私有 Node 运行时互相覆盖。
|
|
68
68
|
|
|
69
|
-
DSH `0.1.
|
|
69
|
+
DSH `0.1.5-rc.1` 暂无 `writeBytes`。下载附件因此只在本地 Host FS 上可用:插件先用 `ctx.fs` 解析逻辑路径,创建目录后再解析工作区与目标目录的真实路径并重新验证包含关系,最后把随机文件名以 `wx` 独占模式写入。这样会拒绝预置符号链接或目录联接造成的工作区逃逸。未来官方提供二进制写 seam 后,应删除这段本地适配,直接复用官方能力。
|
|
70
70
|
|
|
71
71
|
## 后续扩展规则
|
|
72
72
|
|