@openmail/openclaw 0.1.7 → 0.1.8
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 +11 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -2
- package/skills/openmail/SKILL.md +30 -9
package/README.md
CHANGED
|
@@ -218,10 +218,18 @@ generated `compat` and `install.minHostVersion` follow that pin.
|
|
|
218
218
|
|
|
219
219
|
## Draft workflow
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
OpenClaw plugin 0.1.8 bundles [OpenMail CLI 0.9.1](https://github.com/openmailsh/cli/releases/tag/v0.9.1), including HTML-only draft creation and editing plus version-checked deletion.
|
|
222
|
+
|
|
223
|
+
Read a draft with `openclaw openmail -- drafts get --draft-id "<id>" --json`, then discard it using `openclaw openmail -- drafts delete --draft-id "<id>" --updated-at "<saved updatedAt>" --json`. The wrapper forwards the version unchanged with the channel credentials. Deletion permanently removes the draft and files without sending. Stale versions and pending or accepted sends block it; it cannot cancel delivery. Never automatically replace the version and retry deletion.
|
|
224
|
+
|
|
225
|
+
Use `openclaw openmail -- drafts create|list|get|edit|send|delete` with the channel's credentials.
|
|
222
226
|
Select a sending inbox with `--inbox-id` at creation. You can save an incomplete
|
|
223
227
|
draft, add HTML and files, or associate it with a thread. Use `--thread-id` for
|
|
224
228
|
a reply and `--source-thread-id` for a forward that starts a new conversation.
|
|
229
|
+
Both creation and editing accept only `--body-html`; the API generates plain text.
|
|
230
|
+
To edit, read the draft and pass its exact `updatedAt` via `--updated-at` plus
|
|
231
|
+
only the requested changes. Stale versions require reading and reconciling
|
|
232
|
+
the current draft; edits never send mail.
|
|
225
233
|
|
|
226
234
|
The console shows drafts in their owning inbox, in the main Drafts page, and
|
|
227
235
|
in their source thread when present. The CLI lists drafts across the inboxes
|
|
@@ -230,5 +238,5 @@ filters. To send, pass the draft ID and the exact `--updated-at` you reviewed.
|
|
|
230
238
|
The saved inbox, content, and attachments carry through to delivery.
|
|
231
239
|
|
|
232
240
|
See the [bundled skill](skills/openmail/SKILL.md#drafts) for command examples.
|
|
233
|
-
|
|
234
|
-
|
|
241
|
+
The wrapper already passes draft arguments through with channel credentials;
|
|
242
|
+
no separate OpenClaw draft API implementation is needed.
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmail/openclaw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
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.9.
|
|
30
|
+
"@openmail/cli": "^0.9.1",
|
|
31
31
|
"ws": "^8.18.0",
|
|
32
32
|
"zod": "4.4.3"
|
|
33
33
|
},
|
package/skills/openmail/SKILL.md
CHANGED
|
@@ -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 create, find, review
|
|
3
|
+
description: The agent has its own email address via OpenMail. Use this skill to create, find, review, edit, send or delete 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
|
|
|
@@ -85,13 +85,23 @@ around it.
|
|
|
85
85
|
|
|
86
86
|
## Drafts
|
|
87
87
|
|
|
88
|
+
To discard a draft when requested, read it with `openclaw openmail -- drafts get --draft-id "<draft-id>" --json`, then use:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
openclaw openmail -- drafts delete --draft-id "<draft-id>" --updated-at "<reviewed updatedAt>" --json
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Deletion permanently removes the unsent draft and its attachments. Optional `--inbox-id` checks ownership. On `draft_changed`, review the current draft and verify it is still the one to discard; never automatically fetch a new version and retry. Pending or accepted sends block deletion, which cannot cancel sending. Missing drafts may already have been sent or deleted; do not claim this request deleted them. No email is sent by deletion.
|
|
95
|
+
|
|
96
|
+
The bundled CLI 0.9.1 supports `drafts edit` and `drafts delete`. On an older plugin, check `openclaw openmail -- help drafts` and update the plugin if those commands are unavailable; do not claim an edit or deletion succeeded when the command did not run.
|
|
97
|
+
|
|
88
98
|
Every draft belongs to the inbox that will send it. Choose an accessible inbox with
|
|
89
99
|
`inbox list` and pass its ID explicitly when creating a draft. The sender is the
|
|
90
100
|
only required field, so you can save a partial message for review.
|
|
91
101
|
|
|
92
102
|
```bash
|
|
93
103
|
openclaw openmail -- inbox list --json
|
|
94
|
-
openclaw openmail -- drafts create --inbox-id "<inbox-id>" --to "person@example.com" --subject "Proposal" --body "Please review
|
|
104
|
+
openclaw openmail -- drafts create --inbox-id "<inbox-id>" --to "person@example.com" --subject "Proposal" --body-html "<p>Please review.</p>" --json
|
|
95
105
|
openclaw openmail -- drafts list --json
|
|
96
106
|
openclaw openmail -- drafts list --inbox-id "<inbox-id>" --pod-id "<pod-id>" --query Proposal --json
|
|
97
107
|
openclaw openmail -- drafts get --draft-id "<draft-id>" --json
|
|
@@ -110,17 +120,31 @@ conversation. Sending the reply continues that conversation. Sending the
|
|
|
110
120
|
forward starts a new one.
|
|
111
121
|
|
|
112
122
|
```bash
|
|
113
|
-
openclaw openmail -- drafts create --inbox-id "<inbox-id>" --thread-id "<thread-id>" --to "person@example.com" --body "Thanks for the proposal
|
|
123
|
+
openclaw openmail -- drafts create --inbox-id "<inbox-id>" --thread-id "<thread-id>" --to "person@example.com" --body-html "<p>Thanks for the proposal.</p>" --json
|
|
114
124
|
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
125
|
openclaw openmail -- drafts list --source-thread-id "<thread-id>" --json
|
|
116
126
|
```
|
|
117
127
|
|
|
118
|
-
`--cc`, `--bcc`, and `--attach` are repeatable.
|
|
119
|
-
body
|
|
120
|
-
stores them with the draft.
|
|
128
|
+
`--cc`, `--bcc`, and `--attach` are repeatable. Both draft creation and editing accept only `--body-html` for body content.
|
|
129
|
+
The API generates plain text automatically; do not use `--body`. OpenMail imports supported embedded or remote images in the HTML and
|
|
130
|
+
stores them with the draft. On creation, for a local inline image, pass
|
|
121
131
|
`--inline-image "inline-<UUID>@openmail=./photo.png"` and use the same content ID
|
|
122
132
|
in an HTML image source, such as `src="cid:inline-<UUID>@openmail"`.
|
|
123
133
|
|
|
134
|
+
To revise a saved draft, read it first and pass its exact `updatedAt`:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
openclaw openmail -- drafts edit --draft-id "<draft-id>" --updated-at "<current updatedAt>" --body-html "<p>Revised proposal.</p>" --json
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Only supplied fields change. Use `--clear-to`, `--clear-cc`, or `--clear-bcc`
|
|
141
|
+
to clear recipients, and `--subject ""` or `--body-html ""` to clear content.
|
|
142
|
+
Keep inline `cid:` references for images that should remain. The original
|
|
143
|
+
sending inbox and reply context stay fixed. On `draft_changed`, read the
|
|
144
|
+
current draft and reconcile the requested changes before another edit; never
|
|
145
|
+
refresh the version and overwrite newer edits automatically. Pending or
|
|
146
|
+
accepted sends block edits. Editing does not authorize sending.
|
|
147
|
+
|
|
124
148
|
Before sending, review the saved inbox, To/Cc/Bcc, subject, full body, files
|
|
125
149
|
and thread context returned by `drafts get`. When the user asks to send that
|
|
126
150
|
version, pass its exact `updatedAt`. The draft sends from its owning inbox with
|
|
@@ -136,9 +160,6 @@ A successful send removes the draft. Handle other outcomes as follows.
|
|
|
136
160
|
- After `send_failed`, the draft is retained. A failed attempt can advance `updatedAt`. Review it again and obtain approval before retrying.
|
|
137
161
|
- If you receive `draft_sending`, wait and check the owning inbox for the sent message and the saved draft before considering another send.
|
|
138
162
|
|
|
139
|
-
These commands require a plugin release that bundles draft support. Check
|
|
140
|
-
`openclaw openmail -- help drafts` if the commands are unavailable.
|
|
141
|
-
|
|
142
163
|
## Reading mail
|
|
143
164
|
|
|
144
165
|
```bash
|