@anychat-ai/mcp 0.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/LICENSE +21 -0
- package/README.md +174 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +98 -0
- package/dist/bin.js.map +1 -0
- package/dist/client.d.ts +91 -0
- package/dist/client.js +154 -0
- package/dist/client.js.map +1 -0
- package/dist/docs.d.ts +60 -0
- package/dist/docs.js +238 -0
- package/dist/docs.js.map +1 -0
- package/dist/format.d.ts +19 -0
- package/dist/format.js +67 -0
- package/dist/format.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +26 -0
- package/dist/server.js +72 -0
- package/dist/server.js.map +1 -0
- package/dist/tool.d.ts +43 -0
- package/dist/tool.js +8 -0
- package/dist/tool.js.map +1 -0
- package/dist/tools/activity.d.ts +1 -0
- package/dist/tools/activity.js +153 -0
- package/dist/tools/activity.js.map +1 -0
- package/dist/tools/agents.d.ts +1 -0
- package/dist/tools/agents.js +309 -0
- package/dist/tools/agents.js.map +1 -0
- package/dist/tools/capabilities.d.ts +1 -0
- package/dist/tools/capabilities.js +325 -0
- package/dist/tools/capabilities.js.map +1 -0
- package/dist/tools/channels.d.ts +1 -0
- package/dist/tools/channels.js +208 -0
- package/dist/tools/channels.js.map +1 -0
- package/dist/tools/definition.d.ts +1 -0
- package/dist/tools/definition.js +531 -0
- package/dist/tools/definition.js.map +1 -0
- package/dist/tools/docs.d.ts +1 -0
- package/dist/tools/docs.js +67 -0
- package/dist/tools/docs.js.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.js +30 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/me.d.ts +1 -0
- package/dist/tools/me.js +17 -0
- package/dist/tools/me.js.map +1 -0
- package/dist/tools/org.d.ts +1 -0
- package/dist/tools/org.js +178 -0
- package/dist/tools/org.js.map +1 -0
- package/dist/tools/people.d.ts +1 -0
- package/dist/tools/people.js +411 -0
- package/dist/tools/people.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.capabilityTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tool_1 = require("../tool");
|
|
6
|
+
/**
|
|
7
|
+
* Capabilities tool group — tool bindings, OAuth-runtime tool status,
|
|
8
|
+
* outreach config + preview, outreach links, and knowledge documents.
|
|
9
|
+
*
|
|
10
|
+
* Every tool is a 1:1 projection of a `/v1` route (API reference:
|
|
11
|
+
* "Tool bindings", "OAuth-runtime tools", "Outreach", "Outreach links";
|
|
12
|
+
* knowledge documents are the two read routes under
|
|
13
|
+
* `/knowledge/documents`, guarded by `knowledge:read`).
|
|
14
|
+
*
|
|
15
|
+
* Deliberately NOT here:
|
|
16
|
+
* - `POST …/tools/{toolId}/oauth/start` — the grant completes in the
|
|
17
|
+
* operator's browser; hosts can't drive that flow from a tool.
|
|
18
|
+
* - Sending outreach — there is no `/v1` send route (sends are a console /
|
|
19
|
+
* gateway operation), so nothing to project.
|
|
20
|
+
* - Human escalation — no dedicated route; it's the identity contact
|
|
21
|
+
* fields (`contactEmail`, `contactPhone`, `websiteUrl`,
|
|
22
|
+
* `contactAvailability`), edited via the identity tools.
|
|
23
|
+
*/
|
|
24
|
+
const agentId = zod_1.z
|
|
25
|
+
.string()
|
|
26
|
+
.describe('Agent id (URL-safe slug, e.g. agent-acme-bot-pj7r2qx4)');
|
|
27
|
+
const toolId = zod_1.z
|
|
28
|
+
.string()
|
|
29
|
+
.describe('Qualified catalog tool id, e.g. "@anychat/tool.custom-http-webhook", or the id of one of the agent\'s custom tools. Passed raw — the tool URL-encodes it.');
|
|
30
|
+
const bindingsBase = (agent) => `/agents/${encodeURIComponent(agent)}/tool-bindings`;
|
|
31
|
+
const bindingPath = (agent, tool) => `${bindingsBase(agent)}/${encodeURIComponent(tool)}`;
|
|
32
|
+
const oauthPath = (agent, tool, action) => `/agents/${encodeURIComponent(agent)}/tools/${encodeURIComponent(tool)}/oauth/${action}`;
|
|
33
|
+
const outreachPath = (agent) => `/agents/${encodeURIComponent(agent)}/outreach`;
|
|
34
|
+
const outreachLinksPath = (agent) => `/agents/${encodeURIComponent(agent)}/outreach-links`;
|
|
35
|
+
const knowledgeDocsPath = (agent) => `/agents/${encodeURIComponent(agent)}/knowledge/documents`;
|
|
36
|
+
/**
|
|
37
|
+
* Tool-binding `config`: shape is defined by the catalog tool's
|
|
38
|
+
* `configSchema` (see the tools catalog), so it's an open record. Secret
|
|
39
|
+
* (`writeOnly`) fields: non-empty string sets/replaces, empty string
|
|
40
|
+
* clears, omitted leaves the stored secret untouched.
|
|
41
|
+
*/
|
|
42
|
+
const bindingConfig = zod_1.z
|
|
43
|
+
.record(zod_1.z.string(), zod_1.z.any())
|
|
44
|
+
.describe("Tool configuration object; shape per the catalog tool's configSchema (e.g. { webhookUrl, authHeader } for the Custom HTTP Webhook tool, a calendar id for Google Calendar). For write-only secret fields (API keys, webhook URLs, auth headers): send a non-empty string to set/replace, an empty string to clear, or omit to leave the stored secret untouched. Reads return { set, last4 } metadata in place of secrets.");
|
|
45
|
+
const followUpStep = zod_1.z
|
|
46
|
+
.object({
|
|
47
|
+
id: zod_1.z.string().min(1).describe('Step id (non-empty string, operator-chosen)'),
|
|
48
|
+
delay: zod_1.z
|
|
49
|
+
.object({
|
|
50
|
+
value: zod_1.z.number().positive().describe('Wait since the initial outreach (> 0)'),
|
|
51
|
+
unit: zod_1.z.enum(['hours', 'days']).describe('Unit for value'),
|
|
52
|
+
})
|
|
53
|
+
.describe('How long after the outreach to send the nudge'),
|
|
54
|
+
messageTemplateId: zod_1.z
|
|
55
|
+
.string()
|
|
56
|
+
.min(1)
|
|
57
|
+
.describe("Id of one of the agent's message templates (must exist, else 404)"),
|
|
58
|
+
})
|
|
59
|
+
.describe('The single automatic follow-up step');
|
|
60
|
+
exports.capabilityTools = [
|
|
61
|
+
// ── Tool bindings ────────────────────────────────────────────────────
|
|
62
|
+
(0, tool_1.defineTool)({
|
|
63
|
+
name: 'list_tool_bindings',
|
|
64
|
+
title: 'List tool bindings',
|
|
65
|
+
description: "List the tools bound to an agent (integrations such as Google Calendar, Slack, Custom HTTP Webhook, or the agent's own custom tools) with each binding's config (secrets redacted to { set, last4 }), enabled flag and configStatus (complete | incomplete | invalid). Use to see which capabilities an agent has wired up before configuring or troubleshooting one. Maps to GET /v1/orgs/{org}/agents/{agent}/tool-bindings.",
|
|
66
|
+
kind: 'read',
|
|
67
|
+
scope: 'agents:read',
|
|
68
|
+
roleFloor: 'viewer',
|
|
69
|
+
input: { agentId },
|
|
70
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(bindingsBase(agentId))),
|
|
71
|
+
}),
|
|
72
|
+
(0, tool_1.defineTool)({
|
|
73
|
+
name: 'get_tool_binding',
|
|
74
|
+
title: 'Get a tool binding',
|
|
75
|
+
description: 'Read one tool binding on an agent: { toolId, config (secrets redacted), enabled, configStatus }. Use to inspect how a specific integration is configured. Maps to GET /v1/orgs/{org}/agents/{agent}/tool-bindings/{toolId}.',
|
|
76
|
+
kind: 'read',
|
|
77
|
+
scope: 'agents:read',
|
|
78
|
+
roleFloor: 'viewer',
|
|
79
|
+
input: { agentId, toolId },
|
|
80
|
+
run: async ({ client }, { agentId, toolId }) => client.get(await client.orgPath(bindingPath(agentId, toolId))),
|
|
81
|
+
}),
|
|
82
|
+
(0, tool_1.defineTool)({
|
|
83
|
+
name: 'upsert_tool_binding',
|
|
84
|
+
title: 'Create or replace a tool binding',
|
|
85
|
+
description: "Bind a catalog tool (or one of the agent's custom tools) to the agent, or replace an existing binding's config wholesale. The tool must exist in the catalog (see the tools catalog for its configSchema) — unknown tools are rejected with 404. Returns the saved binding with configStatus. Use update_tool_binding to merge a partial change instead. Maps to PUT /v1/orgs/{org}/agents/{agent}/tool-bindings/{toolId}.",
|
|
86
|
+
kind: 'write',
|
|
87
|
+
scope: 'agents:write',
|
|
88
|
+
roleFloor: 'editor',
|
|
89
|
+
input: {
|
|
90
|
+
agentId,
|
|
91
|
+
toolId,
|
|
92
|
+
config: bindingConfig,
|
|
93
|
+
enabled: zod_1.z
|
|
94
|
+
.boolean()
|
|
95
|
+
.optional()
|
|
96
|
+
.describe('Whether the agent may use the tool (default: keep the existing value, or true for a new binding)'),
|
|
97
|
+
},
|
|
98
|
+
run: async ({ client }, { agentId, toolId, config, enabled }) => client.put(await client.orgPath(bindingPath(agentId, toolId)), {
|
|
99
|
+
config,
|
|
100
|
+
...(enabled !== undefined ? { enabled } : {}),
|
|
101
|
+
}),
|
|
102
|
+
}),
|
|
103
|
+
(0, tool_1.defineTool)({
|
|
104
|
+
name: 'update_tool_binding',
|
|
105
|
+
title: 'Update a tool binding (merge)',
|
|
106
|
+
description: "Merge changes into an existing tool binding's config (fields you omit are left as they are). The binding must already exist (else 404). Returns the saved binding with configStatus. Maps to PATCH /v1/orgs/{org}/agents/{agent}/tool-bindings/{toolId}.",
|
|
107
|
+
kind: 'write',
|
|
108
|
+
scope: 'agents:write',
|
|
109
|
+
roleFloor: 'editor',
|
|
110
|
+
input: {
|
|
111
|
+
agentId,
|
|
112
|
+
toolId,
|
|
113
|
+
config: bindingConfig.optional(),
|
|
114
|
+
enabled: zod_1.z
|
|
115
|
+
.boolean()
|
|
116
|
+
.optional()
|
|
117
|
+
.describe('Set the enabled flag as part of the same update'),
|
|
118
|
+
},
|
|
119
|
+
run: async ({ client }, { agentId, toolId, config, enabled }) => client.patch(await client.orgPath(bindingPath(agentId, toolId)), {
|
|
120
|
+
...(config !== undefined ? { config } : {}),
|
|
121
|
+
...(enabled !== undefined ? { enabled } : {}),
|
|
122
|
+
}),
|
|
123
|
+
}),
|
|
124
|
+
(0, tool_1.defineTool)({
|
|
125
|
+
name: 'set_tool_binding_enabled',
|
|
126
|
+
title: 'Enable or disable a tool binding',
|
|
127
|
+
description: 'Turn a bound tool on or off for the agent without touching its config — a disabled binding keeps its configuration and any stored secrets. Returns the updated binding. Maps to POST /v1/orgs/{org}/agents/{agent}/tool-bindings/{toolId}/_enable (enabled: true) or …/_disable (enabled: false).',
|
|
128
|
+
kind: 'write',
|
|
129
|
+
scope: 'agents:write',
|
|
130
|
+
roleFloor: 'editor',
|
|
131
|
+
input: {
|
|
132
|
+
agentId,
|
|
133
|
+
toolId,
|
|
134
|
+
enabled: zod_1.z.boolean().describe('true → _enable, false → _disable'),
|
|
135
|
+
},
|
|
136
|
+
run: async ({ client }, { agentId, toolId, enabled }) => client.post(await client.orgPath(`${bindingPath(agentId, toolId)}/${enabled ? '_enable' : '_disable'}`)),
|
|
137
|
+
}),
|
|
138
|
+
(0, tool_1.defineTool)({
|
|
139
|
+
name: 'delete_tool_binding',
|
|
140
|
+
title: 'Delete a tool binding',
|
|
141
|
+
description: 'Unbind a tool from the agent and clear any stored secrets for the binding (irreversible — the config and secrets are gone; the agent stops offering the tool). To merely pause a tool use set_tool_binding_enabled; to drop only an OAuth grant use disconnect_oauth. Returns { ok: true, deleted: toolId } (the API replies 204). Maps to DELETE /v1/orgs/{org}/agents/{agent}/tool-bindings/{toolId}.',
|
|
142
|
+
kind: 'destructive',
|
|
143
|
+
scope: 'agents:write',
|
|
144
|
+
roleFloor: 'editor',
|
|
145
|
+
input: { agentId, toolId },
|
|
146
|
+
run: async ({ client }, { agentId, toolId }) => {
|
|
147
|
+
await client.delete(await client.orgPath(bindingPath(agentId, toolId)));
|
|
148
|
+
return { ok: true, deleted: toolId };
|
|
149
|
+
},
|
|
150
|
+
}),
|
|
151
|
+
// ── OAuth-runtime tools ──────────────────────────────────────────────
|
|
152
|
+
(0, tool_1.defineTool)({
|
|
153
|
+
name: 'get_oauth_status',
|
|
154
|
+
title: 'Get OAuth connection status',
|
|
155
|
+
description: 'Report the OAuth credential state for an OAuth-runtime tool binding (Google Calendar, Slack, …): { state: "not-connected" | "connected" | "expired" | "revoked" | "error", connectedAt?, lastError? }. Use to check whether an integration is connected or needs the operator to reconnect. Connecting requires the operator\'s browser (the console\'s Connect button, or POST …/oauth/start) and is not exposed as a tool. Maps to GET /v1/orgs/{org}/agents/{agent}/tools/{toolId}/oauth/status.',
|
|
156
|
+
kind: 'read',
|
|
157
|
+
scope: 'agents:read',
|
|
158
|
+
roleFloor: 'viewer',
|
|
159
|
+
input: { agentId, toolId },
|
|
160
|
+
run: async ({ client }, { agentId, toolId }) => client.get(await client.orgPath(oauthPath(agentId, toolId, 'status'))),
|
|
161
|
+
}),
|
|
162
|
+
(0, tool_1.defineTool)({
|
|
163
|
+
name: 'disconnect_oauth',
|
|
164
|
+
title: 'Disconnect an OAuth grant',
|
|
165
|
+
description: 'Revoke the OAuth grant at the provider and delete the stored credential for an OAuth-runtime tool binding. The agent immediately loses access to the connected account (e.g. the calendar) until an operator reconnects in a browser; the binding itself stays so reconnecting is one click. Confirm with the user before running. Maps to POST /v1/orgs/{org}/agents/{agent}/tools/{toolId}/oauth/disconnect.',
|
|
166
|
+
kind: 'destructive',
|
|
167
|
+
scope: 'agents:write',
|
|
168
|
+
roleFloor: 'editor',
|
|
169
|
+
input: { agentId, toolId },
|
|
170
|
+
run: async ({ client }, { agentId, toolId }) => client.post(await client.orgPath(oauthPath(agentId, toolId, 'disconnect'))),
|
|
171
|
+
}),
|
|
172
|
+
// ── Outreach config ──────────────────────────────────────────────────
|
|
173
|
+
(0, tool_1.defineTool)({
|
|
174
|
+
name: 'get_outreach_config',
|
|
175
|
+
title: 'Get outreach config',
|
|
176
|
+
description: "Read the agent's outreach configuration: greetingTemplateId (the message template used as the first message when the agent initiates a conversation) and followUps (the single automatic nudge for non-responders: enabled, steps[1], quietHours). Returns {} when nothing is configured (outreach then falls back to an LLM-composed opener). Maps to GET /v1/orgs/{org}/agents/{agent}/outreach.",
|
|
177
|
+
kind: 'read',
|
|
178
|
+
scope: 'agents:read',
|
|
179
|
+
roleFloor: 'viewer',
|
|
180
|
+
input: { agentId },
|
|
181
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(outreachPath(agentId))),
|
|
182
|
+
}),
|
|
183
|
+
(0, tool_1.defineTool)({
|
|
184
|
+
name: 'replace_outreach_config',
|
|
185
|
+
title: 'Replace outreach config',
|
|
186
|
+
description: "Replace the agent's whole outreach configuration (PUT semantics: fields you omit are cleared — read it first with get_outreach_config). greetingTemplateId must be an existing message template on the agent (else 404); followUps.steps holds exactly one step (more → 422); pass {} to clear everything. Enabling follow-ups only enrolls people contacted afterwards — never existing contacts. Returns the saved config. Maps to PUT /v1/orgs/{org}/agents/{agent}/outreach.",
|
|
187
|
+
kind: 'write',
|
|
188
|
+
scope: 'agents:write',
|
|
189
|
+
roleFloor: 'editor',
|
|
190
|
+
input: {
|
|
191
|
+
agentId,
|
|
192
|
+
greetingTemplateId: zod_1.z
|
|
193
|
+
.string()
|
|
194
|
+
.optional()
|
|
195
|
+
.describe("Id of one of the agent's message templates to use as the outreach greeting; omit to fall back to an LLM-composed opener"),
|
|
196
|
+
followUps: zod_1.z
|
|
197
|
+
.object({
|
|
198
|
+
enabled: zod_1.z.boolean().describe('Master switch for automatic follow-up sending'),
|
|
199
|
+
steps: zod_1.z
|
|
200
|
+
.array(followUpStep)
|
|
201
|
+
.max(1)
|
|
202
|
+
.describe('Exactly one follow-up step (or empty)'),
|
|
203
|
+
quietHours: zod_1.z
|
|
204
|
+
.object({
|
|
205
|
+
startHour: zod_1.z.number().int().min(0).max(23).describe('0–23, inclusive'),
|
|
206
|
+
endHour: zod_1.z
|
|
207
|
+
.number()
|
|
208
|
+
.int()
|
|
209
|
+
.min(0)
|
|
210
|
+
.max(23)
|
|
211
|
+
.describe('0–23, exclusive; may wrap midnight'),
|
|
212
|
+
timezone: zod_1.z.string().min(1).describe('IANA zone, e.g. "America/Chicago"'),
|
|
213
|
+
})
|
|
214
|
+
.optional()
|
|
215
|
+
.describe('Suppress the automatic send during these local hours'),
|
|
216
|
+
})
|
|
217
|
+
.optional()
|
|
218
|
+
.describe('Automatic follow-up (nudge) config; omit to clear follow-ups'),
|
|
219
|
+
},
|
|
220
|
+
run: async ({ client }, { agentId, greetingTemplateId, followUps }) => client.put(await client.orgPath(outreachPath(agentId)), {
|
|
221
|
+
...(greetingTemplateId !== undefined ? { greetingTemplateId } : {}),
|
|
222
|
+
...(followUps !== undefined ? { followUps } : {}),
|
|
223
|
+
}),
|
|
224
|
+
}),
|
|
225
|
+
(0, tool_1.defineTool)({
|
|
226
|
+
name: 'preview_outreach',
|
|
227
|
+
title: 'Preview outreach greeting',
|
|
228
|
+
description: 'Render the configured outreach greeting for a specific person and return what would be sent: { greeting: { renderedText, missingSlots[], blocked } }. Use to check slot substitution before sending outreach. Returns 404 when no greeting template is configured. Maps to GET /v1/orgs/{org}/agents/{agent}/outreach/preview?personId=….',
|
|
229
|
+
kind: 'read',
|
|
230
|
+
scope: 'agents:read',
|
|
231
|
+
roleFloor: 'viewer',
|
|
232
|
+
input: {
|
|
233
|
+
agentId,
|
|
234
|
+
personId: zod_1.z
|
|
235
|
+
.string()
|
|
236
|
+
.describe('Id of a Person on this agent to render the greeting against'),
|
|
237
|
+
},
|
|
238
|
+
run: async ({ client }, { agentId, personId }) => client.get(await client.orgPath(`${outreachPath(agentId)}/preview`), { personId }),
|
|
239
|
+
}),
|
|
240
|
+
// ── Outreach links ───────────────────────────────────────────────────
|
|
241
|
+
(0, tool_1.defineTool)({
|
|
242
|
+
name: 'list_outreach_links',
|
|
243
|
+
title: 'List outreach links',
|
|
244
|
+
description: "List the agent's outreach links — shareable public phone-entry pages that let a prospect start an RCS conversation with the agent. Each has { id, code, url, label, maxUses, usesRemaining, redemptionCount, expiresAt, disabled, createdAt }. Maps to GET /v1/orgs/{org}/agents/{agent}/outreach-links.",
|
|
245
|
+
kind: 'read',
|
|
246
|
+
scope: 'agents:read',
|
|
247
|
+
roleFloor: 'viewer',
|
|
248
|
+
input: { agentId },
|
|
249
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(outreachLinksPath(agentId))),
|
|
250
|
+
}),
|
|
251
|
+
(0, tool_1.defineTool)({
|
|
252
|
+
name: 'create_outreach_link',
|
|
253
|
+
title: 'Create an outreach link',
|
|
254
|
+
description: "Mint a new use-limited, time-limited outreach link against one of the agent's RCS channel bindings (find the binding id with the channel tools). Returns the link including its shareable url. Validation failures return 400 with a human-readable error. Maps to POST /v1/orgs/{org}/agents/{agent}/outreach-links.",
|
|
255
|
+
kind: 'write',
|
|
256
|
+
scope: 'agents:write',
|
|
257
|
+
roleFloor: 'editor',
|
|
258
|
+
input: {
|
|
259
|
+
agentId,
|
|
260
|
+
bindingId: zod_1.z
|
|
261
|
+
.string()
|
|
262
|
+
.describe('Id of an RCS channel binding on this agent (required)'),
|
|
263
|
+
label: zod_1.z.string().optional().describe('Operator-facing note, e.g. "Trade-show QR"'),
|
|
264
|
+
maxUses: zod_1.z
|
|
265
|
+
.number()
|
|
266
|
+
.int()
|
|
267
|
+
.min(1)
|
|
268
|
+
.max(500)
|
|
269
|
+
.optional()
|
|
270
|
+
.describe('Redemption cap, 1–500 (default 25)'),
|
|
271
|
+
expiresAt: zod_1.z
|
|
272
|
+
.string()
|
|
273
|
+
.optional()
|
|
274
|
+
.describe('ISO-8601 expiry, at most 30 days out (default 14 days from now)'),
|
|
275
|
+
},
|
|
276
|
+
run: async ({ client }, { agentId, bindingId, label, maxUses, expiresAt }) => client.post(await client.orgPath(outreachLinksPath(agentId)), {
|
|
277
|
+
bindingId,
|
|
278
|
+
...(label !== undefined ? { label } : {}),
|
|
279
|
+
...(maxUses !== undefined ? { maxUses } : {}),
|
|
280
|
+
...(expiresAt !== undefined ? { expiresAt } : {}),
|
|
281
|
+
}),
|
|
282
|
+
}),
|
|
283
|
+
(0, tool_1.defineTool)({
|
|
284
|
+
name: 'update_outreach_link',
|
|
285
|
+
title: 'Pause or resume an outreach link',
|
|
286
|
+
description: "Set an outreach link's disabled flag — pause (disabled: true) or resume (false) without losing its remaining uses. This is the only mutable field. Returns the updated link. Maps to PATCH /v1/orgs/{org}/agents/{agent}/outreach-links/{id}.",
|
|
287
|
+
kind: 'write',
|
|
288
|
+
scope: 'agents:write',
|
|
289
|
+
roleFloor: 'editor',
|
|
290
|
+
input: {
|
|
291
|
+
agentId,
|
|
292
|
+
linkId: zod_1.z.string().describe('Outreach link id (from list_outreach_links)'),
|
|
293
|
+
disabled: zod_1.z.boolean().describe('true to pause the link, false to resume it'),
|
|
294
|
+
},
|
|
295
|
+
run: async ({ client }, { agentId, linkId, disabled }) => client.patch(await client.orgPath(`${outreachLinksPath(agentId)}/${encodeURIComponent(linkId)}`), { disabled }),
|
|
296
|
+
}),
|
|
297
|
+
(0, tool_1.defineTool)({
|
|
298
|
+
name: 'delete_outreach_link',
|
|
299
|
+
title: 'Delete an outreach link',
|
|
300
|
+
description: 'Permanently remove an outreach link — anyone holding the URL can no longer use it and its redemption count is lost. Prefer update_outreach_link (disabled: true) to pause instead. Returns { ok: true, deleted: linkId } (the API replies 204). Maps to DELETE /v1/orgs/{org}/agents/{agent}/outreach-links/{id}.',
|
|
301
|
+
kind: 'destructive',
|
|
302
|
+
scope: 'agents:write',
|
|
303
|
+
roleFloor: 'editor',
|
|
304
|
+
input: {
|
|
305
|
+
agentId,
|
|
306
|
+
linkId: zod_1.z.string().describe('Outreach link id (from list_outreach_links)'),
|
|
307
|
+
},
|
|
308
|
+
run: async ({ client }, { agentId, linkId }) => {
|
|
309
|
+
await client.delete(await client.orgPath(`${outreachLinksPath(agentId)}/${encodeURIComponent(linkId)}`));
|
|
310
|
+
return { ok: true, deleted: linkId };
|
|
311
|
+
},
|
|
312
|
+
}),
|
|
313
|
+
// ── Knowledge documents (read-only) ──────────────────────────────────
|
|
314
|
+
(0, tool_1.defineTool)({
|
|
315
|
+
name: 'list_knowledge_documents',
|
|
316
|
+
title: 'List knowledge documents',
|
|
317
|
+
description: "List the documents in the agent's knowledge base (metadata only: id, fileName, mimeType, title, status, uploadedAt, createdAt, updatedAt — never the extracted text). Use to see what the agent can draw on for answers. Uploading and deleting documents is console-only today. Maps to GET /v1/orgs/{org}/agents/{agent}/knowledge/documents.",
|
|
318
|
+
kind: 'read',
|
|
319
|
+
scope: 'knowledge:read',
|
|
320
|
+
roleFloor: 'viewer',
|
|
321
|
+
input: { agentId },
|
|
322
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(knowledgeDocsPath(agentId))),
|
|
323
|
+
}),
|
|
324
|
+
];
|
|
325
|
+
//# sourceMappingURL=capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/tools/capabilities.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kCAAqC;AAErC;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,OAAO,GAAG,OAAC;KACd,MAAM,EAAE;KACR,QAAQ,CAAC,wDAAwD,CAAC,CAAC;AACtE,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,EAAE;KACR,QAAQ,CACP,2JAA2J,CAC5J,CAAC;AAEJ,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CACrC,WAAW,kBAAkB,CAAC,KAAK,CAAC,gBAAgB,CAAC;AACvD,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,IAAY,EAAE,EAAE,CAClD,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC;AACvD,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,IAAY,EAAE,MAA+B,EAAE,EAAE,CACjF,WAAW,kBAAkB,CAAC,KAAK,CAAC,UAAU,kBAAkB,CAAC,IAAI,CAAC,UAAU,MAAM,EAAE,CAAC;AAC3F,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,WAAW,kBAAkB,CAAC,KAAK,CAAC,WAAW,CAAC;AACxF,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gBAAgB;QACvB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,EAAE,OAAO,EAAE;QAClB,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CACrC,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;KAC/D,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const channelTools: import("../tool").AnyTool[];
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.channelTools = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tool_1 = require("../tool");
|
|
6
|
+
/**
|
|
7
|
+
* Channels — the bindings that wire an agent to the messaging channels its
|
|
8
|
+
* users live on. Mirrors the "Channels" section of the API reference:
|
|
9
|
+
* `/v1/orgs/{org}/agents/{agent}/channels`.
|
|
10
|
+
*
|
|
11
|
+
* Vocabulary (keep it operator-facing): a *channel* is what the user sees
|
|
12
|
+
* (rcs, appleMessages, whatsapp, sms, webchat, …); the *provider* serving it
|
|
13
|
+
* is an implementation detail. A binding is either **managed** (Anychat picks
|
|
14
|
+
* the provider and runs provisioning — a human-actioned sysop queue for rich
|
|
15
|
+
* channels, days to weeks) or **unmanaged** (the operator brings their own
|
|
16
|
+
* provider account and credentials; `auth` is write-only and never read back).
|
|
17
|
+
* One live binding per channel per agent; webchat is created automatically
|
|
18
|
+
* with every agent. Provisioning progress is read off the binding itself
|
|
19
|
+
* (`status`, `statusDetail`, `events`) — there is no separate provisioning
|
|
20
|
+
* route.
|
|
21
|
+
*/
|
|
22
|
+
const CHANNEL_NAMES = [
|
|
23
|
+
'rcs',
|
|
24
|
+
'appleMessages',
|
|
25
|
+
'whatsapp',
|
|
26
|
+
'sms',
|
|
27
|
+
'webchat',
|
|
28
|
+
'viber',
|
|
29
|
+
'instagram',
|
|
30
|
+
'slack',
|
|
31
|
+
'poe',
|
|
32
|
+
];
|
|
33
|
+
const PROVIDERS = [
|
|
34
|
+
'googleRbm',
|
|
35
|
+
'webexRcs',
|
|
36
|
+
'webexAmb',
|
|
37
|
+
'twilio',
|
|
38
|
+
'whatsappCloud',
|
|
39
|
+
'viber',
|
|
40
|
+
'slack',
|
|
41
|
+
'poe',
|
|
42
|
+
];
|
|
43
|
+
const channelName = zod_1.z
|
|
44
|
+
.enum(CHANNEL_NAMES)
|
|
45
|
+
.describe('Public channel name. rcs | appleMessages (Apple Messages for Business) | whatsapp | sms | webchat | viber | instagram | slack | poe.');
|
|
46
|
+
const deliverySchema = zod_1.z
|
|
47
|
+
.object({
|
|
48
|
+
minMessageDelayMs: zod_1.z
|
|
49
|
+
.number()
|
|
50
|
+
.int()
|
|
51
|
+
.min(250)
|
|
52
|
+
.max(3000)
|
|
53
|
+
.optional()
|
|
54
|
+
.describe('Minimum gap in ms (250–3000) between consecutive agent messages to one user on this channel. Paces multi-bubble replies and keeps ordering on providers that do not guarantee it. Omit for no pacing.'),
|
|
55
|
+
})
|
|
56
|
+
.describe('Delivery pacing (any binding mode).');
|
|
57
|
+
const complianceSchema = zod_1.z
|
|
58
|
+
.object({
|
|
59
|
+
enabled: zod_1.z
|
|
60
|
+
.boolean()
|
|
61
|
+
.describe('Turn carrier compliance on/off (default off). When on, Anychat sends a one-time disclaimer per messaging relationship and deterministically handles STOP/UNSUBSCRIBE/CANCEL/END/QUIT (opt-out), HELP (brand contact reply from identity) and START (re-subscribe). Leave off if the provider already auto-handles opt-out keywords (e.g. Twilio Advanced Opt-Out) to avoid double confirmations.'),
|
|
62
|
+
disclaimerText: zod_1.z
|
|
63
|
+
.string()
|
|
64
|
+
.max(1000)
|
|
65
|
+
.optional()
|
|
66
|
+
.describe('Override for the conversation-start disclaimer (max 1000 chars). Omit for the stock operator text.'),
|
|
67
|
+
})
|
|
68
|
+
.describe('Carrier compliance block — RCS and SMS bindings only.');
|
|
69
|
+
const agentIdField = zod_1.z
|
|
70
|
+
.string()
|
|
71
|
+
.describe('Agent id (URL-safe slug, e.g. agent-acme-bot-pj7r2qx4).');
|
|
72
|
+
const bindingIdField = zod_1.z
|
|
73
|
+
.string()
|
|
74
|
+
.describe('Channel binding id, as returned by list_channels / get_channel.');
|
|
75
|
+
function bindingPath(agentId, bindingId) {
|
|
76
|
+
const base = `/agents/${encodeURIComponent(agentId)}/channels`;
|
|
77
|
+
return bindingId ? `${base}/${encodeURIComponent(bindingId)}` : base;
|
|
78
|
+
}
|
|
79
|
+
exports.channelTools = [
|
|
80
|
+
(0, tool_1.defineTool)({
|
|
81
|
+
name: 'list_channels',
|
|
82
|
+
title: 'List channel bindings',
|
|
83
|
+
description: 'List the channel bindings of an agent — one per connected channel (rcs, appleMessages, whatsapp, sms, webchat, …) with mode (managed = Anychat provisions; unmanaged = operator-supplied provider account), status (Requested | Provisioning | ActionRequired | Active | Failed | Disabled), statusDetail, lifecycle events, and delivery/compliance settings. Use it to see what an agent is reachable on and to follow provisioning progress; credentials are never returned. Maps to GET /v1/orgs/{org}/agents/{agent}/channels (returns { data: ChannelBinding[] }, not paginated).',
|
|
84
|
+
kind: 'read',
|
|
85
|
+
scope: 'agents:read',
|
|
86
|
+
roleFloor: 'viewer',
|
|
87
|
+
input: { agentId: agentIdField },
|
|
88
|
+
run: async ({ client }, { agentId }) => client.get(await client.orgPath(bindingPath(agentId))),
|
|
89
|
+
}),
|
|
90
|
+
(0, tool_1.defineTool)({
|
|
91
|
+
name: 'get_channel',
|
|
92
|
+
title: 'Get a channel binding',
|
|
93
|
+
description: 'Fetch one channel binding by id, including its provisioning status, statusDetail (what is blocking an ActionRequired/Failed binding), oldest-first lifecycle events, routingId (display-only provider id), the business inputs filed with a managed request, and delivery/compliance settings. Poll this to follow a managed provisioning request. Never returns credentials. Maps to GET /v1/orgs/{org}/agents/{agent}/channels/{bindingId}.',
|
|
94
|
+
kind: 'read',
|
|
95
|
+
scope: 'agents:read',
|
|
96
|
+
roleFloor: 'viewer',
|
|
97
|
+
input: { agentId: agentIdField, bindingId: bindingIdField },
|
|
98
|
+
run: async ({ client }, { agentId, bindingId }) => client.get(await client.orgPath(bindingPath(agentId, bindingId))),
|
|
99
|
+
}),
|
|
100
|
+
(0, tool_1.defineTool)({
|
|
101
|
+
name: 'request_channel',
|
|
102
|
+
title: 'Request a managed channel',
|
|
103
|
+
description: 'File a MANAGED channel request: name the channel and supply the business inputs its setup form asks for (brand name, banner, business category, 10DLC registration info, …; the form comes from the `channels` catalog, GET /v1/catalogs/channels/{channel}). Anychat picks the provider and runs the carrier/Apple/Meta provisioning workflow — a request that humans act on and that takes days to weeks for rich channels, so confirm with the operator before calling. Returns 201 with status "Requested" (or "Active" for instantly-provisioned channels); follow progress with get_channel. 409 if the channel is already bound; 400 if the channel has no managed mode (slack, viber, poe are unmanaged-only — use bind_channel). Never pass credentials here. Maps to POST /v1/orgs/{org}/agents/{agent}/channels with mode "managed".',
|
|
104
|
+
kind: 'destructive',
|
|
105
|
+
scope: 'agents:write',
|
|
106
|
+
roleFloor: 'editor',
|
|
107
|
+
input: {
|
|
108
|
+
agentId: agentIdField,
|
|
109
|
+
channel: channelName,
|
|
110
|
+
inputs: zod_1.z
|
|
111
|
+
.record(zod_1.z.string(), zod_1.z.any())
|
|
112
|
+
.optional()
|
|
113
|
+
.describe('Business/identity fields per the channel\'s managed setup form (e.g. { "brandName": "Acme Health", "bannerUrl": "https://…", "businessCategory": "Health & Wellness" }). Keys and required flags come from the `channels` catalog; several are seeded from the agent identity if omitted.'),
|
|
114
|
+
},
|
|
115
|
+
run: async ({ client }, { agentId, channel, inputs }) => client.post(await client.orgPath(bindingPath(agentId)), {
|
|
116
|
+
channel,
|
|
117
|
+
mode: 'managed',
|
|
118
|
+
...(inputs !== undefined ? { inputs } : {}),
|
|
119
|
+
}),
|
|
120
|
+
}),
|
|
121
|
+
(0, tool_1.defineTool)({
|
|
122
|
+
name: 'bind_channel',
|
|
123
|
+
title: 'Bind an unmanaged channel (bring your own provider)',
|
|
124
|
+
description: 'Create an UNMANAGED channel binding using the operator\'s own provider account: name the channel, the provider serving it, and the provider\'s credential form. `auth` is WRITE-ONLY — accepted here and on update_channel for rotation, never returned by any read. Provider per channel: rcs → googleRbm | webexRcs; appleMessages → webexAmb; whatsapp → whatsappCloud; sms → twilio; slack → slack; viber → viber; poe → poe (credential field keys and required flags come from the `channels` catalog, GET /v1/catalogs/channels/{channel}). Unmanaged bindings go straight to status "Active". 409 if the channel is already bound; 400/422 if provider or required auth fields are wrong. Maps to POST /v1/orgs/{org}/agents/{agent}/channels with mode "unmanaged".',
|
|
125
|
+
kind: 'write',
|
|
126
|
+
scope: 'agents:write',
|
|
127
|
+
roleFloor: 'editor',
|
|
128
|
+
input: {
|
|
129
|
+
agentId: agentIdField,
|
|
130
|
+
channel: channelName,
|
|
131
|
+
provider: zod_1.z
|
|
132
|
+
.enum(PROVIDERS)
|
|
133
|
+
.describe("Provider whose account you are bringing. Must be one of the channel's unmanaged providers (e.g. twilio for sms, whatsappCloud for whatsapp, googleRbm or webexRcs for rcs, webexAmb for appleMessages)."),
|
|
134
|
+
auth: zod_1.z
|
|
135
|
+
.record(zod_1.z.string(), zod_1.z.any())
|
|
136
|
+
.describe('Provider credentials, WRITE-ONLY (never echoed back). Keys per the provider\'s credential form, e.g. Twilio: { "accountSid": "AC…", "authToken": "…", "messagingServiceSid": "MG…", "phoneNumber": "+1555…" }. Treat as secrets.'),
|
|
137
|
+
},
|
|
138
|
+
run: async ({ client }, { agentId, channel, provider, auth }) => client.post(await client.orgPath(bindingPath(agentId)), {
|
|
139
|
+
channel,
|
|
140
|
+
mode: 'unmanaged',
|
|
141
|
+
provider,
|
|
142
|
+
auth,
|
|
143
|
+
}),
|
|
144
|
+
}),
|
|
145
|
+
(0, tool_1.defineTool)({
|
|
146
|
+
name: 'update_channel',
|
|
147
|
+
title: 'Update a channel binding',
|
|
148
|
+
description: 'Update settings on a channel binding: `delivery` (message pacing, any mode), `compliance` (carrier compliance, RCS/SMS only), and/or `auth` (rotate credentials — unmanaged bindings only; write-only, never returned). Supply at least one field; pass null for delivery or compliance to clear that block. Out-of-range pacing → 400; compliance on a non-carrier channel → 400; auth on a managed binding → 400. Returns the updated binding. Maps to PATCH /v1/orgs/{org}/agents/{agent}/channels/{bindingId}.',
|
|
149
|
+
kind: 'write',
|
|
150
|
+
scope: 'agents:write',
|
|
151
|
+
roleFloor: 'editor',
|
|
152
|
+
input: {
|
|
153
|
+
agentId: agentIdField,
|
|
154
|
+
bindingId: bindingIdField,
|
|
155
|
+
delivery: deliverySchema
|
|
156
|
+
.nullable()
|
|
157
|
+
.optional()
|
|
158
|
+
.describe('Delivery pacing settings; null clears pacing; omit to leave unchanged.'),
|
|
159
|
+
compliance: complianceSchema
|
|
160
|
+
.nullable()
|
|
161
|
+
.optional()
|
|
162
|
+
.describe('Carrier compliance settings (rcs/sms only); null clears the block; omit to leave unchanged.'),
|
|
163
|
+
auth: zod_1.z
|
|
164
|
+
.record(zod_1.z.string(), zod_1.z.any())
|
|
165
|
+
.optional()
|
|
166
|
+
.describe("Replacement provider credentials for an UNMANAGED binding (rotation). WRITE-ONLY — never returned. Keys per the provider's credential form. Omit to leave unchanged."),
|
|
167
|
+
},
|
|
168
|
+
run: async ({ client }, { agentId, bindingId, delivery, compliance, auth }) => client.patch(await client.orgPath(bindingPath(agentId, bindingId)), {
|
|
169
|
+
...(delivery !== undefined ? { delivery } : {}),
|
|
170
|
+
...(compliance !== undefined ? { compliance } : {}),
|
|
171
|
+
...(auth !== undefined ? { auth } : {}),
|
|
172
|
+
}),
|
|
173
|
+
}),
|
|
174
|
+
(0, tool_1.defineTool)({
|
|
175
|
+
name: 'disable_channel',
|
|
176
|
+
title: 'Disable a channel binding',
|
|
177
|
+
description: 'Temporarily take a channel offline for this agent: the binding moves to status "Disabled" and stops carrying traffic, but is kept (credentials, provisioning, carrier verification intact) so enable_channel can restore it in one step. Prefer this over delete_channel for a pause. Returns the updated binding. Maps to POST /v1/orgs/{org}/agents/{agent}/channels/{bindingId}/_disable.',
|
|
178
|
+
kind: 'write',
|
|
179
|
+
scope: 'agents:write',
|
|
180
|
+
roleFloor: 'editor',
|
|
181
|
+
input: { agentId: agentIdField, bindingId: bindingIdField },
|
|
182
|
+
run: async ({ client }, { agentId, bindingId }) => client.post(`${await client.orgPath(bindingPath(agentId, bindingId))}/_disable`),
|
|
183
|
+
}),
|
|
184
|
+
(0, tool_1.defineTool)({
|
|
185
|
+
name: 'enable_channel',
|
|
186
|
+
title: 'Enable a channel binding',
|
|
187
|
+
description: 'Re-enable a previously disabled channel binding so it carries traffic again (status back to "Active"). Returns the updated binding. Maps to POST /v1/orgs/{org}/agents/{agent}/channels/{bindingId}/_enable.',
|
|
188
|
+
kind: 'write',
|
|
189
|
+
scope: 'agents:write',
|
|
190
|
+
roleFloor: 'editor',
|
|
191
|
+
input: { agentId: agentIdField, bindingId: bindingIdField },
|
|
192
|
+
run: async ({ client }, { agentId, bindingId }) => client.post(`${await client.orgPath(bindingPath(agentId, bindingId))}/_enable`),
|
|
193
|
+
}),
|
|
194
|
+
(0, tool_1.defineTool)({
|
|
195
|
+
name: 'delete_channel',
|
|
196
|
+
title: 'Delete a channel binding',
|
|
197
|
+
description: 'Remove a channel binding from the agent — cancels a pending managed request or releases a live channel (the agent stops being reachable there; unmanaged credentials are discarded; managed RCS is archived rather than deleted so a later re-request restores the same carrier-verified agent). Irreversible for most channels — use disable_channel for a pause. Returns the removed binding. Maps to DELETE /v1/orgs/{org}/agents/{agent}/channels/{bindingId}.',
|
|
198
|
+
kind: 'destructive',
|
|
199
|
+
scope: 'agents:write',
|
|
200
|
+
roleFloor: 'editor',
|
|
201
|
+
input: { agentId: agentIdField, bindingId: bindingIdField },
|
|
202
|
+
run: async ({ client }, { agentId, bindingId }) => {
|
|
203
|
+
const removed = await client.delete(await client.orgPath(bindingPath(agentId, bindingId)));
|
|
204
|
+
return removed ?? { ok: true, deleted: bindingId };
|
|
205
|
+
},
|
|
206
|
+
}),
|
|
207
|
+
];
|
|
208
|
+
//# sourceMappingURL=channels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../../src/tools/channels.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kCAAqC;AAErC;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,aAAa,GAAG;IACpB,KAAK;IACL,eAAe;IACf,UAAU;IACV,KAAK;IACL,SAAS;IACT,OAAO;IACP,WAAW;IACX,OAAO;IACP,KAAK;CACG,CAAC;AAEX,MAAM,SAAS,GAAG;IAChB,WAAW;IACX,UAAU;IACV,UAAU;IACV,QAAQ;IACR,eAAe;IACf,OAAO;IACP,OAAO;IACP,KAAK;CACG,CAAC;AAEX,MAAM,WAAW,GAAG,OAAC;KAClB,IAAI,CAAC,aAAa,CAAC;KACnB,QAAQ,CACP,sIAAsI,CACvI,CAAC;AAEJ,MAAM,cAAc,GAAG,OAAC;KACrB,MAAM,CAAC;IACN,iBAAiB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,GAAG,CAAC;SACR,GAAG,CAAC,IAAI,CAAC;SACT,QAAQ,EAAE;SACV,QAAQ,CACP,uMAAuM,CACxM;CACJ,CAAC;KACD,QAAQ,CAAC,qCAAqC,CAAC,CAAC;AAEnD,MAAM,gBAAgB,GAAG,OAAC;KACvB,MAAM,CAAC;IACN,OAAO,EAAE,OAAC;SACP,OAAO,EAAE;SACT,QAAQ,CACP,kYAAkY,CACnY;IACH,cAAc,EAAE,OAAC;SACd,MAAM,EAAE;SACR,GAAG,CAAC,IAAI,CAAC;SACT,QAAQ,EAAE;SACV,QAAQ,CACP,oGAAoG,CACrG;CACJ,CAAC;KACD,QAAQ,CAAC,uDAAuD,CAAC,CAAC;AAErE,MAAM,YAAY,GAAG,OAAC;KACnB,MAAM,EAAE;KACR,Q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