@velaro/mcp-server 0.6.95 → 0.6.96
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 +137 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velaro/mcp-server",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.96",
|
|
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
|
@@ -1699,6 +1699,79 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
1699
1699
|
},
|
|
1700
1700
|
|
|
1701
1701
|
// ── Livefluence Migration ─────────────────────────────────────────────────
|
|
1702
|
+
{
|
|
1703
|
+
name: 'livefluence_site_workflows_list',
|
|
1704
|
+
description: 'Velaro staff only (superadmin). List ANOTHER v20 site\'s workflows: id, name, enabled, priority, action, team/AI target. Use after livefluence_migrate to see what exists on the destination site (e.g. 100140).',
|
|
1705
|
+
inputSchema: { type: 'object', properties: { site_id: { type: 'number', description: 'V20 site ID to inspect' } }, required: ['site_id'] },
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
name: 'livefluence_site_workflows_set_enabled',
|
|
1709
|
+
description: 'Velaro staff only (superadmin). Enable or disable workflows on a v20 site by ids or names. Idempotent, audit-logged. Enabling REFUSES a workflow whose trigger is not fully converted from v10 unless force_partial=true; pass v10_site_id to check each against its same-named v10 rule. Use dry_run=true first.',
|
|
1710
|
+
inputSchema: {
|
|
1711
|
+
type: 'object',
|
|
1712
|
+
properties: {
|
|
1713
|
+
site_id: { type: 'number', description: 'V20 site ID' },
|
|
1714
|
+
workflow_ids: { type: 'array', items: { type: 'number' } },
|
|
1715
|
+
names: { type: 'array', items: { type: 'string' } },
|
|
1716
|
+
enabled: { type: 'boolean', description: 'true = enable, false = disable' },
|
|
1717
|
+
v10_site_id: { type: 'number', description: 'Verify conversion against this v10 site rules' },
|
|
1718
|
+
force_partial: { type: 'boolean', description: 'Enable even if v10 expression terms were not converted' },
|
|
1719
|
+
dry_run: { type: 'boolean' },
|
|
1720
|
+
},
|
|
1721
|
+
required: ['site_id', 'enabled'],
|
|
1722
|
+
},
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
name: 'livefluence_site_workflow_create',
|
|
1726
|
+
description: 'Velaro staff only (superadmin). Create a workflow on a v20 site from a nodes-blob JSON (object of nodes with a trigger node). Disabled unless enabled=true. Idempotent by name; validates that referenced AI configs/teams exist on the site. Use dry_run=true first.',
|
|
1727
|
+
inputSchema: {
|
|
1728
|
+
type: 'object',
|
|
1729
|
+
properties: {
|
|
1730
|
+
site_id: { type: 'number' },
|
|
1731
|
+
name: { type: 'string' },
|
|
1732
|
+
nodes_blob: { type: 'string', description: 'JSON string of the nodes object' },
|
|
1733
|
+
trigger_type: { type: 'string', description: 'Default conversation_opened' },
|
|
1734
|
+
enabled: { type: 'boolean' },
|
|
1735
|
+
dry_run: { type: 'boolean' },
|
|
1736
|
+
},
|
|
1737
|
+
required: ['site_id', 'name', 'nodes_blob'],
|
|
1738
|
+
},
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
name: 'livefluence_site_workflow_set_action',
|
|
1742
|
+
description: 'Velaro staff only (superadmin). Set a workflow action node on a v20 site to transferToAI {aiConfigId} or routeToTeam {teamId}. Validates the target exists on that site. Idempotent, audit-logged.',
|
|
1743
|
+
inputSchema: {
|
|
1744
|
+
type: 'object',
|
|
1745
|
+
properties: {
|
|
1746
|
+
site_id: { type: 'number' },
|
|
1747
|
+
workflow_id: { type: 'number' },
|
|
1748
|
+
action_type: { type: 'string', enum: ['transferToAI', 'routeToTeam'] },
|
|
1749
|
+
target_id: { type: 'number', description: 'aiConfigId for transferToAI, teamId for routeToTeam' },
|
|
1750
|
+
dry_run: { type: 'boolean' },
|
|
1751
|
+
},
|
|
1752
|
+
required: ['site_id', 'workflow_id', 'action_type', 'target_id'],
|
|
1753
|
+
},
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
name: 'livefluence_site_rules_list',
|
|
1757
|
+
description: 'Velaro staff only (superadmin). List a v20 site Rules (e.g. the use-ai rules seeded by livefluence_seed_url_rules) with enabled state.',
|
|
1758
|
+
inputSchema: { type: 'object', properties: { site_id: { type: 'number' } }, required: ['site_id'] },
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
name: 'livefluence_site_rules_set_enabled',
|
|
1762
|
+
description: 'Velaro staff only (superadmin). Switch v20 Rules off/on without deleting them (reversible), by rule ids or by trigger (e.g. use-ai). Use to turn off the url-rules seeded earlier so they do not double-route with migrated workflows. Idempotent, audit-logged.',
|
|
1763
|
+
inputSchema: {
|
|
1764
|
+
type: 'object',
|
|
1765
|
+
properties: {
|
|
1766
|
+
site_id: { type: 'number' },
|
|
1767
|
+
rule_ids: { type: 'array', items: { type: 'number' } },
|
|
1768
|
+
trigger: { type: 'string', description: 'Every rule with this trigger, e.g. use-ai' },
|
|
1769
|
+
enabled: { type: 'boolean' },
|
|
1770
|
+
dry_run: { type: 'boolean' },
|
|
1771
|
+
},
|
|
1772
|
+
required: ['site_id', 'enabled'],
|
|
1773
|
+
},
|
|
1774
|
+
},
|
|
1702
1775
|
{
|
|
1703
1776
|
name: 'livefluence_seed_url_rules',
|
|
1704
1777
|
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.',
|
|
@@ -2160,6 +2233,20 @@ For multiSelect dynamic options: the variable named in dynamicOptionsVariable mu
|
|
|
2160
2233
|
required: ['jobId'],
|
|
2161
2234
|
},
|
|
2162
2235
|
},
|
|
2236
|
+
{
|
|
2237
|
+
name: 'index_create',
|
|
2238
|
+
description: 'Velaro staff only. Create a named virtual knowledge index on ANY site (e.g. "100140-troubleshooting", "100140-manual-catalog") so uploads/publishes with that indexName work. Idempotent: returns the existing index if the name already exists. Respects the site index quota. Wraps POST KnowledgeSetup/Staff/{siteId}/create-index.',
|
|
2239
|
+
inputSchema: {
|
|
2240
|
+
type: 'object',
|
|
2241
|
+
properties: {
|
|
2242
|
+
siteId: { type: 'number', description: 'Target site ID' },
|
|
2243
|
+
indexName: { type: 'string', description: 'Index name (lowercased, a-z 0-9 and dashes)' },
|
|
2244
|
+
purpose: { type: 'string', enum: ['general', 'troubleshooting', 'catalog'], description: 'Index purpose (default general)' },
|
|
2245
|
+
excludeFromAllSources: { type: 'boolean', description: 'Keep out of the ["*"] all-sources search' },
|
|
2246
|
+
},
|
|
2247
|
+
required: ['siteId', 'indexName'],
|
|
2248
|
+
},
|
|
2249
|
+
},
|
|
2163
2250
|
{
|
|
2164
2251
|
name: 'uploaded_file_reindex',
|
|
2165
2252
|
description: 'Re-index an already-uploaded AI training file from blob storage — use when a file shows 0 chunks (e.g. PDF uploaded before PDF support was added). Reads from blob and re-runs full ingestion. Use index_status after ~30s to verify chunks appear.',
|
|
@@ -7145,6 +7232,47 @@ async function handleTool(name, args) {
|
|
|
7145
7232
|
return JSON.stringify(result, null, 2);
|
|
7146
7233
|
}
|
|
7147
7234
|
|
|
7235
|
+
case 'livefluence_site_workflows_list': {
|
|
7236
|
+
const result = await api('GET', `/DatabaseTool/SiteWorkflows/${args.site_id}`);
|
|
7237
|
+
return JSON.stringify(result, null, 2);
|
|
7238
|
+
}
|
|
7239
|
+
|
|
7240
|
+
case 'livefluence_site_workflows_set_enabled': {
|
|
7241
|
+
const result = await api('POST', '/DatabaseTool/SiteWorkflows/SetEnabled', {
|
|
7242
|
+
siteId: args.site_id, workflowIds: args.workflow_ids ?? [], names: args.names ?? [],
|
|
7243
|
+
enabled: !!args.enabled, dryRun: !!args.dry_run, forcePartial: !!args.force_partial, v10SiteId: args.v10_site_id ?? null,
|
|
7244
|
+
});
|
|
7245
|
+
return JSON.stringify(result, null, 2);
|
|
7246
|
+
}
|
|
7247
|
+
|
|
7248
|
+
case 'livefluence_site_workflow_create': {
|
|
7249
|
+
const result = await api('POST', '/DatabaseTool/SiteWorkflows/Create', {
|
|
7250
|
+
siteId: args.site_id, name: args.name, triggerType: args.trigger_type ?? 'conversation_opened',
|
|
7251
|
+
nodesBlob: typeof args.nodes_blob === 'string' ? args.nodes_blob : JSON.stringify(args.nodes_blob),
|
|
7252
|
+
enabled: !!args.enabled, dryRun: !!args.dry_run,
|
|
7253
|
+
});
|
|
7254
|
+
return JSON.stringify(result, null, 2);
|
|
7255
|
+
}
|
|
7256
|
+
|
|
7257
|
+
case 'livefluence_site_workflow_set_action': {
|
|
7258
|
+
const result = await api('POST', '/DatabaseTool/SiteWorkflows/SetAction', {
|
|
7259
|
+
siteId: args.site_id, workflowId: args.workflow_id, actionType: args.action_type, targetId: args.target_id, dryRun: !!args.dry_run,
|
|
7260
|
+
});
|
|
7261
|
+
return JSON.stringify(result, null, 2);
|
|
7262
|
+
}
|
|
7263
|
+
|
|
7264
|
+
case 'livefluence_site_rules_list': {
|
|
7265
|
+
const result = await api('GET', `/DatabaseTool/SiteRules/${args.site_id}`);
|
|
7266
|
+
return JSON.stringify(result, null, 2);
|
|
7267
|
+
}
|
|
7268
|
+
|
|
7269
|
+
case 'livefluence_site_rules_set_enabled': {
|
|
7270
|
+
const result = await api('POST', '/DatabaseTool/SiteRules/SetEnabled', {
|
|
7271
|
+
siteId: args.site_id, ruleIds: args.rule_ids ?? [], trigger: args.trigger ?? null, enabled: !!args.enabled, dryRun: !!args.dry_run,
|
|
7272
|
+
});
|
|
7273
|
+
return JSON.stringify(result, null, 2);
|
|
7274
|
+
}
|
|
7275
|
+
|
|
7148
7276
|
case 'livefluence_seed_url_rules': {
|
|
7149
7277
|
const result = await api('POST', '/DatabaseTool/V10SeedUrlRules', {
|
|
7150
7278
|
siteId: args.site_id, aiConfigId: args.ai_config_id, dryRun: !!args.dry_run, rules: args.rules,
|
|
@@ -7626,6 +7754,15 @@ async function handleTool(name, args) {
|
|
|
7626
7754
|
return lines.join('\n');
|
|
7627
7755
|
}
|
|
7628
7756
|
|
|
7757
|
+
case 'index_create': {
|
|
7758
|
+
if (!args.siteId || !args.indexName) return 'siteId and indexName are required.';
|
|
7759
|
+
const body = { indexName: args.indexName, purpose: args.purpose ?? 'general' };
|
|
7760
|
+
if (args.excludeFromAllSources !== undefined) body.excludeFromAllSources = args.excludeFromAllSources;
|
|
7761
|
+
const idx = await messagingRequest('POST', `/KnowledgeSetup/Staff/${encodeURIComponent(args.siteId)}/create-index`, body);
|
|
7762
|
+
if (idx?.error) return `Create index error: ${idx.error}`;
|
|
7763
|
+
return `Index ready on site ${args.siteId}: ${idx?.name} (id=${idx?.id}, purpose=${idx?.purpose}, excludeFromAllSources=${!!idx?.excludeFromAllSources}).`;
|
|
7764
|
+
}
|
|
7765
|
+
|
|
7629
7766
|
case 'uploaded_files_list': {
|
|
7630
7767
|
const files = await messagingRequest('GET', '/uploadedFiles/list/AI');
|
|
7631
7768
|
if (!Array.isArray(files) || !files.length) return 'No AI training files uploaded for this site.';
|