@anychat-ai/mcp 0.76.0 → 0.77.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/tools/ajo.d.ts +1 -0
- package/dist/tools/ajo.js +95 -0
- package/dist/tools/ajo.js.map +1 -0
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +3 -1
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ajoTools: import("../tool").AnyTool[];
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ajoTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tool_1 = require("../tool");
|
|
6
|
+
/**
|
|
7
|
+
* AJO Integration — the send and status actions an Adobe Journey
|
|
8
|
+
* Optimizer journey calls as custom actions. A 1:1 projection of the
|
|
9
|
+
* "Adobe Journey Optimizer" section of the API reference. For an MCP host
|
|
10
|
+
* these are for rehearsing and checking an AJO action's wiring exactly as
|
|
11
|
+
* AJO will call it; an ordinary send to one person is `send_outreach`.
|
|
12
|
+
*/
|
|
13
|
+
const agentId = zod_1.z.string().min(1).describe('Agent id');
|
|
14
|
+
const ajoPath = (agent, sub) => `/agents/${encodeURIComponent(agent)}/integrations/ajo${sub}`;
|
|
15
|
+
const dropUndefined = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== undefined));
|
|
16
|
+
exports.ajoTools = [
|
|
17
|
+
(0, tool_1.defineTool)({
|
|
18
|
+
name: 'send_ajo_outreach',
|
|
19
|
+
title: 'Send an Outreach as an AJO custom action would',
|
|
20
|
+
description: "Call the Adobe Journey Optimizer send action as an AJO journey does: one send of this Outreach to the AJO profile, over the same named send as send_outreach (prefer send_outreach for an ordinary send). A REAL message unless emulator.personaId (rehearse into a persona's emulator session; profile must be empty) or dryRun is set; confirm a real send with the user first. Every business outcome is 200 { outcome, reason, detail, sendId, personId, unknownInputs, idempotency }: queued (read it with get_ajo_send) | duplicate (this journey step already sent; nothing changed) | skipped (dryRun) | refused with reason opted_out | declined (consent.sms n) | consent_denied | missing_inputs | no_phone | ambiguous_recipient — nothing written. consent.sms: y = evidence, n = refuse, anything else asserts nothing. The key comes from journey.versionId + nodeId + instanceId, else one send per profile per UTC day (idempotency derived). Errors: 400 request.invalid, 404 agent/Outreach not found or disabled, 429 rate limited (its own budget: 12,000/min per API key, bursts of 1,000), 502/504 may have sent — repeat the same call. Maps to POST /v1/orgs/{org}/agents/{agent}/integrations/ajo/outreach/{outreachId}/sends",
|
|
21
|
+
kind: 'destructive',
|
|
22
|
+
scope: 'integrations:ajo',
|
|
23
|
+
roleFloor: 'editor',
|
|
24
|
+
input: {
|
|
25
|
+
agentId,
|
|
26
|
+
outreachId: zod_1.z.string().min(1).describe('Outreach id (one AJO action per Outreach)'),
|
|
27
|
+
profile: zod_1.z
|
|
28
|
+
.object({
|
|
29
|
+
id: zod_1.z
|
|
30
|
+
.string()
|
|
31
|
+
.optional()
|
|
32
|
+
.describe("AJO profileId; becomes the Person's externalId. Required unless emulator.personaId is set"),
|
|
33
|
+
phone: zod_1.z
|
|
34
|
+
.string()
|
|
35
|
+
.optional()
|
|
36
|
+
.describe('E.164, or a national number read with country'),
|
|
37
|
+
country: zod_1.z
|
|
38
|
+
.string()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('ISO-3166 alpha-2 for a national phone; default US'),
|
|
41
|
+
firstName: zod_1.z.string().optional(),
|
|
42
|
+
lastName: zod_1.z.string().optional(),
|
|
43
|
+
email: zod_1.z.string().optional(),
|
|
44
|
+
})
|
|
45
|
+
.optional(),
|
|
46
|
+
consent: zod_1.z
|
|
47
|
+
.object({
|
|
48
|
+
sms: zod_1.z
|
|
49
|
+
.string()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe('AEP consents.marketing.sms.val (y, n, or anything else)'),
|
|
52
|
+
evidence: zod_1.z
|
|
53
|
+
.string()
|
|
54
|
+
.optional()
|
|
55
|
+
.describe('Kept on the send as the consent evidence'),
|
|
56
|
+
})
|
|
57
|
+
.optional(),
|
|
58
|
+
journey: zod_1.z
|
|
59
|
+
.object({
|
|
60
|
+
versionId: zod_1.z.string().optional().describe('journeyVersionUID'),
|
|
61
|
+
nodeId: zod_1.z.string().optional().describe('currentNodeId'),
|
|
62
|
+
instanceId: zod_1.z.string().optional().describe('instanceUID'),
|
|
63
|
+
})
|
|
64
|
+
.optional()
|
|
65
|
+
.describe('The journey position; the idempotency key is derived from it'),
|
|
66
|
+
inputs: zod_1.z
|
|
67
|
+
.record(zod_1.z.string(), zod_1.z.string())
|
|
68
|
+
.optional()
|
|
69
|
+
.describe("Values for the Outreach's declared inputs; keys without dots, not starting with $"),
|
|
70
|
+
emulator: zod_1.z
|
|
71
|
+
.object({ personaId: zod_1.z.string().optional() })
|
|
72
|
+
.optional()
|
|
73
|
+
.describe("A rehearsal: send to this persona's emulator session instead of a real profile"),
|
|
74
|
+
dryRun: zod_1.z
|
|
75
|
+
.boolean()
|
|
76
|
+
.optional()
|
|
77
|
+
.describe('Decide everything, send nothing, write nothing'),
|
|
78
|
+
},
|
|
79
|
+
run: async ({ client }, { agentId, outreachId, ...body }) => client.post(await client.orgPath(ajoPath(agentId, `/outreach/${encodeURIComponent(outreachId)}/sends`)), dropUndefined(body)),
|
|
80
|
+
}),
|
|
81
|
+
(0, tool_1.defineTool)({
|
|
82
|
+
name: 'get_ajo_send',
|
|
83
|
+
title: 'Read a send as the AJO status action does',
|
|
84
|
+
description: "The Adobe Journey Optimizer status action: a send, flattened, every field always present — { sendId, state (queued | sending | sent | failed | suppressed | cancelled), reason ('' or the send's reason, e.g. not_rcs_capable, binding_error, outreach_unavailable), reachable (false only for not_rcs_capable), delivered, read (positive evidence only; false is not a failure), replied, final (the state will not change again: sent, failed, suppressed or cancelled), nextAttemptAt (when an automatic retry is due, else '') }. A transient failure is retried by the platform for about 30 minutes before a send is failed, so a journey should wait for final rather than branch on the first read. 404 resource.not_found for an unknown send. Maps to GET /v1/orgs/{org}/agents/{agent}/integrations/ajo/sends/{sendId}.",
|
|
85
|
+
kind: 'read',
|
|
86
|
+
scope: 'integrations:ajo',
|
|
87
|
+
roleFloor: 'viewer',
|
|
88
|
+
input: {
|
|
89
|
+
agentId,
|
|
90
|
+
sendId: zod_1.z.string().min(1).describe('sendId from send_ajo_outreach'),
|
|
91
|
+
},
|
|
92
|
+
run: async ({ client }, { agentId, sendId }) => client.get(await client.orgPath(ajoPath(agentId, `/sends/${encodeURIComponent(sendId)}`))),
|
|
93
|
+
}),
|
|
94
|
+
];
|
|
95
|
+
//# sourceMappingURL=ajo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ajo.js","sourceRoot":"","sources":["../../src/tools/ajo.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,OAAO,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAEvD,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,GAAW,EAAU,EAAE,CACrD,WAAW,kBAAkB,CAAC,KAAK,CAAC,oBAAoB,GAAG,EAAE,CAAC;AAEhE,MAAM,aAAa,GAAG,CAAC,CAA0B,EAAE,EAAE,CACnD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC;AAE9D,QAAA,QAAQ,GAAG;IACtB,IAAA,iBAAU,EAAC;QACT,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,gDAAgD;QACvD,WAAW,EACT,yrCAAyrC;QAC3rC,IAAI,EAAE,aAAa;QACnB,KAAK,E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EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAC7C,MAAM,CAAC,GAAG,CACR,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAC/E;KACJ,CAAC;CACH,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyTool, ToolProfile } from '../tool';
|
|
2
2
|
/**
|
|
3
3
|
* The tool table, in the order hosts list them. Grouped as the API reference
|
|
4
|
-
* is: orient → Definition → Capabilities → Channels → People → Outreach → Campaigns →
|
|
4
|
+
* is: orient → Definition → Capabilities → Channels → People → Outreach → AJO → Campaigns →
|
|
5
5
|
* Tests → Personas → Emulator → Activity → Org → Docs. Names must be unique (enforced by test/tools.spec.ts).
|
|
6
6
|
*/
|
|
7
7
|
export declare const allTools: AnyTool[];
|
package/dist/tools/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toolsByName = exports.allTools = void 0;
|
|
4
4
|
exports.toolsForProfile = toolsForProfile;
|
|
5
5
|
const activity_1 = require("./activity");
|
|
6
|
+
const ajo_1 = require("./ajo");
|
|
6
7
|
const agents_1 = require("./agents");
|
|
7
8
|
const campaigns_1 = require("./campaigns");
|
|
8
9
|
const capabilities_1 = require("./capabilities");
|
|
@@ -20,7 +21,7 @@ const outreach_1 = require("./outreach");
|
|
|
20
21
|
const people_1 = require("./people");
|
|
21
22
|
/**
|
|
22
23
|
* The tool table, in the order hosts list them. Grouped as the API reference
|
|
23
|
-
* is: orient → Definition → Capabilities → Channels → People → Outreach → Campaigns →
|
|
24
|
+
* is: orient → Definition → Capabilities → Channels → People → Outreach → AJO → Campaigns →
|
|
24
25
|
* Tests → Personas → Emulator → Activity → Org → Docs. Names must be unique (enforced by test/tools.spec.ts).
|
|
25
26
|
*/
|
|
26
27
|
exports.allTools = [
|
|
@@ -33,6 +34,7 @@ exports.allTools = [
|
|
|
33
34
|
...channels_1.channelTools,
|
|
34
35
|
...people_1.peopleTools,
|
|
35
36
|
...outreach_1.outreachTools,
|
|
37
|
+
...ajo_1.ajoTools,
|
|
36
38
|
...campaigns_1.campaignTools,
|
|
37
39
|
...tests_1.testTools,
|
|
38
40
|
...personas_1.personaTools,
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AAoDA,0CAKC;AAxDD,yCAA2C;AAC3C,+BAAiC;AACjC,qCAAsC;AACtC,2CAA4C;AAC5C,iDAAiD;AACjD,yCAA0C;AAC1C,6CAA+C;AAC/C,iCAAmC;AACnC,yCAA2C;AAC3C,mCAAoC;AACpC,yCAA0C;AAC1C,mCAAoC;AACpC,mCAAqC;AACrC,6BAA+B;AAC/B,+BAAiC;AACjC,yCAA2C;AAC3C,qCAAuC;AAEvC;;;;GAIG;AACU,QAAA,QAAQ,GAAc;IACjC,GAAG,YAAO;IACV,GAAG,mBAAU;IACb,GAAG,4BAAe;IAClB,GAAG,iBAAS;IACZ,GAAG,kBAAU;IACb,GAAG,8BAAe;IAClB,GAAG,uBAAY;IACf,GAAG,oBAAW;IACd,GAAG,wBAAa;IAChB,GAAG,cAAQ;IACX,GAAG,yBAAa;IAChB,GAAG,iBAAS;IACZ,GAAG,uBAAY;IACf,GAAG,wBAAa;IAChB,GAAG,wBAAa;IAChB,GAAG,cAAQ;IACX,GAAG,gBAAS;CACb,CAAC;AAEW,QAAA,WAAW,GAAiC,IAAI,GAAG,CAC9D,gBAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAC/B,CAAC;AAEF;;;GAGG;AACH,SAAgB,eAAe,CAC7B,OAAoB,EACpB,QAA4B,gBAAQ;IAEpC,OAAO,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC;AACnF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anychat-ai/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.77.0",
|
|
4
4
|
"description": "Anychat MCP server — drive your Anychat workspace (agents, playbooks, channels, people, outreach) from Claude Code, Claude Desktop, Cursor, or any MCP host.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anychat",
|