@zaclinley/dsh-mailharbor 0.14.0 → 0.16.0
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 +36 -0
- package/README.md +36 -35
- package/README.zh.md +35 -32
- package/lib/client.js +169 -18
- package/lib/client.js.map +2 -2
- package/lib/index.js +78 -34
- package/lib/index.js.map +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 15e68be: Remove OAuth2 and rebuild the shell for narrow windows.
|
|
8
|
+
|
|
9
|
+
- OAuth2 is gone: no auth mode, token storage, device/loopback flows or settings
|
|
10
|
+
section. Accounts use passwords or app passwords again.
|
|
11
|
+
- Responsive shell: the account/folder column becomes a drawer below 1220px,
|
|
12
|
+
the list and reader become one pane below 900px with a back button, the AI
|
|
13
|
+
assistant overlays with a scrim below 1540px, and the reader's secondary
|
|
14
|
+
actions collapse behind 更多 on phones.
|
|
15
|
+
- Fluid list width, wrapping topbar at 760px, full-width search, single-column
|
|
16
|
+
settings grids, and a fixed sync popover on phones.
|
|
17
|
+
- Keyboard: `/` focuses search and Escape closes the popover, AI rail, drawer
|
|
18
|
+
or reader in that order; empty searches offer a clear action.
|
|
19
|
+
- Thin scrollbars and larger touch targets on small screens.
|
|
20
|
+
|
|
21
|
+
## 0.15.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- 729a56c: OAuth2 accounts, onboarding and config migration.
|
|
26
|
+
|
|
27
|
+
- OAuth2: Google loopback with PKCE and Microsoft device-code login; access
|
|
28
|
+
tokens refresh in the background and live in the OS keychain (not config).
|
|
29
|
+
- Account creation accepts OAuth2 without a password; the account settings page
|
|
30
|
+
gains an authorize / re-authorize / revoke card.
|
|
31
|
+
- OAuth app configuration (client IDs) is editable in settings.
|
|
32
|
+
- The empty state explains the three onboarding steps, including OAuth vs app
|
|
33
|
+
passwords.
|
|
34
|
+
- Export/import a small JSON profile: accounts (without secrets), signature,
|
|
35
|
+
reading settings and OAuth app config; imports dedupe accounts by email.
|
|
36
|
+
- Live OAuth needs your own client ID; refresh and device polling are covered
|
|
37
|
+
by unit tests with mocked token endpoints.
|
|
38
|
+
|
|
3
39
|
## 0.14.0
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -15,25 +15,27 @@ and read state.
|
|
|
15
15
|
- Package: `@zaclinley/dsh-mailharbor`
|
|
16
16
|
- Requirements: **DSH `>=0.2.2-0 <0.3.0`**, Node **>=24.9** (the runtime bundled with DSH is fine)
|
|
17
17
|
- License: MIT
|
|
18
|
-
- Status: **v0.
|
|
18
|
+
- Status: **v0.16.0 — local-first mail workspace with background IMAP sync, AI search, projects and a Kanban task board**.
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
|
-
| Area
|
|
23
|
-
|
|
|
24
|
-
| Accounts
|
|
25
|
-
| Local
|
|
26
|
-
| Browse
|
|
27
|
-
|
|
|
28
|
-
| Reader
|
|
29
|
-
| Compose
|
|
30
|
-
| Drafts
|
|
31
|
-
| AI
|
|
32
|
-
| Projects
|
|
33
|
-
| Tasks
|
|
34
|
-
| Credentials
|
|
35
|
-
|
|
|
36
|
-
|
|
|
22
|
+
| Area | What you get |
|
|
23
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
+
| Accounts | Any IMAP/SMTP mailbox with a password or app password; per-account data directory; accounts and folders in the left column |
|
|
25
|
+
| Local-first | Opens from the local SQLite backup instantly, then syncs new mail in the background; progress popover with start/stop |
|
|
26
|
+
| Browse | Collapsible account/folder column, paging, subject conversations loaded across the whole backup, AI search over the local index |
|
|
27
|
+
| Actions | Star, archive, delete-to-trash, move to any folder; bulk read/unread/star/archive/delete |
|
|
28
|
+
| Reader | Sandboxed HTML with a strict CSP, inline cid images as data URLs, remote images blocked, plain-text fallback, attachment download |
|
|
29
|
+
| Compose | Rich text, attachments, reply/reply-all/forward with `In-Reply-To` and `References`, contact autocomplete, per-account signatures, explicit send confirmation |
|
|
30
|
+
| Drafts | Local drafts mirrored to IMAP Drafts on save/close, cleaned up on discard and send |
|
|
31
|
+
| AI | Per-mail workspace: summary (brief/standard/detailed), reply, translation, Q&A, writing style; inline expansion; AI search; compose draft/polish/shorten |
|
|
32
|
+
| Projects | Project folder (`BRIEF.md`, `CONVERSATION.md`) registered in DSH Workspaces; append AI records, add mails, open in Finder; delete folder/workspace when asked |
|
|
33
|
+
| Tasks | Kanban board (待处理 / 进行中 / 已完成 / 终止) with due/priority/owner/project, source-mail links and AI extraction |
|
|
34
|
+
| Credentials | macOS Keychain, libsecret, Windows Credential Locker; secrets never enter `config.json` |
|
|
35
|
+
| Migration | Export/import a JSON profile: accounts without secrets, signature and reading settings |
|
|
36
|
+
| Agent tools | `mail_status`, `mail_list`, `mail_read`, `mail_search`, `mail_drafts`, `mail_draft`, `mail_backup` |
|
|
37
|
+
| Settings | DSH Settings → MailHarbor: accounts, servers, checks, signature, reading, list size, AI model and writing style, project root |
|
|
38
|
+
| Layout | Responsive shell: the folder column becomes a drawer, list/reader switch to one pane, AI rail becomes an overlay, reader actions collapse behind 更多 |
|
|
37
39
|
|
|
38
40
|
## Screenshots
|
|
39
41
|
|
|
@@ -75,15 +77,13 @@ dsh plugin --profile desktop add link:$PWD
|
|
|
75
77
|
1. Open the **MailHarbor** panel from the sidebar.
|
|
76
78
|
2. Add an account: address + password (or app password). **Advanced** lets you set IMAP/SMTP hosts,
|
|
77
79
|
ports and TLS. The account is verified against IMAP before it is saved.
|
|
78
|
-
3.
|
|
79
|
-
4.
|
|
80
|
+
3. The list opens from the local backup immediately; the sync indicator pulls new mail in the background (and every poll interval).
|
|
81
|
+
4. Press **Write** to compose. New mail appears after the next background sync.
|
|
80
82
|
|
|
81
83
|
### Gmail, Outlook, and other providers
|
|
82
84
|
|
|
83
|
-
- Gmail: enable IMAP
|
|
84
|
-
|
|
85
|
-
- Microsoft 365: basic auth is disabled; use an app password only if your tenant still allows IMAP
|
|
86
|
-
AUTH, otherwise wait for the OAuth2 release.
|
|
85
|
+
- Gmail: enable IMAP and use an **app password** (2-Step Verification required).
|
|
86
|
+
- Microsoft 365: app passwords only work while the tenant still allows IMAP AUTH.
|
|
87
87
|
- Yahoo: app password. Self-hosted: any IMAP/SMTP endpoints with STARTTLS or implicit TLS.
|
|
88
88
|
|
|
89
89
|
## Migrating from `dsh-plugin-mail`
|
|
@@ -103,8 +103,8 @@ node node_modules/@zaclinley/dsh-mailharbor/scripts/migrate-legacy.mjs --copy
|
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
It matches accounts by email, repoints `dataDir`, converts read-state keys and drafts to the new
|
|
106
|
-
shapes, and copies the macOS Keychain password to the new service name.
|
|
107
|
-
|
|
106
|
+
shapes, and copies the macOS Keychain password to the new service name.
|
|
107
|
+
Restart DSH afterwards so the Host reopens the database.
|
|
108
108
|
|
|
109
109
|
## Data and privacy
|
|
110
110
|
|
|
@@ -176,17 +176,18 @@ must be able to publish `@zaclinley/*`. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
176
176
|
|
|
177
177
|
## Roadmap
|
|
178
178
|
|
|
179
|
-
| Version | Scope
|
|
180
|
-
| --------- |
|
|
181
|
-
| **0.1.x** | Core mail workspace, backup, tools, settings, publishing pipeline
|
|
182
|
-
| 0.2 | UI overhaul, migration from `dsh-plugin-mail`, installer polish
|
|
183
|
-
| 0.3 | Drafts, unified inbox, server paging, AI summary/reply/translate, writing style
|
|
184
|
-
| 0.4 | Persistent AI workspace, composer version stack
|
|
185
|
-
| 0.5 | Projects from mail, task panel
|
|
186
|
-
| 0.6 | Mailbox sidebar, Kanban tasks, faster server browsing
|
|
187
|
-
| 0.7 | AI search, conversation grouping, folder picker, four-column task board
|
|
188
|
-
| 0.8
|
|
189
|
-
| Later |
|
|
179
|
+
| Version | Scope |
|
|
180
|
+
| --------- | ----------------------------------------------------------------------------------- |
|
|
181
|
+
| **0.1.x** | Core mail workspace, backup, tools, settings, publishing pipeline |
|
|
182
|
+
| 0.2 | UI overhaul, migration from `dsh-plugin-mail`, installer polish |
|
|
183
|
+
| 0.3 | Drafts, unified inbox, server paging, AI summary/reply/translate, writing style |
|
|
184
|
+
| 0.4 | Persistent AI workspace, composer version stack |
|
|
185
|
+
| 0.5 | Projects from mail, task panel |
|
|
186
|
+
| 0.6 | Mailbox sidebar, Kanban tasks, faster server browsing |
|
|
187
|
+
| 0.7 | AI search, conversation grouping, folder picker, four-column task board |
|
|
188
|
+
| 0.8–0.16 | Local-first sync, mail actions, drafts mirror, responsive layout, account migration |
|
|
189
|
+
| Later | OAuth2 is not planned for now (app passwords cover IMAP/SMTP) |
|
|
190
|
+
| Later | Reports, export/import, onboarding, richer attachments |
|
|
190
191
|
|
|
191
192
|
## Star history
|
|
192
193
|
|
package/README.zh.md
CHANGED
|
@@ -14,25 +14,27 @@ MailHarbor 在 DSH 左侧栏加一个「邮件」入口,主面板里是完整
|
|
|
14
14
|
- 包名:`@zaclinley/dsh-mailharbor`
|
|
15
15
|
- 要求:**DSH `>=0.2.2-0 <0.3.0`**,Node **>=24.9**(DSH 自带运行时即可)
|
|
16
16
|
- 许可证:MIT
|
|
17
|
-
- 状态:**v0.
|
|
17
|
+
- 状态:**v0.16.0 — 本地优先 + 后台同步 + AI 搜索 + 项目 + 看板任务 + 响应式布局**。
|
|
18
18
|
|
|
19
19
|
## 功能
|
|
20
20
|
|
|
21
|
-
| 区域 | 能做什么
|
|
22
|
-
| ---------- |
|
|
23
|
-
| 账号 | 任意 IMAP/SMTP
|
|
24
|
-
|
|
|
25
|
-
| 浏览 |
|
|
26
|
-
|
|
|
27
|
-
| 阅读 | sandbox
|
|
28
|
-
| 写邮件 |
|
|
29
|
-
| 草稿 |
|
|
30
|
-
| AI |
|
|
31
|
-
| 项目 |
|
|
32
|
-
| 任务 |
|
|
33
|
-
| 凭据 | macOS 钥匙串、
|
|
34
|
-
|
|
|
35
|
-
|
|
|
21
|
+
| 区域 | 能做什么 |
|
|
22
|
+
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
23
|
+
| 账号 | 任意 IMAP/SMTP 邮箱,密码或应用专用密码;每账号独立数据目录;账号与文件夹在左侧栏 |
|
|
24
|
+
| 本地优先 | 打开即从本地 SQLite 备份显示,随后后台增量同步;同步按钮带进度与启停 |
|
|
25
|
+
| 浏览 | 可折叠账号/文件夹栏、分页、按主题从整个备份组会话、AI 搜索 |
|
|
26
|
+
| 操作 | 标星、归档、删除到垃圾箱、移动到任意文件夹;多选批量已读/未读/标星/归档/删除 |
|
|
27
|
+
| 阅读 | sandbox + 严格 CSP;内嵌 cid 图片转 data URL;远程图片拦截;附件多时折叠 |
|
|
28
|
+
| 写邮件 | 富文本、附件、回复/全部回复/转发(In-Reply-To/References)、联系人补全、按账号签名、二次确认 |
|
|
29
|
+
| 草稿 | 本地草稿在手动保存/关闭时镜像到 IMAP Drafts 并替换旧副本,丢弃/发送时清理 |
|
|
30
|
+
| AI | 单封邮件工作台:摘要(简洁/标准/详细)、回复、翻译、问答、写作风格;内联展开;AI 搜索;写信润色 |
|
|
31
|
+
| 项目 | 生成项目文件夹(BRIEF.md、CONVERSATION.md)并注册到 DSH Workspaces;追加 AI 记录、加入邮件、Finder 打开;删除时可连同文件夹/工作空间 |
|
|
32
|
+
| 任务 | 四列看板(待处理/进行中/已完成/终止),截止/优先级/负责人/项目、来源邮件、AI 提取 |
|
|
33
|
+
| 凭据 | macOS 钥匙串、libsecret、Windows Credential Locker;密钥不写入 config.json |
|
|
34
|
+
| 迁移 | 导出/导入 JSON:账号(不含密钥)、签名与阅读设置 |
|
|
35
|
+
| Agent 工具 | `mail_status`、`mail_list`、`mail_read`、`mail_search`、`mail_drafts`、`mail_draft`、`mail_backup` |
|
|
36
|
+
| 设置 | DSH 设置 → MailHarbor:账号、服务器、连接检查、签名、阅读、列表数量、AI 模型与写作风格、项目根目录 |
|
|
37
|
+
| 布局 | 响应式:文件夹栏变抽屉,列表/阅读单栏切换,AI 助手变浮层,阅读操作收进「更多」 |
|
|
36
38
|
|
|
37
39
|
## 界面
|
|
38
40
|
|
|
@@ -74,13 +76,13 @@ dsh plugin --profile desktop add link:$PWD
|
|
|
74
76
|
1. 从左侧栏打开 **MailHarbor**。
|
|
75
77
|
2. 添加账号:邮箱地址 + 密码(或应用专用密码)。「高级设置」里可改 IMAP/SMTP 主机、端口和 TLS;
|
|
76
78
|
保存前会真实连接一次 IMAP 校验。
|
|
77
|
-
3.
|
|
78
|
-
4.
|
|
79
|
+
3. 打开即显示本地备份,顶部同步按钮在后台拉取新邮件。
|
|
80
|
+
4. 点「写邮件」开始写信;新邮件会在下次同步后出现。
|
|
79
81
|
|
|
80
82
|
### Gmail、Outlook 与其他服务商
|
|
81
83
|
|
|
82
|
-
- Gmail
|
|
83
|
-
- Microsoft 365
|
|
84
|
+
- Gmail:启用 IMAP,并使用**应用专用密码**(需先开启两步验证)。
|
|
85
|
+
- Microsoft 365:应用专用密码只在租户仍允许 IMAP AUTH 时可用。
|
|
84
86
|
- Yahoo:应用专用密码。自建邮箱:任何支持 STARTTLS 或隐式 TLS 的 IMAP/SMTP 都可以。
|
|
85
87
|
|
|
86
88
|
## 从 `dsh-plugin-mail` 迁移
|
|
@@ -99,7 +101,7 @@ node node_modules/@zaclinley/dsh-mailharbor/scripts/migrate-legacy.mjs --copy
|
|
|
99
101
|
```
|
|
100
102
|
|
|
101
103
|
脚本按邮箱匹配账号,改写 `dataDir`,把已读状态和草稿转换成新结构,并把 macOS 钥匙串密码复制到
|
|
102
|
-
新的 service
|
|
104
|
+
新的 service 名下。迁移完重启 DSH,Host 才会重新打开数据库。
|
|
103
105
|
|
|
104
106
|
## 数据与隐私
|
|
105
107
|
|
|
@@ -169,17 +171,18 @@ CI 会在 `main` 上通过 `.github/workflows/release.yml` 发布;仓库需要
|
|
|
169
171
|
|
|
170
172
|
## 路线图
|
|
171
173
|
|
|
172
|
-
| 版本 | 范围
|
|
173
|
-
| --------- |
|
|
174
|
-
| **0.1.x** | 核心邮件工作区、备份、工具、设置、发布流水线
|
|
175
|
-
| 0.2 | 界面重做、从 `dsh-plugin-mail` 迁移数据、安装体验
|
|
176
|
-
| 0.3 | 草稿、统一收件箱、服务器分页、AI 摘要/回复/翻译、写作风格
|
|
177
|
-
| 0.4 | 常驻 AI 工作台、写信版本栈
|
|
178
|
-
| 0.5 | 从邮件建项目、任务面板
|
|
179
|
-
| 0.6 | 账号/文件夹侧栏、看板任务、服务器浏览提速
|
|
180
|
-
| 0.7 | AI 搜索、会话分组、目录选择器、四列任务看板
|
|
181
|
-
| 0.8
|
|
182
|
-
|
|
|
174
|
+
| 版本 | 范围 |
|
|
175
|
+
| --------- | --------------------------------------------------------- |
|
|
176
|
+
| **0.1.x** | 核心邮件工作区、备份、工具、设置、发布流水线 |
|
|
177
|
+
| 0.2 | 界面重做、从 `dsh-plugin-mail` 迁移数据、安装体验 |
|
|
178
|
+
| 0.3 | 草稿、统一收件箱、服务器分页、AI 摘要/回复/翻译、写作风格 |
|
|
179
|
+
| 0.4 | 常驻 AI 工作台、写信版本栈 |
|
|
180
|
+
| 0.5 | 从邮件建项目、任务面板 |
|
|
181
|
+
| 0.6 | 账号/文件夹侧栏、看板任务、服务器浏览提速 |
|
|
182
|
+
| 0.7 | AI 搜索、会话分组、目录选择器、四列任务看板 |
|
|
183
|
+
| 0.8–0.16 | 本地优先、邮件操作、草稿镜像、响应式布局、配置迁移 |
|
|
184
|
+
| Later | 暂不做 OAuth2(应用专用密码已覆盖 IMAP/SMTP) |
|
|
185
|
+
| 以后 | 报告、导出/导入、引导流程、更完整的附件支持 |
|
|
183
186
|
|
|
184
187
|
## 许可证
|
|
185
188
|
|