@velaro/mcp-server 0.6.62 → 0.6.64

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +34 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velaro/mcp-server",
3
- "version": "0.6.62",
3
+ "version": "0.6.64",
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
@@ -1451,6 +1451,24 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
1451
1451
  },
1452
1452
 
1453
1453
  // ── Livefluence Migration ─────────────────────────────────────────────────
1454
+ {
1455
+ name: 'livefluence_seed_url_rules',
1456
+ description: 'Velaro staff only. Seed v20 use-ai routing rules on a target site from v10 URL rules. Each rule matches "url contains <path>" with scheme/host stripped (path-only), so a demo page path triggers the same rule as the customer real URL. Idempotent. Domain-only URLs are skipped. Use dry_run=true first.',
1457
+ inputSchema: {
1458
+ type: 'object',
1459
+ properties: {
1460
+ site_id: { type: 'number', description: 'V20 destination site ID' },
1461
+ ai_config_id: { type: 'number', description: 'AI config on that site that receives routed chats' },
1462
+ dry_run: { type: 'boolean', description: 'Preview without writing' },
1463
+ rules: {
1464
+ type: 'array',
1465
+ description: 'Rules in priority order',
1466
+ items: { type: 'object', properties: { name: { type: 'string' }, priority: { type: 'number' }, paths: { type: 'array', items: { type: 'string' } } }, required: ['name', 'priority', 'paths'] },
1467
+ },
1468
+ },
1469
+ required: ['site_id', 'ai_config_id', 'rules'],
1470
+ },
1471
+ },
1454
1472
  {
1455
1473
  name: 'livefluence_migrate',
1456
1474
  description: 'Migrate a Livefluence (V10) customer to Velaro V20. Reads REAL routing rules from the V10 config database and creates V20 canvas workflows (conversation_opened trigger + transferToAI or routeToTeam action nodes). Auto-matches V10 groups to V20 teams/AI configs by name. Use dry_run=true to preview first. All workflows created DISABLED — review conditions in the canvas then enable. Note: V10 expression conditions are NOT auto-converted; add them manually after migration.',
@@ -2537,7 +2555,7 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
2537
2555
  },
2538
2556
  {
2539
2557
  name: 'experience_impact_report',
2540
- description: 'Experience Impact report: shows how staffing and schedule adherence affect customer experience. Returns a 0-100 experience index (adherence 25, service level 30, missed-chat rate 20, CSAT 25), per-interval staffing vs chat demand (scheduled vs actual agents, missed chats, wait time, CSAT), per-agent rows, and plain-language insights. Scoped to the caller site.',
2558
+ description: 'Experience Impact report: shows how staffing and schedule adherence affect customer experience. Returns a 0-100 experience index (adherence 25, service level 30, missed-chat rate 20, CSAT 25), per-interval staffing vs chat demand (scheduled vs actual agents, missed chats, wait time, CSAT), per-agent rows, a bot-vs-human breakdown (bot only, bot-to-human handoff, human only, with wait, missed, CSAT and bot containment rate), and plain-language insights. Scoped to the caller site.',
2541
2559
  inputSchema: {
2542
2560
  type: 'object',
2543
2561
  properties: {
@@ -5796,6 +5814,13 @@ async function handleTool(name, args) {
5796
5814
  return lines.join('\n');
5797
5815
  }
5798
5816
 
5817
+ case 'livefluence_seed_url_rules': {
5818
+ const result = await api('POST', '/DatabaseTool/V10SeedUrlRules', {
5819
+ siteId: args.site_id, aiConfigId: args.ai_config_id, dryRun: !!args.dry_run, rules: args.rules,
5820
+ });
5821
+ return JSON.stringify(result, null, 2);
5822
+ }
5823
+
5799
5824
  case 'livefluence_migrate': {
5800
5825
  const result = await api('POST', '/DatabaseTool/V10Migrate', {
5801
5826
  v10SiteId: args.v10_site_id,
@@ -7229,6 +7254,14 @@ async function handleTool(name, args) {
7229
7254
  ...(r.insights ?? []).map(i => ` [${i.severity}] ${i.text}`),
7230
7255
  `Intervals: ${(r.intervals ?? []).length} | Agents: ${(r.agents ?? []).length}`,
7231
7256
  ];
7257
+ if (r.botVsHuman) {
7258
+ const bh = r.botVsHuman;
7259
+ lines.push(`Bots vs humans (bot containment ${bh.containmentRatePct}%)`);
7260
+ for (const [label, k] of [['Bot only', 'botOnly'], ['Bot to human', 'handoff'], ['Human only', 'humanOnly']]) {
7261
+ const x = bh[k] ?? {};
7262
+ lines.push(` ${label}: ${x.chats} chats | avg wait ${x.avgWaitSec}s | missed ${x.missed} | CSAT ${x.csatResponses ? x.csatAvg : '-'} (${x.csatResponses ?? 0})`);
7263
+ }
7264
+ }
7232
7265
  for (const a of r.agents ?? []) lines.push(` ${a.name}: index ${a.experienceIndex} | adherence ${a.adherencePct}% | CSAT ${a.csatAvg ?? '-'} | handled ${a.handled}`);
7233
7266
  return lines.join('\n');
7234
7267
  }