conduyt-mcp 4.53.0 → 4.55.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.
@@ -35,6 +35,14 @@ const masterStatusName = z
35
35
  .min(1)
36
36
  .max(40)
37
37
  .regex(/^[a-z0-9][a-z0-9 _-]*$/i, "letters, numbers, spaces, - and _ only");
38
+ /** settings.callDispositions.statusMap as stored (string → string), anything malformed dropped */
39
+ function dispositionStatusMapOf(raw) {
40
+ const cd = raw.callDispositions;
41
+ const map = cd && typeof cd === "object" && !Array.isArray(cd) ? cd.statusMap : undefined;
42
+ if (!map || typeof map !== "object" || Array.isArray(map))
43
+ return {};
44
+ return Object.fromEntries(Object.entries(map).filter((e) => typeof e[1] === "string"));
45
+ }
38
46
  export function registerLifecycleTools(server, client) {
39
47
  server.tool("conduyt_get_lifecycle_settings", "Read the account's Lifecycle configuration (v2 + v3), shaped for read-before-write: dealWorkingMode and lostPropagation say how the tenant works leads and whether lost propagation is live; masterStatuses.effective is the full list a contact's masterStatus may take (the five built-in defaults plus the account's customs — the raw settings key stores only the customs); intakeDeals is the automatic deal-on-intake config, or null with an intakeDealsNote explaining that null can mean either not-configured or not-visible-to-your-key (the setting is admin-visible; member-tier responses omit it).", {}, async () => {
40
48
  const result = await client.get("/api/v1/settings");
@@ -67,6 +75,9 @@ export function registerLifecycleTools(server, client) {
67
75
  customs,
68
76
  effective: [...DEFAULT_MASTER_STATUSES, ...customs.filter((c) => !DEFAULT_MASTER_STATUSES.includes(c.toLowerCase()))],
69
77
  },
78
+ // (09-15) disposition → lead status: when a call outcome is picked (by a rep or by AI) the contact's masterStatus becomes the
79
+ // mapped value; keys are disposition values, values are master statuses (defaults or customs); {} = no mappings
80
+ dispositionStatusMap: dispositionStatusMapOf(raw),
70
81
  intakeDeals: intakeDeals ?? null,
71
82
  intakeDealsNote: intakeDeals === null
72
83
  ? "null = not configured, OR your key's role cannot read this admin-visible setting; configure/verify with an admin-tier key"
@@ -89,6 +100,28 @@ export function registerLifecycleTools(server, client) {
89
100
  server.tool("conduyt_update_lost_propagation", "Turn LOST propagation on or off for this tenant (Lifecycle v3 P2). When on: a contact's masterStatus flips to 'lost' within a minute of its LAST open deal card closing lost (a per-minute resolver applies the rule on the committed state) (carrying that card's lostReason into masterStatusReason), a new open card on a lost/abandoned/disqualified contact reopens it, and a won contact never flips. Forward-only from the first enable (enabledAt is stamped server-side): existing history never flips by itself. A terminal masterStatus silences every drip, sequence and playbook for that contact, so read the nightly shadow report first (job run 'lost-propagation-shadow': contacts that would flip, their reasons, and the automations that would go quiet) before enabling.", {
90
101
  enabled: z.boolean().describe("true = flips happen live from now on; false = shadow report only"),
91
102
  }, async ({ enabled }) => patchGeneralSettings(client, { lostPropagation: { enabled } }));
103
+ server.tool("conduyt_update_disposition_status_map", "Set which lead status each call disposition sets when it is picked (by a rep after a call or by the AI auto-disposition): e.g. {\"not-interested\": \"lost\", \"sale-closed\": \"won\", \"interested\": \"working\"}. Keys are disposition values (built-ins like interested, not-interested, callback-requested, appointment-set, sale-closed, dnc-requested, voicemail, no-answer, wrong-number, or the account's custom outcomes); values are master statuses (open, won, lost, abandoned, disqualified, or the account's customs from conduyt_update_master_statuses). The map REPLACES the stored map (send the full map; {} clears every mapping); the rest of the account's disposition settings are untouched. An unknown disposition or status is a 422. A lead a deal has WON is never moved by an outcome; mapping to a terminal status (won/lost/abandoned/disqualified) closes the lead and stops its automations. Read the current map with conduyt_get_lifecycle_settings (dispositionStatusMap).", {
104
+ statusMap: z
105
+ .record(z.string().trim().min(1).max(40), z.string().trim().min(1).max(40))
106
+ .describe("Disposition value → master status, the complete map"),
107
+ }, async ({ statusMap }) => patchGeneralSettings(client, { callDispositions: { statusMap } }));
108
+ server.tool("conduyt_get_agent_statuses", "Read the account's curated dialer agent statuses (2026-09-15): Available, Break, Lunch, Meeting, Training, Offline. Each carries a FIXED basis the dialer runs on (available = takes inbound calls and Smart Dialing hand-outs; break = signed in, not ringable; offline = signed out), the tenant's label, and whether the tenant hid it from the softphone menu. Admins rename or hide with conduyt_update_agent_statuses; Available and Offline can never be hidden. Reports bucket by basis; heartbeats and status logs also carry the chosen code (statusCode).", {}, async () => formatResult(await client.get("/api/v1/dialer/agent-statuses")));
109
+ server.tool("conduyt_update_agent_statuses", "Rename or hide the curated dialer statuses (settings.agentStatuses). labels: code → the label reps see (1–24 chars; omit a code or pass an empty string to restore the default); hidden: the codes removed from the softphone menu (available and offline are refused with a 422; a rep already on a hidden status keeps it until they change). Codes: available, break, lunch, meeting, training, offline. Fields you omit keep their stored value (the tool reads the current settings first); two visible statuses cannot share a label (422). Requires settings:edit.", {
110
+ labels: z.record(z.string().trim().min(1).max(24), z.string().trim().max(24)).optional().describe("code → label; '' restores the default label for that code"),
111
+ hidden: z.array(z.string().trim().min(1).max(24)).max(6).optional().describe("the complete list of hidden codes (replaces the stored list when given)"),
112
+ }, async ({ labels, hidden }) => {
113
+ const current = (await client.get("/api/v1/settings"));
114
+ const stored = current?.data?.agentStatuses ?? {};
115
+ const nextLabels = { ...(stored.labels ?? {}) };
116
+ for (const [code, label] of Object.entries(labels ?? {})) {
117
+ if (label.trim())
118
+ nextLabels[code] = label.trim();
119
+ else
120
+ delete nextLabels[code];
121
+ }
122
+ const nextHidden = hidden ?? stored.hidden ?? [];
123
+ return patchGeneralSettings(client, { agentStatuses: { labels: nextLabels, hidden: nextHidden } });
124
+ });
92
125
  server.tool("conduyt_update_master_statuses", "Set the account's custom lead lifecycle statuses. The five defaults (open, won, lost, abandoned, disqualified) always exist and cannot be removed; this REPLACES the custom list on top of them (max 20 names, 1-40 chars each, letters/numbers/spaces/-/_ only). Terminal statuses stop all outbound automation for a contact. Requires settings:edit.", {
93
126
  statuses: z
94
127
  .array(masterStatusName)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.53.0",
3
+ "version": "4.55.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,9 +1,9 @@
1
1
  {
2
- "generatedAt": "2026-09-14T20:41:35.427Z",
3
- "toolCount": 260,
4
- "totalEndpoints": 974,
2
+ "generatedAt": "2026-09-15T15:01:31.617Z",
3
+ "toolCount": 263,
4
+ "totalEndpoints": 975,
5
5
  "counts": {
6
- "covered": 245,
6
+ "covered": 246,
7
7
  "excluded": 288,
8
8
  "planned": 441,
9
9
  "uncategorized": 0
@@ -2081,6 +2081,12 @@
2081
2081
  "status": "planned",
2082
2082
  "reason": "deal subroutes beyond core CRUD (history, files, links)"
2083
2083
  },
2084
+ "GET /api/v1/dialer/agent-statuses": {
2085
+ "status": "covered",
2086
+ "tools": [
2087
+ "conduyt_get_agent_statuses"
2088
+ ]
2089
+ },
2084
2090
  "GET /api/v1/dialer/agents-status": {
2085
2091
  "status": "excluded",
2086
2092
  "reason": "realtime browser dialer (WebRTC tokens, live call control) — needs a live audio session"
@@ -3582,7 +3588,8 @@
3582
3588
  "tools": [
3583
3589
  "conduyt_get_contact_table_defaults",
3584
3590
  "conduyt_set_contact_table_defaults",
3585
- "conduyt_get_lifecycle_settings"
3591
+ "conduyt_get_lifecycle_settings",
3592
+ "conduyt_update_agent_statuses"
3586
3593
  ]
3587
3594
  },
3588
3595
  "PATCH /api/v1/settings": {