@jclvsh/iris 0.14.0 → 0.15.0
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/commands/ai.js
CHANGED
|
@@ -3,11 +3,12 @@ export function registerAICommands(program, client) {
|
|
|
3
3
|
const ai = program.command("ai").description("AI content generation and analysis");
|
|
4
4
|
ai.command("generate")
|
|
5
5
|
.description("generate AI content (email draft, subject line, etc.)")
|
|
6
|
-
.requiredOption("-t, --generation-type <type>", "generation type
|
|
6
|
+
.requiredOption("-t, --generation-type <type>", "generation type: initial_outreach, follow_up, response_negotiation, meeting_request, or closing")
|
|
7
7
|
.requiredOption("--tone <tone>", "tone (e.g. professional, casual, friendly)")
|
|
8
8
|
.option("--contact-id <id>", "contact ID for personalization")
|
|
9
9
|
.option("--campaign-id <id>", "campaign ID for context")
|
|
10
10
|
.option("--prompt <text>", "free-form prompt context")
|
|
11
|
+
.option("--format <format>", "email (default) or dm - dm is short platform-native text, empty subject")
|
|
11
12
|
.action(async (opts) => {
|
|
12
13
|
try {
|
|
13
14
|
const body = {
|
|
@@ -20,6 +21,8 @@ export function registerAICommands(program, client) {
|
|
|
20
21
|
body.campaign_id = opts.campaignId;
|
|
21
22
|
if (opts.prompt)
|
|
22
23
|
body.prompt = opts.prompt;
|
|
24
|
+
if (opts.format)
|
|
25
|
+
body.format = opts.format;
|
|
23
26
|
const result = await client.post("/ai/generate", body);
|
|
24
27
|
formatOutput(result, getFormat(program.opts()));
|
|
25
28
|
}
|
|
@@ -11,7 +11,7 @@ export function registerConversationCommands(program, client) {
|
|
|
11
11
|
.option("-s, --page-size <n>", "items per page (max 100)", "50")
|
|
12
12
|
.option("--status <status>", "filter by status")
|
|
13
13
|
.option("--campaign-id <id>", "filter by campaign")
|
|
14
|
-
.option("--channel <channel>", "filter by channel: email, instagram, twitter")
|
|
14
|
+
.option("--channel <channel>", "filter by channel: email, instagram, twitter, tiktok")
|
|
15
15
|
.action(async (opts) => {
|
|
16
16
|
try {
|
|
17
17
|
const params = {};
|
|
@@ -63,7 +63,7 @@ export function registerConversationCommands(program, client) {
|
|
|
63
63
|
.requiredOption("--content <text>", "message content")
|
|
64
64
|
.requiredOption("--direction <direction>", "inbound or outbound")
|
|
65
65
|
.requiredOption("--status <status>", "draft, queued, sending, pending_approval, sent, delivered, failed, bounced, or rejected")
|
|
66
|
-
.requiredOption("--channel <channel>", "email, twitter, or
|
|
66
|
+
.requiredOption("--channel <channel>", "email, twitter, instagram, or tiktok (tiktok records only - manual send)")
|
|
67
67
|
.option("--platform-recipient-id <id>", "platform recipient id (twitter/instagram channels)")
|
|
68
68
|
.action(async (id, opts) => {
|
|
69
69
|
try {
|
package/dist/tools/ai.js
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { formatMcpError } from "../cli-utils.js";
|
|
3
3
|
export function registerAiTools(server, client) {
|
|
4
|
-
server.tool("generate_content", "generate AI content for a
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
server.tool("generate_content", "generate AI outreach content (email or DM draft) for a contact/campaign. the contact's tags + enrichment_data feed the generation context automatically. requires generate scope.", {
|
|
5
|
+
generation_type: z
|
|
6
|
+
.enum(["initial_outreach", "follow_up", "response_negotiation", "meeting_request", "closing"])
|
|
7
|
+
.describe("type of content to generate"),
|
|
8
|
+
tone: z
|
|
9
|
+
.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.describe("tone (e.g. professional, friendly, casual, formal, persuasive, informative)"),
|
|
12
|
+
campaign_id: z.string().uuid().optional().describe("campaign to scope the generation to"),
|
|
13
|
+
contact_id: z
|
|
14
|
+
.string()
|
|
15
|
+
.uuid()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("target contact - its tags + enrichment_data are used automatically"),
|
|
18
|
+
prompt: z.string().optional().describe("additional freeform instructions"),
|
|
19
|
+
format: z
|
|
20
|
+
.enum(["email", "dm"])
|
|
21
|
+
.optional()
|
|
22
|
+
.describe("dm = short platform-native message text with empty subject. defaults to email"),
|
|
23
|
+
include_cta: z.boolean().optional().describe("include a clear call-to-action"),
|
|
24
|
+
}, async ({ include_cta, ...rest }) => {
|
|
10
25
|
try {
|
|
11
|
-
const
|
|
26
|
+
const body = { ...rest };
|
|
27
|
+
if (include_cta !== undefined)
|
|
28
|
+
body.input_context = { include_cta };
|
|
29
|
+
const result = await client.post("/ai/generate", body);
|
|
12
30
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
13
31
|
}
|
|
14
32
|
catch (error) {
|
|
@@ -63,7 +63,7 @@ export function registerConversationTools(server, client) {
|
|
|
63
63
|
content: z.string().min(1).describe("message content"),
|
|
64
64
|
direction: z.enum(["inbound", "outbound"]).describe("message direction"),
|
|
65
65
|
status: z.enum(MESSAGE_STATUSES).describe("initial message status"),
|
|
66
|
-
channel: z.enum(["email", "twitter", "instagram"]).describe("delivery channel"),
|
|
66
|
+
channel: z.enum(["email", "twitter", "instagram", "tiktok"]).describe("delivery channel (tiktok is manual-send: record only)"),
|
|
67
67
|
platform_recipient_id: z
|
|
68
68
|
.string()
|
|
69
69
|
.optional()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jclvsh/iris",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "MCP server for the Iris API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "tsc",
|
|
18
|
+
"prepublishOnly": "npm run build",
|
|
18
19
|
"start": "node dist/index.js"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|