carlyemail-toolkit 0.1.0 → 0.1.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/core.js +3 -1
- package/package.json +6 -1
- package/tools.js +11 -7
package/core.js
CHANGED
|
@@ -172,7 +172,9 @@ async function updateInbox(client, a) {
|
|
|
172
172
|
|
|
173
173
|
async function deleteInbox(client, a) {
|
|
174
174
|
const inbox = await oneInbox(client, a.inbox_id);
|
|
175
|
-
|
|
175
|
+
// Only sent when true, so a refusal (`inbox_in_use`) reaches the model and
|
|
176
|
+
// it has to ask the person before trying again with `force`.
|
|
177
|
+
await client.inboxes.delete(inbox, a.force === true ? { force: true } : {});
|
|
176
178
|
return { deleted: true, inbox_id: inbox };
|
|
177
179
|
}
|
|
178
180
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carlyemail-toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CarlyEmail's email tools for the Vercel AI SDK, LangChain, and any other agent framework.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"carlyemail",
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
],
|
|
16
16
|
"homepage": "https://docs.carlyemail.com/integrations/toolkit",
|
|
17
17
|
"bugs": "https://docs.carlyemail.com/support",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/shirschfield/carlyemail.git",
|
|
21
|
+
"directory": "integrations/carlyemail-toolkit/node"
|
|
22
|
+
},
|
|
18
23
|
"license": "MIT",
|
|
19
24
|
"author": "SWH Labs LLC",
|
|
20
25
|
"type": "module",
|
package/tools.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Written by tools/gen_toolkit_tools.py in the API repository. Do not edit.
|
|
2
2
|
export default {
|
|
3
3
|
"source": "app/mcp/tools.py, written by tools/gen_toolkit_tools.py",
|
|
4
|
-
"first_inbox": "Ask the person what they want their email address to be \u2014 the part before the @ \u2014 then call create_inbox with it as `username`.
|
|
4
|
+
"first_inbox": "Ask the person what they want their email address to be \u2014 the part before the @ \u2014 then call create_inbox with it as `username`.",
|
|
5
5
|
"tools": [
|
|
6
6
|
{
|
|
7
7
|
"name": "auth_me",
|
|
@@ -204,13 +204,17 @@ export default {
|
|
|
204
204
|
{
|
|
205
205
|
"name": "delete_inbox",
|
|
206
206
|
"title": "Delete an inbox and its mail",
|
|
207
|
-
"description": "Delete an inbox. Its messages go with it.",
|
|
207
|
+
"description": "Delete an inbox. Its messages go with it. An inbox that sent mail or whose key was used in the last 30 days is refused with `inbox_in_use`; ask the person before calling again with `force`.",
|
|
208
208
|
"input_schema": {
|
|
209
209
|
"type": "object",
|
|
210
210
|
"properties": {
|
|
211
211
|
"inbox_id": {
|
|
212
212
|
"type": "string",
|
|
213
213
|
"description": "Address of the inbox to act on, like agent@carlyemail.com. Optional when this key is scoped to one inbox or the organization has only one; required otherwise."
|
|
214
|
+
},
|
|
215
|
+
"force": {
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"description": "Delete even though the inbox is in use. Only after the person confirms."
|
|
214
218
|
}
|
|
215
219
|
},
|
|
216
220
|
"required": [
|
|
@@ -487,7 +491,7 @@ export default {
|
|
|
487
491
|
"items": {
|
|
488
492
|
"type": "string"
|
|
489
493
|
},
|
|
490
|
-
"description": "Labels to filter by
|
|
494
|
+
"description": "Labels to filter by; a match carries all of them. `received` or `sent` picks one direction of mail, `unread` what has not been read."
|
|
491
495
|
},
|
|
492
496
|
"before": {
|
|
493
497
|
"type": "string",
|
|
@@ -558,7 +562,7 @@ export default {
|
|
|
558
562
|
"items": {
|
|
559
563
|
"type": "string"
|
|
560
564
|
},
|
|
561
|
-
"description": "Labels to filter by
|
|
565
|
+
"description": "Labels to filter by; a match carries all of them. `received` or `sent` picks one direction of mail, `unread` what has not been read."
|
|
562
566
|
},
|
|
563
567
|
"include_spam": {
|
|
564
568
|
"type": "boolean",
|
|
@@ -621,7 +625,7 @@ export default {
|
|
|
621
625
|
"items": {
|
|
622
626
|
"type": "string"
|
|
623
627
|
},
|
|
624
|
-
"description": "Labels to filter by
|
|
628
|
+
"description": "Labels to filter by; a match carries all of them. `received` or `sent` picks one direction of mail, `unread` what has not been read."
|
|
625
629
|
},
|
|
626
630
|
"senders": {
|
|
627
631
|
"type": "array",
|
|
@@ -789,7 +793,7 @@ export default {
|
|
|
789
793
|
"properties": {
|
|
790
794
|
"query": {
|
|
791
795
|
"type": "string",
|
|
792
|
-
"description": "
|
|
796
|
+
"description": "Words to search for across sender, recipients, subject and body. Every word must appear, in any order; newest matches first."
|
|
793
797
|
},
|
|
794
798
|
"inbox_id": {
|
|
795
799
|
"type": "string",
|
|
@@ -831,7 +835,7 @@ export default {
|
|
|
831
835
|
"properties": {
|
|
832
836
|
"query": {
|
|
833
837
|
"type": "string",
|
|
834
|
-
"description": "
|
|
838
|
+
"description": "Words to search for across sender, recipients, subject and body. Every word must appear, in any order; newest matches first."
|
|
835
839
|
},
|
|
836
840
|
"inbox_id": {
|
|
837
841
|
"type": "string",
|