@jclvsh/iris 0.5.3 → 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.
@@ -51,14 +51,14 @@ export function registerAICommands(program, client) {
51
51
  }
52
52
  });
53
53
  ai.command("analyze")
54
- .description("analyze a response in a conversation")
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("--email-content <text>", "email content to analyze")
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
- email_content: opts.emailContent,
61
+ message_content: opts.messageContent,
62
62
  });
63
63
  formatOutput(result, getFormat(program.opts()));
64
64
  }
@@ -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, delete, generate, send, admin (defaults to all)", parseList)
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 };
@@ -1,5 +1,7 @@
1
1
  import { z } from "zod";
2
- const SCOPES = ["read", "write", "delete", "generate", "send", "admin"];
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, delete, generate, send, admin). defaults to all scopes"),
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jclvsh/iris",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "MCP server for the Iris API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",