mails 0.0.8 → 1.0.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/README.ja.md ADDED
@@ -0,0 +1,146 @@
1
+ # mails
2
+
3
+ AIエージェント向けのメールインフラ。プログラムでメールの送受信ができます。
4
+
5
+ [![npm](https://img.shields.io/npm/v/mails)](https://www.npmjs.com/package/mails)
6
+ [![license](https://img.shields.io/npm/l/mails)](LICENSE)
7
+
8
+ [English](README.md) | [中文](README.zh.md)
9
+
10
+ ## テストカバレッジ
11
+
12
+ ```
13
+ 全ファイル: 100.00% Functions | 100.00% Lines
14
+ ユニットテスト 78件 + ライブ E2E テスト 8件(実際の Resend + Cloudflare Email Routing)
15
+ ```
16
+
17
+ ## 特徴
18
+
19
+ - **メール送信** — Resend経由(他のプロバイダーも追加予定)
20
+ - **メール受信** — Cloudflare Email Routing Worker経由
21
+ - **認証コード自動抽出** — メールから認証コードを自動検出(英語/中国語/日本語/韓国語対応)
22
+ - **ストレージプロバイダー** — ローカルSQLite(デフォルト)または [db9.ai](https://db9.ai) クラウドPostgreSQL
23
+ - **依存関係ゼロ** — Resendプロバイダーは `fetch()` を直接使用、SDKは不要
24
+ - **エージェントファースト** — `skill.md` 統合ガイド付きのAIエージェント向け設計
25
+ - **クラウドサービス** — `@mails.dev` アドレス、x402マイクロペイメント対応(近日公開)
26
+
27
+ ## インストール
28
+
29
+ ```bash
30
+ npm install -g mails
31
+ # または
32
+ bun install -g mails
33
+ # または直接実行
34
+ npx mails
35
+ ```
36
+
37
+ ## クイックスタート
38
+
39
+ ```bash
40
+ # 設定
41
+ mails config set resend_api_key re_YOUR_KEY
42
+ mails config set default_from "Agent <agent@yourdomain.com>"
43
+
44
+ # メール送信
45
+ mails send --to user@example.com --subject "Hello" --body "World"
46
+ ```
47
+
48
+ ## CLIリファレンス
49
+
50
+ ### 送信
51
+
52
+ ```bash
53
+ mails send --to <email> --subject <subject> --body <text>
54
+ mails send --to <email> --subject <subject> --html "<h1>Hello</h1>"
55
+ mails send --from "Name <email>" --to <email> --subject <subject> --body <text>
56
+ ```
57
+
58
+ ### 受信箱
59
+
60
+ ```bash
61
+ mails inbox # 最近のメール一覧
62
+ mails inbox --mailbox agent@test.com # 特定メールボックス
63
+ mails inbox <id> # メール詳細表示
64
+ ```
65
+
66
+ ### 認証コード
67
+
68
+ ```bash
69
+ mails code --to agent@test.com # コード待機(デフォルト30秒)
70
+ mails code --to agent@test.com --timeout 60 # タイムアウト指定
71
+ ```
72
+
73
+ コードは標準出力に出力されるため、パイプで利用可能: `CODE=$(mails code --to agent@test.com)`
74
+
75
+ ### 設定
76
+
77
+ ```bash
78
+ mails config # 全設定表示
79
+ mails config set <key> <value> # 値を設定
80
+ mails config get <key> # 値を取得
81
+ mails config path # 設定ファイルのパス表示
82
+ ```
83
+
84
+ ## SDK
85
+
86
+ ```typescript
87
+ import { send, getInbox, waitForCode } from 'mails'
88
+
89
+ // 送信
90
+ const result = await send({
91
+ to: 'user@example.com',
92
+ subject: 'Hello',
93
+ text: 'World',
94
+ })
95
+
96
+ // 受信箱一覧
97
+ const emails = await getInbox('agent@yourdomain.com', { limit: 10 })
98
+
99
+ // 認証コード待機
100
+ const code = await waitForCode('agent@yourdomain.com', { timeout: 30 })
101
+ if (code) console.log(code.code) // "123456"
102
+ ```
103
+
104
+ ## メールワーカー
105
+
106
+ `worker/` ディレクトリにCloudflare Email Routing Workerが含まれています。
107
+
108
+ ### セットアップ
109
+
110
+ ```bash
111
+ cd worker
112
+ bun install
113
+ # wrangler.toml を編集 — D1データベースIDを設定
114
+ wrangler d1 create mails
115
+ wrangler d1 execute mails --file=schema.sql
116
+ wrangler deploy
117
+ ```
118
+
119
+ その後、Cloudflare Email Routingでこのワーカーへの転送を設定します。
120
+
121
+ ## ストレージプロバイダー
122
+
123
+ ### SQLite(デフォルト)
124
+
125
+ `~/.mails/mails.db` のローカルデータベース。設定不要。
126
+
127
+ ### db9.ai
128
+
129
+ AIエージェント向けクラウドPostgreSQL。
130
+
131
+ ```bash
132
+ mails config set storage_provider db9
133
+ mails config set db9_token YOUR_TOKEN
134
+ mails config set db9_database_id YOUR_DB_ID
135
+ ```
136
+
137
+ ## テスト
138
+
139
+ ```bash
140
+ bun test # 全テスト実行
141
+ bun test --coverage # カバレッジレポート付き
142
+ ```
143
+
144
+ ## ライセンス
145
+
146
+ MIT
package/README.md CHANGED
@@ -1,148 +1,196 @@
1
- ## ![logo](http://ww2.sinaimg.cn/large/61ff0de3gw1eajmy0wdikj2014014wea.jpg) mails ![npm](https://badge.fury.io/js/mails.png)
2
-
3
- mails 使发送邮件变得更简单与优雅,提高模板复用率。
4
-
5
- 使用 mails 内建的标准模板 `mails-default` 来发送邮件,或者快速发布自己的邮件主题,mails 推荐您把邮件主题发布到 NPM
6
-
7
- mails 内建的标准邮件模板由 [ink](http://zurb.com/ink) 改造而来,对二次开发表现友好,也对各个终端的兼容表现优秀。稍作修改,亦可以适配智能手机等小屏幕终端。
8
-
9
- ### 如何安装
10
- ````
11
- $ npm install mails
12
- ````
13
-
14
- ### 快速指引
15
-
16
- mails 包括三个部分:
17
-
18
- - 一个邮件模板加载器和发送工具(基于 Nodemailer 的 SMTP 服务)
19
- - 一个支持实时编辑(live reload)的邮件模板设计工具(CLI)
20
- - 一个快速生成邮件主题项目文件的脚手架工具(CLI)
21
-
22
- 如果你是邮件主题开发者,希望分享自己的主题,或者将他们发布到 NPM,你可能会想要使用到第二个与第三个工具;
23
- 如果你只是使用 mails 发送邮件的程序员,并不需要了解后两者如何运作,只需了解API的使用方法即可:
24
-
25
- ### 范例代码
26
- 最快上手使用 mails,我们来看一段渲染邮件的代码:
27
- ````javascript
28
- var mails = require('mails'); // 引用 mails
29
-
30
- // 使用 mails-default/basic 别名渲染邮件模板,并填入对应的变量:
31
- mails.render('mails-default/basic', {
32
- name: 'The First Email To You',
33
- banner: 'http://mysite.com/banner.jpg'
34
- }, function(err,html){
35
- // 得到最终的邮件 html 代码
36
- if (err) return console.log(err)
37
- console.log(html);
38
- });
39
-
40
- // 如果不需要使用渲染后的片段做其他用途,
41
- // mails 推荐您直接使用 mails.send 发送邮件。
42
- mails.send('mails-default/basic', {
43
- from: 'xxx <xxx@qq.com>', // 来自您的邮箱
44
- to: 'abc@qq.com', // 接受者邮箱
45
- subject: 'hi,abc', // 邮件标题
46
- // 用做渲染的模板变量
47
- name: 'mySite',
48
- banner: 'http://mysite.com/banner.jpg',
49
- // 用做发送的 smtp 配置
50
- host: 'smtp.qq.com',
51
- port: 25,
52
- use_authentication: true,
53
- auth: {
54
- user: "xxx@qq.com",
55
- pass: 'yourpassword'
56
- }
57
- }, function(err, response) { ...... });
58
- ````
59
-
60
- ### 加载 NPM 模块作为主题
61
- 你可以将 mails 提供的标准邮件主题进行简单的二次开发,然后发布到 NPM 作为您的邮件主题,使他人获益。
62
-
63
- 在这个例子中,我们使用 `mails-flat` 模块中的 `message` 主题进行邮件渲染:
64
- ````javascript
65
- var mails = require('mails');
66
-
67
- mails.render('mails-flat/message', { ...... }, function(err, html){
68
- console.log(html);
69
- });
70
- ````
71
- #### 如何进行主题的二次开发
72
-
73
- 1. 首先,将 mails 作为全局模块安装:
74
-
75
- ````
76
- $ [sudo] npm install mails -g
77
- ````
78
-
79
- 2. 建立新项目文件夹,初始化邮件主题:
80
-
81
- ````
82
- $ mkdir my-mails-theme && cd my-mails-theme
83
- $ mails init
84
- ````
85
-
86
- 3. 编辑 `package.json`,这个文件定义了模板引擎的配置,也保存了调试所需要的变量,确保此文件中有正确的 `view engine` 字段:
87
-
88
- ````
89
- $ vi ./package.json
90
- $ { "view engine": "swig" } // 比如使用swig作为模板引擎
91
- ````
92
-
93
- 4. 使用 live reload 设计工具进行开发
94
-
95
- ````
96
- // ./package.json 也是存放模板变量的文件
97
- $ mails watch ./package.json [-p] [port]
98
- ````
99
- 使用 mails 提供的 live reload 工具进行开发,程序会监听当前文件夹下文件的变动,包括样式表文件,模板文件和提供模板变量的 json 文件。打开相应的端口服务,指定相应文件的url即可访问,比如:
100
- ````
101
- $ GET http://localhost:3001/message.html
102
- ````
103
-
104
-
105
- #### 如何发布主题到 NPM
106
- 在使用 `npm publish` 发布到社区之前,确认以下几项:
107
- - 确保你的项目中 `package.json` 符合 NPM 社区规范
108
- - 确保 `package.json` 文件中有 `view engine` 字段并且符合邮件模板引擎
109
- - 确保填写了相应的依赖模块名
110
- - 建议在 readme.md 中附上一张模板最终渲染效果的截图
111
-
112
- ### API
113
- 查看这个文件: `index.js`
114
-
115
- ### 贡献我的代码
116
- - Fork this repo
117
- - Clone your repo
118
- - Install dependencies
119
- - Checkout a feature branch
120
- - Feel free to add your features
121
- - Make sure your features are fully tested
122
- - Open a pull request, and enjoy <3
123
-
124
- ### MIT license
125
- Copyright (c) 2013 turing
126
-
127
- Permission is hereby granted, free of charge, to any person obtaining a copy
128
- of this software and associated documentation files (the "Software"), to deal
129
- in the Software without restriction, including without limitation the rights
130
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
131
- copies of the Software, and to permit persons to whom the Software is
132
- furnished to do so, subject to the following conditions:
133
-
134
- The above copyright notice and this permission notice shall be included in
135
- all copies or substantial portions of the Software.
136
-
137
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
138
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
139
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
140
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
141
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
142
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
143
- THE SOFTWARE.
144
-
145
-
146
- ---
147
- ![docor](https://cdn1.iconfinder.com/data/icons/windows8_icons_iconpharm/26/doctor.png)
148
- generated using [docor](https://github.com/turingou/docor.git) @ 0.1.0. brought to you by [turingou](https://github.com/turingou)
1
+ # mails
2
+
3
+ Email infrastructure for AI agents. Send and receive emails programmatically.
4
+
5
+ [![npm](https://img.shields.io/npm/v/mails)](https://www.npmjs.com/package/mails)
6
+ [![license](https://img.shields.io/npm/l/mails)](LICENSE)
7
+
8
+ [日本語](README.ja.md) | [中文](README.zh.md)
9
+
10
+ ## Test Coverage
11
+
12
+ ```
13
+ ---------------------------------|---------|---------|
14
+ File | % Funcs | % Lines |
15
+ ---------------------------------|---------|---------|
16
+ All files | 100.00 | 100.00 |
17
+ src/cli/commands/help.ts | 100.00 | 100.00 |
18
+ src/core/config.ts | 100.00 | 100.00 |
19
+ src/core/send.ts | 100.00 | 100.00 |
20
+ src/core/types.ts | 100.00 | 100.00 |
21
+ src/providers/send/resend.ts | 100.00 | 100.00 |
22
+ src/providers/storage/db9.ts | 100.00 | 100.00 |
23
+ src/providers/storage/sqlite.ts | 100.00 | 100.00 |
24
+ worker/src/extract-code.ts | 100.00 | 100.00 |
25
+ ---------------------------------|---------|---------|
26
+
27
+ 78 unit tests + 8 live E2E tests (real Resend + Cloudflare Email Routing)
28
+ ```
29
+
30
+ ## Features
31
+
32
+ - **Send emails** via Resend (more providers coming)
33
+ - **Receive emails** via Cloudflare Email Routing Worker
34
+ - **Verification code extraction** — auto-extracts codes from emails (EN/ZH/JA/KO)
35
+ - **Storage providers** — local SQLite (default) or [db9.ai](https://db9.ai) cloud PostgreSQL
36
+ - **Zero dependencies** — Resend provider uses raw `fetch()`, no SDK needed
37
+ - **Agent-first** — designed for AI agents with `skill.md` integration guide
38
+ - **Cloud service** — `@mails.dev` addresses with x402 micropayments (coming soon)
39
+
40
+ ## Install
41
+
42
+ ```bash
43
+ npm install -g mails
44
+ # or
45
+ bun install -g mails
46
+ # or use directly
47
+ npx mails
48
+ ```
49
+
50
+ ## Quick Start
51
+
52
+ ```bash
53
+ # Configure
54
+ mails config set resend_api_key re_YOUR_KEY
55
+ mails config set default_from "Agent <agent@yourdomain.com>"
56
+
57
+ # Send an email
58
+ mails send --to user@example.com --subject "Hello" --body "World"
59
+ ```
60
+
61
+ ## CLI Reference
62
+
63
+ ### Send
64
+
65
+ ```bash
66
+ mails send --to <email> --subject <subject> --body <text>
67
+ mails send --to <email> --subject <subject> --html "<h1>Hello</h1>"
68
+ mails send --from "Name <email>" --to <email> --subject <subject> --body <text>
69
+ ```
70
+
71
+ ### Inbox
72
+
73
+ ```bash
74
+ mails inbox # List recent emails
75
+ mails inbox --mailbox agent@test.com # Specific mailbox
76
+ mails inbox <id> # View email details
77
+ ```
78
+
79
+ ### Verification Code
80
+
81
+ ```bash
82
+ mails code --to agent@test.com # Wait for code (default 30s)
83
+ mails code --to agent@test.com --timeout 60 # Custom timeout
84
+ ```
85
+
86
+ The code is printed to stdout for easy piping: `CODE=$(mails code --to agent@test.com)`
87
+
88
+ ### Config
89
+
90
+ ```bash
91
+ mails config # Show all config
92
+ mails config set <key> <value> # Set a value
93
+ mails config get <key> # Get a value
94
+ mails config path # Show config file path
95
+ ```
96
+
97
+ ## SDK Usage
98
+
99
+ ```typescript
100
+ import { send, getInbox, waitForCode } from 'mails'
101
+
102
+ // Send
103
+ const result = await send({
104
+ to: 'user@example.com',
105
+ subject: 'Hello',
106
+ text: 'World',
107
+ })
108
+
109
+ // List inbox
110
+ const emails = await getInbox('agent@yourdomain.com', { limit: 10 })
111
+
112
+ // Wait for verification code
113
+ const code = await waitForCode('agent@yourdomain.com', { timeout: 30 })
114
+ if (code) console.log(code.code) // "123456"
115
+ ```
116
+
117
+ ### Direct Provider Usage
118
+
119
+ ```typescript
120
+ import { createResendProvider } from 'mails'
121
+
122
+ const resend = createResendProvider('re_YOUR_KEY')
123
+ await resend.send({
124
+ from: 'Agent <agent@yourdomain.com>',
125
+ to: ['user@example.com'],
126
+ subject: 'Hello',
127
+ text: 'Direct provider usage',
128
+ })
129
+ ```
130
+
131
+ ## Email Worker
132
+
133
+ The `worker/` directory contains a Cloudflare Email Routing Worker for receiving emails.
134
+
135
+ ### Setup
136
+
137
+ ```bash
138
+ cd worker
139
+ bun install
140
+ # Edit wrangler.toml set your D1 database ID
141
+ wrangler d1 create mails
142
+ wrangler d1 execute mails --file=schema.sql
143
+ wrangler deploy
144
+ ```
145
+
146
+ Then configure Cloudflare Email Routing to forward to this worker.
147
+
148
+ ### Worker API
149
+
150
+ | Endpoint | Description |
151
+ |----------|-------------|
152
+ | `GET /api/inbox?to=<addr>&limit=20` | List emails |
153
+ | `GET /api/code?to=<addr>&timeout=30` | Long-poll for verification code |
154
+ | `GET /api/email?id=<id>` | Get email by ID |
155
+ | `GET /health` | Health check |
156
+
157
+ ## Storage Providers
158
+
159
+ ### SQLite (default)
160
+
161
+ Local database at `~/.mails/mails.db`. Zero config.
162
+
163
+ ### db9.ai
164
+
165
+ Cloud PostgreSQL for AI agents.
166
+
167
+ ```bash
168
+ mails config set storage_provider db9
169
+ mails config set db9_token YOUR_TOKEN
170
+ mails config set db9_database_id YOUR_DB_ID
171
+ ```
172
+
173
+ ## Config Keys
174
+
175
+ | Key | Default | Description |
176
+ |-----|---------|-------------|
177
+ | `mode` | `hosted` | `hosted` or `selfhosted` |
178
+ | `domain` | `mails.dev` | Email domain |
179
+ | `mailbox` | | Your receiving address |
180
+ | `send_provider` | `resend` | Send provider |
181
+ | `storage_provider` | `sqlite` | `sqlite` or `db9` |
182
+ | `resend_api_key` | | Resend API key |
183
+ | `default_from` | | Default sender address |
184
+ | `db9_token` | | db9.ai API token |
185
+ | `db9_database_id` | | db9.ai database ID |
186
+
187
+ ## Testing
188
+
189
+ ```bash
190
+ bun test # Run all tests
191
+ bun test --coverage # With coverage report
192
+ ```
193
+
194
+ ## License
195
+
196
+ MIT
package/README.zh.md ADDED
@@ -0,0 +1,160 @@
1
+ # mails
2
+
3
+ 面向 AI Agent 的邮件基础设施。通过编程方式收发邮件。
4
+
5
+ [![npm](https://img.shields.io/npm/v/mails)](https://www.npmjs.com/package/mails)
6
+ [![license](https://img.shields.io/npm/l/mails)](LICENSE)
7
+
8
+ [English](README.md) | [日本語](README.ja.md)
9
+
10
+ ## 测试覆盖率
11
+
12
+ ```
13
+ 全部文件: 100.00% Functions | 100.00% Lines
14
+ 78 个单元测试 + 8 个 Live E2E 测试(真实 Resend + Cloudflare Email Routing)
15
+ ```
16
+
17
+ ## 特性
18
+
19
+ - **发送邮件** — 通过 Resend(更多 Provider 即将支持)
20
+ - **接收邮件** — 通过 Cloudflare Email Routing Worker
21
+ - **验证码自动提取** — 自动从邮件中提取验证码(支持中/英/日/韩)
22
+ - **存储 Provider** — 本地 SQLite(默认)或 [db9.ai](https://db9.ai) 云端 PostgreSQL
23
+ - **零依赖** — Resend Provider 直接使用 `fetch()`,无需 SDK
24
+ - **Agent 优先** — 为 AI Agent 设计,附带 `skill.md` 接入指南
25
+ - **云服务** — `@mails.dev` 邮箱地址,x402 微支付(即将上线)
26
+
27
+ ## 安装
28
+
29
+ ```bash
30
+ npm install -g mails
31
+ # 或
32
+ bun install -g mails
33
+ # 或直接使用
34
+ npx mails
35
+ ```
36
+
37
+ ## 快速开始
38
+
39
+ ```bash
40
+ # 配置
41
+ mails config set resend_api_key re_YOUR_KEY
42
+ mails config set default_from "Agent <agent@yourdomain.com>"
43
+
44
+ # 发送邮件
45
+ mails send --to user@example.com --subject "Hello" --body "World"
46
+ ```
47
+
48
+ ## CLI 参考
49
+
50
+ ### 发送
51
+
52
+ ```bash
53
+ mails send --to <email> --subject <subject> --body <text>
54
+ mails send --to <email> --subject <subject> --html "<h1>Hello</h1>"
55
+ mails send --from "Name <email>" --to <email> --subject <subject> --body <text>
56
+ ```
57
+
58
+ ### 收件箱
59
+
60
+ ```bash
61
+ mails inbox # 最近邮件列表
62
+ mails inbox --mailbox agent@test.com # 指定邮箱
63
+ mails inbox <id> # 查看邮件详情
64
+ ```
65
+
66
+ ### 验证码
67
+
68
+ ```bash
69
+ mails code --to agent@test.com # 等待验证码(默认 30 秒)
70
+ mails code --to agent@test.com --timeout 60 # 自定义超时
71
+ ```
72
+
73
+ 验证码输出到 stdout,方便管道使用:`CODE=$(mails code --to agent@test.com)`
74
+
75
+ ### 配置
76
+
77
+ ```bash
78
+ mails config # 显示所有配置
79
+ mails config set <key> <value> # 设置值
80
+ mails config get <key> # 获取值
81
+ mails config path # 显示配置文件路径
82
+ ```
83
+
84
+ ## SDK 用法
85
+
86
+ ```typescript
87
+ import { send, getInbox, waitForCode } from 'mails'
88
+
89
+ // 发送
90
+ const result = await send({
91
+ to: 'user@example.com',
92
+ subject: 'Hello',
93
+ text: 'World',
94
+ })
95
+
96
+ // 收件箱列表
97
+ const emails = await getInbox('agent@yourdomain.com', { limit: 10 })
98
+
99
+ // 等待验证码
100
+ const code = await waitForCode('agent@yourdomain.com', { timeout: 30 })
101
+ if (code) console.log(code.code) // "123456"
102
+ ```
103
+
104
+ ## 邮件 Worker
105
+
106
+ `worker/` 目录包含 Cloudflare Email Routing Worker,用于接收邮件。
107
+
108
+ ### 部署
109
+
110
+ ```bash
111
+ cd worker
112
+ bun install
113
+ # 编辑 wrangler.toml — 设置你的 D1 数据库 ID
114
+ wrangler d1 create mails
115
+ wrangler d1 execute mails --file=schema.sql
116
+ wrangler deploy
117
+ ```
118
+
119
+ 然后在 Cloudflare Email Routing 中配置转发到此 Worker。
120
+
121
+ ## 存储 Provider
122
+
123
+ ### SQLite(默认)
124
+
125
+ 本地数据库 `~/.mails/mails.db`,无需配置。
126
+
127
+ ### db9.ai
128
+
129
+ 面向 AI Agent 的云端 PostgreSQL。
130
+
131
+ ```bash
132
+ mails config set storage_provider db9
133
+ mails config set db9_token YOUR_TOKEN
134
+ mails config set db9_database_id YOUR_DB_ID
135
+ ```
136
+
137
+ ## 配置项
138
+
139
+ | 键 | 默认值 | 说明 |
140
+ |---|--------|------|
141
+ | `mode` | `hosted` | `hosted` 或 `selfhosted` |
142
+ | `domain` | `mails.dev` | 邮件域名 |
143
+ | `mailbox` | | 接收邮箱地址 |
144
+ | `send_provider` | `resend` | 发送 Provider |
145
+ | `storage_provider` | `sqlite` | `sqlite` 或 `db9` |
146
+ | `resend_api_key` | | Resend API 密钥 |
147
+ | `default_from` | | 默认发件人地址 |
148
+ | `db9_token` | | db9.ai API Token |
149
+ | `db9_database_id` | | db9.ai 数据库 ID |
150
+
151
+ ## 测试
152
+
153
+ ```bash
154
+ bun test # 运行所有测试
155
+ bun test --coverage # 带覆盖率报告
156
+ ```
157
+
158
+ ## 许可证
159
+
160
+ MIT