@openmail/openclaw 0.1.6 → 0.1.7

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.md CHANGED
@@ -215,3 +215,20 @@ generated from `src/config-schema.ts` and `src/setup.ts`. Edit those, then run
215
215
 
216
216
  Compiles against `openclaw@2026.9.2` (pinned in `devDependencies`); the
217
217
  generated `compat` and `install.minHostVersion` follow that pin.
218
+
219
+ ## Draft workflow
220
+
221
+ Use `openclaw openmail -- drafts create|list|get|send` with the channel's credentials.
222
+ Select a sending inbox with `--inbox-id` at creation. You can save an incomplete
223
+ draft, add HTML and files, or associate it with a thread. Use `--thread-id` for
224
+ a reply and `--source-thread-id` for a forward that starts a new conversation.
225
+
226
+ The console shows drafts in their owning inbox, in the main Drafts page, and
227
+ in their source thread when present. The CLI lists drafts across the inboxes
228
+ the channel can access and can combine inbox, pod, source thread, and text
229
+ filters. To send, pass the draft ID and the exact `--updated-at` you reviewed.
230
+ The saved inbox, content, and attachments carry through to delivery.
231
+
232
+ See the [bundled skill](skills/openmail/SKILL.md#drafts) for command examples.
233
+ [OpenMail #662](https://github.com/openmailsh/openmail/pull/662) adds the API.
234
+ OpenClaw plugin 0.1.7 bundles [OpenMail CLI 0.9.0](https://github.com/openmailsh/cli/releases/tag/v0.9.0) for these commands.
@@ -2,7 +2,7 @@
2
2
  "id": "openmail",
3
3
  "name": "OpenMail",
4
4
  "description": "OpenMail channel plugin for OpenClaw: give your agent an email address.",
5
- "version": "0.1.6",
5
+ "version": "0.1.7",
6
6
  "activation": {
7
7
  "onStartup": false
8
8
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmail/openclaw",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "OpenMail channel plugin for OpenClaw: give your agent an email address.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,7 +27,7 @@
27
27
  "prepublishOnly": "pnpm check"
28
28
  },
29
29
  "dependencies": {
30
- "@openmail/cli": "^0.8.0",
30
+ "@openmail/cli": "^0.9.0",
31
31
  "ws": "^8.18.0",
32
32
  "zod": "4.4.3"
33
33
  },
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: openmail
3
- description: The agent has its own email address via OpenMail. Use this skill to send email, reply in a thread, read a thread, check for unread mail, or read an attachment. Also use it when the user says things like "reach out to them", "contact support", "sign up", "wait for their reply", "check if they responded", or "what did that PDF say" — even without the word "email".
3
+ description: The agent has its own email address via OpenMail. Use this skill to create, find, review or send saved drafts, send email, reply in a thread, read a thread, check for unread mail, or read an attachment. Also use it when the user says things like "reach out to them", "contact support", "sign up", "wait for their reply", "check if they responded", or "what did that PDF say" — even without the word "email".
4
4
  metadata: {"openclaw":{"emoji":"📬","requires":{"bins":["openclaw"]}}}
5
5
  ---
6
6
 
@@ -83,6 +83,62 @@ The response has `messageId` and `threadId`; keep `threadId` to continue later.
83
83
  If a send is rejected by an outbound policy rule, tell the user; do not work
84
84
  around it.
85
85
 
86
+ ## Drafts
87
+
88
+ Every draft belongs to the inbox that will send it. Choose an accessible inbox with
89
+ `inbox list` and pass its ID explicitly when creating a draft. The sender is the
90
+ only required field, so you can save a partial message for review.
91
+
92
+ ```bash
93
+ openclaw openmail -- inbox list --json
94
+ openclaw openmail -- drafts create --inbox-id "<inbox-id>" --to "person@example.com" --subject "Proposal" --body "Please review." --json
95
+ openclaw openmail -- drafts list --json
96
+ openclaw openmail -- drafts list --inbox-id "<inbox-id>" --pod-id "<pod-id>" --query Proposal --json
97
+ openclaw openmail -- drafts get --draft-id "<draft-id>" --json
98
+ ```
99
+
100
+ List returns drafts across the inboxes the channel can access. Combine
101
+ `--inbox-id`, `--pod-id`, `--source-thread-id`, and `--query` to narrow the list.
102
+ Use `--limit` and `--offset` for pagination. The console also shows each draft in
103
+ its inbox and in the main Drafts page.
104
+
105
+ For a reply, use `--thread-id` and the inbox that owns the thread. The server
106
+ sets the reply subject and records the thread as the source. For a forward,
107
+ supply only `--source-thread-id` as the thread reference and compose the
108
+ recipient, subject and content to forward. Both drafts appear in the source
109
+ conversation. Sending the reply continues that conversation. Sending the
110
+ forward starts a new one.
111
+
112
+ ```bash
113
+ openclaw openmail -- drafts create --inbox-id "<inbox-id>" --thread-id "<thread-id>" --to "person@example.com" --body "Thanks for the proposal." --json
114
+ openclaw openmail -- drafts create --inbox-id "<inbox-id>" --source-thread-id "<thread-id>" --to "reviewer@example.com" --subject "Fwd: Proposal" --body-html "<p>Please review the attached proposal.</p>" --attach ./proposal.pdf --json
115
+ openclaw openmail -- drafts list --source-thread-id "<thread-id>" --json
116
+ ```
117
+
118
+ `--cc`, `--bcc`, and `--attach` are repeatable. Use `--body-html` for a rich-text
119
+ body. OpenMail imports supported embedded or remote images in the HTML and
120
+ stores them with the draft. For a local inline image, pass
121
+ `--inline-image "inline-<UUID>@openmail=./photo.png"` and use the same content ID
122
+ in an HTML image source, such as `src="cid:inline-<UUID>@openmail"`.
123
+
124
+ Before sending, review the saved inbox, To/Cc/Bcc, subject, full body, files
125
+ and thread context returned by `drafts get`. When the user asks to send that
126
+ version, pass its exact `updatedAt`. The draft sends from its owning inbox with
127
+ its saved content and attachments.
128
+
129
+ ```bash
130
+ openclaw openmail -- drafts send --draft-id "<draft-id>" --updated-at "<reviewed updatedAt>" --json
131
+ ```
132
+
133
+ A successful send removes the draft. Handle other outcomes as follows.
134
+
135
+ - If you receive `draft_changed`, get the draft again and review the current version with the user before sending.
136
+ - After `send_failed`, the draft is retained. A failed attempt can advance `updatedAt`. Review it again and obtain approval before retrying.
137
+ - If you receive `draft_sending`, wait and check the owning inbox for the sent message and the saved draft before considering another send.
138
+
139
+ These commands require a plugin release that bundles draft support. Check
140
+ `openclaw openmail -- help drafts` if the commands are unavailable.
141
+
86
142
  ## Reading mail
87
143
 
88
144
  ```bash