@agenticmail/openclaw 0.3.0 → 0.3.2
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/dist/index.js +7 -7
- package/package.json +4 -2
- package/scripts/uninstall.mjs +58 -0
package/dist/index.js
CHANGED
|
@@ -521,7 +521,7 @@ function registerTools(api, ctx, subagentAccounts2, coordination) {
|
|
|
521
521
|
html: { type: "string", description: "HTML body" },
|
|
522
522
|
cc: { type: "string", description: "CC recipients" },
|
|
523
523
|
inReplyTo: { type: "string", description: "Message-ID to reply to" },
|
|
524
|
-
references: { type: "array", description: "Message-IDs for threading" },
|
|
524
|
+
references: { type: "array", items: { type: "string" }, description: "Message-IDs for threading" },
|
|
525
525
|
attachments: {
|
|
526
526
|
type: "array",
|
|
527
527
|
items: {
|
|
@@ -901,7 +901,7 @@ ${orig.text || ""}`;
|
|
|
901
901
|
reg("agenticmail_batch_delete", {
|
|
902
902
|
description: "Delete multiple emails by UIDs",
|
|
903
903
|
parameters: {
|
|
904
|
-
uids: { type: "array", required: true, description: "UIDs to delete" },
|
|
904
|
+
uids: { type: "array", items: { type: "number" }, required: true, description: "UIDs to delete" },
|
|
905
905
|
folder: { type: "string", description: "Folder (default: INBOX)" }
|
|
906
906
|
},
|
|
907
907
|
handler: async (params) => {
|
|
@@ -917,7 +917,7 @@ ${orig.text || ""}`;
|
|
|
917
917
|
reg("agenticmail_batch_mark_read", {
|
|
918
918
|
description: "Mark multiple emails as read",
|
|
919
919
|
parameters: {
|
|
920
|
-
uids: { type: "array", required: true, description: "UIDs to mark as read" },
|
|
920
|
+
uids: { type: "array", items: { type: "number" }, required: true, description: "UIDs to mark as read" },
|
|
921
921
|
folder: { type: "string", description: "Folder (default: INBOX)" }
|
|
922
922
|
},
|
|
923
923
|
handler: async (params) => {
|
|
@@ -1188,7 +1188,7 @@ ${orig.text || ""}`;
|
|
|
1188
1188
|
reg("agenticmail_purchase_domain", {
|
|
1189
1189
|
description: "Search for available domains via Cloudflare Registrar (requires master key). NOTE: Cloudflare API only supports READ access for registrar \u2014 domains must be purchased manually. Use this tool to CHECK availability, then direct the user to purchase at https://dash.cloudflare.com/?to=/:account/domain-registration or from Namecheap/other registrars (then point nameservers to Cloudflare).",
|
|
1190
1190
|
parameters: {
|
|
1191
|
-
keywords: { type: "array", required: true, description: "Search keywords" },
|
|
1191
|
+
keywords: { type: "array", items: { type: "string" }, required: true, description: "Search keywords" },
|
|
1192
1192
|
tld: { type: "string", description: "Preferred TLD" }
|
|
1193
1193
|
},
|
|
1194
1194
|
handler: async (params) => {
|
|
@@ -1344,7 +1344,7 @@ ${orig.text || ""}`;
|
|
|
1344
1344
|
reg("agenticmail_batch_mark_unread", {
|
|
1345
1345
|
description: "Mark multiple emails as unread",
|
|
1346
1346
|
parameters: {
|
|
1347
|
-
uids: { type: "array", required: true, description: "UIDs to mark as unread" },
|
|
1347
|
+
uids: { type: "array", items: { type: "number" }, required: true, description: "UIDs to mark as unread" },
|
|
1348
1348
|
folder: { type: "string", description: "Folder (default: INBOX)" }
|
|
1349
1349
|
},
|
|
1350
1350
|
handler: async (params) => {
|
|
@@ -1625,7 +1625,7 @@ ${orig.text || ""}`;
|
|
|
1625
1625
|
reg("agenticmail_batch_move", {
|
|
1626
1626
|
description: "Move multiple emails to another folder",
|
|
1627
1627
|
parameters: {
|
|
1628
|
-
uids: { type: "array", required: true, description: "UIDs to move" },
|
|
1628
|
+
uids: { type: "array", items: { type: "number" }, required: true, description: "UIDs to move" },
|
|
1629
1629
|
from: { type: "string", description: "Source folder (default: INBOX)" },
|
|
1630
1630
|
to: { type: "string", required: true, description: "Destination folder" }
|
|
1631
1631
|
},
|
|
@@ -1642,7 +1642,7 @@ ${orig.text || ""}`;
|
|
|
1642
1642
|
reg("agenticmail_batch_read", {
|
|
1643
1643
|
description: "Read multiple emails at once by UIDs. Returns full parsed content for each. Much more efficient than reading one at a time \u2014 saves tokens by batching N reads into 1 call.",
|
|
1644
1644
|
parameters: {
|
|
1645
|
-
uids: { type: "array", required: true, description: "Array of UIDs to read" },
|
|
1645
|
+
uids: { type: "array", items: { type: "number" }, required: true, description: "Array of UIDs to read" },
|
|
1646
1646
|
folder: { type: "string", description: "Folder (default: INBOX)" }
|
|
1647
1647
|
},
|
|
1648
1648
|
handler: async (params) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticmail/openclaw",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "OpenClaw plugin and skill for AgenticMail",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist",
|
|
16
16
|
"openclaw.plugin.json",
|
|
17
|
+
"scripts",
|
|
17
18
|
"skill",
|
|
18
19
|
"README.md",
|
|
19
20
|
"REFERENCE.md",
|
|
@@ -26,7 +27,8 @@
|
|
|
26
27
|
},
|
|
27
28
|
"scripts": {
|
|
28
29
|
"build": "tsup index.ts --format esm --dts --clean",
|
|
29
|
-
"test": "vitest run",
|
|
30
|
+
"test": "vitest run --passWithNoTests",
|
|
31
|
+
"preuninstall": "node scripts/uninstall.mjs",
|
|
30
32
|
"prepublishOnly": "npm run build"
|
|
31
33
|
},
|
|
32
34
|
"dependencies": {},
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Cleanup script that runs on `npm uninstall @agenticmail/openclaw`.
|
|
5
|
+
* Removes the agenticmail plugin entry from ~/.openclaw/openclaw.json
|
|
6
|
+
* and cleans up the plugin load path so OpenClaw doesn't error on
|
|
7
|
+
* a missing plugin.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { readFileSync, writeFileSync, existsSync } from 'node:fs';
|
|
11
|
+
import { join } from 'node:path';
|
|
12
|
+
import { homedir } from 'node:os';
|
|
13
|
+
|
|
14
|
+
const configPath = join(homedir(), '.openclaw', 'openclaw.json');
|
|
15
|
+
|
|
16
|
+
if (!existsSync(configPath)) process.exit(0);
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
const raw = readFileSync(configPath, 'utf-8');
|
|
20
|
+
const config = JSON.parse(raw);
|
|
21
|
+
|
|
22
|
+
let changed = false;
|
|
23
|
+
|
|
24
|
+
// Remove plugins.entries.agenticmail
|
|
25
|
+
if (config.plugins?.entries?.agenticmail) {
|
|
26
|
+
delete config.plugins.entries.agenticmail;
|
|
27
|
+
changed = true;
|
|
28
|
+
|
|
29
|
+
// Clean up empty entries object
|
|
30
|
+
if (Object.keys(config.plugins.entries).length === 0) {
|
|
31
|
+
delete config.plugins.entries;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Remove our path from plugins.load.paths
|
|
36
|
+
if (Array.isArray(config.plugins?.load?.paths)) {
|
|
37
|
+
const before = config.plugins.load.paths.length;
|
|
38
|
+
config.plugins.load.paths = config.plugins.load.paths.filter(
|
|
39
|
+
(p) => !p.includes('@agenticmail/openclaw')
|
|
40
|
+
);
|
|
41
|
+
if (config.plugins.load.paths.length !== before) changed = true;
|
|
42
|
+
|
|
43
|
+
// Clean up empty paths array
|
|
44
|
+
if (config.plugins.load.paths.length === 0) {
|
|
45
|
+
delete config.plugins.load.paths;
|
|
46
|
+
if (Object.keys(config.plugins.load).length === 0) {
|
|
47
|
+
delete config.plugins.load;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (changed) {
|
|
53
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
|
|
54
|
+
console.log('[agenticmail] Cleaned up OpenClaw config:', configPath);
|
|
55
|
+
}
|
|
56
|
+
} catch {
|
|
57
|
+
// Don't fail the uninstall if cleanup fails
|
|
58
|
+
}
|