conduyt-mcp 4.105.20 → 4.105.21
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.
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ConduytApiError, formatResult } from "../client.js";
|
|
3
|
+
// (parity1292, batch30 #1292 Ship 1) Secure custom fields: the flag, its reveal set, and the codes. There is NO reveal tool: the reveal
|
|
4
|
+
// routes (POST /{contacts|deals|companies}/{id}/custom-fields/{key}/reveal) refuse an API key (403 reveal_requires_session), and this
|
|
5
|
+
// server always signs in with one.
|
|
6
|
+
const SECURE_NOTE = "Secure fields (isSecure): every read, export and outbound payload answers a Secure value masked as the string \u2022\u2022\u2022\u2022 (with a secureFields entry beside it); this server passes the mask through untouched and never unmasks it. Only a signed-in user in the definition's reveal set can reveal one value at a time (audited, session only): an API key NEVER reveals (403 reveal_requires_session), so there is no reveal tool here. isSecure true answers 400 secure_fields_not_enabled until Secure fields are enabled for the app.";
|
|
7
|
+
const revealRoles = z.array(z.string().min(1).max(40)).max(10).optional().describe("Roles whose members may reveal a Secure value (max 10, 1 to 40 characters each; a super admin always; an API key never)");
|
|
8
|
+
const revealGroupIds = z.array(z.string().uuid()).max(20).optional().describe("Team group UUIDs whose members may reveal a Secure value (max 20)");
|
|
3
9
|
export function registerCustomFieldTools(server, client) {
|
|
4
10
|
server.tool("conduyt_list_custom_fields", "List custom field definitions. Filter by entity type (contact, deal, or company) to see available fields.", {
|
|
5
11
|
entityType: z.enum(["contact", "deal", "company"]).optional().describe("Filter by entity type"),
|
|
@@ -16,7 +22,7 @@ export function registerCustomFieldTools(server, client) {
|
|
|
16
22
|
const result = await client.get(`/api/v1/custom-fields?${params}`);
|
|
17
23
|
return formatResult(result);
|
|
18
24
|
});
|
|
19
|
-
server.tool("conduyt_create_custom_field", "Create a new custom field definition for contacts, deals, or companies. Field types: text, number, date, select, multiselect, boolean.", {
|
|
25
|
+
server.tool("conduyt_create_custom_field", "Create a new custom field definition for contacts, deals, or companies. Field types: text, number, date, select, multiselect, boolean. " + SECURE_NOTE, {
|
|
20
26
|
entityType: z.enum(["contact", "deal", "company"]).describe("Entity type this field applies to"),
|
|
21
27
|
fieldKey: z.string().describe("Unique field key (alphanumeric + underscores, e.g. 'lead_score')"),
|
|
22
28
|
label: z.string().describe("Human-readable label (e.g. 'Lead Score')"),
|
|
@@ -25,21 +31,28 @@ export function registerCustomFieldTools(server, client) {
|
|
|
25
31
|
options: z.any().optional().describe("Options for select/multiselect fields (array of strings)"),
|
|
26
32
|
isRequired: z.boolean().optional().describe("Whether this field is required"),
|
|
27
33
|
sortOrder: z.number().optional().describe("Display order"),
|
|
34
|
+
isSecure: z.boolean().optional().describe("Make this a Secure field (values masked everywhere; 400 secure_fields_not_enabled until enabled)"),
|
|
35
|
+
revealRoles,
|
|
36
|
+
revealGroupIds,
|
|
28
37
|
}, async (params) => {
|
|
29
38
|
const result = await client.post("/api/v1/custom-fields", params);
|
|
30
39
|
return formatResult(result);
|
|
31
40
|
});
|
|
32
|
-
server.tool("conduyt_update_custom_field", "Update a custom field's label, options, or
|
|
41
|
+
server.tool("conduyt_update_custom_field", "Update a custom field's label, options, required status, Secure flag or reveal set. Cannot change the field key or entity type. Turning Secure OFF (isSecure false) makes every stored value visible and needs confirmUnsecure true, else 409 secure_unsecure_unconfirmed. " + SECURE_NOTE, {
|
|
33
42
|
id: z.string().describe("Custom field UUID"),
|
|
34
43
|
label: z.string().optional().describe("Updated label"),
|
|
35
44
|
options: z.any().optional().describe("Updated options for select/multiselect"),
|
|
36
45
|
isRequired: z.boolean().optional().describe("Updated required status"),
|
|
37
46
|
sortOrder: z.number().optional().describe("Updated display order"),
|
|
47
|
+
isSecure: z.boolean().optional().describe("Turn Secure on or off (off needs confirmUnsecure true)"),
|
|
48
|
+
revealRoles,
|
|
49
|
+
revealGroupIds,
|
|
50
|
+
confirmUnsecure: z.boolean().optional().describe("Required true with isSecure false: confirms every stored value becomes visible"),
|
|
38
51
|
}, async ({ id, ...updates }) => {
|
|
39
52
|
const result = await client.patch(`/api/v1/custom-fields/${id}`, updates);
|
|
40
53
|
return formatResult(result);
|
|
41
54
|
});
|
|
42
|
-
server.tool("conduyt_delete_custom_field", "Delete a custom field definition. Removes the field from all entities.", {
|
|
55
|
+
server.tool("conduyt_delete_custom_field", "Delete a custom field definition. Removes the field from all entities. A Secure field cannot be deleted: 409 secure_field_delete_refused (turn Secure off first with conduyt_update_custom_field isSecure false + confirmUnsecure true, then delete).", {
|
|
43
56
|
id: z.string().describe("Custom field UUID"),
|
|
44
57
|
}, async ({ id }) => {
|
|
45
58
|
const result = await client.del(`/api/v1/custom-fields/${id}`);
|
|
@@ -12,15 +12,15 @@ const PUSH_CODES = "403 deal_not_editable / push_not_permitted; 404; 409 partner
|
|
|
12
12
|
const keyed = (min, max) => z.record(z.string().min(1).max(KEY_MAX), z.unknown()).refine((o) => Object.keys(o).length >= min && Object.keys(o).length <= max, { message: `must hold ${min} to ${max} keys` });
|
|
13
13
|
export function registerDealProfileTools(server, client) {
|
|
14
14
|
const dealId = z.string().uuid().describe("Deal UUID");
|
|
15
|
-
server.tool("conduyt_get_deal_profile", "Read a deal's Deal profile (GET /api/v1/deals/{id}/profile): the CONTACT custom fields the workspace binds in settings.dealProfile, read from the card's PRIMARY contact (one value per contact; nothing is stored on the deal), arranged in tabs, plus the partner readiness (ready of total: readiness fields are needed to send to a partner, never to save or work the card). { enabled: false } when the workspace has no binding or the card is outside its pipelines. A sensitive field is answered masked (last 4); conduyt_reveal_deal_profile_field returns the full value. Every answer carries cardKey, the same value the deal read answers as profileCardKey. Needs deals:view on the card (an API key needs the deals AND contacts scopes). 404 when the deal does not exist or the caller cannot see it.", { id: dealId }, async ({ id }) => formatResult(await client.get(`/api/v1/deals/${encodeURIComponent(id)}/profile`)));
|
|
15
|
+
server.tool("conduyt_get_deal_profile", "Read a deal's Deal profile (GET /api/v1/deals/{id}/profile): the CONTACT custom fields the workspace binds in settings.dealProfile, read from the card's PRIMARY contact (one value per contact; nothing is stored on the deal), arranged in tabs, plus the partner readiness (ready of total: readiness fields are needed to send to a partner, never to save or work the card; partners[key].actionName is the action's display name the readiness copy reads as \"Needed for <actionName>\", and a field's note is the binding's hint to the rep, null = none). { enabled: false } when the workspace has no binding or the card is outside its pipelines. A sensitive field is answered masked (last 4); conduyt_reveal_deal_profile_field returns the full value. Every answer carries cardKey, the same value the deal read answers as profileCardKey. Needs deals:view on the card (an API key needs the deals AND contacts scopes). 404 when the deal does not exist or the caller cannot see it.", { id: dealId }, async ({ id }) => formatResult(await client.get(`/api/v1/deals/${encodeURIComponent(id)}/profile`)));
|
|
16
16
|
strictInput(server.tool("conduyt_update_deal_profile", `Edit Deal profile fields (PATCH /api/v1/deals/{id}/profile): writes the bound CONTACT custom fields of the card's primary contact through the contact write path (partial merge of only the submitted keys, audited as contact.updated). Needs deals:edit, the card's edit scope AND contacts:edit. fields: bound contact field key -> new value (1 to 100 keys; null clears). expected (optional): key -> the value you last saw (a sensitive field's token from conduyt_get_deal_profile, never its mask); every supplied key is checked under the contact lock, a mismatch answers 409 profile_field_changed with the current value and NOTHING is written; leave expected off to overwrite (latest edit wins). Returns the fresh profile. A value identical to the stored one is skipped and nothing is audited for it, so repeating the same call changes nothing more. ${PATCH_CODES}`, {
|
|
17
17
|
id: dealId,
|
|
18
18
|
fields: keyed(1, PROFILE_KEYS_MAX).describe("Bound contact field key -> new value (null clears); 1 to 100 keys, each key 1 to 100 characters"),
|
|
19
19
|
expected: keyed(0, Infinity).optional().describe("Optional: key -> the value you last saw (a sensitive field's token); a mismatch writes nothing (409 profile_field_changed)"),
|
|
20
20
|
}, async ({ id, fields, expected }) => formatResult(await client.patch(`/api/v1/deals/${encodeURIComponent(id)}/profile`, { fields, expected }))));
|
|
21
|
-
strictInput(server.tool("conduyt_reveal_deal_profile_field", "Reveal ONE sensitive Deal profile field in full (
|
|
21
|
+
strictInput(server.tool("conduyt_reveal_deal_profile_field", "Reveal ONE sensitive Deal profile field in full (POST /api/v1/deals/{id}/profile/reveal with body { key }; the answer is never cached and carries the value's token; the old GET answers 405). A bound key whose contact field is Secure is revealed the same way but is refused for an API key (403 reveal_requires_session) and needs that field's own reveal set. Allowed only for a caller in the binding's reveal set (settings.dealProfile revealRoles / revealGroupIds; a super admin always) with contacts:view on a card they can see. Every reveal of a stored value is audited before the answer (deal_profile.reveal for a sensitive-only key; custom_field.revealed with via deal_profile for a Secure key), so each call is recorded; an empty field answers value null and is not audited. 400 invalid_body, invalid_json, profile_key_not_sensitive or deal_profile_not_enabled; 403 reveal_not_allowed or contacts_permission_required; 404.", { id: dealId, key: z.string().min(1).max(100).refine((v) => v.trim() !== "", { message: "key must not be blank" }).describe("The sensitive bound field key (exactly one)") }, async ({ id, key }) => formatResult(await client.post(`/api/v1/deals/${encodeURIComponent(id)}/profile/reveal`, { key }))));
|
|
22
22
|
server.tool("conduyt_get_deal_profile_settings", "Read the workspace's Deal profile binding (GET /api/v1/settings/deal-profile; settings:view): { dealProfile (as stored), valid, danglingKeys (bound keys that name no contact custom field definition) }.", {}, async () => formatResult(await client.get("/api/v1/settings/deal-profile")));
|
|
23
|
-
strictInput(server.tool("conduyt_set_deal_profile_settings", "REPLACE the workspace's Deal profile binding (PUT /api/v1/settings/deal-profile; settings:edit, and only an owner or admin: a delegated holder is refused 403 deal_profile_admin_only; audited as settings_deal_profile_updated): the whole object is replaced, nothing merges, so read the current one with conduyt_get_deal_profile_settings first. dealProfile holds enabled, pipelineIds (null or absent = every pipeline), generalTab { label }, tabs (up to 12: key, label, fields of { key (a CONTACT custom field key), label, control, options, span, sensitive, default, requiredFor, showWhen, validate }), repeating slot tables, footerNote, revealRoles / revealGroupIds. Every pipeline and member group named must be this workspace's. No custom field definition is created or altered. 422 invalid_deal_profile (shape, a foreign pipeline or member group).", { dealProfile: z.record(z.string(), z.unknown()).describe("The whole binding object (validated by the server)") }, async ({ dealProfile }) => formatResult(await client.put("/api/v1/settings/deal-profile", { dealProfile }))));
|
|
23
|
+
strictInput(server.tool("conduyt_set_deal_profile_settings", "REPLACE the workspace's Deal profile binding (PUT /api/v1/settings/deal-profile; settings:edit, and only an owner or admin: a delegated holder is refused 403 deal_profile_admin_only; audited as settings_deal_profile_updated): the whole object is replaced, nothing merges, so read the current one with conduyt_get_deal_profile_settings first. dealProfile holds enabled, pipelineIds (null or absent = every pipeline), generalTab { label }, tabs (up to 12: key, label, fields of { key (a CONTACT custom field key), label, control, options, span, sensitive, default, requiredFor, showWhen, note, validate }), repeating slot tables (each may set readinessPerSlot: true), footerNote, actions, revealRoles / revealGroupIds. actions is [{ key, name }] (up to 20, one entry per partner key; a key named twice is refused; name 1 to 60 characters of plain text): the readiness copy on the deal page reads \"Needed for <name>\", and an action without one shows its partner's default name, else its key. A field's note is a hint to the rep shown under the field (plain text, 1 to 240 characters). readinessPerSlot: true on a repeating table makes each readiness column count one item per filled slot (3 creditors listed = 3 items per column in the N of M); absent, the whole table is one item per column. Plain text starts with a visible character and holds no control, line-separator, invisible (zero-width, soft hyphen, BOM) or bidirectional characters. conduyt_get_deal_profile answers the result as partners[key].actionName (the binding's saved name, else \"Send to <name>\" for a known partner, else the key) and fields[].note (null = none, absent on a repeating cell). Every pipeline and member group named must be this workspace's. No custom field definition is created or altered. 422 invalid_deal_profile (shape, a foreign pipeline or member group).", { dealProfile: z.record(z.string(), z.unknown()).describe("The whole binding object (validated by the server: actions [{ key, name }] up to 20, a field note up to 240 plain-text characters, readinessPerSlot true on a repeating table)") }, async ({ dealProfile }) => formatResult(await client.put("/api/v1/settings/deal-profile", { dealProfile }))));
|
|
24
24
|
strictInput(server.tool("conduyt_remove_deal_profile_settings", "REMOVE the workspace's Deal profile binding (PUT /api/v1/settings/deal-profile with dealProfile null; settings:edit, and only an owner or admin: a delegated holder is refused 403 deal_profile_admin_only): the deal page's Details card returns to its plain view and the stored binding (tabs, rules, reveal set) is DISCARDED, so read and keep a copy with conduyt_get_deal_profile_settings first. No custom field definition is touched.", {}, async () => formatResult(await client.put("/api/v1/settings/deal-profile", { dealProfile: null }))));
|
|
25
25
|
server.tool("conduyt_get_deal_partner_pushes", "The deal page's Push to partner card (GET /api/v1/deals/{id}/partner-pushes): { enabled: false } when the workspace has no enabled partner, else the partners (Creditors Relief; Delancey Street listed, disabled), the card's partner id (the deal field oes_number) and its display (CRL-<id>), a pending create (sending, or unknown after an ambiguous answer: the next push checks the partner first), the newest four pushes and canPush (the card's edit scope and closer or above). Needs deals:view on the card; 404 when the deal does not exist or the caller cannot see it.", { id: dealId }, async ({ id }) => formatResult(await client.get(`/api/v1/deals/${encodeURIComponent(id)}/partner-pushes`)));
|
|
26
26
|
server.tool("conduyt_preview_deal_partner_push", "Preview what the next partner push would send (GET /api/v1/deals/{id}/partner-pushes/preview): the action (create when the card has no OES #, update when it has one), the partner endpoint, the payload rows (SSN and bank numbers masked to the last 4), the readiness gaps (missing[]; a push answers 422 profile_incomplete while any remain) and the policy warnings. Nothing is written and no partner is called. Same gates as the push: deals:edit, the card's edit scope, closer or above. 403 deal_not_editable / push_not_permitted; 404; 409 partner_disabled (delancey_street is disabled in v1), partner_not_enabled, deal_has_no_contact.", { id: dealId, partner: z.enum(PUSH_PARTNERS).optional().describe("creditors_relief (default) or delancey_street") }, async ({ id, partner }) => {
|
package/package.json
CHANGED
|
@@ -10,6 +10,21 @@
|
|
|
10
10
|
"status": "planned",
|
|
11
11
|
"reason": "owner/admin bulk edit of members' pipeline lists (#1083, Settings > Team Members), callable with an API key in principle; a typed tool is wanted but not built (batch19 added the endpoint, 4.105.10 only records the decision)"
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
"match": "POST /api/v1/contacts/:id/custom-fields/:key/reveal",
|
|
15
|
+
"status": "excluded",
|
|
16
|
+
"reason": "session-only by design (#1292 Ship 1): the Secure custom field reveal refuses an API key (403 reveal_requires_session) and this server signs in with one, so a tool could only ever answer 403; reads stay masked"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"match": "POST /api/v1/deals/:id/custom-fields/:key/reveal",
|
|
20
|
+
"status": "excluded",
|
|
21
|
+
"reason": "session-only by design (#1292 Ship 1): the Secure custom field reveal refuses an API key (403 reveal_requires_session) and this server signs in with one, so a tool could only ever answer 403; reads stay masked"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"match": "POST /api/v1/companies/:id/custom-fields/:key/reveal",
|
|
25
|
+
"status": "excluded",
|
|
26
|
+
"reason": "session-only by design (#1292 Ship 1): the Secure custom field reveal refuses an API key (403 reveal_requires_session) and this server signs in with one, so a tool could only ever answer 403; reads stay masked"
|
|
27
|
+
},
|
|
13
28
|
{
|
|
14
29
|
"match": "GET /api/v1/call-flows/functions/:id",
|
|
15
30
|
"status": "planned",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-11-
|
|
2
|
+
"generatedAt": "2026-11-12T14:56:42.139Z",
|
|
3
3
|
"toolCount": 428,
|
|
4
|
-
"totalEndpoints":
|
|
4
|
+
"totalEndpoints": 1207,
|
|
5
5
|
"counts": {
|
|
6
6
|
"covered": 378,
|
|
7
|
-
"excluded":
|
|
8
|
-
"planned":
|
|
7
|
+
"excluded": 372,
|
|
8
|
+
"planned": 457,
|
|
9
9
|
"uncategorized": 0
|
|
10
10
|
},
|
|
11
11
|
"matrix": {
|
|
@@ -1723,6 +1723,10 @@
|
|
|
1723
1723
|
"status": "planned",
|
|
1724
1724
|
"reason": "company subroutes beyond core CRUD"
|
|
1725
1725
|
},
|
|
1726
|
+
"POST /api/v1/companies/:id/custom-fields/:key/reveal": {
|
|
1727
|
+
"status": "excluded",
|
|
1728
|
+
"reason": "session-only by design (#1292 Ship 1): the Secure custom field reveal refuses an API key (403 reveal_requires_session) and this server signs in with one, so a tool could only ever answer 403; reads stay masked"
|
|
1729
|
+
},
|
|
1726
1730
|
"GET /api/v1/companies/:id/intelligence": {
|
|
1727
1731
|
"status": "planned",
|
|
1728
1732
|
"reason": "company subroutes beyond core CRUD"
|
|
@@ -1836,6 +1840,10 @@
|
|
|
1836
1840
|
"conduyt_remove_contact_collaborator"
|
|
1837
1841
|
]
|
|
1838
1842
|
},
|
|
1843
|
+
"POST /api/v1/contacts/:id/custom-fields/:key/reveal": {
|
|
1844
|
+
"status": "excluded",
|
|
1845
|
+
"reason": "session-only by design (#1292 Ship 1): the Secure custom field reveal refuses an API key (403 reveal_requires_session) and this server signs in with one, so a tool could only ever answer 403; reads stay masked"
|
|
1846
|
+
},
|
|
1839
1847
|
"GET /api/v1/contacts/:id/dnc": {
|
|
1840
1848
|
"status": "planned",
|
|
1841
1849
|
"reason": "contact subroutes beyond the core CRUD/search tools"
|
|
@@ -2376,6 +2384,10 @@
|
|
|
2376
2384
|
"status": "excluded",
|
|
2377
2385
|
"reason": "CRON_SECRET-gated infrastructure jobs; never key-callable"
|
|
2378
2386
|
},
|
|
2387
|
+
"GET /api/v1/cron/repeat-send-loops": {
|
|
2388
|
+
"status": "excluded",
|
|
2389
|
+
"reason": "CRON_SECRET-gated infrastructure jobs; never key-callable"
|
|
2390
|
+
},
|
|
2379
2391
|
"GET /api/v1/cron/reply-capture-drain": {
|
|
2380
2392
|
"status": "excluded",
|
|
2381
2393
|
"reason": "CRON_SECRET-gated infrastructure jobs; never key-callable"
|
|
@@ -2633,6 +2645,10 @@
|
|
|
2633
2645
|
"status": "planned",
|
|
2634
2646
|
"reason": "deal subroutes beyond core CRUD (history, files, links)"
|
|
2635
2647
|
},
|
|
2648
|
+
"POST /api/v1/deals/:id/custom-fields/:key/reveal": {
|
|
2649
|
+
"status": "excluded",
|
|
2650
|
+
"reason": "session-only by design (#1292 Ship 1): the Secure custom field reveal refuses an API key (403 reveal_requires_session) and this server signs in with one, so a tool could only ever answer 403; reads stay masked"
|
|
2651
|
+
},
|
|
2636
2652
|
"GET /api/v1/deals/:id/handoff-files/:fileId/download": {
|
|
2637
2653
|
"status": "planned",
|
|
2638
2654
|
"reason": "deal subroutes beyond core CRUD (history, files, links)"
|
|
@@ -2672,6 +2688,10 @@
|
|
|
2672
2688
|
]
|
|
2673
2689
|
},
|
|
2674
2690
|
"GET /api/v1/deals/:id/profile/reveal": {
|
|
2691
|
+
"status": "planned",
|
|
2692
|
+
"reason": "deal subroutes beyond core CRUD (history, files, links)"
|
|
2693
|
+
},
|
|
2694
|
+
"POST /api/v1/deals/:id/profile/reveal": {
|
|
2675
2695
|
"status": "covered",
|
|
2676
2696
|
"tools": [
|
|
2677
2697
|
"conduyt_reveal_deal_profile_field"
|