@jclvsh/iris 0.5.2 → 0.5.4
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 +3 -3
- package/dist/commands/keys.js +1 -1
- package/dist/tools/ai.js +6 -5
- package/dist/tools/keys.js +5 -2
- package/dist/tools/webhooks.js +1 -1
- package/package.json +1 -1
package/dist/commands/ai.js
CHANGED
|
@@ -51,14 +51,14 @@ export function registerAICommands(program, client) {
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
ai.command("analyze")
|
|
54
|
-
.description("analyze
|
|
54
|
+
.description("analyze an inbound message (email or DM) for sentiment, intent, and suggested reply")
|
|
55
55
|
.requiredOption("--conversation-id <id>", "conversation ID")
|
|
56
|
-
.requiredOption("--
|
|
56
|
+
.requiredOption("--message-content <text>", "inbound message content to analyze")
|
|
57
57
|
.action(async (opts) => {
|
|
58
58
|
try {
|
|
59
59
|
const result = await client.post("/ai/analyze", {
|
|
60
60
|
conversation_id: opts.conversationId,
|
|
61
|
-
|
|
61
|
+
message_content: opts.messageContent,
|
|
62
62
|
});
|
|
63
63
|
formatOutput(result, getFormat(program.opts()));
|
|
64
64
|
}
|
package/dist/commands/keys.js
CHANGED
|
@@ -26,7 +26,7 @@ export function registerKeyCommands(program, client) {
|
|
|
26
26
|
keys.command("create")
|
|
27
27
|
.description("create a new API key (requires admin scope)")
|
|
28
28
|
.requiredOption("-n, --name <name>", "key name")
|
|
29
|
-
.option("--scopes <list>", "comma-separated scopes: read, write,
|
|
29
|
+
.option("--scopes <list>", "comma-separated scopes: read, write, generate, send, admin (defaults to all; empty rejected)", parseList)
|
|
30
30
|
.action(async (opts) => {
|
|
31
31
|
try {
|
|
32
32
|
const body = { name: opts.name };
|
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/keys.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
2
|
+
// Five-verb scope vocabulary. iris uses soft-deletes everywhere, so DELETE
|
|
3
|
+
// routes gate on `write` — there is no separate `delete` scope.
|
|
4
|
+
const SCOPES = ["read", "write", "generate", "send", "admin"];
|
|
3
5
|
export function registerKeyTools(server, client) {
|
|
4
6
|
server.tool("get_current_api_key", "get details about the currently authenticated API key.", {}, async () => {
|
|
5
7
|
try {
|
|
@@ -44,8 +46,9 @@ export function registerKeyTools(server, client) {
|
|
|
44
46
|
name: z.string().min(1).max(100).describe("key name for identification"),
|
|
45
47
|
scopes: z
|
|
46
48
|
.array(z.enum(SCOPES))
|
|
49
|
+
.min(1, "scopes must be a non-empty array; omit the field for all scopes")
|
|
47
50
|
.optional()
|
|
48
|
-
.describe("permission scopes (any of: read, write,
|
|
51
|
+
.describe("permission scopes (any of: read, write, generate, send, admin). omit for all scopes; empty array is rejected with 422"),
|
|
49
52
|
expires_at: z.string().optional().describe("expiration date in ISO 8601 format"),
|
|
50
53
|
}, async (args) => {
|
|
51
54
|
try {
|
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 {
|