@jclvsh/iris 0.5.1 → 0.5.3
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/index.js +14 -1
- package/dist/tools/ai.js +6 -5
- package/dist/tools/webhooks.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22,7 +22,20 @@ const server = new McpServer({
|
|
|
22
22
|
name: "iris",
|
|
23
23
|
version: pkg.version,
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
// Lazy client: defer the IrisClient constructor (which throws when
|
|
26
|
+
// IRIS_API_KEY is missing) until a tool invocation actually issues an HTTP call.
|
|
27
|
+
// MCP discovery (initialize, tools/list) never touches the proxy, so the server
|
|
28
|
+
// boots cleanly without an API key set and surfaces a structured error only
|
|
29
|
+
// when a tool is invoked.
|
|
30
|
+
let realClient = null;
|
|
31
|
+
const client = new Proxy({}, {
|
|
32
|
+
get(_target, prop, receiver) {
|
|
33
|
+
if (!realClient)
|
|
34
|
+
realClient = new IrisClient();
|
|
35
|
+
const value = Reflect.get(realClient, prop, receiver);
|
|
36
|
+
return typeof value === "function" ? value.bind(realClient) : value;
|
|
37
|
+
},
|
|
38
|
+
});
|
|
26
39
|
registerCampaignTools(server, client);
|
|
27
40
|
registerContactTools(server, client);
|
|
28
41
|
registerConversationTools(server, client);
|
package/dist/tools/ai.js
CHANGED
|
@@ -22,11 +22,12 @@ export function registerAiTools(server, client) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
server.tool("generate_campaign_content", "generate
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
server.tool("generate_campaign_content", "generate campaign-level outreach content (email sequence, templates) from a campaign brief. content-first: takes the strategy inline, not a campaign id. requires generate scope.", {
|
|
26
|
+
campaign_name: z.string().min(1).describe("campaign name (used as the brief title)"),
|
|
27
|
+
objective: z.string().min(1).describe("campaign objective (e.g. 'book DJ gigs', 'sell SaaS to VPs of Eng')"),
|
|
28
|
+
target_audience: z.string().min(1).describe("target audience description"),
|
|
29
|
+
key_benefits: z.array(z.string().min(1)).min(1).describe("non-empty list of key benefits to emphasise"),
|
|
30
|
+
tone: z.string().min(1).describe("tone (e.g. professional, casual, warm-direct)"),
|
|
30
31
|
}, async (args) => {
|
|
31
32
|
try {
|
|
32
33
|
const result = await client.post("/ai/generate/campaign", args);
|
package/dist/tools/webhooks.js
CHANGED
|
@@ -154,7 +154,7 @@ export function registerWebhookTools(server, client) {
|
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
|
-
server.tool("rotate_webhook_secret", "rotate the signing secret for a webhook. the new secret is returned in the response. requires
|
|
157
|
+
server.tool("rotate_webhook_secret", "rotate the signing secret for a webhook. the new secret is returned in the response. the old secret is invalidated immediately — receivers must update their HMAC verification before the next delivery. requires write scope.", {
|
|
158
158
|
id: z.string().uuid().describe("webhook ID"),
|
|
159
159
|
}, async ({ id }) => {
|
|
160
160
|
try {
|