conduyt-mcp 4.26.0 → 4.28.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.
@@ -124,6 +124,37 @@ 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
+ });
140
+ server.tool("conduyt_ai_plan_actions", "Copilot actions — PLAN. Turn a natural-language request ('call Luis back tomorrow at 10', 'note on Ana: prefers texts', 'move the Roof deal to Proposal sent', 'draft a text to Ana about the quote') into a preview of concrete CRM actions resolved against records the caller can see (tasks, callbacks, notes, appointments, existing tags, deal stage moves, SMS/email DRAFTS). Nothing is written by this call. Returns the resolved actions (ready or with an issue such as an ambiguous name) and a single-use confirmationToken bound to that exact set; pass the actions array back UNMODIFIED with the token to conduyt_ai_execute_actions to apply. Drafts are never sent by the system.", {
141
+ message: z.string().min(1).max(2000).describe("What the rep wants done, in plain language"),
142
+ contactId: z.string().optional().describe("Contact UUID the request refers to when it says 'this contact' (must be visible to the caller)"),
143
+ dealId: z.string().optional().describe("Deal UUID the request refers to when it says 'this deal'"),
144
+ }, async ({ message, contactId, dealId }) => {
145
+ const section = contactId ? { type: "contact", id: contactId } : dealId ? { type: "deal", id: dealId } : undefined;
146
+ const result = await client.post("/api/v1/ai/actions", { message, ...(section ? { section } : {}) });
147
+ return formatResult(result);
148
+ });
149
+ server.tool("conduyt_ai_execute_actions", "Copilot actions — APPLY. Executes the ready actions from a conduyt_ai_plan_actions result through the same routes the UI uses (permissions, tenant scope, visibility, audit all apply). Send the plan's `actions` array back exactly as received plus its confirmationToken (single-use, expires in 5 minutes, bound to the caller and the exact set — any edit is refused). Optionally narrow with selectedIds. Returns a per-action result; drafts are not sent. Sending the same token again REPLAYS the run (nothing runs twice; the response says replayed:true). A result with inFlight:true was started but never confirmed — inspect the record, then resume it explicitly with resumeIds.", {
150
+ actions: z.array(z.record(z.unknown())).min(1).max(8).describe("The `actions` array from the plan, unmodified"),
151
+ confirmationToken: z.string().describe("The plan's confirmationToken"),
152
+ selectedIds: z.array(z.string()).optional().describe("First apply only: apply just these action ids (default: every ready action). A later call with the same token must resend the same selection — a run's action set cannot be widened."),
153
+ resumeIds: z.array(z.string()).optional().describe("Re-run actions the previous response reported with inFlight:true (started but never confirmed, e.g. the connection dropped mid-apply). Check the record first — the write may already exist — and only after the result's resumableAt (the earlier attempt can no longer be running); earlier resumes are refused. Later actions wait behind an in-flight one (plan order). Never re-run automatically."),
154
+ }, async ({ actions, confirmationToken, selectedIds, resumeIds }) => {
155
+ const result = await client.post("/api/v1/ai/actions/execute", { actions, confirmationToken, ...(selectedIds ? { selectedIds } : {}), ...(resumeIds ? { resumeIds } : {}) });
156
+ return formatResult(result);
157
+ });
127
158
  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
159
  const result = await client.get("/api/v1/ai/daily-brief");
129
160
  return formatResult(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.26.0",
3
+ "version": "4.28.0",
4
4
  "description": "MCP server for Conduyt CRM — expose CRM operations as AI-accessible tools",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,11 +1,11 @@
1
1
  {
2
- "generatedAt": "2026-09-06T00:25:42.269Z",
3
- "toolCount": 209,
4
- "totalEndpoints": 911,
2
+ "generatedAt": "2026-09-06T05:48:44.694Z",
3
+ "toolCount": 212,
4
+ "totalEndpoints": 915,
5
5
  "counts": {
6
- "covered": 194,
6
+ "covered": 196,
7
7
  "excluded": 274,
8
- "planned": 443,
8
+ "planned": 445,
9
9
  "uncategorized": 0
10
10
  },
11
11
  "matrix": {
@@ -309,6 +309,26 @@
309
309
  "status": "excluded",
310
310
  "reason": "super-admin platform operations (Conduyt staff only)"
311
311
  },
312
+ "POST /api/v1/ai/actions": {
313
+ "status": "covered",
314
+ "tools": [
315
+ "conduyt_ai_plan_actions"
316
+ ]
317
+ },
318
+ "POST /api/v1/ai/actions/execute": {
319
+ "status": "covered",
320
+ "tools": [
321
+ "conduyt_ai_execute_actions"
322
+ ]
323
+ },
324
+ "GET /api/v1/ai/actions/runs/:id": {
325
+ "status": "planned",
326
+ "reason": "AI surfaces beyond chat/insights/tasks tools"
327
+ },
328
+ "GET /api/v1/ai/agenda": {
329
+ "status": "planned",
330
+ "reason": "AI surfaces beyond chat/insights/tasks tools"
331
+ },
312
332
  "POST /api/v1/ai/chat": {
313
333
  "status": "covered",
314
334
  "tools": [