@jclvsh/iris 0.22.0 → 0.22.1

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.
@@ -110,7 +110,7 @@ export function registerCampaignCommands(program, client) {
110
110
  });
111
111
  campaigns
112
112
  .command("analyze <id>")
113
- .description("run AI analysis on a campaign to generate target profiles")
113
+ .description("queue AI analysis of a campaign to generate target profiles (from its product, or from its goal)")
114
114
  .action(async (id) => {
115
115
  try {
116
116
  const result = await client.post(`/campaigns/${id}/analyze`);
@@ -193,7 +193,7 @@ export function registerCampaignTools(server, client) {
193
193
  return formatMcpError(error);
194
194
  }
195
195
  });
196
- server.tool("analyze_campaign", "trigger AI analysis of a campaign to generate target profiles and recommendations. requires write scope.", {
196
+ server.tool("analyze_campaign", "queue AI analysis of a campaign to generate its target profiles: from the product for product_promotion campaigns, from goal_description for any other campaign. runs asynchronously; poll get_campaign until analysis_status is completed, then search_campaign_contacts. requires write scope.", {
197
197
  id: z.string().uuid().describe("campaign ID"),
198
198
  }, async ({ id }) => {
199
199
  try {
package/dist/types.d.ts CHANGED
@@ -33,6 +33,9 @@ export interface Campaign {
33
33
  follow_up_enabled: boolean;
34
34
  follow_up_max_count: number;
35
35
  follow_up_delay_days: number;
36
+ goal_description?: string | null;
37
+ analysis_status?: "none" | "pending" | "analyzing" | "completed" | "failed";
38
+ analysis_error?: string | null;
36
39
  created_at: string;
37
40
  updated_at: string;
38
41
  }
@@ -43,14 +46,15 @@ export interface CampaignWithStats extends Campaign {
43
46
  emails_opened?: number;
44
47
  emails_replied?: number;
45
48
  }
49
+ /** `GET /campaigns/{id}/usage` */
46
50
  export interface CampaignUsage {
47
51
  campaign_id: string;
48
- contacts_count: number;
49
- contacts_limit: number;
50
- emails_sent: number;
51
- emails_limit: number;
52
- discovery_runs: number;
53
- discovery_limit: number;
52
+ status: string;
53
+ total_contacts: number;
54
+ total_conversations: number;
55
+ delivery_status: Record<string, number>;
56
+ /** id of a contact search running for the campaign right now; null when none is */
57
+ discovery_job_id: string | null;
54
58
  }
55
59
  /** `POST /campaigns/{id}/contacts` */
56
60
  export interface AddCampaignContactsResult {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jclvsh/iris",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "description": "MCP server for the Iris API",
5
5
  "repository": {
6
6
  "type": "git",