@velaro/mcp-server 0.6.66 → 0.6.67
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/package.json +1 -1
- package/server.js +13 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.67",
|
|
4
4
|
"description": "Velaro MCP server — connect Claude and other AI agents directly to your Velaro account: KB, workflows, bots, conversations, contacts, routing, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/server.js
CHANGED
|
@@ -3989,15 +3989,16 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
3989
3989
|
// Moshky AI safety rule and ConversationTriageService's prompt assembly (velaro-messaging).
|
|
3990
3990
|
{
|
|
3991
3991
|
name: 'focus_get_triage_rules',
|
|
3992
|
-
description: 'Get this site\'s current AI triage rules: which of the 5 fixed labels (urgent, needs_reply, offer, fyi, waiting) are enabled, plus the per-channel triage-on-off and priority weight already owned by the channel-config endpoint, shown here for context. A label missing/never configured defaults to enabled.',
|
|
3992
|
+
description: 'Get this site\'s current AI triage rules: which of the 5 fixed labels (urgent, needs_reply, offer, fyi, waiting) are enabled, plus the per-channel triage-on-off and priority weight already owned by the channel-config endpoint, shown here for context. A label missing/never configured defaults to enabled. Also returns triageMode ("off" or "economy").',
|
|
3993
3993
|
inputSchema: { type: 'object', properties: {} },
|
|
3994
3994
|
},
|
|
3995
3995
|
{
|
|
3996
3996
|
name: 'focus_update_triage_rules',
|
|
3997
|
-
description: 'Enable or disable one or more of the 5 fixed AI triage labels (urgent, needs_reply, offer, fyi, waiting) for this site. Apply-if-present -- only labels included are changed. Rejects any label name outside the fixed set. Disabling all 5 fails safe back to all-enabled server-side rather than breaking triage.',
|
|
3997
|
+
description: 'Enable or disable one or more of the 5 fixed AI triage labels (urgent, needs_reply, offer, fyi, waiting) for this site. Apply-if-present -- only labels included are changed. Rejects any label name outside the fixed set. Disabling all 5 fails safe back to all-enabled server-side rather than breaking triage. Optionally set triageMode: "economy" classifies obvious messages (auto-replies, clear urgency) without an AI call, lowering AI usage; "off" keeps current behavior. Unspecified fields are preserved.',
|
|
3998
3998
|
inputSchema: {
|
|
3999
3999
|
type: 'object',
|
|
4000
4000
|
properties: {
|
|
4001
|
+
triageMode: { type: 'string', enum: ['off', 'economy'], description: 'Optional. "economy" skips the AI call for obvious messages; "off" (default) keeps current behavior.' },
|
|
4001
4002
|
labels: {
|
|
4002
4003
|
type: 'array',
|
|
4003
4004
|
description: 'Labels to update.',
|
|
@@ -4011,7 +4012,6 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
4011
4012
|
},
|
|
4012
4013
|
},
|
|
4013
4014
|
},
|
|
4014
|
-
required: ['labels'],
|
|
4015
4015
|
},
|
|
4016
4016
|
},
|
|
4017
4017
|
|
|
@@ -8776,10 +8776,17 @@ async function handleTool(name, args) {
|
|
|
8776
8776
|
case 'focus_get_triage_rules':
|
|
8777
8777
|
return await messagingGet('/Focus/triage-rules');
|
|
8778
8778
|
case 'focus_update_triage_rules': {
|
|
8779
|
-
|
|
8780
|
-
|
|
8779
|
+
const hasLabels = Array.isArray(args.labels) && args.labels.length > 0;
|
|
8780
|
+
const hasMode = args.triageMode !== undefined && args.triageMode !== null;
|
|
8781
|
+
if (!hasLabels && !hasMode) {
|
|
8782
|
+
throw new Error('Provide labels (non-empty array) and/or triageMode.');
|
|
8781
8783
|
}
|
|
8782
|
-
|
|
8784
|
+
if (hasMode && !['off', 'economy'].includes(args.triageMode)) {
|
|
8785
|
+
throw new Error('triageMode must be "off" or "economy".');
|
|
8786
|
+
}
|
|
8787
|
+
const labels = hasLabels ? args.labels.map((l) => ({ Label: l.label, Enabled: l.enabled })) : undefined;
|
|
8788
|
+
// Legacy array body when only labels are sent; object body when triageMode is involved.
|
|
8789
|
+
const body = hasMode ? { ...(labels ? { labels } : {}), triageMode: args.triageMode } : labels;
|
|
8783
8790
|
return await messagingPut('/Focus/triage-rules', body);
|
|
8784
8791
|
}
|
|
8785
8792
|
|