@cargo-ai/cli 1.0.59 → 1.0.61
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 +1 -0
- package/build/commands/ai/chat.d.ts.map +1 -1
- package/build/commands/ai/chat.js +2 -0
- package/build/commands/mailboxManagement/event.d.ts +4 -0
- package/build/commands/mailboxManagement/event.d.ts.map +1 -0
- package/build/commands/mailboxManagement/event.js +38 -0
- package/build/commands/mailboxManagement/index.d.ts +4 -0
- package/build/commands/mailboxManagement/index.d.ts.map +1 -0
- package/build/commands/mailboxManagement/index.js +17 -0
- package/build/commands/mailboxManagement/mailbox.d.ts +4 -0
- package/build/commands/mailboxManagement/mailbox.d.ts.map +1 -0
- package/build/commands/mailboxManagement/mailbox.js +172 -0
- package/build/commands/mailboxManagement/message.d.ts +4 -0
- package/build/commands/mailboxManagement/message.d.ts.map +1 -0
- package/build/commands/mailboxManagement/message.js +44 -0
- package/build/commands/mailboxManagement/options.d.ts +10 -0
- package/build/commands/mailboxManagement/options.d.ts.map +1 -0
- package/build/commands/mailboxManagement/options.js +38 -0
- package/build/commands/mailboxManagement/pricing.d.ts +4 -0
- package/build/commands/mailboxManagement/pricing.d.ts.map +1 -0
- package/build/commands/mailboxManagement/pricing.js +18 -0
- package/build/commands/mailboxManagement/suppression.d.ts +4 -0
- package/build/commands/mailboxManagement/suppression.d.ts.map +1 -0
- package/build/commands/mailboxManagement/suppression.js +38 -0
- package/build/commands/mailboxManagement/thread.d.ts +4 -0
- package/build/commands/mailboxManagement/thread.d.ts.map +1 -0
- package/build/commands/mailboxManagement/thread.js +42 -0
- package/build/commands/orchestration/record.d.ts.map +1 -1
- package/build/commands/orchestration/record.js +2 -0
- package/build/commands/orchestration/run.d.ts.map +1 -1
- package/build/commands/orchestration/run.js +2 -0
- package/build/commands/orchestration/span.d.ts.map +1 -1
- package/build/commands/orchestration/span.js +2 -0
- package/build/index.js +2 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -156,6 +156,7 @@ cargo-ai orchestration workflow --help
|
|
|
156
156
|
| **ai** | AI templates, agents, releases, chats, MCP, files | `cargo-ai ai template list`, `cargo-ai ai agent list`, `cargo-ai ai file list` |
|
|
157
157
|
| **context** | Context repository, runtime sandbox, and knowledge graph | `cargo-ai context repository get`, `cargo-ai context runtime browse --path <path>`, `cargo-ai context graph get` |
|
|
158
158
|
| **hosting** | Cargo Hosting apps (Vite SPAs), workers, and deployments | `cargo-ai hosting app list`, `cargo-ai hosting worker list`, `cargo-ai hosting deployment list --payload '{}'` |
|
|
159
|
+
| **mailboxManagement** | Owned sending mailboxes, threads, events, suppressions, pricing | `cargo-ai mailboxManagement mailbox list`, `cargo-ai mailboxManagement mailbox get-send-allowance <uuid>` |
|
|
159
160
|
| **cdk** | Declarative IaC: define resources in code, deploy, generate types | `cargo-ai cdk init <dir>`, `cargo-ai cdk types`, `cargo-ai cdk plan`, `cargo-ai cdk deploy` |
|
|
160
161
|
|
|
161
162
|
Commands that accept complex payloads use a `--payload <json>` option (e.g. `cargo-ai orchestration play create --payload '{"name":"My Play",...}'`). Use `--help` on any subcommand for options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CA0H7E"}
|
|
@@ -10,6 +10,7 @@ export function registerChatCommands(parent, getApi) {
|
|
|
10
10
|
.option("--release-uuid <uuid>", "Filter by release UUID (string)")
|
|
11
11
|
.option("--user-uuid <uuid>", "Filter by user UUID (string)")
|
|
12
12
|
.option("--trigger-type <type>", "Filter by trigger type (string: chat, draft, cron, ...)")
|
|
13
|
+
.option("--search <text>", "Case-insensitive partial match on chat name or slug")
|
|
13
14
|
.option("--limit <n>", "Max results to return (integer)")
|
|
14
15
|
.option("--offset <n>", "Number of results to skip (integer)")
|
|
15
16
|
.action(async (opts) => {
|
|
@@ -19,6 +20,7 @@ export function registerChatCommands(parent, getApi) {
|
|
|
19
20
|
releaseUuid: opts.releaseUuid,
|
|
20
21
|
userUuid: opts.userUuid,
|
|
21
22
|
triggerType: opts.triggerType,
|
|
23
|
+
search: opts.search,
|
|
22
24
|
limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
|
|
23
25
|
offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
|
|
24
26
|
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/commands/mailboxManagement/event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAIxC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA4DN"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
import { csvList, optionalLimit, optionalOffset } from "./options.js";
|
|
3
|
+
export function registerEventCommands(parent, getApi) {
|
|
4
|
+
const event = parent
|
|
5
|
+
.command("event")
|
|
6
|
+
.description("Delivery events on outbound mail (sent, opened, clicked, replied, bounced, unsubscribed)");
|
|
7
|
+
event
|
|
8
|
+
.command("list")
|
|
9
|
+
.description("List mailbox events")
|
|
10
|
+
.option("--mailbox-uuid <uuid>", "Filter by mailbox")
|
|
11
|
+
.option("--message-uuid <uuid>", "Filter by outbound message")
|
|
12
|
+
.option("--thread-uuid <uuid>", "Filter by thread")
|
|
13
|
+
.option("--kinds <list>", "Filter by kind (comma-separated: sent,opened,clicked,replied,bounced,unsubscribed)")
|
|
14
|
+
.option("--occurred-after <date>", "Occurred after (ISO 8601)")
|
|
15
|
+
.option("--occurred-before <date>", "Occurred before (ISO 8601)")
|
|
16
|
+
.option("--search <text>", "Search actor email or snippet")
|
|
17
|
+
.option("--limit <n>", "Max results to return (integer)")
|
|
18
|
+
.option("--offset <n>", "Number of results to skip (integer)")
|
|
19
|
+
.addHelpText("after", `
|
|
20
|
+
Examples:
|
|
21
|
+
$ cargo-ai mailboxManagement event list --mailbox-uuid 550e8400-...
|
|
22
|
+
$ cargo-ai mailboxManagement event list --kinds replied,unsubscribed --limit 50`)
|
|
23
|
+
.action(async (opts) => {
|
|
24
|
+
const api = getApi();
|
|
25
|
+
const result = await handleApiCall(() => api.mailboxManagement.event.list({
|
|
26
|
+
mailboxUuid: opts.mailboxUuid,
|
|
27
|
+
messageUuid: opts.messageUuid,
|
|
28
|
+
threadUuid: opts.threadUuid,
|
|
29
|
+
kinds: csvList(opts.kinds),
|
|
30
|
+
occurredAfter: opts.occurredAfter,
|
|
31
|
+
occurredBefore: opts.occurredBefore,
|
|
32
|
+
search: opts.search,
|
|
33
|
+
limit: optionalLimit(opts.limit),
|
|
34
|
+
offset: optionalOffset(opts.offset),
|
|
35
|
+
}));
|
|
36
|
+
outputJson(result);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/mailboxManagement/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAQxC,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAaN"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { registerEventCommands } from "./event.js";
|
|
2
|
+
import { registerMailboxCommands } from "./mailbox.js";
|
|
3
|
+
import { registerMessageCommands } from "./message.js";
|
|
4
|
+
import { registerPricingCommands } from "./pricing.js";
|
|
5
|
+
import { registerSuppressionCommands } from "./suppression.js";
|
|
6
|
+
import { registerThreadCommands } from "./thread.js";
|
|
7
|
+
export function registerMailboxManagementCommands(parent, getApi) {
|
|
8
|
+
const mailboxManagement = parent
|
|
9
|
+
.command("mailboxManagement")
|
|
10
|
+
.description("Owned sending mailboxes, threads, events, suppressions, and pricing");
|
|
11
|
+
registerMailboxCommands(mailboxManagement, getApi);
|
|
12
|
+
registerMessageCommands(mailboxManagement, getApi);
|
|
13
|
+
registerThreadCommands(mailboxManagement, getApi);
|
|
14
|
+
registerEventCommands(mailboxManagement, getApi);
|
|
15
|
+
registerSuppressionCommands(mailboxManagement, getApi);
|
|
16
|
+
registerPricingCommands(mailboxManagement, getApi);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailbox.d.ts","sourceRoot":"","sources":["../../../src/commands/mailboxManagement/mailbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAUxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA6RN"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
import { csvList, optionalCleared, optionalDailyTarget, optionalLimit, optionalOffset, } from "./options.js";
|
|
3
|
+
export function registerMailboxCommands(parent, getApi) {
|
|
4
|
+
const mailbox = parent
|
|
5
|
+
.command("mailbox")
|
|
6
|
+
.description("Owned sending inboxes (provision, warm-up, send allowance). Delivery is sendEmail, not this group.");
|
|
7
|
+
mailbox
|
|
8
|
+
.command("list")
|
|
9
|
+
.description("List mailboxes in this workspace")
|
|
10
|
+
.option("--domain-uuid <uuid>", "Only mailboxes on this sending domain")
|
|
11
|
+
.option("--folder-uuid <uuid>", 'Folder UUID, or "none" for mailboxes not in a folder')
|
|
12
|
+
.option("--statuses <list>", "Filter by statuses (comma-separated: pending,active,inactive)")
|
|
13
|
+
.option("--limit <n>", "Max results to return (integer)")
|
|
14
|
+
.option("--offset <n>", "Number of results to skip (integer)")
|
|
15
|
+
.addHelpText("after", `
|
|
16
|
+
Examples:
|
|
17
|
+
$ cargo-ai mailboxManagement mailbox list
|
|
18
|
+
$ cargo-ai mailboxManagement mailbox list --domain-uuid 550e8400-... --statuses active
|
|
19
|
+
$ cargo-ai mailboxManagement mailbox list | jq -r '.mailboxes[] | "\\(.email) \\(.uuid)"'`)
|
|
20
|
+
.action(async (opts) => {
|
|
21
|
+
const api = getApi();
|
|
22
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.list({
|
|
23
|
+
domainUuid: opts.domainUuid,
|
|
24
|
+
folderUuid: optionalCleared(opts.folderUuid),
|
|
25
|
+
statuses: csvList(opts.statuses),
|
|
26
|
+
limit: optionalLimit(opts.limit),
|
|
27
|
+
offset: optionalOffset(opts.offset),
|
|
28
|
+
}));
|
|
29
|
+
outputJson(result);
|
|
30
|
+
});
|
|
31
|
+
mailbox
|
|
32
|
+
.command("get <uuid>")
|
|
33
|
+
.description("Get a mailbox by UUID")
|
|
34
|
+
.addHelpText("after", `
|
|
35
|
+
Example:
|
|
36
|
+
$ cargo-ai mailboxManagement mailbox get 550e8400-e29b-41d4-a716-446655440000`)
|
|
37
|
+
.action(async (uuid) => {
|
|
38
|
+
const api = getApi();
|
|
39
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.get(uuid));
|
|
40
|
+
outputJson(result);
|
|
41
|
+
});
|
|
42
|
+
mailbox
|
|
43
|
+
.command("create")
|
|
44
|
+
.description("Provision a mailbox on a sending domain the workspace owns")
|
|
45
|
+
.requiredOption("--domain-uuid <uuid>", "Sending domain UUID")
|
|
46
|
+
.requiredOption("--type <type>", "Mailbox flavour: google, shared, or private (outlook cannot deliver yet)")
|
|
47
|
+
.requiredOption("--username <local-part>", "Local part of the address, e.g. jane for jane@acme.com")
|
|
48
|
+
.requiredOption("--first-name <name>", "Sender first name in the From header")
|
|
49
|
+
.requiredOption("--last-name <name>", "Sender last name in the From header")
|
|
50
|
+
.option("--signature <html>", "HTML signature stored on the mailbox")
|
|
51
|
+
.option("--folder-uuid <uuid>", "Folder UUID of kind mailbox")
|
|
52
|
+
.addHelpText("after", `
|
|
53
|
+
Examples:
|
|
54
|
+
$ cargo-ai mailboxManagement mailbox create \\
|
|
55
|
+
--domain-uuid 550e8400-... --type google --username jane \\
|
|
56
|
+
--first-name Jane --last-name Doe
|
|
57
|
+
$ cargo-ai mailboxManagement mailbox create \\
|
|
58
|
+
--domain-uuid 550e8400-... --type shared --username outreach \\
|
|
59
|
+
--first-name Cargo --last-name Outreach --folder-uuid 660e8400-...
|
|
60
|
+
|
|
61
|
+
The mailbox starts pending until the provider issues credentials. Prefer
|
|
62
|
+
defineMailbox in a CDK repo for the inbox itself; this command is the
|
|
63
|
+
imperative counterpart.`)
|
|
64
|
+
.action(async (opts) => {
|
|
65
|
+
const api = getApi();
|
|
66
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.create({
|
|
67
|
+
domainUuid: opts.domainUuid,
|
|
68
|
+
type: opts.type,
|
|
69
|
+
username: opts.username,
|
|
70
|
+
firstName: opts.firstName,
|
|
71
|
+
lastName: opts.lastName,
|
|
72
|
+
signature: opts.signature,
|
|
73
|
+
folderUuid: opts.folderUuid,
|
|
74
|
+
}));
|
|
75
|
+
outputJson(result);
|
|
76
|
+
});
|
|
77
|
+
mailbox
|
|
78
|
+
.command("update")
|
|
79
|
+
.description("Update a mailbox's name, signature, or folder")
|
|
80
|
+
.requiredOption("--uuid <uuid>", "Mailbox UUID")
|
|
81
|
+
.option("--first-name <name>", "Sender first name in the From header")
|
|
82
|
+
.option("--last-name <name>", "Sender last name in the From header")
|
|
83
|
+
.option("--signature <html>", 'HTML signature, or "none" to clear it')
|
|
84
|
+
.option("--folder-uuid <uuid>", 'Folder UUID, or "none" to move the mailbox to the root')
|
|
85
|
+
.addHelpText("after", `
|
|
86
|
+
Examples:
|
|
87
|
+
$ cargo-ai mailboxManagement mailbox update --uuid 550e8400-... --first-name Janet
|
|
88
|
+
$ cargo-ai mailboxManagement mailbox update --uuid 550e8400-... --folder-uuid none`)
|
|
89
|
+
.action(async (opts) => {
|
|
90
|
+
const api = getApi();
|
|
91
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.update({
|
|
92
|
+
uuid: opts.uuid,
|
|
93
|
+
firstName: opts.firstName,
|
|
94
|
+
lastName: opts.lastName,
|
|
95
|
+
signature: optionalCleared(opts.signature),
|
|
96
|
+
folderUuid: optionalCleared(opts.folderUuid),
|
|
97
|
+
}));
|
|
98
|
+
outputJson(result);
|
|
99
|
+
});
|
|
100
|
+
mailbox
|
|
101
|
+
.command("remove <uuid>")
|
|
102
|
+
.description("Delete a mailbox at the provider and in Cargo")
|
|
103
|
+
.addHelpText("after", `
|
|
104
|
+
Example:
|
|
105
|
+
$ cargo-ai mailboxManagement mailbox remove 550e8400-e29b-41d4-a716-446655440000`)
|
|
106
|
+
.action(async (uuid) => {
|
|
107
|
+
const api = getApi();
|
|
108
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.remove({ uuid }));
|
|
109
|
+
outputJson(result);
|
|
110
|
+
});
|
|
111
|
+
mailbox
|
|
112
|
+
.command("refresh-status <uuid>")
|
|
113
|
+
.description("Re-poll the provider for credentials and status")
|
|
114
|
+
.action(async (uuid) => {
|
|
115
|
+
const api = getApi();
|
|
116
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.refreshStatus({ uuid }));
|
|
117
|
+
outputJson(result);
|
|
118
|
+
});
|
|
119
|
+
mailbox
|
|
120
|
+
.command("start-warmup <uuid>")
|
|
121
|
+
.description("Start provider warm-up (dummy mail) and the Cargo send ramp")
|
|
122
|
+
.option("--daily-target <n>", "Warm-up messages per day at full ramp (provider default if omitted)")
|
|
123
|
+
.addHelpText("after", `
|
|
124
|
+
Example:
|
|
125
|
+
$ cargo-ai mailboxManagement mailbox start-warmup 550e8400-... --daily-target 40`)
|
|
126
|
+
.action(async (uuid, opts) => {
|
|
127
|
+
const api = getApi();
|
|
128
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.startWarmup({
|
|
129
|
+
uuid,
|
|
130
|
+
dailyTarget: optionalDailyTarget(opts.dailyTarget),
|
|
131
|
+
}));
|
|
132
|
+
outputJson(result);
|
|
133
|
+
});
|
|
134
|
+
mailbox
|
|
135
|
+
.command("update-warmup")
|
|
136
|
+
.description("Change warm-up daily target or pause/resume the pool")
|
|
137
|
+
.requiredOption("--uuid <uuid>", "Mailbox UUID")
|
|
138
|
+
.option("--daily-target <n>", "Warm-up messages per day at full ramp")
|
|
139
|
+
.option("--status <status>", "Warm-up state: disabled, pending, active, paused, failed")
|
|
140
|
+
.addHelpText("after", `
|
|
141
|
+
Example:
|
|
142
|
+
$ cargo-ai mailboxManagement mailbox update-warmup --uuid 550e8400-... --status paused`)
|
|
143
|
+
.action(async (opts) => {
|
|
144
|
+
const api = getApi();
|
|
145
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.updateWarmup({
|
|
146
|
+
uuid: opts.uuid,
|
|
147
|
+
dailyTarget: optionalDailyTarget(opts.dailyTarget),
|
|
148
|
+
status: opts.status,
|
|
149
|
+
}));
|
|
150
|
+
outputJson(result);
|
|
151
|
+
});
|
|
152
|
+
mailbox
|
|
153
|
+
.command("stop-warmup <uuid>")
|
|
154
|
+
.description("Tear down provider warm-up and reset the Cargo send ramp")
|
|
155
|
+
.action(async (uuid) => {
|
|
156
|
+
const api = getApi();
|
|
157
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.stopWarmup({ uuid }));
|
|
158
|
+
outputJson(result);
|
|
159
|
+
});
|
|
160
|
+
mailbox
|
|
161
|
+
.command("get-send-allowance <uuid>")
|
|
162
|
+
.description("Today's remaining real sends under the ramp (rolling 24h window)")
|
|
163
|
+
.addHelpText("after", `
|
|
164
|
+
Example:
|
|
165
|
+
$ cargo-ai mailboxManagement mailbox get-send-allowance 550e8400-...
|
|
166
|
+
$ cargo-ai mailboxManagement mailbox get-send-allowance 550e8400-... | jq .allowance`)
|
|
167
|
+
.action(async (uuid) => {
|
|
168
|
+
const api = getApi();
|
|
169
|
+
const result = await handleApiCall(() => api.mailboxManagement.mailbox.getSendAllowance({ uuid }));
|
|
170
|
+
outputJson(result);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/commands/mailboxManagement/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAIxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAkEN"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
import { csvList, optionalLimit, optionalOffset } from "./options.js";
|
|
3
|
+
export function registerMessageCommands(parent, getApi) {
|
|
4
|
+
const message = parent
|
|
5
|
+
.command("message")
|
|
6
|
+
.description("Outbound emails sent from a mailbox");
|
|
7
|
+
message
|
|
8
|
+
.command("list")
|
|
9
|
+
.description("List outbound messages")
|
|
10
|
+
.option("--mailbox-uuid <uuid>", "Filter by mailbox")
|
|
11
|
+
.option("--thread-uuid <uuid>", "Filter by thread")
|
|
12
|
+
.option("--statuses <list>", "Filter by list status (comma-separated: pending,error,sent,opened,clicked,replied,bounced,unsubscribed)")
|
|
13
|
+
.option("--created-after <date>", "Created after (ISO 8601)")
|
|
14
|
+
.option("--created-before <date>", "Created before (ISO 8601)")
|
|
15
|
+
.option("--search <text>", "Search subject or recipient")
|
|
16
|
+
.option("--limit <n>", "Max results to return (integer)")
|
|
17
|
+
.option("--offset <n>", "Number of results to skip (integer)")
|
|
18
|
+
.addHelpText("after", `
|
|
19
|
+
Examples:
|
|
20
|
+
$ cargo-ai mailboxManagement message list --mailbox-uuid 550e8400-...
|
|
21
|
+
$ cargo-ai mailboxManagement message list --statuses sent,replied --limit 50`)
|
|
22
|
+
.action(async (opts) => {
|
|
23
|
+
const api = getApi();
|
|
24
|
+
const result = await handleApiCall(() => api.mailboxManagement.message.list({
|
|
25
|
+
mailboxUuid: opts.mailboxUuid,
|
|
26
|
+
threadUuid: opts.threadUuid,
|
|
27
|
+
statuses: csvList(opts.statuses),
|
|
28
|
+
createdAfter: opts.createdAfter,
|
|
29
|
+
createdBefore: opts.createdBefore,
|
|
30
|
+
search: opts.search,
|
|
31
|
+
limit: optionalLimit(opts.limit),
|
|
32
|
+
offset: optionalOffset(opts.offset),
|
|
33
|
+
}));
|
|
34
|
+
outputJson(result);
|
|
35
|
+
});
|
|
36
|
+
message
|
|
37
|
+
.command("get <uuid>")
|
|
38
|
+
.description("Get an outbound message by UUID")
|
|
39
|
+
.action(async (uuid) => {
|
|
40
|
+
const api = getApi();
|
|
41
|
+
const result = await handleApiCall(() => api.mailboxManagement.message.get(uuid));
|
|
42
|
+
outputJson(result);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Comma-separated flag → trimmed list, or omitted. */
|
|
2
|
+
export declare function csvList(value: string | undefined): string[] | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Optional UUID / clearable string flags: omit = leave live, `none` = null.
|
|
5
|
+
*/
|
|
6
|
+
export declare function optionalCleared(value: string | undefined): string | null | undefined;
|
|
7
|
+
export declare function optionalLimit(value: string | undefined): number | undefined;
|
|
8
|
+
export declare function optionalOffset(value: string | undefined): number | undefined;
|
|
9
|
+
export declare function optionalDailyTarget(value: string | undefined): number | undefined;
|
|
10
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/commands/mailboxManagement/options.ts"],"names":[],"mappings":"AAEA,uDAAuD;AACvD,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAGvE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,GAAG,IAAI,GAAG,SAAS,CAI3B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG3E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAS5E;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,GAAG,SAAS,CAGpB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ExitCodes, failWith, parsePositiveInt } from "../runHandler.js";
|
|
2
|
+
/** Comma-separated flag → trimmed list, or omitted. */
|
|
3
|
+
export function csvList(value) {
|
|
4
|
+
if (value === undefined)
|
|
5
|
+
return undefined;
|
|
6
|
+
return value.split(",").map((part) => part.trim());
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Optional UUID / clearable string flags: omit = leave live, `none` = null.
|
|
10
|
+
*/
|
|
11
|
+
export function optionalCleared(value) {
|
|
12
|
+
if (value === undefined)
|
|
13
|
+
return undefined;
|
|
14
|
+
if (value === "none")
|
|
15
|
+
return null;
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
export function optionalLimit(value) {
|
|
19
|
+
if (value === undefined)
|
|
20
|
+
return undefined;
|
|
21
|
+
return parsePositiveInt(value, "--limit");
|
|
22
|
+
}
|
|
23
|
+
export function optionalOffset(value) {
|
|
24
|
+
if (value === undefined)
|
|
25
|
+
return undefined;
|
|
26
|
+
const n = parseInt(value, 10);
|
|
27
|
+
if (Number.isNaN(n) === true || n < 0) {
|
|
28
|
+
failWith("--offset must be a non-negative integer.", {
|
|
29
|
+
code: ExitCodes.InvalidUsage,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return n;
|
|
33
|
+
}
|
|
34
|
+
export function optionalDailyTarget(value) {
|
|
35
|
+
if (value === undefined)
|
|
36
|
+
return undefined;
|
|
37
|
+
return parsePositiveInt(value, "--daily-target");
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../../src/commands/mailboxManagement/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAsBN"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
export function registerPricingCommands(parent, getApi) {
|
|
3
|
+
const pricing = parent
|
|
4
|
+
.command("pricing")
|
|
5
|
+
.description("Monthly credit cost of each mailbox flavour");
|
|
6
|
+
pricing
|
|
7
|
+
.command("get")
|
|
8
|
+
.description("Get monthly credits charged per mailbox type")
|
|
9
|
+
.addHelpText("after", `
|
|
10
|
+
Example:
|
|
11
|
+
$ cargo-ai mailboxManagement pricing get
|
|
12
|
+
$ cargo-ai mailboxManagement pricing get | jq .monthlyCredits`)
|
|
13
|
+
.action(async () => {
|
|
14
|
+
const api = getApi();
|
|
15
|
+
const result = await handleApiCall(() => api.mailboxManagement.pricing.get());
|
|
16
|
+
outputJson(result);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppression.d.ts","sourceRoot":"","sources":["../../../src/commands/mailboxManagement/suppression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAIxC,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA2DN"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
import { csvList, optionalLimit, optionalOffset } from "./options.js";
|
|
3
|
+
export function registerSuppressionCommands(parent, getApi) {
|
|
4
|
+
const suppression = parent
|
|
5
|
+
.command("suppression")
|
|
6
|
+
.description("Workspace-wide addresses that must not receive mail (unsubscribed, bounced, complained, manual)");
|
|
7
|
+
suppression
|
|
8
|
+
.command("list")
|
|
9
|
+
.description("List suppressions")
|
|
10
|
+
.option("--reasons <list>", "Filter by reason (comma-separated: unsubscribed,bounced,complained,manual)")
|
|
11
|
+
.option("--limit <n>", "Max results to return (integer)")
|
|
12
|
+
.option("--offset <n>", "Number of results to skip (integer)")
|
|
13
|
+
.addHelpText("after", `
|
|
14
|
+
Examples:
|
|
15
|
+
$ cargo-ai mailboxManagement suppression list
|
|
16
|
+
$ cargo-ai mailboxManagement suppression list --reasons unsubscribed,manual`)
|
|
17
|
+
.action(async (opts) => {
|
|
18
|
+
const api = getApi();
|
|
19
|
+
const result = await handleApiCall(() => api.mailboxManagement.suppression.list({
|
|
20
|
+
reasons: csvList(opts.reasons),
|
|
21
|
+
limit: optionalLimit(opts.limit),
|
|
22
|
+
offset: optionalOffset(opts.offset),
|
|
23
|
+
}));
|
|
24
|
+
outputJson(result);
|
|
25
|
+
});
|
|
26
|
+
suppression
|
|
27
|
+
.command("create")
|
|
28
|
+
.description("Manually suppress an address (workspace-wide)")
|
|
29
|
+
.requiredOption("--email <email>", "Address that should stop receiving mail")
|
|
30
|
+
.addHelpText("after", `
|
|
31
|
+
Example:
|
|
32
|
+
$ cargo-ai mailboxManagement suppression create --email opted-out@acme.com`)
|
|
33
|
+
.action(async (opts) => {
|
|
34
|
+
const api = getApi();
|
|
35
|
+
const result = await handleApiCall(() => api.mailboxManagement.suppression.create({ email: opts.email }));
|
|
36
|
+
outputJson(result);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../src/commands/mailboxManagement/thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAIxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA+DN"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { handleApiCall, outputJson } from "../runHandler.js";
|
|
2
|
+
import { csvList, optionalLimit, optionalOffset } from "./options.js";
|
|
3
|
+
export function registerThreadCommands(parent, getApi) {
|
|
4
|
+
const thread = parent
|
|
5
|
+
.command("thread")
|
|
6
|
+
.description("Conversations of outbound sends and their inbound replies");
|
|
7
|
+
thread
|
|
8
|
+
.command("list")
|
|
9
|
+
.description("List threads")
|
|
10
|
+
.option("--mailbox-uuid <uuid>", "Filter by mailbox")
|
|
11
|
+
.option("--statuses <list>", "Filter by latest list status (comma-separated: pending,error,sent,opened,clicked,replied,bounced,unsubscribed)")
|
|
12
|
+
.option("--created-after <date>", "Created after (ISO 8601)")
|
|
13
|
+
.option("--created-before <date>", "Created before (ISO 8601)")
|
|
14
|
+
.option("--search <text>", "Search subject or recipient")
|
|
15
|
+
.option("--limit <n>", "Max results to return (integer)")
|
|
16
|
+
.option("--offset <n>", "Number of results to skip (integer)")
|
|
17
|
+
.addHelpText("after", `
|
|
18
|
+
Examples:
|
|
19
|
+
$ cargo-ai mailboxManagement thread list --mailbox-uuid 550e8400-...
|
|
20
|
+
$ cargo-ai mailboxManagement thread list --search acme --limit 20`)
|
|
21
|
+
.action(async (opts) => {
|
|
22
|
+
const api = getApi();
|
|
23
|
+
const result = await handleApiCall(() => api.mailboxManagement.thread.list({
|
|
24
|
+
mailboxUuid: opts.mailboxUuid,
|
|
25
|
+
statuses: csvList(opts.statuses),
|
|
26
|
+
createdAfter: opts.createdAfter,
|
|
27
|
+
createdBefore: opts.createdBefore,
|
|
28
|
+
search: opts.search,
|
|
29
|
+
limit: optionalLimit(opts.limit),
|
|
30
|
+
offset: optionalOffset(opts.offset),
|
|
31
|
+
}));
|
|
32
|
+
outputJson(result);
|
|
33
|
+
});
|
|
34
|
+
thread
|
|
35
|
+
.command("get <uuid>")
|
|
36
|
+
.description("Get a thread by UUID")
|
|
37
|
+
.action(async (uuid) => {
|
|
38
|
+
const api = getApi();
|
|
39
|
+
const result = await handleApiCall(() => api.mailboxManagement.thread.get(uuid));
|
|
40
|
+
outputJson(result);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA4ZN"}
|
|
@@ -20,6 +20,7 @@ export function registerRecordCommands(parent, getApi) {
|
|
|
20
20
|
.option("--created-before <date>", "Created before date")
|
|
21
21
|
.option("--updated-after <date>", "Updated after date")
|
|
22
22
|
.option("--updated-before <date>", "Updated before date")
|
|
23
|
+
.option("--search <text>", "Case-insensitive partial match on record title or ID")
|
|
23
24
|
.option("--limit <n>", "Limit", "20")
|
|
24
25
|
.option("--offset <n>", "Offset", "0")
|
|
25
26
|
.action(async (opts) => {
|
|
@@ -31,6 +32,7 @@ export function registerRecordCommands(parent, getApi) {
|
|
|
31
32
|
: undefined,
|
|
32
33
|
title: opts.title,
|
|
33
34
|
titleOrId: opts.titleOrId,
|
|
35
|
+
search: opts.search,
|
|
34
36
|
releaseUuid: opts.releaseUuid,
|
|
35
37
|
batchUuid: opts.batchUuid,
|
|
36
38
|
statuses: opts.statuses !== undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAexC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAexC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CAqoB5E"}
|
|
@@ -24,6 +24,7 @@ export function registerRunCommands(parent, getApi) {
|
|
|
24
24
|
.option("--created-before <date>", "Filter runs created before this date (ISO 8601 string)")
|
|
25
25
|
.option("--updated-after <date>", "Filter runs updated after this date (ISO 8601 string)")
|
|
26
26
|
.option("--updated-before <date>", "Filter runs updated before this date (ISO 8601 string)")
|
|
27
|
+
.option("--search <text>", "Case-insensitive partial match on record title or ID")
|
|
27
28
|
.option("--limit <n>", "Max results to return (integer, default: 20)", "20")
|
|
28
29
|
.option("--offset <n>", "Number of results to skip (integer, default: 0)", "0")
|
|
29
30
|
.addHelpText("after", `
|
|
@@ -47,6 +48,7 @@ Examples:
|
|
|
47
48
|
recordId: opts.recordId,
|
|
48
49
|
recordTitle: opts.recordTitle,
|
|
49
50
|
recordTitleOrId: opts.recordTitleOrId,
|
|
51
|
+
search: opts.search,
|
|
50
52
|
isFinished: opts.isFinished,
|
|
51
53
|
executionsFilter: opts.executionsFilter !== undefined
|
|
52
54
|
? parseJson(opts.executionsFilter, "--executions-filter")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/span.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/span.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CA0P7E"}
|
|
@@ -26,6 +26,7 @@ export function registerSpanCommands(parent, getApi) {
|
|
|
26
26
|
.option("--parent-run-uuid <uuid>", "Parent run UUID")
|
|
27
27
|
.requiredOption("--execution-started-after <date>", "Execution started after (ISO date)")
|
|
28
28
|
.option("--execution-started-before <date>", "Execution started on or before (ISO date)")
|
|
29
|
+
.option("--search <text>", "Case-insensitive partial match on record title, record ID, execution title, or error message")
|
|
29
30
|
.option("--limit <n>", "Limit", "30")
|
|
30
31
|
.option("--offset <n>", "Offset", "0")
|
|
31
32
|
.action(async (opts) => {
|
|
@@ -39,6 +40,7 @@ export function registerSpanCommands(parent, getApi) {
|
|
|
39
40
|
recordTitleOrId: opts.recordTitleOrId,
|
|
40
41
|
executionTitle: opts.executionTitle,
|
|
41
42
|
executionTitleOrErrorMessage: opts.executionTitleOrErrorMessage,
|
|
43
|
+
search: opts.search,
|
|
42
44
|
nodeUuid: opts.nodeUuid,
|
|
43
45
|
nodeKind: opts.nodeKind !== undefined
|
|
44
46
|
? opts.nodeKind
|
package/build/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { registerDoctorCommand } from "./commands/doctor.js";
|
|
|
14
14
|
import { registerExpressionCommands } from "./commands/expression/index.js";
|
|
15
15
|
import { registerHostingCommands } from "./commands/hosting/index.js";
|
|
16
16
|
import { registerInitCommand } from "./commands/init.js";
|
|
17
|
+
import { registerMailboxManagementCommands } from "./commands/mailboxManagement/index.js";
|
|
17
18
|
import { registerMcpCommand } from "./commands/mcp.js";
|
|
18
19
|
import { registerObservabilityCommands } from "./commands/observability/index.js";
|
|
19
20
|
import { registerOrchestrationCommands } from "./commands/orchestration/index.js";
|
|
@@ -91,6 +92,7 @@ registerSystemOfRecordIntegrationCommands(program, getApi);
|
|
|
91
92
|
registerUserManagementCommands(program, getApi);
|
|
92
93
|
registerAiCommands(program, getApi);
|
|
93
94
|
registerHostingCommands(program, getApi);
|
|
95
|
+
registerMailboxManagementCommands(program, getApi);
|
|
94
96
|
registerMcpCommand(program, getApi);
|
|
95
97
|
registerCdkCommands(program
|
|
96
98
|
.command("cdk")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cargo-ai/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.61",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://getcargo.ai",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"format:check": "prettier --check ."
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cargo-ai/api": "^1.0.
|
|
63
|
-
"@cargo-ai/app-sdk": "^1.0.
|
|
64
|
-
"@cargo-ai/cdk": "^1.0.
|
|
65
|
-
"@cargo-ai/types": "^1.0.
|
|
66
|
-
"@cargo-ai/worker-sdk": "^1.0.
|
|
62
|
+
"@cargo-ai/api": "^1.0.64",
|
|
63
|
+
"@cargo-ai/app-sdk": "^1.0.8",
|
|
64
|
+
"@cargo-ai/cdk": "^1.0.51",
|
|
65
|
+
"@cargo-ai/types": "^1.0.63",
|
|
66
|
+
"@cargo-ai/worker-sdk": "^1.0.16",
|
|
67
67
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
68
68
|
"commander": "^12.1.0",
|
|
69
69
|
"tsx": "^4.19.2",
|