conduyt-mcp 4.25.0 → 4.27.0
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/index.js +2 -0
- package/dist/tools/ai-extended.js +13 -0
- package/dist/tools/smart-views.d.ts +3 -0
- package/dist/tools/smart-views.js +69 -0
- package/package.json +1 -1
- package/scripts/coverage-matrix.json +33 -11
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ import { registerDashboardTools } from "./tools/dashboard.js";
|
|
|
35
35
|
import { registerAiExtendedTools } from "./tools/ai-extended.js";
|
|
36
36
|
import { registerWorkflowSandboxTools } from "./tools/workflow-sandbox.js";
|
|
37
37
|
import { registerPrivacyTools } from "./tools/privacy.js";
|
|
38
|
+
import { registerSmartViewTools } from "./tools/smart-views.js";
|
|
38
39
|
import { registerAccountExportTools } from "./tools/account-exports.js";
|
|
39
40
|
import { registerLifecycleTools } from "./tools/lifecycle.js";
|
|
40
41
|
import { registerReplyCaptureTools } from "./tools/reply-capture.js";
|
|
@@ -97,6 +98,7 @@ registerDashboardTools(server, client);
|
|
|
97
98
|
registerAiExtendedTools(server, client);
|
|
98
99
|
registerWorkflowSandboxTools(server, client);
|
|
99
100
|
registerPrivacyTools(server, client);
|
|
101
|
+
registerSmartViewTools(server, client);
|
|
100
102
|
registerAccountExportTools(server, client);
|
|
101
103
|
registerLifecycleTools(server, client);
|
|
102
104
|
registerReplyCaptureTools(server, client);
|
|
@@ -124,6 +124,19 @@ export function registerAiExtendedTools(server, client) {
|
|
|
124
124
|
const result = await client.post(`/api/v1/dialer/call/${callId}/ai-disposition`, {});
|
|
125
125
|
return formatResult(result);
|
|
126
126
|
});
|
|
127
|
+
server.tool("conduyt_ai_agenda", "The copilot's Today agenda for a user: what is on their calendar today (tenant timezone), callbacks they promised, messages waiting for a reply, overdue and due-today tasks, untouched new leads, recent-call follow-ups and deals going quiet — every visibility and opt-out rule applied — with a short brief on top (composed by the account's AI engine when available, otherwise a deterministic sentence built from the counts). Read-only.", {
|
|
128
|
+
userId: z.string().optional().describe("User UUID to build the agenda for (admins/owners only; defaults to the authenticated user)"),
|
|
129
|
+
narrative: z.boolean().optional().describe("false = skip the AI-composed brief and return the deterministic one (spends no AI budget)"),
|
|
130
|
+
}, async ({ userId, narrative }) => {
|
|
131
|
+
const params = new URLSearchParams();
|
|
132
|
+
if (userId)
|
|
133
|
+
params.set("userId", userId);
|
|
134
|
+
if (narrative === false)
|
|
135
|
+
params.set("narrative", "0");
|
|
136
|
+
const qs = params.toString();
|
|
137
|
+
const result = await client.get(`/api/v1/ai/agenda${qs ? `?${qs}` : ""}`);
|
|
138
|
+
return formatResult(result);
|
|
139
|
+
});
|
|
127
140
|
server.tool("conduyt_ai_daily_brief", "AI-generated daily brief for the current user. Summarizes today's priorities — deals needing attention, overdue tasks, hot leads, and recommended focus.", {}, async () => {
|
|
128
141
|
const result = await client.get("/api/v1/ai/daily-brief");
|
|
129
142
|
return formatResult(result);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { formatResult } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* Smart Views + Smart Dialing (#53). Smart Views are the admin-curated
|
|
5
|
+
* contact buckets in the sidebar; the dial-enabled ones are the Smart
|
|
6
|
+
* Dialing PRIORITIES: when an agent starts Smart Dialing the CRM feeds one
|
|
7
|
+
* lead at a time from priority 1 down (sidebar order = dial order), skipping
|
|
8
|
+
* leads in cooldown, over a cap, already connected, or on DNC. One call at a
|
|
9
|
+
* time with the agent on the line — never predictive. Dialing settings are
|
|
10
|
+
* admin-only in the API (owner/admin API keys); reads work for any key with
|
|
11
|
+
* the 'contacts' scope.
|
|
12
|
+
*/
|
|
13
|
+
const scheduleStepSchema = z.object({
|
|
14
|
+
attemptNumber: z.number().int().min(1).max(20).describe("1 = the first call, 2 = the first retry, …"),
|
|
15
|
+
delayMinutes: z.number().int().min(0).describe("Minutes to wait after the previous attempt before this one (0 = immediately)"),
|
|
16
|
+
});
|
|
17
|
+
export function registerSmartViewTools(server, client) {
|
|
18
|
+
server.tool("conduyt_list_smart_views", "List the account's Smart Views in sidebar order with their lead counts and Smart Dialing settings (dialEnabled = it is a dialing priority; sortPosition = its rank; maxDialAttempts, maxDialAttemptsPerDay, dialCooldownMinutes, dialSchedule). Use it to answer \"what does the team dial first?\" or before changing a priority.", {}, async () => {
|
|
19
|
+
const result = await client.get("/api/v1/smart-views");
|
|
20
|
+
return formatResult(result);
|
|
21
|
+
});
|
|
22
|
+
server.tool("conduyt_update_smart_view_dialing", "Change one Smart View's Smart Dialing settings (admin key): make it a priority or not, the lifetime attempt cap, the per-day cap (null = no daily cap, counted in the account timezone), the cooldown between calls to the same lead, and the retry schedule. Only the fields you pass change. Use conduyt_reorder_smart_views to change WHICH priority it is.", {
|
|
23
|
+
id: z.string().uuid().describe("Smart View UUID (from conduyt_list_smart_views)"),
|
|
24
|
+
dialEnabled: z.boolean().optional().describe("true = this view is a Smart Dialing priority; false = agents no longer dial it"),
|
|
25
|
+
maxDialAttempts: z.number().int().min(1).max(20).optional().describe("Stop after N calls to a lead, ever (1–20)"),
|
|
26
|
+
maxDialAttemptsPerDay: z
|
|
27
|
+
.number()
|
|
28
|
+
.int()
|
|
29
|
+
.min(1)
|
|
30
|
+
.max(20)
|
|
31
|
+
.nullable()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Most calls to one lead in a single account-local day (1–20); null removes the daily cap"),
|
|
34
|
+
dialCooldownMinutes: z.number().int().min(0).max(10080).optional().describe("Minutes to wait between calls to the same lead"),
|
|
35
|
+
dialSchedule: z
|
|
36
|
+
.array(scheduleStepSchema)
|
|
37
|
+
.min(1)
|
|
38
|
+
.max(20)
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('Retry schedule, e.g. [{"attemptNumber":1,"delayMinutes":0},{"attemptNumber":2,"delayMinutes":60},{"attemptNumber":3,"delayMinutes":1440}]'),
|
|
41
|
+
}, async ({ id, dialEnabled, maxDialAttempts, maxDialAttemptsPerDay, dialCooldownMinutes, dialSchedule }) => {
|
|
42
|
+
// Inline body (undefined fields drop out in JSON) — keeps the shape
|
|
43
|
+
// readable by the contract verifier's static parser.
|
|
44
|
+
const result = await client.patch(`/api/v1/smart-views/${encodeURIComponent(id)}`, {
|
|
45
|
+
dialEnabled,
|
|
46
|
+
maxDialAttempts,
|
|
47
|
+
maxDialAttemptsPerDay,
|
|
48
|
+
dialCooldownMinutes,
|
|
49
|
+
dialSchedule,
|
|
50
|
+
});
|
|
51
|
+
return formatResult(result);
|
|
52
|
+
});
|
|
53
|
+
server.tool("conduyt_get_smart_dialing_order", "The Smart Dialing PRIORITIES, uncapped: every dial-enabled, account-wide contact Smart View in dial order (exactly the set the queue walks; personal views and deal views are never priorities) plus the candidates that could become one. Prefer this over conduyt_list_smart_views (capped at 100) before changing the priority order.", {}, async () => {
|
|
54
|
+
const result = await client.get("/api/v1/smart-views/dial-order");
|
|
55
|
+
return formatResult(result);
|
|
56
|
+
});
|
|
57
|
+
server.tool("conduyt_set_smart_dialing_order", "Set the Smart Dialing PRIORITY order (admin key): pass the dial-enabled Smart View ids in the wanted order — every dial-enabled view exactly once, nothing else. The server rebuilds the account-wide view order so views that are not priorities keep their slots. Prefer this over conduyt_reorder_smart_views for dialing.", {
|
|
58
|
+
order: z.array(z.string().uuid()).max(2000).describe("Every dial-enabled Smart View UUID (from conduyt_get_smart_dialing_order), first = dialed first"),
|
|
59
|
+
}, async ({ order }) => {
|
|
60
|
+
const result = await client.patch("/api/v1/smart-views/dial-order", { order });
|
|
61
|
+
return formatResult(result);
|
|
62
|
+
});
|
|
63
|
+
server.tool("conduyt_reorder_smart_views", "Set the SIDEBAR order of Smart Views (admin key). Pass EVERY view id from conduyt_list_smart_views in the wanted order (max 200, no duplicates) — views you leave out keep a stale position, so always send the full list. For the dialing priority use conduyt_set_smart_dialing_order, which only needs the dial-enabled ids.", {
|
|
64
|
+
order: z.array(z.string().uuid()).min(1).max(200).describe("Every Smart View UUID, first = highest priority"),
|
|
65
|
+
}, async ({ order }) => {
|
|
66
|
+
const result = await client.patch("/api/v1/smart-views/reorder", { order });
|
|
67
|
+
return formatResult(result);
|
|
68
|
+
});
|
|
69
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-09-
|
|
3
|
-
"toolCount":
|
|
4
|
-
"totalEndpoints":
|
|
2
|
+
"generatedAt": "2026-09-06T04:07:11.872Z",
|
|
3
|
+
"toolCount": 210,
|
|
4
|
+
"totalEndpoints": 912,
|
|
5
5
|
"counts": {
|
|
6
|
-
"covered":
|
|
6
|
+
"covered": 194,
|
|
7
7
|
"excluded": 274,
|
|
8
|
-
"planned":
|
|
8
|
+
"planned": 444,
|
|
9
9
|
"uncategorized": 0
|
|
10
10
|
},
|
|
11
11
|
"matrix": {
|
|
@@ -309,6 +309,10 @@
|
|
|
309
309
|
"status": "excluded",
|
|
310
310
|
"reason": "super-admin platform operations (Conduyt staff only)"
|
|
311
311
|
},
|
|
312
|
+
"GET /api/v1/ai/agenda": {
|
|
313
|
+
"status": "planned",
|
|
314
|
+
"reason": "AI surfaces beyond chat/insights/tasks tools"
|
|
315
|
+
},
|
|
312
316
|
"POST /api/v1/ai/chat": {
|
|
313
317
|
"status": "covered",
|
|
314
318
|
"tools": [
|
|
@@ -3524,24 +3528,42 @@
|
|
|
3524
3528
|
"reason": "smart list management"
|
|
3525
3529
|
},
|
|
3526
3530
|
"GET /api/v1/smart-views": {
|
|
3527
|
-
"status": "
|
|
3528
|
-
"
|
|
3531
|
+
"status": "covered",
|
|
3532
|
+
"tools": [
|
|
3533
|
+
"conduyt_list_smart_views"
|
|
3534
|
+
]
|
|
3529
3535
|
},
|
|
3530
3536
|
"POST /api/v1/smart-views": {
|
|
3531
3537
|
"status": "planned",
|
|
3532
3538
|
"reason": "smart view management beyond summaries"
|
|
3533
3539
|
},
|
|
3534
3540
|
"PATCH /api/v1/smart-views/:id": {
|
|
3535
|
-
"status": "
|
|
3536
|
-
"
|
|
3541
|
+
"status": "covered",
|
|
3542
|
+
"tools": [
|
|
3543
|
+
"conduyt_update_smart_view_dialing"
|
|
3544
|
+
]
|
|
3537
3545
|
},
|
|
3538
3546
|
"DELETE /api/v1/smart-views/:id": {
|
|
3539
3547
|
"status": "planned",
|
|
3540
3548
|
"reason": "smart view management beyond summaries"
|
|
3541
3549
|
},
|
|
3550
|
+
"GET /api/v1/smart-views/dial-order": {
|
|
3551
|
+
"status": "covered",
|
|
3552
|
+
"tools": [
|
|
3553
|
+
"conduyt_get_smart_dialing_order"
|
|
3554
|
+
]
|
|
3555
|
+
},
|
|
3556
|
+
"PATCH /api/v1/smart-views/dial-order": {
|
|
3557
|
+
"status": "covered",
|
|
3558
|
+
"tools": [
|
|
3559
|
+
"conduyt_set_smart_dialing_order"
|
|
3560
|
+
]
|
|
3561
|
+
},
|
|
3542
3562
|
"PATCH /api/v1/smart-views/reorder": {
|
|
3543
|
-
"status": "
|
|
3544
|
-
"
|
|
3563
|
+
"status": "covered",
|
|
3564
|
+
"tools": [
|
|
3565
|
+
"conduyt_reorder_smart_views"
|
|
3566
|
+
]
|
|
3545
3567
|
},
|
|
3546
3568
|
"GET /api/v1/sms-providers": {
|
|
3547
3569
|
"status": "planned",
|