@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 +15 -7
- package/dist/server.js +1 -1
- package/dist/tools/lead_groups.d.ts +4 -1
- package/dist/tools/lead_groups.js +18 -3
- package/package.json +1 -1
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
|
-
|
|
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
|
|
139
|
-
npm version
|
|
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.x → 8.4.0
|
|
145
|
+
npm version major --no-git-tag-version # 8.x → 9.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.
|
|
161
|
-
4.
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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) {
|