dsh-aimail 0.1.12-rc.2 → 0.1.12

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/cordis.patch.yml CHANGED
@@ -33,6 +33,6 @@
33
33
  config:
34
34
  port: 9099
35
35
 
36
- # AIMail tools (12 bare names, semantics from @aimail/mail-core)
36
+ # AIMail tools (15 bare names, semantics from @aimail/mail-core)
37
37
  - id: tool-mail
38
38
  name: 'dsh-aimail/tools'
package/lib/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The bundle patch (cordis.patch.yml) self-mounts three subpath entries:
5
5
  * dsh-aimail/mail-service → ctx.mail (config resolution binding)
6
- * dsh-aimail/tools → 13 AIMail bare tools
6
+ * dsh-aimail/tools → 15 AIMail bare tools
7
7
  * dsh-aimail/inbound → node:http inbound endpoint + delivery
8
8
  *
9
9
  * Installed via: dsh plugin --profile web add dsh-aimail
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The bundle patch (cordis.patch.yml) self-mounts three subpath entries:
5
5
  * dsh-aimail/mail-service → ctx.mail (config resolution binding)
6
- * dsh-aimail/tools → 13 AIMail bare tools
6
+ * dsh-aimail/tools → 15 AIMail bare tools
7
7
  * dsh-aimail/inbound → node:http inbound endpoint + delivery
8
8
  *
9
9
  * Installed via: dsh plugin --profile web add dsh-aimail
@@ -13,7 +13,7 @@
13
13
  * local extra update) — mirrors bind_agent's every-run semantics.
14
14
  *
15
15
  * ABI: stdout = one JSON line {ok,email,system_id,exists?,registered?,
16
- * config_path?,api_key?,error?,hint?}; logs → stderr; exit 0 = ok.
16
+ * config_path?,error?,hint?}; logs → stderr; exit 0 = ok.
17
17
  *
18
18
  * Usage (from the CLI platform registry):
19
19
  * node <dsh-aimail>/dist/register-cli.js [--system-id S] [--email E]
package/lib/tools.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  /**
2
- * dsh-aimail tools — registers the 13 AIMail bare tools for this profile.
2
+ * dsh-aimail tools — registers the 15 AIMail bare tools for this profile.
3
3
  *
4
4
  * Semantic text (names, descriptions, parameter descriptions) comes from
5
5
  * the shared MAIL_TOOLS registry in @aimail/mail-core (single source of
6
- * truth, parity-tested against aimail_mcp_server.py). This adapter only:
6
+ * truth, parity-tested against the shared tool spec in
7
+ * pysdk/aimail_mcp_server.py). No MCP service is used by this TS adapter.
8
+ * This adapter only:
7
9
  * - iterates MAIL_TOOLS, translating each entry to a dsh defineTool
8
10
  * - binds execution: exec.agent.id (dsh session uuid) → ctx.mail.resolveCtx
9
11
  */
package/lib/tools.js CHANGED
@@ -30,6 +30,9 @@ function toDshParam(p) {
30
30
  }
31
31
  if (p.description !== undefined)
32
32
  base.description = p.description;
33
+ // 审计 2026-09-21: default 也要透传到宿主 schema(与 mail-core 的 TypeBox 转换同口径)
34
+ if (p.default !== undefined)
35
+ base.default = p.default;
33
36
  if (p.required === true)
34
37
  base.required = true;
35
38
  return base;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-aimail",
3
3
  "description": "AIMail plugin for dsh — install via: dsh plugin --profile web add dsh-aimail",
4
- "version": "0.1.12-rc.2",
4
+ "version": "0.1.12",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "provenance": true
@@ -51,8 +51,8 @@
51
51
  "@deepseek-ai/dsh-tools": "^0.0.1-rc.1"
52
52
  },
53
53
  "dependencies": {
54
- "@aimail/mail-core": "^0.1.12-rc.2",
55
- "@aimail/mail": "^0.1.12-rc.2"
54
+ "@aimail/mail-core": "^0.1.12",
55
+ "@aimail/mail": "^0.1.12"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@deepseek-ai/cordis": "^4.0.1",
@@ -206,7 +206,7 @@ set_contact_profile(address="alice@example.com",
206
206
 
207
207
  ## Tools
208
208
 
209
- The 6 aimail tools are registered with full schemas — parameter names, types, and descriptions are visible to you automatically. This table is a quick reference:
209
+ The aimail tools are registered with full schemas — parameter names, types, and descriptions are visible to you automatically. This table is a quick reference:
210
210
 
211
211
  | Tool | Use |
212
212
  |------|-----|
@@ -214,11 +214,15 @@ The 6 aimail tools are registered with full schemas — parameter names, types,
214
214
  | `contact_profile` | Look up a contact before deciding how to engage. |
215
215
  | `set_contact_profile` | Persist new observations about a contact. Only changed fields. |
216
216
  | `manage_contacts` | Check/add/remove/update contacts with direction control. `check` covers both "to" and "all" directions. `add` sends approval request to manager. `remove` needs no direction (one address = one record). `update` changes direction. |
217
+ | `search_mail` | Search your own LOCAL mail history (offline). `query` keywords match subject/body/attachment text; `scope`=inbound/outbound/all; `since`/`until` (YYYY-MM-DD) and `from` narrow the window. Use to recall past conversations, find when something happened, or recover attachment content. Results newest-first with hit snippets. |
217
218
  | `email_summary` | Retrieve the stored thread summary (pre-loaded as `thread_summary`; call directly only if you need to re-read it mid-processing). |
218
219
  | `set_email_summary` | Save updated thread state after sending and replying. |
219
220
 
220
221
  ---
221
222
 
223
+ ### Recalling History
224
+ When you need to remember what was said, when an event happened, or what an attachment contained, search your own mail archive first — `search_mail` is offline and instant. Empty `query` with `scope`+`since`/`until` browses a period. Your archive starts from when snapshots are enabled (default: on); mail you sent or received before that is not indexed.
225
+
222
226
  ## Rules
223
227
 
224
228
  1. **Contact gate**: all `to`/`cc` addresses must be in your contacts. Verify with `manage_contacts(action="check", ...)`.