@datasynx/agentic-crm 1.0.0 → 1.1.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/README.md +8 -1
- package/dist/{ask-D8iYqDAr.js → ask-CDysGnRg.js} +2 -2
- package/dist/{ask-D8iYqDAr.js.map → ask-CDysGnRg.js.map} +1 -1
- package/dist/attachments-CX2GAtsw.cjs +517 -0
- package/dist/attachments-CX2GAtsw.cjs.map +1 -0
- package/dist/attachments-D207gXfN.js +514 -0
- package/dist/attachments-D207gXfN.js.map +1 -0
- package/dist/attachments-rLa96rOK.js +514 -0
- package/dist/attachments-rLa96rOK.js.map +1 -0
- package/dist/chunk-BfDYWZQ8.cjs +32 -0
- package/dist/chunk-BfDYWZQ8.cjs.map +1 -0
- package/dist/chunk-BhUZmQg5.js +32 -0
- package/dist/chunk-BhUZmQg5.js.map +1 -0
- package/dist/chunk-ChC83jai.js +2 -0
- package/dist/chunk-e_w8qqtP.js +32 -0
- package/dist/chunk-e_w8qqtP.js.map +1 -0
- package/dist/cli.js +16 -15
- package/dist/cli.js.map +1 -1
- package/dist/daemon/worker.js +3 -3
- package/dist/email-body-BFSRa0AW.cjs +42 -0
- package/dist/email-body-BFSRa0AW.cjs.map +1 -0
- package/dist/email-body-BOd7U-D2.js +42 -0
- package/dist/email-body-BOd7U-D2.js.map +1 -0
- package/dist/{gmail-sync-DueE6tl5.js → gmail-sync-B4Iu3AQb.js} +45 -15
- package/dist/gmail-sync-B4Iu3AQb.js.map +1 -0
- package/dist/{gmail-sync-GEy3oVvw.cjs → gmail-sync-BpSVESSe.cjs} +45 -15
- package/dist/gmail-sync-BpSVESSe.cjs.map +1 -0
- package/dist/{gmail-sync-C-NmibzS.js → gmail-sync-DIbrPnTK.js} +45 -15
- package/dist/gmail-sync-DIbrPnTK.js.map +1 -0
- package/dist/{gmail-webhook-handler-kGKpbY9h.js → gmail-webhook-handler-BzOFbvgh.js} +2 -2
- package/dist/{gmail-webhook-handler-kGKpbY9h.js.map → gmail-webhook-handler-BzOFbvgh.js.map} +1 -1
- package/dist/{gmail-webhook-handler-B26COilD.js → gmail-webhook-handler-CvSDW_Js.js} +1 -1
- package/dist/{google-drive-sync-D1n7WKZn.js → google-drive-sync-B_I1d54Y.js} +2 -2
- package/dist/{google-drive-sync-D1n7WKZn.js.map → google-drive-sync-B_I1d54Y.js.map} +1 -1
- package/dist/html-BaeOCZKE.js +36 -0
- package/dist/html-BaeOCZKE.js.map +1 -0
- package/dist/html-CmOku6jS.cjs +47 -0
- package/dist/html-CmOku6jS.cjs.map +1 -0
- package/dist/{import-hubspot-DB4n89jy.js → import-hubspot-CTId9IGV.js} +2 -2
- package/dist/{import-hubspot-DB4n89jy.js.map → import-hubspot-CTId9IGV.js.map} +1 -1
- package/dist/{index-pY7tYXwH.d.cts → index-BAutNcAT.d.cts} +13 -9
- package/dist/index-BAutNcAT.d.cts.map +1 -0
- package/dist/{index-B0IMMrp_.d.ts → index-FzDsNSSb.d.ts} +5 -1
- package/dist/index-FzDsNSSb.d.ts.map +1 -0
- package/dist/index.d.cts +13 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/{interactions-writer-RJB8SWf2.js → interactions-writer-B2y-73lh.js} +1 -1
- package/dist/{interactions-writer-DbSyI2rt.js → interactions-writer-B8XAzdqR.js} +3 -2
- package/dist/interactions-writer-B8XAzdqR.js.map +1 -0
- package/dist/{interactions-writer-a2yzBd7T.cjs → interactions-writer-BRJNrefF.cjs} +3 -2
- package/dist/interactions-writer-BRJNrefF.cjs.map +1 -0
- package/dist/{interactions-writer-BZzUIgJd.js → interactions-writer-ZQcpFOh9.js} +3 -2
- package/dist/interactions-writer-ZQcpFOh9.js.map +1 -0
- package/dist/{knowledge-base-DHNc4hVj.js → knowledge-base--063Kpa3.js} +9 -7
- package/dist/{knowledge-base-DHNc4hVj.js.map → knowledge-base--063Kpa3.js.map} +1 -1
- package/dist/mcp.cjs +44 -22
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.js +44 -22
- package/dist/mcp.js.map +1 -1
- package/dist/{microsoft-calendar-jIu9K5zX.js → microsoft-calendar-BgVR8GDv.js} +3 -3
- package/dist/{microsoft-calendar-jIu9K5zX.js.map → microsoft-calendar-BgVR8GDv.js.map} +1 -1
- package/dist/{microsoft-sync-R_r8HL-B.js → microsoft-sync-D30_XksI.js} +3 -3
- package/dist/{microsoft-sync-R_r8HL-B.js.map → microsoft-sync-D30_XksI.js.map} +1 -1
- package/dist/{nba-mTJ4yEqD.js → nba-DwdfM93s.js} +2 -2
- package/dist/{nba-mTJ4yEqD.js.map → nba-DwdfM93s.js.map} +1 -1
- package/dist/{server-DqSMYhSA.js → server-DoRPPOeR.js} +39 -19
- package/dist/server-DoRPPOeR.js.map +1 -0
- package/dist/{transcript-watcher-0mh2ZhmH.js → transcript-watcher-BoClrJAz.js} +2 -2
- package/dist/{transcript-watcher-0mh2ZhmH.js.map → transcript-watcher-BoClrJAz.js.map} +1 -1
- package/package.json +12 -1
- package/dist/gmail-sync-C-NmibzS.js.map +0 -1
- package/dist/gmail-sync-DueE6tl5.js.map +0 -1
- package/dist/gmail-sync-GEy3oVvw.cjs.map +0 -1
- package/dist/index-B0IMMrp_.d.ts.map +0 -1
- package/dist/index-pY7tYXwH.d.cts.map +0 -1
- package/dist/interactions-writer-BZzUIgJd.js.map +0 -1
- package/dist/interactions-writer-DbSyI2rt.js.map +0 -1
- package/dist/interactions-writer-a2yzBd7T.cjs.map +0 -1
- package/dist/server-DqSMYhSA.js.map +0 -1
package/dist/mcp.cjs
CHANGED
|
@@ -3,7 +3,7 @@ const require_chunk = require("./chunk-DakpK96I.cjs");
|
|
|
3
3
|
const require_session_store = require("./session-store-yfwnj0OC.cjs");
|
|
4
4
|
const require_atomic_write = require("./atomic-write-BYmF-ThH.cjs");
|
|
5
5
|
const require_write_queue = require("./write-queue-BDolUxfs.cjs");
|
|
6
|
-
const require_interactions_writer = require("./interactions-writer-
|
|
6
|
+
const require_interactions_writer = require("./interactions-writer-BRJNrefF.cjs");
|
|
7
7
|
const require_logger = require("./logger-BkInaGoV.cjs");
|
|
8
8
|
const require_pipeline_writer = require("./pipeline-writer-B1tRAhuD.cjs");
|
|
9
9
|
const require_llm = require("./llm-CXycmEl9.cjs");
|
|
@@ -405,7 +405,7 @@ Config: \`.agentic/rbac.json\` | Actor: \`DXCRM_ACTOR\` env var
|
|
|
405
405
|
| log_interaction | Write a new interaction entry (call, email, meeting, note) — immediately searchable | rep+ |
|
|
406
406
|
| update_deal | Create or update a deal in pipeline.md — upserts by deal name | rep+ |
|
|
407
407
|
| update_customer_facts | Update fields in customer profile (domain, contact, stage, tags) | admin |
|
|
408
|
-
| export_customer | Export all customer data as JSON or Markdown | admin |
|
|
408
|
+
| export_customer | Export all customer data (incl. attachment contents) as JSON or Markdown | admin |
|
|
409
409
|
| get_deal_health | Score deal health 0–100 (A–F grade) based on activity, velocity, close date, probability | any |
|
|
410
410
|
| get_pipeline_forecast | Aggregate weighted pipeline revenue across all customers grouped by stage | any |
|
|
411
411
|
| get_pipeline_stages | List all configured pipeline stages (defaults: lead, qualified, proposal, negotiation, won, lost) | any |
|
|
@@ -539,12 +539,14 @@ RBAC: admin
|
|
|
539
539
|
- Input: slug (required) + any combination of the optional fields
|
|
540
540
|
- Returns: { success: boolean, facts: object }
|
|
541
541
|
|
|
542
|
-
### export_customer({ slug, format? })
|
|
543
|
-
Export all customer data (main_facts + interactions
|
|
542
|
+
### export_customer({ slug, format?, includeAttachmentContent? })
|
|
543
|
+
Export all customer data (main_facts + interactions + pipeline + attachments).
|
|
544
|
+
Set includeAttachmentContent to inline every attachment's converted Markdown —
|
|
545
|
+
a single sendable bundle of all conversations and documents for the customer.
|
|
544
546
|
RBAC: admin
|
|
545
|
-
- Input: { slug: string, format?: "json" | "markdown" (default "json") }
|
|
546
|
-
- Returns (JSON): { slug, exportedAt, mainFacts, interactionsCount, pipeline, attachments }
|
|
547
|
-
- Returns (Markdown): Formatted document with all sections
|
|
547
|
+
- Input: { slug: string, format?: "json" | "markdown" (default "json"), includeAttachmentContent?: boolean (default false) }
|
|
548
|
+
- Returns (JSON): { slug, exportedAt, mainFacts, interactionsCount, pipeline, attachments[, attachmentContents] }
|
|
549
|
+
- Returns (Markdown): Formatted document with all sections (and attachment contents when requested)
|
|
548
550
|
|
|
549
551
|
### get_deal_health({ slug })
|
|
550
552
|
Score the health of all deals for a customer based on activity recency, stage velocity,
|
|
@@ -1439,7 +1441,7 @@ function triggerOnQuerySync(dataDir, slug) {
|
|
|
1439
1441
|
const sources = JSON.parse(fs.default.readFileSync(sourcesPath, "utf-8"));
|
|
1440
1442
|
if (!sources.gmail?.enabled || !sources.gmail.query) return;
|
|
1441
1443
|
const query = sources.gmail.query;
|
|
1442
|
-
Promise.resolve().then(() => require("./gmail-sync-
|
|
1444
|
+
Promise.resolve().then(() => require("./gmail-sync-BpSVESSe.cjs")).then(({ syncGmail }) => syncGmail({
|
|
1443
1445
|
slug,
|
|
1444
1446
|
dataDir,
|
|
1445
1447
|
auth,
|
|
@@ -2378,14 +2380,27 @@ async function handleExportCustomer(input, dataDir = DATA_DIR$47) {
|
|
|
2378
2380
|
interactionsCount = countInteractions(interactionsContent);
|
|
2379
2381
|
}
|
|
2380
2382
|
const pipeline = await require_pipeline_writer.readPipeline(dataDir, input.slug);
|
|
2383
|
+
const includeAttachmentContent = input.includeAttachmentContent ?? false;
|
|
2381
2384
|
const attachmentsDir = path.default.join(customerDir, "attachments");
|
|
2382
2385
|
const attachments = [];
|
|
2386
|
+
const attachmentContents = {};
|
|
2383
2387
|
if (fs.default.existsSync(attachmentsDir)) try {
|
|
2384
2388
|
const files = fs.default.readdirSync(attachmentsDir);
|
|
2385
2389
|
for (const f of files) try {
|
|
2386
|
-
if (fs.default.statSync(path.default.join(attachmentsDir, f)).isFile())
|
|
2390
|
+
if (!fs.default.statSync(path.default.join(attachmentsDir, f)).isFile()) continue;
|
|
2391
|
+
attachments.push(f);
|
|
2392
|
+
if (includeAttachmentContent && f.endsWith(".md")) attachmentContents[f] = fs.default.readFileSync(path.default.join(attachmentsDir, f), "utf-8");
|
|
2387
2393
|
} catch {}
|
|
2388
2394
|
} catch {}
|
|
2395
|
+
const attachmentContentSection = () => {
|
|
2396
|
+
const entries = Object.entries(attachmentContents);
|
|
2397
|
+
if (!includeAttachmentContent || entries.length === 0) return [];
|
|
2398
|
+
return [
|
|
2399
|
+
"",
|
|
2400
|
+
`## Attachment Contents (${entries.length})`,
|
|
2401
|
+
...entries.map(([name, content]) => `\n### ${name}\n\n${content.trim()}`)
|
|
2402
|
+
];
|
|
2403
|
+
};
|
|
2389
2404
|
if (format === "markdown") return { content: [{
|
|
2390
2405
|
type: "text",
|
|
2391
2406
|
text: [
|
|
@@ -2404,7 +2419,8 @@ async function handleExportCustomer(input, dataDir = DATA_DIR$47) {
|
|
|
2404
2419
|
pipeline.length > 0 ? pipeline.map((d) => `- **${d.name}** · ${d.stage}${d.value !== void 0 ? ` · €${d.value}` : ""}${d.close_date ? ` · close: ${d.close_date}` : ""}`).join("\n") : "(no deals)",
|
|
2405
2420
|
"",
|
|
2406
2421
|
`## Attachments (${attachments.length})`,
|
|
2407
|
-
attachments.length > 0 ? attachments.map((f) => `- ${f}`).join("\n") : "(none)"
|
|
2422
|
+
attachments.length > 0 ? attachments.map((f) => `- ${f}`).join("\n") : "(none)",
|
|
2423
|
+
...attachmentContentSection()
|
|
2408
2424
|
].join("\n")
|
|
2409
2425
|
}] };
|
|
2410
2426
|
const exported = {
|
|
@@ -2413,7 +2429,8 @@ async function handleExportCustomer(input, dataDir = DATA_DIR$47) {
|
|
|
2413
2429
|
mainFacts,
|
|
2414
2430
|
interactionsCount,
|
|
2415
2431
|
pipeline,
|
|
2416
|
-
attachments
|
|
2432
|
+
attachments,
|
|
2433
|
+
...includeAttachmentContent ? { attachmentContents } : {}
|
|
2417
2434
|
};
|
|
2418
2435
|
return { content: [{
|
|
2419
2436
|
type: "text",
|
|
@@ -2423,23 +2440,28 @@ async function handleExportCustomer(input, dataDir = DATA_DIR$47) {
|
|
|
2423
2440
|
function registerExportCustomer(server) {
|
|
2424
2441
|
server.registerTool("export_customer", {
|
|
2425
2442
|
title: "Export Customer",
|
|
2426
|
-
description: `Export all customer data (main_facts + interactions
|
|
2427
|
-
Useful for reporting, audits, or creating
|
|
2443
|
+
description: `Export all customer data (main_facts + interactions + pipeline deals + attachments).
|
|
2444
|
+
Useful for reporting, audits, handoffs, or creating a complete sendable bundle
|
|
2445
|
+
of every conversation and document for a customer.
|
|
2428
2446
|
|
|
2429
2447
|
Args:
|
|
2430
2448
|
slug: Customer ID (e.g. "acme-corp")
|
|
2431
2449
|
format: Output format — "json" (default) or "markdown"
|
|
2450
|
+
includeAttachmentContent: Inline the converted Markdown of every attachment
|
|
2451
|
+
(default false). Use this to produce a single self-contained bundle.
|
|
2432
2452
|
|
|
2433
2453
|
Returns:
|
|
2434
|
-
JSON: { slug, exportedAt, mainFacts, interactionsCount, pipeline }
|
|
2435
|
-
Markdown: Formatted document with all sections`,
|
|
2454
|
+
JSON: { slug, exportedAt, mainFacts, interactionsCount, pipeline, attachments[, attachmentContents] }
|
|
2455
|
+
Markdown: Formatted document with all sections (and attachment contents when requested)`,
|
|
2436
2456
|
inputSchema: zod.z.object({
|
|
2437
2457
|
slug: zod.z.string().describe("Customer slug (e.g. 'acme-corp')"),
|
|
2438
|
-
format: zod.z.enum(["json", "markdown"]).optional().describe("Output format: 'json' (default) or 'markdown'")
|
|
2458
|
+
format: zod.z.enum(["json", "markdown"]).optional().describe("Output format: 'json' (default) or 'markdown'"),
|
|
2459
|
+
includeAttachmentContent: zod.z.boolean().optional().describe("Inline converted attachment Markdown into the export (default false)")
|
|
2439
2460
|
})
|
|
2440
|
-
}, async ({ slug, format }) => handleExportCustomer({
|
|
2461
|
+
}, async ({ slug, format, includeAttachmentContent }) => handleExportCustomer({
|
|
2441
2462
|
slug,
|
|
2442
|
-
...format !== void 0 ? { format } : {}
|
|
2463
|
+
...format !== void 0 ? { format } : {},
|
|
2464
|
+
...includeAttachmentContent !== void 0 ? { includeAttachmentContent } : {}
|
|
2443
2465
|
}));
|
|
2444
2466
|
}
|
|
2445
2467
|
//#endregion
|
|
@@ -3548,7 +3570,7 @@ async function executeAction(action, dataDir) {
|
|
|
3548
3570
|
if (!slug) return "skipped";
|
|
3549
3571
|
switch (action.type) {
|
|
3550
3572
|
case "log_interaction": {
|
|
3551
|
-
const { appendInteraction } = await Promise.resolve().then(() => require("./interactions-writer-
|
|
3573
|
+
const { appendInteraction } = await Promise.resolve().then(() => require("./interactions-writer-BRJNrefF.cjs")).then((n) => n.interactions_writer_exports);
|
|
3552
3574
|
await appendInteraction(dataDir, slug, {
|
|
3553
3575
|
date: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10),
|
|
3554
3576
|
type: action.payload["type"] ?? "Note",
|
|
@@ -3561,7 +3583,7 @@ async function executeAction(action, dataDir) {
|
|
|
3561
3583
|
return "executed";
|
|
3562
3584
|
}
|
|
3563
3585
|
case "schedule_meeting": {
|
|
3564
|
-
const { appendInteraction } = await Promise.resolve().then(() => require("./interactions-writer-
|
|
3586
|
+
const { appendInteraction } = await Promise.resolve().then(() => require("./interactions-writer-BRJNrefF.cjs")).then((n) => n.interactions_writer_exports);
|
|
3565
3587
|
await appendInteraction(dataDir, slug, {
|
|
3566
3588
|
date: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10),
|
|
3567
3589
|
type: "Note",
|
|
@@ -6698,7 +6720,7 @@ async function handleTriggerSync(input, dataDir = DATA_DIR$4) {
|
|
|
6698
6720
|
try {
|
|
6699
6721
|
const sources = JSON.parse(fs.default.readFileSync(sourcesPath, "utf-8"));
|
|
6700
6722
|
if (!sources.gmail?.enabled || !sources.gmail.query) continue;
|
|
6701
|
-
const { syncGmail } = await Promise.resolve().then(() => require("./gmail-sync-
|
|
6723
|
+
const { syncGmail } = await Promise.resolve().then(() => require("./gmail-sync-BpSVESSe.cjs"));
|
|
6702
6724
|
const result = await syncGmail({
|
|
6703
6725
|
slug,
|
|
6704
6726
|
dataDir,
|
|
@@ -6956,7 +6978,7 @@ function registerResources(server, dataDir = DATA_DIR$1) {
|
|
|
6956
6978
|
description: "Newest-first interaction history for a customer",
|
|
6957
6979
|
mimeType: "text/markdown"
|
|
6958
6980
|
}, async (uri, variables) => {
|
|
6959
|
-
const { readInteractions } = await Promise.resolve().then(() => require("./interactions-writer-
|
|
6981
|
+
const { readInteractions } = await Promise.resolve().then(() => require("./interactions-writer-BRJNrefF.cjs")).then((n) => n.interactions_writer_exports);
|
|
6960
6982
|
const text = await readInteractions(dataDir, String(variables["slug"]));
|
|
6961
6983
|
return { contents: [{
|
|
6962
6984
|
uri: uri.href,
|