@apex-inc/mcp-server 0.39.0 → 0.41.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 +1 -1
- package/dist/api-client.d.ts +22 -0
- package/dist/api-client.d.ts.map +1 -1
- package/dist/api-client.js +61 -1
- package/dist/api-client.js.map +1 -1
- package/dist/auth.d.ts +22 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +71 -5
- package/dist/auth.js.map +1 -1
- package/dist/base-url.d.ts +8 -0
- package/dist/base-url.d.ts.map +1 -0
- package/dist/base-url.js +10 -0
- package/dist/base-url.js.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/letter-blocks.d.ts +17 -0
- package/dist/letter-blocks.d.ts.map +1 -1
- package/dist/letter-blocks.js +64 -0
- package/dist/letter-blocks.js.map +1 -1
- package/dist/preview-images.d.ts +9 -0
- package/dist/preview-images.d.ts.map +1 -0
- package/dist/preview-images.js +29 -0
- package/dist/preview-images.js.map +1 -0
- package/dist/prompts.d.ts +14 -0
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +31 -6
- package/dist/prompts.js.map +1 -1
- package/dist/repo-binding.d.ts +8 -0
- package/dist/repo-binding.d.ts.map +1 -0
- package/dist/repo-binding.js +13 -0
- package/dist/repo-binding.js.map +1 -0
- package/dist/resources.d.ts +13 -0
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +16 -0
- package/dist/resources.js.map +1 -1
- package/dist/setup-catchup-tools.d.ts +283 -5
- package/dist/setup-catchup-tools.d.ts.map +1 -1
- package/dist/setup-catchup-tools.js +348 -13
- package/dist/setup-catchup-tools.js.map +1 -1
- package/dist/setup-checklist.d.ts +68 -0
- package/dist/setup-checklist.d.ts.map +1 -0
- package/dist/setup-checklist.js +128 -0
- package/dist/setup-checklist.js.map +1 -0
- package/dist/setup-flow.d.ts +14 -0
- package/dist/setup-flow.d.ts.map +1 -0
- package/dist/setup-flow.js +52 -0
- package/dist/setup-flow.js.map +1 -0
- package/dist/smoke-tools.d.ts.map +1 -1
- package/dist/smoke-tools.js +2 -0
- package/dist/smoke-tools.js.map +1 -1
- package/dist/tool-groups.d.ts.map +1 -1
- package/dist/tool-groups.js +23 -0
- package/dist/tool-groups.js.map +1 -1
- package/dist/tool-shared.d.ts.map +1 -1
- package/dist/tool-shared.js +11 -4
- package/dist/tool-shared.js.map +1 -1
- package/dist/tools/ad-platforms.d.ts +240 -0
- package/dist/tools/ad-platforms.d.ts.map +1 -0
- package/dist/tools/ad-platforms.js +294 -0
- package/dist/tools/ad-platforms.js.map +1 -0
- package/dist/tools/adoption.d.ts +24 -2
- package/dist/tools/adoption.d.ts.map +1 -1
- package/dist/tools/adoption.js +24 -3
- package/dist/tools/adoption.js.map +1 -1
- package/dist/tools/context.d.ts +10 -0
- package/dist/tools/context.d.ts.map +1 -1
- package/dist/tools/context.js +36 -31
- package/dist/tools/context.js.map +1 -1
- package/dist/tools/experiments.d.ts +2 -2
- package/dist/tools/experiments.d.ts.map +1 -1
- package/dist/tools/experiments.js +2 -2
- package/dist/tools/experiments.js.map +1 -1
- package/dist/tools/letters.d.ts +48 -8
- package/dist/tools/letters.d.ts.map +1 -1
- package/dist/tools/letters.js +59 -5
- package/dist/tools/letters.js.map +1 -1
- package/dist/tools/measurement.d.ts +2 -2
- package/dist/tools/measurement.d.ts.map +1 -1
- package/dist/tools/measurement.js +4 -3
- package/dist/tools/measurement.js.map +1 -1
- package/dist/tools.d.ts +639 -19
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +2 -0
- package/dist/tools.js.map +1 -1
- package/package.json +3 -2
- package/skills/apex-communications/SKILL.md +5 -1
- package/skills/apex-growth-tracking/SKILL.md +1 -0
- package/skills/apex-integration-cookbook/SKILL.md +21 -7
- package/skills/apex-setup/SKILL.md +69 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ad platforms: the buyer lists Apex keeps on Meta, Google and LinkedIn, and
|
|
3
|
+
* the shop's own events it sends them. Same routes as Attribution → Ad
|
|
4
|
+
* platforms.
|
|
5
|
+
* A held-back list that belongs to an Ad holdout is the experiment's; these
|
|
6
|
+
* tools leave it alone and point at the experiment.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
declare const SEND_MEANINGS: readonly ["purchase", "lead", "signup", "subscription", "add_to_cart", "something_else"];
|
|
10
|
+
declare const LIST_GOALS: readonly ["win_back", "stop_paying", "interested", "lookalike"];
|
|
11
|
+
export declare const adPlatformTools: {
|
|
12
|
+
list_audiences: {
|
|
13
|
+
description: string;
|
|
14
|
+
schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
15
|
+
handler: () => Promise<{
|
|
16
|
+
content: {
|
|
17
|
+
type: "text";
|
|
18
|
+
text: string;
|
|
19
|
+
}[];
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
update_audience: {
|
|
23
|
+
description: string;
|
|
24
|
+
schema: z.ZodObject<{
|
|
25
|
+
audience_id: z.ZodString;
|
|
26
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
27
|
+
holdout_percent: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<5>, z.ZodLiteral<10>, z.ZodLiteral<20>]>>;
|
|
28
|
+
confirm_delete: z.ZodOptional<z.ZodLiteral<true>>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
audience_id: string;
|
|
31
|
+
platforms?: string[] | undefined;
|
|
32
|
+
holdout_percent?: 0 | 5 | 10 | 20 | undefined;
|
|
33
|
+
confirm_delete?: true | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
audience_id: string;
|
|
36
|
+
platforms?: string[] | undefined;
|
|
37
|
+
holdout_percent?: 0 | 5 | 10 | 20 | undefined;
|
|
38
|
+
confirm_delete?: true | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
handler: (args: {
|
|
41
|
+
audience_id: string;
|
|
42
|
+
platforms?: string[];
|
|
43
|
+
holdout_percent?: 0 | 5 | 10 | 20;
|
|
44
|
+
confirm_delete?: true;
|
|
45
|
+
}) => Promise<{
|
|
46
|
+
content: {
|
|
47
|
+
type: "text";
|
|
48
|
+
text: string;
|
|
49
|
+
}[];
|
|
50
|
+
}>;
|
|
51
|
+
};
|
|
52
|
+
remove_audience: {
|
|
53
|
+
description: string;
|
|
54
|
+
schema: z.ZodObject<{
|
|
55
|
+
audience_id: z.ZodString;
|
|
56
|
+
confirm: z.ZodLiteral<true>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
audience_id: string;
|
|
59
|
+
confirm: true;
|
|
60
|
+
}, {
|
|
61
|
+
audience_id: string;
|
|
62
|
+
confirm: true;
|
|
63
|
+
}>;
|
|
64
|
+
handler: (args: {
|
|
65
|
+
audience_id: string;
|
|
66
|
+
confirm: true;
|
|
67
|
+
}) => Promise<{
|
|
68
|
+
content: {
|
|
69
|
+
type: "text";
|
|
70
|
+
text: string;
|
|
71
|
+
}[];
|
|
72
|
+
}>;
|
|
73
|
+
};
|
|
74
|
+
list_audience_removals: {
|
|
75
|
+
description: string;
|
|
76
|
+
schema: z.ZodObject<{
|
|
77
|
+
audience_id: z.ZodOptional<z.ZodString>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
audience_id?: string | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
audience_id?: string | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
handler: (args: {
|
|
84
|
+
audience_id?: string;
|
|
85
|
+
}) => Promise<{
|
|
86
|
+
content: {
|
|
87
|
+
type: "text";
|
|
88
|
+
text: string;
|
|
89
|
+
}[];
|
|
90
|
+
}>;
|
|
91
|
+
};
|
|
92
|
+
retry_audience_removals: {
|
|
93
|
+
description: string;
|
|
94
|
+
schema: z.ZodObject<{
|
|
95
|
+
audience_id: z.ZodString;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
audience_id: string;
|
|
98
|
+
}, {
|
|
99
|
+
audience_id: string;
|
|
100
|
+
}>;
|
|
101
|
+
handler: (args: {
|
|
102
|
+
audience_id: string;
|
|
103
|
+
}) => Promise<{
|
|
104
|
+
content: {
|
|
105
|
+
type: "text";
|
|
106
|
+
text: string;
|
|
107
|
+
}[];
|
|
108
|
+
}>;
|
|
109
|
+
};
|
|
110
|
+
list_audience_goals: {
|
|
111
|
+
description: string;
|
|
112
|
+
schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
113
|
+
handler: () => Promise<{
|
|
114
|
+
content: {
|
|
115
|
+
type: "text";
|
|
116
|
+
text: string;
|
|
117
|
+
}[];
|
|
118
|
+
}>;
|
|
119
|
+
};
|
|
120
|
+
add_audience: {
|
|
121
|
+
description: string;
|
|
122
|
+
schema: z.ZodObject<{
|
|
123
|
+
goal: z.ZodEnum<["win_back", "stop_paying", "interested", "lookalike"]>;
|
|
124
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<["meta-ads", "google-ads", "linkedin-ads"]>, "many">>;
|
|
125
|
+
name: z.ZodOptional<z.ZodString>;
|
|
126
|
+
send_now: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
confirm: z.ZodLiteral<true>;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
goal: "win_back" | "stop_paying" | "interested" | "lookalike";
|
|
130
|
+
confirm: true;
|
|
131
|
+
name?: string | undefined;
|
|
132
|
+
platforms?: ("meta-ads" | "google-ads" | "linkedin-ads")[] | undefined;
|
|
133
|
+
send_now?: boolean | undefined;
|
|
134
|
+
}, {
|
|
135
|
+
goal: "win_back" | "stop_paying" | "interested" | "lookalike";
|
|
136
|
+
confirm: true;
|
|
137
|
+
name?: string | undefined;
|
|
138
|
+
platforms?: ("meta-ads" | "google-ads" | "linkedin-ads")[] | undefined;
|
|
139
|
+
send_now?: boolean | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
handler: (args: {
|
|
142
|
+
goal: (typeof LIST_GOALS)[number];
|
|
143
|
+
platforms?: string[];
|
|
144
|
+
name?: string;
|
|
145
|
+
send_now?: boolean;
|
|
146
|
+
confirm: true;
|
|
147
|
+
}) => Promise<{
|
|
148
|
+
content: {
|
|
149
|
+
type: "text";
|
|
150
|
+
text: string;
|
|
151
|
+
}[];
|
|
152
|
+
}>;
|
|
153
|
+
};
|
|
154
|
+
preview_ad_platform_send: {
|
|
155
|
+
description: string;
|
|
156
|
+
schema: z.ZodObject<{
|
|
157
|
+
event_name: z.ZodString;
|
|
158
|
+
meaning: z.ZodEnum<["purchase", "lead", "signup", "subscription", "add_to_cart", "something_else"]>;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
event_name: string;
|
|
161
|
+
meaning: "purchase" | "subscription" | "lead" | "signup" | "add_to_cart" | "something_else";
|
|
162
|
+
}, {
|
|
163
|
+
event_name: string;
|
|
164
|
+
meaning: "purchase" | "subscription" | "lead" | "signup" | "add_to_cart" | "something_else";
|
|
165
|
+
}>;
|
|
166
|
+
handler: (args: {
|
|
167
|
+
event_name: string;
|
|
168
|
+
meaning: (typeof SEND_MEANINGS)[number];
|
|
169
|
+
}) => Promise<{
|
|
170
|
+
content: {
|
|
171
|
+
type: "text";
|
|
172
|
+
text: string;
|
|
173
|
+
}[];
|
|
174
|
+
}>;
|
|
175
|
+
};
|
|
176
|
+
list_ad_platform_sends: {
|
|
177
|
+
description: string;
|
|
178
|
+
schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
179
|
+
handler: () => Promise<{
|
|
180
|
+
content: {
|
|
181
|
+
type: "text";
|
|
182
|
+
text: string;
|
|
183
|
+
}[];
|
|
184
|
+
}>;
|
|
185
|
+
};
|
|
186
|
+
add_ad_platform_send: {
|
|
187
|
+
description: string;
|
|
188
|
+
schema: z.ZodObject<{
|
|
189
|
+
event_name: z.ZodString;
|
|
190
|
+
meaning: z.ZodEnum<["purchase", "lead", "signup", "subscription", "add_to_cart", "something_else"]>;
|
|
191
|
+
send_value: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
+
name: z.ZodOptional<z.ZodString>;
|
|
193
|
+
confirm: z.ZodLiteral<true>;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
event_name: string;
|
|
196
|
+
confirm: true;
|
|
197
|
+
meaning: "purchase" | "subscription" | "lead" | "signup" | "add_to_cart" | "something_else";
|
|
198
|
+
name?: string | undefined;
|
|
199
|
+
send_value?: boolean | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
event_name: string;
|
|
202
|
+
confirm: true;
|
|
203
|
+
meaning: "purchase" | "subscription" | "lead" | "signup" | "add_to_cart" | "something_else";
|
|
204
|
+
name?: string | undefined;
|
|
205
|
+
send_value?: boolean | undefined;
|
|
206
|
+
}>;
|
|
207
|
+
handler: (args: {
|
|
208
|
+
event_name: string;
|
|
209
|
+
meaning: (typeof SEND_MEANINGS)[number];
|
|
210
|
+
send_value?: boolean;
|
|
211
|
+
name?: string;
|
|
212
|
+
confirm: true;
|
|
213
|
+
}) => Promise<{
|
|
214
|
+
content: {
|
|
215
|
+
type: "text";
|
|
216
|
+
text: string;
|
|
217
|
+
}[];
|
|
218
|
+
}>;
|
|
219
|
+
};
|
|
220
|
+
remove_ad_platform_send: {
|
|
221
|
+
description: string;
|
|
222
|
+
schema: z.ZodObject<{
|
|
223
|
+
send_id: z.ZodString;
|
|
224
|
+
}, "strip", z.ZodTypeAny, {
|
|
225
|
+
send_id: string;
|
|
226
|
+
}, {
|
|
227
|
+
send_id: string;
|
|
228
|
+
}>;
|
|
229
|
+
handler: (args: {
|
|
230
|
+
send_id: string;
|
|
231
|
+
}) => Promise<{
|
|
232
|
+
content: {
|
|
233
|
+
type: "text";
|
|
234
|
+
text: string;
|
|
235
|
+
}[];
|
|
236
|
+
}>;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
export {};
|
|
240
|
+
//# sour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AAM,CAAC;YACnB,OAAO,EAAE,CAAC,OAAO,aAAa,EAAE,MAAM,CAAC,CAAC;YACxC,UAAU,CAAC,EAAE,OAAO,CAAC;YACrB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,OAAO,EAAE,IAAI,CAAC;SACf;;;;;;;;;;;;;;;;wBAgBqB;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE;;;;;;;CAO5C,CAAC"}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ad platforms: the buyer lists Apex keeps on Meta, Google and LinkedIn, and
|
|
3
|
+
* the shop's own events it sends them. Same routes as Attribution → Ad
|
|
4
|
+
* platforms.
|
|
5
|
+
* A held-back list that belongs to an Ad holdout is the experiment's; these
|
|
6
|
+
* tools leave it alone and point at the experiment.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { apiDeleteJson, apiGet, apiPatch, apiPost } from "../api-client.js";
|
|
10
|
+
import { resolveMeasurementNetwork } from "../setup-catchup-tools.js";
|
|
11
|
+
import { APEX } from "../tool-shared.js";
|
|
12
|
+
const SEND_MEANINGS = ["purchase", "lead", "signup", "subscription", "add_to_cart", "something_else"];
|
|
13
|
+
/** The platforms that take lists today. */
|
|
14
|
+
const LIST_PLATFORMS = ["meta-ads", "google-ads", "linkedin-ads"];
|
|
15
|
+
const LIST_GOALS = ["win_back", "stop_paying", "interested", "lookalike"];
|
|
16
|
+
function jsonResult(data, error = null) {
|
|
17
|
+
return { content: [{ type: "text", text: JSON.stringify({ data, error }, null, 2) }] };
|
|
18
|
+
}
|
|
19
|
+
function reachedPlatforms(a) {
|
|
20
|
+
return Object.entries(a.destinations ?? {})
|
|
21
|
+
.filter(([, d]) => Boolean(d?.platformAudienceId))
|
|
22
|
+
.map(([network]) => network);
|
|
23
|
+
}
|
|
24
|
+
async function loadList(id) {
|
|
25
|
+
try {
|
|
26
|
+
const res = await apiGet(`/api/audience-activations/${encodeURIComponent(id)}`);
|
|
27
|
+
return res.data ?? null;
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
if (err instanceof Error && err.message.includes("404"))
|
|
31
|
+
return null;
|
|
32
|
+
throw err;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function removalRow(r) {
|
|
36
|
+
return {
|
|
37
|
+
audience_id: r.activationId,
|
|
38
|
+
platform: r.network,
|
|
39
|
+
owed: r.owed,
|
|
40
|
+
stopped_retrying: r.stuck,
|
|
41
|
+
why: r.blockReason === "credentials_pending"
|
|
42
|
+
? "not_connected"
|
|
43
|
+
: r.blockReason === "not_implemented" || r.blockReason === "no_adapter"
|
|
44
|
+
? "platform_cant_remove_yet"
|
|
45
|
+
: "platform_refused",
|
|
46
|
+
platform_said: r.message ?? null,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const HOLDOUT_OWNED = "This held-back list belongs to an Ad holdout experiment. Stop or archive the experiment (pause_experiment / archive_experiment) and Apex takes the list down with it.";
|
|
50
|
+
export const adPlatformTools = {
|
|
51
|
+
list_audiences: {
|
|
52
|
+
description: `${APEX} — List the buyer lists Apex keeps on the shop's ad platforms: which segment each is built from, which platforms it goes to, which platforms it actually reached, and how many people it holds back. Same as Attribution → Ad platforms → Who sees your ads.`,
|
|
53
|
+
schema: z.object({}),
|
|
54
|
+
handler: async () => {
|
|
55
|
+
const [lists, segments] = await Promise.all([
|
|
56
|
+
apiGet("/api/audience-activations"),
|
|
57
|
+
apiGet("/api/segments?scope=workspace").catch(() => ({
|
|
58
|
+
data: [],
|
|
59
|
+
})),
|
|
60
|
+
]);
|
|
61
|
+
const names = new Map((segments.data ?? []).map((s) => [s.id, s.name]));
|
|
62
|
+
const data = (lists.data ?? [])
|
|
63
|
+
.filter((a) => !a.archivedAt)
|
|
64
|
+
.map((a) => ({
|
|
65
|
+
audience_id: a.id,
|
|
66
|
+
segment: names.get(a.segmentId) ?? a.segmentId,
|
|
67
|
+
kind: a.kind,
|
|
68
|
+
goal: a.goal ?? null,
|
|
69
|
+
platforms: a.platformTargets,
|
|
70
|
+
reached: reachedPlatforms(a),
|
|
71
|
+
holdout_percent: a.holdoutPercent ?? 0,
|
|
72
|
+
created_at: a.createdAt,
|
|
73
|
+
}));
|
|
74
|
+
return jsonResult(data);
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
update_audience: {
|
|
78
|
+
description: `${APEX} — Change where a buyer list goes, or how many of its people Apex holds back from the ads. holdout_percent 0 stops holding anyone back. Dropping a platform the list already reached deletes the list on that platform, which cannot be undone, and any ad set using it loses it: ask the shop first and pass confirm_delete only after they said yes. Without it, Apex changes nothing and says which platforms would lose the list. Held-back lists that belong to an Ad holdout can't be changed here.`,
|
|
79
|
+
schema: z.object({
|
|
80
|
+
audience_id: z.string().describe("From list_audiences."),
|
|
81
|
+
platforms: z
|
|
82
|
+
.array(z.string())
|
|
83
|
+
.min(1)
|
|
84
|
+
.optional()
|
|
85
|
+
.describe("Every platform the list should go to: meta-ads, google-ads, linkedin-ads (or meta / google / linkedin)."),
|
|
86
|
+
holdout_percent: z
|
|
87
|
+
.union([z.literal(0), z.literal(5), z.literal(10), z.literal(20)])
|
|
88
|
+
.optional()
|
|
89
|
+
.describe("Share of the list's people kept out of the ads: 0, 5, 10 or 20, the same choices as the list card. 0 stops holding anyone back."),
|
|
90
|
+
confirm_delete: z
|
|
91
|
+
.literal(true)
|
|
92
|
+
.optional()
|
|
93
|
+
.describe("Only after the shop said yes to deleting the list on every platform it already reached that platforms leaves out."),
|
|
94
|
+
}),
|
|
95
|
+
handler: async (args) => {
|
|
96
|
+
if (args.platforms === undefined && args.holdout_percent === undefined) {
|
|
97
|
+
return jsonResult(null, "Pass platforms, holdout_percent, or both.");
|
|
98
|
+
}
|
|
99
|
+
const list = await loadList(args.audience_id);
|
|
100
|
+
if (!list)
|
|
101
|
+
return jsonResult(null, "No buyer list with that id in this workspace. Use list_audiences.");
|
|
102
|
+
if (list.kind === "holdout")
|
|
103
|
+
return jsonResult(null, HOLDOUT_OWNED);
|
|
104
|
+
const body = {};
|
|
105
|
+
let dropped = [];
|
|
106
|
+
if (args.platforms) {
|
|
107
|
+
const platforms = [...new Set(args.platforms.map(resolveMeasurementNetwork))];
|
|
108
|
+
const unknown = platforms.filter((p) => !LIST_PLATFORMS.includes(p));
|
|
109
|
+
if (unknown.length > 0) {
|
|
110
|
+
return jsonResult(null, `Lists go to ${LIST_PLATFORMS.join(", ")} only. Not a list platform: ${unknown.join(", ")}.`);
|
|
111
|
+
}
|
|
112
|
+
body.platformTargets = platforms;
|
|
113
|
+
dropped = reachedPlatforms(list).filter((p) => !platforms.includes(p));
|
|
114
|
+
}
|
|
115
|
+
if (dropped.length > 0 && args.confirm_delete !== true) {
|
|
116
|
+
return jsonResult({ audience_id: args.audience_id, would_delete_from: dropped }, `The list is already on ${dropped.join(", ")}. Leaving it out deletes the list there, and ad sets using it lose it. Nothing changed. Ask the shop, then pass confirm_delete: true.`);
|
|
117
|
+
}
|
|
118
|
+
if (args.holdout_percent !== undefined)
|
|
119
|
+
body.holdoutPercent = args.holdout_percent;
|
|
120
|
+
const removedFrom = [];
|
|
121
|
+
const refused = [];
|
|
122
|
+
for (const network of dropped) {
|
|
123
|
+
const off = await apiDeleteJson(`/api/audience-activations/${encodeURIComponent(args.audience_id)}/platforms/${encodeURIComponent(network)}`);
|
|
124
|
+
if (off.data?.failed)
|
|
125
|
+
refused.push({ network, reason: off.data.failed });
|
|
126
|
+
else
|
|
127
|
+
removedFrom.push(network);
|
|
128
|
+
}
|
|
129
|
+
const res = await apiPatch(`/api/audience-activations/${encodeURIComponent(args.audience_id)}`, body);
|
|
130
|
+
return jsonResult({
|
|
131
|
+
audience_id: args.audience_id,
|
|
132
|
+
platforms: res.data?.platformTargets,
|
|
133
|
+
holdout_percent: res.data?.holdoutPercent ?? 0,
|
|
134
|
+
...(dropped.length > 0 ? { removed_from: removedFrom, refused } : {}),
|
|
135
|
+
}, refused.length > 0
|
|
136
|
+
? `Apex stopped sending the list to ${refused.map((f) => f.network).join(", ")}, but the platform didn't delete it. The shop should delete it there by hand.`
|
|
137
|
+
: null);
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
remove_audience: {
|
|
141
|
+
description: `${APEX} — Take a buyer list off every ad platform it reached and stop sending it. Deleting it on a platform cannot be undone, and an ad set that used it stops using it. Ask the shop first; pass confirm only after they said yes. Reports any platform that refused, so the shop can delete it there by hand.`,
|
|
142
|
+
schema: z.object({
|
|
143
|
+
audience_id: z.string().describe("From list_audiences."),
|
|
144
|
+
confirm: z.literal(true).describe("Only after the shop said yes to removing this list from every platform."),
|
|
145
|
+
}),
|
|
146
|
+
handler: async (args) => {
|
|
147
|
+
if (args.confirm !== true)
|
|
148
|
+
return jsonResult(null, "Ask the shop first, then pass confirm: true.");
|
|
149
|
+
const list = await loadList(args.audience_id);
|
|
150
|
+
if (!list)
|
|
151
|
+
return jsonResult(null, "No buyer list with that id in this workspace. Use list_audiences.");
|
|
152
|
+
if (list.kind === "holdout")
|
|
153
|
+
return jsonResult(null, HOLDOUT_OWNED);
|
|
154
|
+
const res = await apiDeleteJson(`/api/audience-activations/${encodeURIComponent(args.audience_id)}?from_platforms=true`);
|
|
155
|
+
const failed = res.data?.failed ?? [];
|
|
156
|
+
return jsonResult({ audience_id: args.audience_id, removed_from: res.data?.deleted ?? [], refused: failed }, failed.length > 0
|
|
157
|
+
? `Apex stopped sending the list, but ${failed.map((f) => f.network).join(", ")} didn't delete it. The shop should delete it there by hand.`
|
|
158
|
+
: null);
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
list_audience_removals: {
|
|
162
|
+
description: `${APEX} — People who asked to be deleted or opted out of ads but are still on one of the shop's buyer lists, because the platform refused or couldn't be reached when Apex took them off. One row per list and platform: \`owed\` (still on it), \`stopped_retrying\` (Apex retries every day for 30 days, then stops and waits for the shop), \`why\` (not_connected, platform_cant_remove_yet, or platform_refused) and \`platform_said\`. Empty means nobody is owed. Pass audience_id for one list, or nothing for every list. Same as the amber line on the list card.`,
|
|
163
|
+
schema: z.object({
|
|
164
|
+
audience_id: z.string().optional().describe("From list_audiences. Leave out for every list."),
|
|
165
|
+
}),
|
|
166
|
+
handler: async (args) => {
|
|
167
|
+
const res = args.audience_id
|
|
168
|
+
? await apiGet(`/api/audience-activations/${encodeURIComponent(args.audience_id)}/removals`)
|
|
169
|
+
: await apiGet("/api/audiences/sync");
|
|
170
|
+
return jsonResult((res.data?.removals ?? []).map(removalRow));
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
retry_audience_removals: {
|
|
174
|
+
description: `${APEX} — Try again now to take the people who asked to be deleted or opted out off one buyer list, including the ones Apex stopped retrying after 30 days. Use it after the shop reconnects a platform or fixes what the platform refused (see list_audience_removals). Returns how many Apex tried, how many came off, and what is still owed. Admin-only.`,
|
|
175
|
+
schema: z.object({
|
|
176
|
+
audience_id: z.string().describe("From list_audiences or list_audience_removals."),
|
|
177
|
+
}),
|
|
178
|
+
handler: async (args) => {
|
|
179
|
+
const res = await apiPost(`/api/audience-activations/${encodeURIComponent(args.audience_id)}/removals`, {});
|
|
180
|
+
if (!res.data)
|
|
181
|
+
return jsonResult(null, res.error ?? "Apex couldn't try again.");
|
|
182
|
+
const still = res.data.removals.map(removalRow);
|
|
183
|
+
return jsonResult({ audience_id: args.audience_id, tried: res.data.retried, removed: res.data.succeeded, still_owed: still }, still.length > 0 ? "Some people are still on the list. Tell the shop what each platform said." : null);
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
list_audience_goals: {
|
|
187
|
+
description: `${APEX} — The four things a buyer list can be for, and whether this shop can make each one now. win_back shows ads to people who bought but not within the shop's kind-of-business window (\`window_days\`); stop_paying leaves everyone who ever bought out of ads meant for new people; interested shows ads to people who added to cart or started checkout in the last 30 days and never bought (\`locked\` until those events arrive); lookalike gives Meta everyone who bought with what each spent, for a value-based lookalike (Meta only). Each goal returns \`networks\` (where its list can go right now) and \`lists\` (lists the shop already made for it). When a goal already has a list, ask whether the shop wants another before adding one.`,
|
|
188
|
+
schema: z.object({}),
|
|
189
|
+
handler: async () => {
|
|
190
|
+
const res = await apiGet("/api/ad-platforms/lists");
|
|
191
|
+
return jsonResult(res.data ?? null);
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
add_audience: {
|
|
195
|
+
description: `${APEX} — Make a buyer list from a goal (see list_audience_goals) and send it. Apex saves the goal's rule as a segment named after the list, which the shop can change in Segments, makes the list on it, and sends it to each platform; it updates every day after. Nobody is held back. Call list_audience_goals first, tell the shop who goes on the list and where it goes, and pass confirm: true only after they say yes. Refused when the goal is locked, or when none of the platforms can take the list. Admin-only.`,
|
|
196
|
+
schema: z.object({
|
|
197
|
+
goal: z.enum(LIST_GOALS).describe("win_back, stop_paying, interested or lookalike."),
|
|
198
|
+
platforms: z
|
|
199
|
+
.array(z.enum(LIST_PLATFORMS))
|
|
200
|
+
.min(1)
|
|
201
|
+
.optional()
|
|
202
|
+
.describe("Where it goes. Defaults to every platform the goal's list can go to now."),
|
|
203
|
+
name: z.string().min(1).max(120).optional().describe("The list's name. Defaults to the goal's list name."),
|
|
204
|
+
send_now: z
|
|
205
|
+
.boolean()
|
|
206
|
+
.optional()
|
|
207
|
+
.describe("Send it right away. Defaults to true; false waits for the daily update."),
|
|
208
|
+
confirm: z.literal(true).describe("The shop heard who goes and where, and said yes."),
|
|
209
|
+
}),
|
|
210
|
+
handler: async (args) => {
|
|
211
|
+
const made = await apiPost("/api/ad-platforms/lists", {
|
|
212
|
+
goal: args.goal,
|
|
213
|
+
...(args.platforms ? { platforms: args.platforms } : {}),
|
|
214
|
+
...(args.name ? { name: args.name } : {}),
|
|
215
|
+
});
|
|
216
|
+
if (!made.data)
|
|
217
|
+
return jsonResult(null, made.error ?? "Apex couldn't make the list.");
|
|
218
|
+
const { list, segment } = made.data;
|
|
219
|
+
let sent = [];
|
|
220
|
+
if (args.send_now !== false) {
|
|
221
|
+
const sync = await apiPost("/api/audiences/sync", { activationId: list.id }).catch(() => null);
|
|
222
|
+
sent = (sync?.data?.runs ?? []).map((r) => ({
|
|
223
|
+
platform: r.network,
|
|
224
|
+
status: r.status,
|
|
225
|
+
people_added: r.addedCount ?? 0,
|
|
226
|
+
message: r.message ?? null,
|
|
227
|
+
}));
|
|
228
|
+
}
|
|
229
|
+
return jsonResult({
|
|
230
|
+
audience_id: list.id,
|
|
231
|
+
goal: args.goal,
|
|
232
|
+
segment: segment.name,
|
|
233
|
+
segment_id: segment.id,
|
|
234
|
+
kind: list.kind,
|
|
235
|
+
platforms: list.platformTargets,
|
|
236
|
+
sent,
|
|
237
|
+
});
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
preview_ad_platform_send: {
|
|
241
|
+
description: `${APEX} — Before sending one of the shop's events to its ad platforms, see what each platform would hear. Pass the event as the shop sends it and what it means. Returns each platform's state: sends (hears \`word\` right away), apex_makes (hears it once Apex makes the conversion there), no_word (the platform has nothing for this meaning, so it is not sent), not_connected, not_agreed (the shop hasn't agreed to send sales there yet), other_source (the shop set another tool to send that platform's conversions), held (the shop asked Apex not to send people to any ad platform), coming_soon, or turned_off. \`without_consent_answer\` says whether an event that carries no consent answer goes out (sent) or not (not_sent); when it's not_sent, tell the shop only events with a yes go. Also returns \`estimate\`: how often the event happened in the last 30 days, the sends a month that bills (one per event, however many platforms hear it), the shop's free sends and use this month, and the monthly cost at its price (null when Apex couldn't count; only people Apex knows are sent, so the real number can be lower). Saves and sends nothing. Show the shop the result before anything starts sending.`,
|
|
242
|
+
schema: z.object({
|
|
243
|
+
event_name: z.string().min(1).describe("The event exactly as the shop sends it, e.g. trial_started."),
|
|
244
|
+
meaning: z
|
|
245
|
+
.enum(SEND_MEANINGS)
|
|
246
|
+
.describe("What the event means: purchase, lead, signup, subscription, add_to_cart, or something_else when none fit."),
|
|
247
|
+
}),
|
|
248
|
+
handler: async (args) => {
|
|
249
|
+
const params = new URLSearchParams({ event_name: args.event_name, meaning: args.meaning });
|
|
250
|
+
const res = await apiGet(`/api/ad-platforms/sends/preview?${params.toString()}`);
|
|
251
|
+
return jsonResult(res.data ?? null);
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
list_ad_platform_sends: {
|
|
255
|
+
description: `${APEX} — The shop's own events Apex sends to its ad platforms, with what each one means and what each platform hears (same states as preview_ad_platform_send). Sales, signups and leads Apex already knows about go out on their own and are not listed here.`,
|
|
256
|
+
schema: z.object({}),
|
|
257
|
+
handler: async () => {
|
|
258
|
+
const res = await apiGet("/api/ad-platforms/sends");
|
|
259
|
+
return jsonResult(res.data ?? []);
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
add_ad_platform_send: {
|
|
263
|
+
description: `${APEX} — Start sending one of the shop's events to its ad platforms. Call preview_ad_platform_send first and show the shop what each platform would hear, the 30-day count and the monthly cost; pass confirm: true only after the shop says yes. Saved on the shop's Conversion for that event (created when there isn't one). Only platforms the shop has connected and agreed to send to hear it; this tool never agrees for the shop. For something_else, Apex makes the conversion on Meta so campaigns can optimize for it; the result's \`made\` lists where it did and \`couldnt_make\` says why a platform refused (the send still goes). Refused when the event already means something else on Conversions, when Apex already sends it as a sale, or when no platform can hear it yet. Admin-only.`,
|
|
264
|
+
schema: z.object({
|
|
265
|
+
event_name: z.string().min(1).describe("The event exactly as the shop sends it, e.g. trial_started."),
|
|
266
|
+
meaning: z
|
|
267
|
+
.enum(SEND_MEANINGS)
|
|
268
|
+
.describe("What the event means: purchase, lead, signup, subscription, add_to_cart, or something_else when none fit."),
|
|
269
|
+
send_value: z.boolean().optional().describe("Send the event's amount when it has one. Defaults to true."),
|
|
270
|
+
name: z.string().optional().describe("Name for a new Conversion. Defaults to the event name in words."),
|
|
271
|
+
confirm: z.literal(true).describe("The shop saw the preview and said yes."),
|
|
272
|
+
}),
|
|
273
|
+
handler: async (args) => {
|
|
274
|
+
const res = await apiPost("/api/ad-platforms/sends", {
|
|
275
|
+
event_name: args.event_name,
|
|
276
|
+
meaning: args.meaning,
|
|
277
|
+
...(args.send_value === undefined ? {} : { send_value: args.send_value }),
|
|
278
|
+
...(args.name ? { name: args.name } : {}),
|
|
279
|
+
});
|
|
280
|
+
return jsonResult(res.data ?? null);
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
remove_ad_platform_send: {
|
|
284
|
+
description: `${APEX} — Stop sending one of the shop's events to its ad platforms. The Conversion stays, so experiments and goals that count it are untouched, and what the platforms already heard stays with them. Pass the id from list_ad_platform_sends. Admin-only.`,
|
|
285
|
+
schema: z.object({
|
|
286
|
+
send_id: z.string().min(1).describe("The send's id from list_ad_platform_sends."),
|
|
287
|
+
}),
|
|
288
|
+
handler: async (args) => {
|
|
289
|
+
const res = await apiDeleteJson(`/api/ad-platforms/sends/${encodeURIComponent(args.send_id)}`);
|
|
290
|
+
return jsonResult(res.data ?? null);
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
//# sourceMappingURL=ad-platforms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ad-platforms.js","sourceRoot":"","sources":["../../src/tools/ad-platforms.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,CAAU,CAAC;AAE/G,2CAA2C;AAC3C,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,cAAc,CAAU,CAAC;AAE3E,MAAM,UAAU,GAAG,CAAC,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,CAAU,CAAC;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,CAAC;QACtC,CAAC;KACF;IAED,uBAAuB,EAAE;QACvB,WAAW,EAAE,GAAG,IAAI,sPAAsP;QAC1Q,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,4CAA4C,CAAC;SAClF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,IAAyB,EAAE,EAAE;YAC3C,MAAM,GAAG,GAAG,MAAM,aAAa,CAC7B,2BAA2B,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAC9D,CAAC;YACF,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;QACtC,CAAC;KACF;CACF,CAAC"}
|
package/dist/tools/adoption.d.ts
CHANGED
|
@@ -117,6 +117,16 @@ export declare const adoptionTools: {
|
|
|
117
117
|
enrollMode: z.ZodOptional<z.ZodEnum<["all", "future"]>>;
|
|
118
118
|
finishWhen: z.ZodOptional<z.ZodEnum<["this_person", "anyone_here"]>>;
|
|
119
119
|
nudgeJourneyId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
nudgeClocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
121
|
+
hours: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
days: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
}, "strict", z.ZodTypeAny, {
|
|
124
|
+
days?: number | undefined;
|
|
125
|
+
hours?: number | undefined;
|
|
126
|
+
}, {
|
|
127
|
+
days?: number | undefined;
|
|
128
|
+
hours?: number | undefined;
|
|
129
|
+
}>, "many">>;
|
|
120
130
|
confirmLiveMilestone: z.ZodOptional<z.ZodBoolean>;
|
|
121
131
|
}, "strip", z.ZodTypeAny, {
|
|
122
132
|
milestoneId: string;
|
|
@@ -137,6 +147,10 @@ export declare const adoptionTools: {
|
|
|
137
147
|
gapDays?: number | undefined;
|
|
138
148
|
gapHours?: number | undefined;
|
|
139
149
|
gapKind?: "days_since_signup" | "event_not_fired" | undefined;
|
|
150
|
+
nudgeClocks?: {
|
|
151
|
+
days?: number | undefined;
|
|
152
|
+
hours?: number | undefined;
|
|
153
|
+
}[] | undefined;
|
|
140
154
|
confirmLiveMilestone?: boolean | undefined;
|
|
141
155
|
}, {
|
|
142
156
|
milestoneId: string;
|
|
@@ -157,11 +171,19 @@ export declare const adoptionTools: {
|
|
|
157
171
|
gapDays?: number | undefined;
|
|
158
172
|
gapHours?: number | undefined;
|
|
159
173
|
gapKind?: "days_since_signup" | "event_not_fired" | undefined;
|
|
174
|
+
nudgeClocks?: {
|
|
175
|
+
days?: number | undefined;
|
|
176
|
+
hours?: number | undefined;
|
|
177
|
+
}[] | undefined;
|
|
160
178
|
confirmLiveMilestone?: boolean | undefined;
|
|
161
179
|
}>;
|
|
162
180
|
handler: (args: AdoptionWriteArgs & {
|
|
163
181
|
milestoneId: string;
|
|
164
182
|
confirmLiveMilestone?: boolean;
|
|
183
|
+
nudgeClocks?: Array<{
|
|
184
|
+
hours?: number;
|
|
185
|
+
days?: number;
|
|
186
|
+
}>;
|
|
165
187
|
}) => Promise<{
|
|
166
188
|
content: {
|
|
167
189
|
type: "text";
|
|
@@ -307,7 +329,7 @@ export declare const adoptionTools: {
|
|
|
307
329
|
label: z.ZodOptional<z.ZodString>;
|
|
308
330
|
}, "strip", z.ZodTypeAny, {
|
|
309
331
|
milestoneId: string;
|
|
310
|
-
state: "
|
|
332
|
+
state: "done" | "not_yet";
|
|
311
333
|
label?: string | undefined;
|
|
312
334
|
url?: string | undefined;
|
|
313
335
|
imageBase64?: string | undefined;
|
|
@@ -315,7 +337,7 @@ export declare const adoptionTools: {
|
|
|
315
337
|
format?: "png" | "jpeg" | undefined;
|
|
316
338
|
}, {
|
|
317
339
|
milestoneId: string;
|
|
318
|
-
state: "
|
|
340
|
+
state: "done" | "not_yet";
|
|
319
341
|
label?: string | undefined;
|
|
320
342
|
url?: string | undefined;
|
|
321
343
|
imageBase64?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adoption.d.ts","sourceRoot":"","sources":["../../src/tools/adoption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAMhC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;mCAmBW;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+BlC,iBAAiB,GAAG;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE
|
|
1
|
+
{"version":3,"file":"adoption.d.ts","sourceRoot":"","sources":["../../src/tools/adoption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAMhC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;mCAmBW;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+BlC,iBAAiB,GAAG;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+DtE,iBAAiB,GAAG;YACxB,WAAW,EAAE,MAAM,CAAC;YACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;YAC/B,WAAW,CAAC,EAAE,KAAK,CAAC;gBAAE,KAAK,CAAC,EAAE,MAAM,CAAC;gBAAC,IAAI,CAAC,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