@jclvsh/iris 0.15.0 → 0.17.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.
|
@@ -46,11 +46,15 @@ export function registerConversationCommands(program, client) {
|
|
|
46
46
|
});
|
|
47
47
|
conversations
|
|
48
48
|
.command("create")
|
|
49
|
-
.description("find-or-create
|
|
49
|
+
.description("find-or-create a conversation for a contact (hub by default; campaign thread with --campaign-id)")
|
|
50
50
|
.requiredOption("--contact-id <id>", "contact ID to converse with")
|
|
51
|
+
.option("--campaign-id <id>", "scope to a campaign the contact belongs to")
|
|
51
52
|
.action(async (opts) => {
|
|
52
53
|
try {
|
|
53
|
-
const
|
|
54
|
+
const body = { contact_id: opts.contactId };
|
|
55
|
+
if (opts.campaignId)
|
|
56
|
+
body.campaign_id = opts.campaignId;
|
|
57
|
+
const result = await client.post("/conversations", body);
|
|
54
58
|
formatOutput(result, getFormat(program.opts()));
|
|
55
59
|
}
|
|
56
60
|
catch (error) {
|
|
@@ -72,6 +72,18 @@ export function registerMessageCommands(program, client) {
|
|
|
72
72
|
handleError(error);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
+
messages
|
|
76
|
+
.command("mark-sent <id>")
|
|
77
|
+
.description("mark a pending manual-channel draft (tiktok / instagram cold first-touch) as sent outside the platform")
|
|
78
|
+
.action(async (id) => {
|
|
79
|
+
try {
|
|
80
|
+
const result = await client.post(`/messages/${id}/mark-sent`);
|
|
81
|
+
formatOutput(result, getFormat(program.opts()));
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
handleError(error);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
75
87
|
messages
|
|
76
88
|
.command("feedback <id>")
|
|
77
89
|
.description("submit feedback to improve future AI generations")
|
|
@@ -47,11 +47,15 @@ export function registerConversationTools(server, client) {
|
|
|
47
47
|
return formatMcpError(error);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
server.tool("create_conversation", "find-or-create
|
|
50
|
+
server.tool("create_conversation", "find-or-create a conversation for a contact - the hub conversation by default, or the campaign-scoped thread when campaign_id is passed (contact must be in that campaign). requires write scope.", {
|
|
51
51
|
contact_id: z.string().uuid().describe("contact ID to converse with"),
|
|
52
|
-
|
|
52
|
+
campaign_id: z.string().uuid().optional().describe("scope to a campaign the contact belongs to"),
|
|
53
|
+
}, async ({ contact_id, campaign_id }) => {
|
|
53
54
|
try {
|
|
54
|
-
const
|
|
55
|
+
const body = { contact_id };
|
|
56
|
+
if (campaign_id)
|
|
57
|
+
body.campaign_id = campaign_id;
|
|
58
|
+
const result = await client.post("/conversations", body);
|
|
55
59
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
56
60
|
}
|
|
57
61
|
catch (error) {
|
package/dist/tools/messages.js
CHANGED
|
@@ -55,6 +55,17 @@ export function registerMessageTools(server, client) {
|
|
|
55
55
|
return formatMcpError(error);
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
+
server.tool("mark_message_sent", "mark a pending manual-channel draft (tiktok, or instagram cold first-touch) as sent outside the platform. API-sendable drafts must use approve_message instead. requires write scope.", {
|
|
59
|
+
id: z.string().uuid().describe("approval queue item ID"),
|
|
60
|
+
}, async ({ id }) => {
|
|
61
|
+
try {
|
|
62
|
+
const result = await client.post(`/messages/${id}/mark-sent`);
|
|
63
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
return formatMcpError(error);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
58
69
|
server.tool("submit_message_feedback", "submit feedback on an AI-generated message to improve future generations. requires send scope.", {
|
|
59
70
|
id: z.string().uuid().describe("message ID"),
|
|
60
71
|
feedback: z.string().min(1).max(2000).describe("feedback text"),
|