conduyt-mcp 4.18.0 → 4.19.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/client.js CHANGED
@@ -150,6 +150,14 @@ export class ConduytClient {
150
150
  const json = JSON.parse(text);
151
151
  if (json?.error)
152
152
  msg = json.error;
153
+ // Structured error details (e.g. STAGE_REQUIREMENTS carries
154
+ // lostReasonOptions) must reach the agent, or a "must be one of the
155
+ // configured options" error is unactionable. Bounded so a pathological
156
+ // body can't bloat the message.
157
+ const details = Object.fromEntries(Object.entries(json ?? {}).filter(([k]) => k !== "error"));
158
+ if (Object.keys(details).length > 0) {
159
+ msg = `${msg} ${JSON.stringify(details).slice(0, 1000)}`;
160
+ }
153
161
  }
154
162
  catch {
155
163
  if (text)
@@ -104,6 +104,7 @@ export function registerDealTools(server, client) {
104
104
  expectedCloseDate: z.string().optional().describe("Expected close date (ISO 8601)"),
105
105
  assignedTo: z.string().optional().describe("Reassign to user (owner) UUID"),
106
106
  source: z.string().trim().min(1).max(500).nullable().optional().describe("Attribution source for THIS deal (the trigger that produced it) — distinct from the contact's first-touch source. Pass null to clear it; a blank string is rejected. 1-500 chars."),
107
+ lostReason: z.string().optional().describe("Reason for a lost/disqualified deal. Some stages REQUIRE this on entry (the move fails with code STAGE_REQUIREMENTS listing lostReasonOptions when the stage has a configured dropdown — resend with one of those exact values)."),
107
108
  customFields: z.record(z.any()).optional().describe("Structured custom-field values to merge, keyed by field key"),
108
109
  }, async ({ id, ...updates }) => {
109
110
  const result = await client.patch(`/api/v1/deals/${id}`, updates);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conduyt-mcp",
3
- "version": "4.18.0",
3
+ "version": "4.19.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",