@agifyai/leadify-mcp 8.3.5 → 8.3.7

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/README.md CHANGED
@@ -132,13 +132,17 @@ Un tool = un appel à `server.tool(name, description, zodSchema, async handler)`
132
132
 
133
133
  ### Publier une nouvelle version
134
134
 
135
- Le publish est automatique via GitHub Actions sur push `main`. Le workflow ne fait rien si la version dans `package.json` n'a pas bougé il faut donc bumper avant de push.
135
+ Chaque push sur `main` déclenche automatiquement une publication npm distincte. Le workflow sérialise les publications, exécute les tests, puis :
136
+
137
+ - publie la version de `package.json` si elle est supérieure à la version npm courante (pour un changement minor ou major intentionnel) ;
138
+ - sinon, incrémente automatiquement le patch de la dernière version npm ;
139
+ - publie avec Trusted Publishing OIDC, puis ajoute un tag Git `vX.Y.Z` sur le SHA exact publié.
140
+
141
+ Il n'est donc pas nécessaire de bumper le patch à la main. Pour annoncer volontairement une nouvelle minor ou major, modifier la version source avant le merge :
136
142
 
137
143
  ```bash
138
- npm version patch # 1.4.21.4.3 (bug fix, ajout de tool)
139
- npm version minor # 1.4.21.5.0 (changement non-breaking notable)
140
- npm version major # 1.4.2 → 2.0.0 (breaking : tool renommé / supprimé / signature changée)
141
- git push && git push --tags
144
+ npm version minor --no-git-tag-version # 8.3.x8.4.0
145
+ npm version major --no-git-tag-version # 8.x9.0.0
142
146
  ```
143
147
 
144
148
  `npm version` crée un commit + un tag git automatiquement.
@@ -157,8 +161,10 @@ Et le run du workflow : https://github.com/AgifyAI/mcp_leadify/actions
157
161
 
158
162
  1. Checkout + install Node 20.
159
163
  2. `npm ci` pour installer les deps.
160
- 3. Check si la version actuelle de `package.json` est déjà publiée sur npm. Si oui, skip silencieusement (on évite les doublons et on permet de push des commits non-version sur `main`).
161
- 4. Sinon, upgrade npm vers 11.5.1 (requis pour Trusted Publishing) puis `npm publish`.
164
+ 3. Calcule une version inédite à partir de la version npm courante et de l'éventuelle intention minor/major dans `package.json`.
165
+ 4. Exécute la suite de tests complète.
166
+ 5. Upgrade npm vers ≥ 11.5.1 (requis pour Trusted Publishing), puis publie via OIDC. La provenance Sigstore explicite reste désactivée tant que npm ne la supporte pas pour les dépôts GitHub privés.
167
+ 6. Pose le tag de version sur le commit `main` publié.
162
168
 
163
169
  L'authentification npm passe par **Trusted Publishing (OIDC)** : pas de token stocké, GitHub Actions s'authentifie directement auprès de npm via la permission `id-token: write` du workflow. La trust relation est configurée sur la [page npm du package](https://www.npmjs.com/package/@agifyai/leadify-mcp/access) (Trusted Publisher : `AgifyAI/mcp_leadify` / `publish.yml`).
164
170
 
@@ -181,6 +187,8 @@ Conséquences pratiques :
181
187
  | `test_api_key` | Vérifier que la clé API configurée est valide (health check). |
182
188
  | `list_lead_groups` | Lister les groupes accessibles d'une organisation explicitement sélectionnée, en vue compacte. |
183
189
  | `get_lead_group` | Consulter les métadonnées compactes d'un groupe accessible par son ID. |
190
+ | `create_lead_group` | Créer un groupe et choisir son type canonique optionnel (`GENERIC`, `COMPANY` ou `PERSON`) via `entity_kind`. |
191
+ | `update_lead_group` | Modifier un groupe, y compris son `entity_kind`, avec réconciliation du schéma côté Leadify. |
184
192
  | `add_leads` | Ajouter un ou plusieurs leads à un groupe. |
185
193
  | `get_leads` | Rechercher et lister des leads avec filtres, recherche et pagination. |
186
194
  | `get_lead` | Récupérer les détails complets d'un lead par son ID. |
package/dist/server.js CHANGED
@@ -17,7 +17,7 @@ import { registerLeadViewTools } from "./tools/views.js";
17
17
  export function createServer() {
18
18
  const server = new McpServer({
19
19
  name: "leadify",
20
- version: "8.3.2",
20
+ version: "8.3.6",
21
21
  });
22
22
  registerAuthTools(server);
23
23
  registerOrganizationTools(server);
@@ -1,2 +1,5 @@
1
1
  import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- export declare function registerLeadGroupTools(server: McpServer): void;
2
+ import { type LeadifyClient } from "../client.js";
3
+ type LeadGroupWriteClient = Pick<LeadifyClient, "post" | "put">;
4
+ export declare function registerLeadGroupTools(server: McpServer, writeClient?: LeadGroupWriteClient): void;
5
+ export {};
@@ -9,7 +9,8 @@ const DISABLABLE_TOOLS = [
9
9
  "linkedin_company",
10
10
  "skool_member",
11
11
  ];
12
- export function registerLeadGroupTools(server) {
12
+ const ENTITY_KINDS = ["GENERIC", "COMPANY", "PERSON"];
13
+ export function registerLeadGroupTools(server, writeClient) {
13
14
  // ── create_lead_group ──────────────────────────────────────────────────
14
15
  server.tool("create_lead_group", "Create a new lead group in the specified organization. A lead group holds leads, a " +
15
16
  "schema, and an optional persona assignment. Use list_organizations first to find the " +
@@ -20,6 +21,11 @@ export function registerLeadGroupTools(server) {
20
21
  .string()
21
22
  .describe("Target organization ID (Clerk org ID). Get one via list_organizations."),
22
23
  description: z.string().nullable().optional().describe("Group description."),
24
+ entity_kind: z
25
+ .enum(ENTITY_KINDS)
26
+ .optional()
27
+ .describe("Canonical entity type stored in this group: GENERIC, COMPANY, or PERSON. " +
28
+ "Changing it makes Leadify reconcile the group schema for that entity type."),
23
29
  persona_types: z
24
30
  .array(z.string())
25
31
  .optional()
@@ -50,6 +56,8 @@ export function registerLeadGroupTools(server) {
50
56
  };
51
57
  if (params.description !== undefined)
52
58
  body.description = params.description;
59
+ if (params.entity_kind !== undefined)
60
+ body.entityKind = params.entity_kind;
53
61
  if (params.persona_types !== undefined)
54
62
  body.personaTypes = params.persona_types;
55
63
  if (params.company_profile !== undefined)
@@ -58,7 +66,7 @@ export function registerLeadGroupTools(server) {
58
66
  body.disabledTools = params.disabled_tools;
59
67
  if (params.persona_id !== undefined)
60
68
  body.personaId = params.persona_id;
61
- const data = await getClient().post("/api/lead-group", body);
69
+ const data = await (writeClient ?? getClient()).post("/api/lead-group", body);
62
70
  return toolResult(data);
63
71
  }
64
72
  catch (error) {
@@ -73,6 +81,11 @@ export function registerLeadGroupTools(server) {
73
81
  id: z.string().describe("Lead group ID to update."),
74
82
  name: z.string().optional().describe("New group name."),
75
83
  description: z.string().nullable().optional().describe("New group description."),
84
+ entity_kind: z
85
+ .enum(ENTITY_KINDS)
86
+ .optional()
87
+ .describe("New canonical entity type: GENERIC, COMPANY, or PERSON. Leadify reconciles the " +
88
+ "group schema after the type change."),
76
89
  persona_id: z
77
90
  .string()
78
91
  .nullable()
@@ -99,6 +112,8 @@ export function registerLeadGroupTools(server) {
99
112
  body.name = params.name;
100
113
  if (params.description !== undefined)
101
114
  body.description = params.description;
115
+ if (params.entity_kind !== undefined)
116
+ body.entityKind = params.entity_kind;
102
117
  if (params.persona_id !== undefined)
103
118
  body.personaId = params.persona_id;
104
119
  if (params.persona_types !== undefined)
@@ -107,7 +122,7 @@ export function registerLeadGroupTools(server) {
107
122
  body.companyProfile = params.company_profile;
108
123
  if (params.disabled_tools !== undefined)
109
124
  body.disabledTools = params.disabled_tools;
110
- const data = await getClient().put(`/api/lead-group/${encodeURIComponent(params.id)}`, body);
125
+ const data = await (writeClient ?? getClient()).put(`/api/lead-group/${encodeURIComponent(params.id)}`, body);
111
126
  return toolResult(data);
112
127
  }
113
128
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agifyai/leadify-mcp",
3
- "version": "8.3.5",
3
+ "version": "8.3.7",
4
4
  "description": "MCP server for Leadify lead management API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",