@dynamoi/mcp 0.6.4 → 0.6.5
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/CHANGELOG.md +21 -1
- package/README.md +4 -3
- package/dist/auth/protected-resource.d.ts +32 -5
- package/dist/auth/protected-resource.d.ts.map +1 -0
- package/dist/auth/protected-resource.js +10 -4
- package/dist/auth/protected-resource.js.map +9 -1
- package/dist/auth/verify-token.d.ts +21 -0
- package/dist/auth/verify-token.d.ts.map +1 -0
- package/dist/chunk-4jfaxshz.js +83 -0
- package/dist/chunk-4jfaxshz.js.map +10 -0
- package/dist/chunk-kb3xpcrb.js +9 -0
- package/dist/chunk-kb3xpcrb.js.map +10 -0
- package/dist/consent.d.ts +4 -0
- package/dist/consent.d.ts.map +1 -0
- package/dist/consent.js +13 -0
- package/dist/consent.js.map +9 -0
- package/dist/flow-types.d.ts +150 -0
- package/dist/flow-types.d.ts.map +1 -0
- package/dist/index.d.ts +13 -2464
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1364 -1242
- package/dist/index.js.map +25 -1
- package/dist/readiness-types.d.ts +88 -0
- package/dist/readiness-types.d.ts.map +1 -0
- package/dist/server/create-server.d.ts +81 -0
- package/dist/server/create-server.d.ts.map +1 -0
- package/dist/server/instructions.d.ts +3 -0
- package/dist/server/instructions.d.ts.map +1 -0
- package/dist/server/onboarding-tool-definitions.d.ts +56 -0
- package/dist/server/onboarding-tool-definitions.d.ts.map +1 -0
- package/dist/server/openai-tools.d.ts +88 -0
- package/dist/server/openai-tools.d.ts.map +1 -0
- package/dist/server/output-schemas.d.ts +122 -0
- package/dist/server/output-schemas.d.ts.map +1 -0
- package/dist/server/playbook-resources.d.ts +3 -0
- package/dist/server/playbook-resources.d.ts.map +1 -0
- package/dist/server/prompts.d.ts +3 -0
- package/dist/server/prompts.d.ts.map +1 -0
- package/dist/server/resources.d.ts +4 -0
- package/dist/server/resources.d.ts.map +1 -0
- package/dist/server/shared-schemas.d.ts +14 -0
- package/dist/server/shared-schemas.d.ts.map +1 -0
- package/dist/server/smart-link-theme-preview.d.ts +48 -0
- package/dist/server/smart-link-theme-preview.d.ts.map +1 -0
- package/dist/server/smart-link-tools.d.ts +346 -0
- package/dist/server/smart-link-tools.d.ts.map +1 -0
- package/dist/server/tools.d.ts +870 -0
- package/dist/server/tools.d.ts.map +1 -0
- package/dist/server/workflow-tools.d.ts +93 -0
- package/dist/server/workflow-tools.d.ts.map +1 -0
- package/dist/transport/http.d.ts +9 -0
- package/dist/transport/http.d.ts.map +1 -0
- package/dist/types.d.ts +429 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +16 -8
- package/server.json +3 -3
- package/dist/chunk-CHQUK72A.js +0 -35
- package/dist/chunk-CHQUK72A.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DYNAMOI_BETTER_AUTH_MCP_SCOPES,
|
|
2
3
|
DYNAMOI_MCP_SCOPES,
|
|
4
|
+
DYNAMOI_MCP_TOOL_SCOPES,
|
|
3
5
|
buildProtectedResourceMetadata,
|
|
4
6
|
buildWwwAuthenticateHeader
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
|
|
7
|
+
} from "./chunk-4jfaxshz.js";
|
|
8
|
+
import {
|
|
9
|
+
PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY,
|
|
10
|
+
PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH,
|
|
11
|
+
PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION
|
|
12
|
+
} from "./chunk-kb3xpcrb.js";
|
|
7
13
|
// src/auth/verify-token.ts
|
|
8
14
|
import { createRemoteJWKSet, jwtVerify } from "jose";
|
|
9
|
-
var jwksByUrl =
|
|
15
|
+
var jwksByUrl = new Map;
|
|
10
16
|
function getRemoteJwks(jwksUrl) {
|
|
11
17
|
const existing = jwksByUrl.get(jwksUrl);
|
|
12
18
|
if (existing) {
|
|
@@ -34,16 +40,14 @@ function extractScopes(payload) {
|
|
|
34
40
|
}
|
|
35
41
|
const scopes = payload["scopes"];
|
|
36
42
|
if (Array.isArray(scopes)) {
|
|
37
|
-
return scopes.filter(
|
|
38
|
-
(scopeValue) => typeof scopeValue === "string" && scopeValue.trim().length > 0
|
|
39
|
-
);
|
|
43
|
+
return scopes.filter((scopeValue) => typeof scopeValue === "string" && scopeValue.trim().length > 0);
|
|
40
44
|
}
|
|
41
45
|
return [];
|
|
42
46
|
}
|
|
43
47
|
async function verifyAccessToken(options) {
|
|
44
48
|
const jwks = getRemoteJwks(options.jwksUrl);
|
|
45
49
|
const verifyOptions = {
|
|
46
|
-
algorithms: ["ES256", "RS256"],
|
|
50
|
+
algorithms: options.algorithms ?? ["ES256", "RS256"],
|
|
47
51
|
audience: options.audienceAllowlist,
|
|
48
52
|
issuer: options.issuer
|
|
49
53
|
};
|
|
@@ -65,19 +69,21 @@ async function verifyAccessToken(options) {
|
|
|
65
69
|
aud,
|
|
66
70
|
clientId: extractClientId(payload),
|
|
67
71
|
exp,
|
|
72
|
+
grantId: typeof payload["gid"] === "string" ? payload["gid"] : null,
|
|
68
73
|
iss,
|
|
74
|
+
jti: typeof payload.jti === "string" ? payload.jti : null,
|
|
69
75
|
scopes: extractScopes(payload),
|
|
76
|
+
sessionId: typeof payload.sid === "string" ? payload.sid : null,
|
|
70
77
|
sub
|
|
71
78
|
};
|
|
72
79
|
}
|
|
73
|
-
|
|
74
80
|
// src/server/create-server.ts
|
|
75
81
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
76
|
-
import * as
|
|
82
|
+
import * as z9 from "zod/v4";
|
|
77
83
|
|
|
78
84
|
// src/version.ts
|
|
79
|
-
var BUNDLED_DYNAMOI_MCP_VERSION =
|
|
80
|
-
var DYNAMOI_MCP_VERSION = BUNDLED_DYNAMOI_MCP_VERSION.length > 0 && !BUNDLED_DYNAMOI_MCP_VERSION.includes("__") ? BUNDLED_DYNAMOI_MCP_VERSION : "0.6.
|
|
85
|
+
var BUNDLED_DYNAMOI_MCP_VERSION = "0.6.5";
|
|
86
|
+
var DYNAMOI_MCP_VERSION = BUNDLED_DYNAMOI_MCP_VERSION.length > 0 && !BUNDLED_DYNAMOI_MCP_VERSION.includes("__") ? BUNDLED_DYNAMOI_MCP_VERSION : "0.6.5";
|
|
81
87
|
|
|
82
88
|
// src/server/instructions.ts
|
|
83
89
|
var DYNAMOI_MCP_INSTRUCTIONS = `
|
|
@@ -90,14 +96,14 @@ paid campaign services.
|
|
|
90
96
|
|
|
91
97
|
=== Session Start Routine ===
|
|
92
98
|
|
|
93
|
-
When the user's first message in a Dynamoi session is account-relevant (artists, campaigns, smart links, billing, connections, launches, or "what should I do here"), call dynamoi_get_account_overview first to learn the user's state. The response includes a recommendedNextActions array and a state object
|
|
99
|
+
When the user's first message in a Dynamoi session is account-relevant (artists, campaigns, smart links, billing, connections, launches, or "what should I do here"), call dynamoi_get_account_overview first to learn the user's state. The response includes a recommendedNextActions array and a state object — treat that array as authoritative guidance for what to ask or do next.
|
|
94
100
|
|
|
95
101
|
Route by state from dynamoi_get_account_overview:
|
|
96
102
|
|
|
97
103
|
- state.hasAnyArtist === false: This is a brand-new user. Ask whether they are a Spotify artist, a YouTube creator, or a label/manager.
|
|
98
|
-
- Spotify artist with a URL
|
|
99
|
-
- YouTube creator
|
|
100
|
-
- Label or manager with a roster
|
|
104
|
+
- Spotify artist with a URL → call dynamoi_create_smart_links_from_spotify_artist immediately to create their free hub. Read dynamoi://playbooks/spotify-artist for scripted phrasing.
|
|
105
|
+
- YouTube creator → read dynamoi://playbooks/youtube-creator and explain Dynamoi's revenue-per-view optimization advantage before asking whether they want to link the channel. If yes, call dynamoi_start_youtube_channel_link.
|
|
106
|
+
- Label or manager with a roster → read dynamoi://playbooks/label-or-manager for the multi-artist setup walkthrough.
|
|
101
107
|
|
|
102
108
|
- state.hasAnyArtist === true && state.hasAnySmartLink === false: The fastest visible win is a free Smart Link. Offer dynamoi_create_smart_link_from_spotify (single release) or dynamoi_create_smart_links_from_spotify_artist (full catalog) before campaign tools.
|
|
103
109
|
|
|
@@ -109,7 +115,7 @@ Route by state from dynamoi_get_account_overview:
|
|
|
109
115
|
|
|
110
116
|
- state.hasAnyArtist === true && state.hasAnyConnectedYoutube === false and the user wants YouTube growth: offer dynamoi_start_youtube_channel_link, then poll dynamoi_get_platform_status for the target artist with the returned onboardingAttemptId and onboardingFlow=youtube after the browser return page sends them back to chat. Treat the connection as complete when platforms.youtube.connected is true.
|
|
111
117
|
|
|
112
|
-
Do NOT call dynamoi_list_artists or dynamoi_search as a first step for brand-new users
|
|
118
|
+
Do NOT call dynamoi_list_artists or dynamoi_search as a first step for brand-new users — both will return empty for them and the conversation stalls. Always go through dynamoi_get_account_overview first.
|
|
113
119
|
|
|
114
120
|
=== End Session Start Routine ===
|
|
115
121
|
|
|
@@ -132,22 +138,22 @@ Principles:
|
|
|
132
138
|
- When answering from Smart Link tools, lead with the artist hub URL when present, then public release URLs, release title, artist name, status, and next action. Do not include internal UUIDs unless the user explicitly asks for IDs or you need an ID for a follow-up tool call.
|
|
133
139
|
- Smart Link pixel tools accept validated pixel IDs only. Do not ask for arbitrary JavaScript, tag-manager snippets, or script code.
|
|
134
140
|
- Money values are shown in USD as presented in Dynamoi.
|
|
135
|
-
- Budget minimums: $10/day (daily), $
|
|
141
|
+
- Budget minimums: $10/day (daily), $50 total (Smart Campaign), $50 total (YouTube).
|
|
136
142
|
- Product and pricing details are available as MCP resources. Keep runtime answers
|
|
137
143
|
focused on the user's account data and requested action.
|
|
138
144
|
|
|
139
145
|
Common workflows:
|
|
140
|
-
- Discovery: dynamoi_list_artists
|
|
146
|
+
- Discovery: dynamoi_list_artists → dynamoi_list_campaigns → dynamoi_get_campaign →
|
|
141
147
|
dynamoi_get_campaign with includeAnalytics=true when needed
|
|
142
148
|
- Artist performance summary: dynamoi_get_artist_analytics with granularity=DAILY when requested. If that response already includes the strongest campaign, do not call more analytics tools.
|
|
143
|
-
- Diagnose stuck campaign: dynamoi_get_campaign
|
|
149
|
+
- Diagnose stuck campaign: dynamoi_get_campaign → dynamoi_get_platform_status →
|
|
144
150
|
propose next steps
|
|
145
|
-
- Pause/resume: dynamoi_get_campaign (confirm)
|
|
146
|
-
- Budget update: dynamoi_get_campaign (confirm)
|
|
147
|
-
- Launch: dynamoi_list_media_assets
|
|
151
|
+
- Pause/resume: dynamoi_get_campaign (confirm) → dynamoi_update_campaign with action=pause or action=resume
|
|
152
|
+
- Budget update: dynamoi_get_campaign (confirm) → dynamoi_update_campaign with action=update_budget
|
|
153
|
+
- Launch: dynamoi_list_media_assets → dynamoi_launch_campaign
|
|
148
154
|
- Free Smart Link artist catalog creation: dynamoi_create_smart_links_from_spotify_artist; omit artistId for a brand-new user with no Dynamoi artist yet
|
|
149
|
-
- Free Smart Link single-release creation: dynamoi_list_artists
|
|
150
|
-
- Smart Link analytics/settings: dynamoi_list_smart_links
|
|
155
|
+
- Free Smart Link single-release creation: dynamoi_list_artists → dynamoi_create_smart_link_from_spotify
|
|
156
|
+
- Smart Link analytics/settings: dynamoi_list_smart_links → dynamoi_get_smart_link with includeAnalytics=true or includeArtistSettings=true
|
|
151
157
|
- Post-launch answer: if dynamoi_launch_campaign succeeds, answer from that result directly. Only call dynamoi_get_campaign when the user explicitly needs more detail than the launch result already returned, and prefer format=summary for that follow-up.
|
|
152
158
|
- Review/demo Smart Campaign launch: if the user already gave artist, content title, budget, countries, and reusable media assets, you may call dynamoi_launch_campaign without spotifyUrl/endDate because Dynamoi can infer reviewer-safe defaults. Do not invent placeholder values for omitted fields; omit those keys entirely.
|
|
153
159
|
`.trim();
|
|
@@ -203,137 +209,107 @@ function asTextPrompt(text) {
|
|
|
203
209
|
};
|
|
204
210
|
}
|
|
205
211
|
function registerDynamoiPrompts(server) {
|
|
206
|
-
server.registerPrompt(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
artistId: z.string().uuid().optional(),
|
|
211
|
-
query: z.string().trim().optional()
|
|
212
|
-
},
|
|
213
|
-
description: "Find a user's free Smart Link URL and answer with public URLs, titles, and statuses.",
|
|
214
|
-
title: "Find Smart Link URL"
|
|
215
|
-
},
|
|
216
|
-
(args) => asTextPrompt(
|
|
217
|
-
[
|
|
218
|
-
"Find my Dynamoi Smart Link URL.",
|
|
219
|
-
args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, use dynamoi_search or dynamoi_list_artists to identify the artist first.",
|
|
220
|
-
args.query ? `Search query: ${args.query}` : "",
|
|
221
|
-
"",
|
|
222
|
-
"Use dynamoi_list_smart_links or dynamoi_search with type=smartlink.",
|
|
223
|
-
"In the final answer, show the release title, artist, public URL, and status. Do not show internal IDs unless I ask for them."
|
|
224
|
-
].filter(Boolean).join("\n")
|
|
225
|
-
)
|
|
226
|
-
);
|
|
227
|
-
server.registerPrompt(
|
|
228
|
-
"dynamoi_explain_free_smart_links",
|
|
229
|
-
{
|
|
230
|
-
argsSchema: {},
|
|
231
|
-
description: "Explain Dynamoi free Smart Links and how they differ from paid managed advertising.",
|
|
232
|
-
title: "Explain Free Smart Links"
|
|
212
|
+
server.registerPrompt("dynamoi_find_smart_link_url", {
|
|
213
|
+
argsSchema: {
|
|
214
|
+
artistId: z.string().uuid().optional(),
|
|
215
|
+
query: z.string().trim().optional()
|
|
233
216
|
},
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
217
|
+
description: "Find a user's free Smart Link URL and answer with public URLs, titles, and statuses.",
|
|
218
|
+
title: "Find Smart Link URL"
|
|
219
|
+
}, (args) => asTextPrompt([
|
|
220
|
+
"Find my Dynamoi Smart Link URL.",
|
|
221
|
+
args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, use dynamoi_search or dynamoi_list_artists to identify the artist first.",
|
|
222
|
+
args.query ? `Search query: ${args.query}` : "",
|
|
223
|
+
"",
|
|
224
|
+
"Use dynamoi_list_smart_links or dynamoi_search with type=smartlink.",
|
|
225
|
+
"In the final answer, show the release title, artist, public URL, and status. Do not show internal IDs unless I ask for them."
|
|
226
|
+
].filter(Boolean).join(`
|
|
227
|
+
`)));
|
|
228
|
+
server.registerPrompt("dynamoi_explain_free_smart_links", {
|
|
229
|
+
argsSchema: {},
|
|
230
|
+
description: "Explain Dynamoi free Smart Links and how they differ from paid managed advertising.",
|
|
231
|
+
title: "Explain Free Smart Links"
|
|
232
|
+
}, () => asTextPrompt([
|
|
233
|
+
"Explain Dynamoi free Smart Links.",
|
|
234
|
+
"Use MCP resources if needed, especially dynamoi://smart-links/free-plan and dynamoi://business/free-vs-paid.",
|
|
235
|
+
"Be clear: Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing. Managed advertising and ad budgets are separate paid services.",
|
|
236
|
+
"Do not inspect my account data unless I ask about my artists, links, campaigns, billing, or settings."
|
|
237
|
+
].join(`
|
|
238
|
+
`)));
|
|
239
|
+
server.registerPrompt("dynamoi_create_free_smart_link", {
|
|
240
|
+
argsSchema: {
|
|
241
|
+
artistId: z.string().uuid().optional(),
|
|
242
|
+
spotifyUrl: z.string().trim().optional()
|
|
252
243
|
},
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
server.registerPrompt(
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
argsSchema: {
|
|
268
|
-
artistId: z.string().uuid().optional()
|
|
269
|
-
},
|
|
270
|
-
description: "Audit an artist's campaigns and summarize what is working and what to fix next.",
|
|
271
|
-
title: "Audit Campaigns"
|
|
244
|
+
description: "Create free Smart Links from a Spotify artist, album, or track URL.",
|
|
245
|
+
title: "Create Free Smart Link"
|
|
246
|
+
}, (args) => asTextPrompt([
|
|
247
|
+
"Create a free Dynamoi Smart Link.",
|
|
248
|
+
args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, list artists first and ask me which artist owns the link.",
|
|
249
|
+
args.spotifyUrl ? `Spotify URL: ${args.spotifyUrl}` : "Ask me for a Spotify artist, album, or track URL. Playlist URLs are not supported today.",
|
|
250
|
+
"",
|
|
251
|
+
"Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing. This does not create a paid campaign.",
|
|
252
|
+
"If the Spotify URL is an artist URL and I want my hub/catalog, use dynamoi_create_smart_links_from_spotify_artist. If it is an album or track URL, use dynamoi_create_smart_link_from_spotify."
|
|
253
|
+
].join(`
|
|
254
|
+
`)));
|
|
255
|
+
server.registerPrompt("dynamoi_audit_campaigns", {
|
|
256
|
+
argsSchema: {
|
|
257
|
+
artistId: z.string().uuid().optional()
|
|
272
258
|
},
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
server.registerPrompt(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
contentTitle: z.string().trim().optional(),
|
|
291
|
-
contentType: z.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]).optional()
|
|
292
|
-
},
|
|
293
|
-
description: "Create a pragmatic release launch plan and propose a Dynamoi campaign setup.",
|
|
294
|
-
title: "Release Launch Plan"
|
|
259
|
+
description: "Audit an artist's campaigns and summarize what is working and what to fix next.",
|
|
260
|
+
title: "Audit Campaigns"
|
|
261
|
+
}, (args) => asTextPrompt([
|
|
262
|
+
"Audit my campaigns in Dynamoi.",
|
|
263
|
+
args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, start by listing artists and ask me which one to audit.",
|
|
264
|
+
"",
|
|
265
|
+
"Steps:",
|
|
266
|
+
"1. Use dynamoi_list_campaigns and dynamoi_get_campaign with includeAnalytics=true for the last 7-14 days when one campaign needs a deeper read.",
|
|
267
|
+
"2. Identify any campaigns that are paused, failed, or stuck in a pre-active state and explain why using dynamoi_get_campaign and dynamoi_get_platform_status.",
|
|
268
|
+
"3. Recommend 3-5 next actions with clear priorities."
|
|
269
|
+
].join(`
|
|
270
|
+
`)));
|
|
271
|
+
server.registerPrompt("dynamoi_release_launch_plan", {
|
|
272
|
+
argsSchema: {
|
|
273
|
+
artistId: z.string().uuid().optional(),
|
|
274
|
+
contentTitle: z.string().trim().optional(),
|
|
275
|
+
contentType: z.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]).optional()
|
|
295
276
|
},
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
server.registerPrompt(
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
argsSchema: {
|
|
320
|
-
campaignId: z.string().uuid()
|
|
321
|
-
},
|
|
322
|
-
description: "Diagnose why a campaign is blocked/stuck and recommend the next fix.",
|
|
323
|
-
title: "Why Is My Campaign Blocked?"
|
|
277
|
+
description: "Create a pragmatic release launch plan and propose a Dynamoi campaign setup.",
|
|
278
|
+
title: "Release Launch Plan"
|
|
279
|
+
}, (args) => asTextPrompt([
|
|
280
|
+
"Help me plan a release launch using Dynamoi.",
|
|
281
|
+
args.artistId ? `Artist ID: ${args.artistId}` : "If no artistId is provided, list artists first.",
|
|
282
|
+
args.contentType ? `Content type: ${args.contentType}` : "",
|
|
283
|
+
args.contentTitle ? `Title: ${args.contentTitle}` : "",
|
|
284
|
+
"",
|
|
285
|
+
"Ask any missing questions first (links, creative, budget, countries, dates).",
|
|
286
|
+
"For review/demo Smart Campaign launches that already specify the artist, content title, budget, countries, and reusable media assets, you may proceed without asking for spotifyUrl or endDate.",
|
|
287
|
+
"When those review/demo fields are omitted, do not invent placeholder spotifyUrl or endDate values; omit them and let Dynamoi infer them.",
|
|
288
|
+
"Then propose the simplest campaign plan that fits today’s supported platforms:",
|
|
289
|
+
"- Smart Campaign (Meta) for Spotify/Apple Music releases",
|
|
290
|
+
"- YouTube campaign for videos",
|
|
291
|
+
"",
|
|
292
|
+
"If we proceed to launch:",
|
|
293
|
+
"- For Smart Campaign: use dynamoi_list_media_assets and then dynamoi_launch_campaign.",
|
|
294
|
+
"- For YouTube: use dynamoi_launch_campaign with youtubeVideoId."
|
|
295
|
+
].filter(Boolean).join(`
|
|
296
|
+
`)));
|
|
297
|
+
server.registerPrompt("dynamoi_why_campaign_blocked", {
|
|
298
|
+
argsSchema: {
|
|
299
|
+
campaignId: z.string().uuid()
|
|
324
300
|
},
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
301
|
+
description: "Diagnose why a campaign is blocked/stuck and recommend the next fix.",
|
|
302
|
+
title: "Why Is My Campaign Blocked?"
|
|
303
|
+
}, (args) => asTextPrompt([
|
|
304
|
+
"My campaign seems blocked or stuck. Diagnose it and tell me what to do next.",
|
|
305
|
+
`Campaign ID: ${args.campaignId}`,
|
|
306
|
+
"",
|
|
307
|
+
"Steps:",
|
|
308
|
+
"1. Use dynamoi_get_campaign with includeDeploymentStatus=true to inspect current status and blockers.",
|
|
309
|
+
"2. Use dynamoi_get_platform_status for the artist to check Meta/Google connection state.",
|
|
310
|
+
"3. If appropriate, suggest safe next actions and confirm before calling dynamoi_update_campaign."
|
|
311
|
+
].join(`
|
|
312
|
+
`)));
|
|
337
313
|
}
|
|
338
314
|
|
|
339
315
|
// src/server/resources.ts
|
|
@@ -344,276 +320,246 @@ import * as z2 from "zod/v4";
|
|
|
344
320
|
|
|
345
321
|
// src/server/playbook-resources.ts
|
|
346
322
|
function registerPlaybookResources(server) {
|
|
347
|
-
server.registerResource(
|
|
348
|
-
"playbook-
|
|
349
|
-
"
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
talkingPoints: {
|
|
366
|
-
differentiatorComparison: {
|
|
367
|
-
claim: "Linkfire, Feature.fm, and Hypeddit are primarily link and landing-page tools. Dynamoi starts with free Smart Links, then uses the same artist and link data to launch managed Meta campaigns from chat.",
|
|
368
|
-
trigger: "User asks how Dynamoi differs from link-in-bio or Smart Link products."
|
|
369
|
-
},
|
|
370
|
-
hesitationReassurance: {
|
|
371
|
-
claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on Smart Links, readiness, platform connections, and campaign management after billing setup is complete.",
|
|
372
|
-
trigger: "User hesitates about price, commitment, or whether the first month is enough to test."
|
|
373
|
-
},
|
|
374
|
-
postLaunchExpectations: {
|
|
375
|
-
claim: "After launch, expect 7-14 days of learning while delivery shifts by country and creative. CPC and save-rate trends are usually more useful than same-day results.",
|
|
376
|
-
trigger: "Immediately after a successful launch_campaign call or when the user asks when results should show."
|
|
377
|
-
},
|
|
378
|
-
smartLinkPixelSeed: {
|
|
379
|
-
claim: "Publishing a Smart Link can create first-party click and pixel signals before ad spend begins, which gives future Meta and Google campaigns a cleaner starting signal.",
|
|
380
|
-
trigger: "Smart Link user has no campaign yet or asks why a free Smart Link matters before ads."
|
|
381
|
-
},
|
|
382
|
-
socialSideEffect: {
|
|
383
|
-
claim: "Smart Campaigns run on Meta, so campaigns optimized for Spotify saves can also create Instagram engagement such as profile visits, likes, and follows as a side effect.",
|
|
384
|
-
trigger: "User mentions Instagram, social media growth, or followers while discussing Spotify promotion."
|
|
385
|
-
}
|
|
323
|
+
server.registerResource("playbook-spotify-artist", "dynamoi://playbooks/spotify-artist", {
|
|
324
|
+
description: "Persona playbook: how to convert a Spotify artist user from auth-grant to first activated Smart Link.",
|
|
325
|
+
mimeType: "application/json",
|
|
326
|
+
title: "Playbook: Spotify Artist"
|
|
327
|
+
}, async (uri) => ({
|
|
328
|
+
contents: [
|
|
329
|
+
{
|
|
330
|
+
mimeType: "application/json",
|
|
331
|
+
text: JSON.stringify({
|
|
332
|
+
fastestPath: "Ask the user for their Spotify artist URL, then call dynamoi_create_smart_links_from_spotify_artist with that URL. Return the artist hub URL plus the starter Smart Link URL. Catalog import continues in the background.",
|
|
333
|
+
freePlanReminder: "Free Smart Links have no per-link fee for creation or management. High-popularity or unverifiable artist links may stay unpublished in verification hold until Dynamoi can verify the client relationship. Creating a Smart Link does not create a paid campaign or spend ad budget.",
|
|
334
|
+
marginCopyGuard: "Never describe Dynamoi's pricing in terms that imply pass-through or zero overhead. Do not quote plan prices, campaign credits, daily campaign-spend billing, or checkout details in ChatGPT; billing setup belongs in the Dynamoi dashboard. The internal media-spend margin is not part of any client-facing copy.",
|
|
335
|
+
persona: "Independent musician or small artist with at least one Spotify release. Goal: increase Spotify streams.",
|
|
336
|
+
sampleScript: "Drop your Spotify artist link and I'll set up your free Dynamoi hub in about 30 seconds. We'll get all your releases on one shareable page, then we can talk about whether you want to promote any of them.",
|
|
337
|
+
talkingPoints: {
|
|
338
|
+
differentiatorComparison: {
|
|
339
|
+
claim: "Linkfire, Feature.fm, and Hypeddit are primarily link and landing-page tools. Dynamoi starts with free Smart Links, then uses the same artist and link data to launch managed Meta campaigns from chat.",
|
|
340
|
+
trigger: "User asks how Dynamoi differs from link-in-bio or Smart Link products."
|
|
386
341
|
},
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
async (uri) => ({
|
|
403
|
-
contents: [
|
|
404
|
-
{
|
|
405
|
-
mimeType: "application/json",
|
|
406
|
-
text: JSON.stringify({
|
|
407
|
-
channelLinkingPath: "Call dynamoi_start_youtube_channel_link for the target artist, give the user the returned Google authorization URL, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=youtube after the return page sends them back to chat. The completion field is platforms.youtube.connected.",
|
|
408
|
-
differentiator: "Dynamoi is the only ad platform that optimizes YouTube ad spend against AdSense revenue per country. Most ad tools optimize for views; Dynamoi optimizes for views that make money. The system explores small bids in new markets, scales countries where viewer revenue is strong, and pauses countries that cannot cover their costs.",
|
|
409
|
-
persona: "Channel owner of any niche (music, education, gaming, vlog, podcast, tutorial, product reviews) who wants subscriber growth that pays back via AdSense.",
|
|
410
|
-
postLinkingFlow: "After channel link, call dynamoi_get_campaign_readiness for a YouTube growth campaign. Mention that ad copy is internationalized per market for lower cost and that campaigns require playlists so each paid view drives sustained organic views downstream.",
|
|
411
|
-
sampleScript: "Most YouTube ad systems optimize for raw views. Dynamoi merges your AdSense revenue with ad cost data to optimize bids per country based on real viewer revenue, so you grow toward viewers who actually monetize. I can start the YouTube channel link from here, then we can plan your first campaign.",
|
|
412
|
-
talkingPoints: {
|
|
413
|
-
differentiatorComparison: {
|
|
414
|
-
claim: "Most creator ad tools optimize for views or subscribers. Dynamoi compares ad cost with AdSense revenue by country so delivery can favor viewers who are more likely to pay back over time.",
|
|
415
|
-
trigger: "User asks how YouTube campaigns differ from normal Google Ads or creator-growth services."
|
|
416
|
-
},
|
|
417
|
-
hesitationReassurance: {
|
|
418
|
-
claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on channel linking, readiness, and campaign management after billing setup is complete.",
|
|
419
|
-
trigger: "User expresses pricing concern or asks whether they can test without a long commitment."
|
|
420
|
-
},
|
|
421
|
-
playlistWaterfall: {
|
|
422
|
-
claim: "Playlist promotion sends viewers into a sequence, so one paid view can lead to additional organic views across related videos and channel-wide subscriber growth.",
|
|
423
|
-
trigger: "User asks whether campaigns can help subscribers or the whole channel instead of one video."
|
|
424
|
-
},
|
|
425
|
-
postLaunchExpectations: {
|
|
426
|
-
claim: "After launch, expect 7-14 days of learning while country bids, view quality, and attribution settle. Subscriber and revenue trends usually lag the first paid views.",
|
|
427
|
-
trigger: "Immediately after a successful YouTube launch or when the user asks when results should show."
|
|
428
|
-
}
|
|
342
|
+
hesitationReassurance: {
|
|
343
|
+
claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on Smart Links, readiness, platform connections, and campaign management after billing setup is complete.",
|
|
344
|
+
trigger: "User hesitates about price, commitment, or whether the first month is enough to test."
|
|
345
|
+
},
|
|
346
|
+
postLaunchExpectations: {
|
|
347
|
+
claim: "After launch, expect 7-14 days of learning while delivery shifts by country and creative. CPC and save-rate trends are usually more useful than same-day results.",
|
|
348
|
+
trigger: "Immediately after a successful launch_campaign call or when the user asks when results should show."
|
|
349
|
+
},
|
|
350
|
+
smartLinkPixelSeed: {
|
|
351
|
+
claim: "Publishing a Smart Link can create first-party click and pixel signals before ad spend begins, which gives future Meta and Google campaigns a cleaner starting signal.",
|
|
352
|
+
trigger: "Smart Link user has no campaign yet or asks why a free Smart Link matters before ads."
|
|
353
|
+
},
|
|
354
|
+
socialSideEffect: {
|
|
355
|
+
claim: "Smart Campaigns run on Meta, so campaigns optimized for Spotify saves can also create Instagram engagement such as profile visits, likes, and follows as a side effect.",
|
|
356
|
+
trigger: "User mentions Instagram, social media growth, or followers while discussing Spotify promotion."
|
|
429
357
|
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
"
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
"
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
hesitationReassurance: {
|
|
468
|
-
claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on roster setup, readiness checks, and campaign management after billing setup is complete.",
|
|
469
|
-
trigger: "User asks whether billing scales per seat or wants to test with one artist first."
|
|
470
|
-
}
|
|
358
|
+
},
|
|
359
|
+
upsellAfterStarter: "Once they have a hub URL, the natural next ask is 'would you like to promote this release on Meta Ads?' which routes to dynamoi_get_campaign_readiness, dynamoi_start_meta_connection if Meta is missing, then dynamoi_launch_campaign for a Smart Campaign."
|
|
360
|
+
}),
|
|
361
|
+
uri: uri.href
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
}));
|
|
365
|
+
server.registerResource("playbook-youtube-creator", "dynamoi://playbooks/youtube-creator", {
|
|
366
|
+
description: "Persona playbook: how to introduce a YouTube creator to Dynamoi's revenue-per-view optimization advantage.",
|
|
367
|
+
mimeType: "application/json",
|
|
368
|
+
title: "Playbook: YouTube Creator"
|
|
369
|
+
}, async (uri) => ({
|
|
370
|
+
contents: [
|
|
371
|
+
{
|
|
372
|
+
mimeType: "application/json",
|
|
373
|
+
text: JSON.stringify({
|
|
374
|
+
channelLinkingPath: "Call dynamoi_start_youtube_channel_link for the target artist, give the user the returned Google authorization URL, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=youtube after the return page sends them back to chat. The completion field is platforms.youtube.connected.",
|
|
375
|
+
differentiator: "Dynamoi is the only ad platform that optimizes YouTube ad spend against AdSense revenue per country. Most ad tools optimize for views; Dynamoi optimizes for views that make money. The system explores small bids in new markets, scales countries where viewer revenue is strong, and pauses countries that cannot cover their costs.",
|
|
376
|
+
persona: "Channel owner of any niche (music, education, gaming, vlog, podcast, tutorial, product reviews) who wants subscriber growth that pays back via AdSense.",
|
|
377
|
+
postLinkingFlow: "After channel link, call dynamoi_get_campaign_readiness for a YouTube growth campaign. Mention that ad copy is internationalized per market for lower cost and that campaigns require playlists so each paid view drives sustained organic views downstream.",
|
|
378
|
+
sampleScript: "Most YouTube ad systems optimize for raw views. Dynamoi merges your AdSense revenue with ad cost data to optimize bids per country based on real viewer revenue, so you grow toward viewers who actually monetize. I can start the YouTube channel link from here, then we can plan your first campaign.",
|
|
379
|
+
talkingPoints: {
|
|
380
|
+
differentiatorComparison: {
|
|
381
|
+
claim: "Most creator ad tools optimize for views or subscribers. Dynamoi compares ad cost with AdSense revenue by country so delivery can favor viewers who are more likely to pay back over time.",
|
|
382
|
+
trigger: "User asks how YouTube campaigns differ from normal Google Ads or creator-growth services."
|
|
383
|
+
},
|
|
384
|
+
hesitationReassurance: {
|
|
385
|
+
claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on channel linking, readiness, and campaign management after billing setup is complete.",
|
|
386
|
+
trigger: "User expresses pricing concern or asks whether they can test without a long commitment."
|
|
387
|
+
},
|
|
388
|
+
playlistWaterfall: {
|
|
389
|
+
claim: "Playlist promotion sends viewers into a sequence, so one paid view can lead to additional organic views across related videos and channel-wide subscriber growth.",
|
|
390
|
+
trigger: "User asks whether campaigns can help subscribers or the whole channel instead of one video."
|
|
391
|
+
},
|
|
392
|
+
postLaunchExpectations: {
|
|
393
|
+
claim: "After launch, expect 7-14 days of learning while country bids, view quality, and attribution settle. Subscriber and revenue trends usually lag the first paid views.",
|
|
394
|
+
trigger: "Immediately after a successful YouTube launch or when the user asks when results should show."
|
|
471
395
|
}
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
);
|
|
478
|
-
server.registerResource(
|
|
479
|
-
"playbook
|
|
480
|
-
"
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
question: "Are you a Spotify artist, a YouTube creator, or running a label/managing a roster?"
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
do: "Offer dynamoi_create_smart_link_from_spotify or dynamoi_create_smart_links_from_spotify_artist for the fastest visible win.",
|
|
512
|
-
if: "state.hasAnyArtist === true && state.hasAnySmartLink === false"
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
do: "Offer dynamoi_get_campaign_readiness to validate launch inputs before creating anything.",
|
|
516
|
-
if: "state.hasAnyArtist === true && state.hasAnyActiveCampaign === false"
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
do: "Tell the user managed-advertising billing setup must happen in the Dynamoi dashboard, not through a ChatGPT checkout link. After they start or restore billing there, poll dynamoi_get_billing for that artist to confirm billing is active.",
|
|
520
|
-
if: "state.hasAnyArtist === true && billing is the launch blocker"
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
do: "Offer dynamoi_start_meta_connection for the target artist, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=meta after Meta returns them to chat. The completion field is platforms.meta.status.",
|
|
524
|
-
if: "state.hasAnyArtist === true && user wants Spotify Smart Campaigns && state.hasAnyConnectedMeta === false"
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
do: "Offer dynamoi_start_youtube_channel_link for the target artist, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=youtube after Google returns them to chat. The completion field is platforms.youtube.connected.",
|
|
528
|
-
if: "state.hasAnyArtist === true && user wants YouTube growth && state.hasAnyConnectedYoutube === false"
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
do: "Ask whether they want a performance summary, a new campaign, or to update an existing campaign.",
|
|
532
|
-
if: "state.hasAnyActiveCampaign === true"
|
|
533
|
-
}
|
|
534
|
-
],
|
|
535
|
-
source: "This tree mirrors dynamoi_get_account_overview.recommendedNextActions. Use either; the tree is for explaining the plan to the user, the array is for deciding the next tool call.",
|
|
536
|
-
talkingPoints: {
|
|
537
|
-
creatorFirstChoice: {
|
|
538
|
-
claim: "Spotify artists should start from a Spotify artist URL; YouTube creators should start by linking a channel; labels and managers should pick one artist as the first setup path.",
|
|
539
|
-
trigger: "Brand-new user has no artists and asks what to do first."
|
|
540
|
-
},
|
|
541
|
-
postLaunchExpectations: {
|
|
542
|
-
claim: "Campaigns need 7-14 days of learning before judging performance. Early reads should focus on blockers, delivery status, spend, CPC, and whether attribution is flowing.",
|
|
543
|
-
trigger: "User asks what happens after launch or whether a first-day result is good or bad."
|
|
544
|
-
},
|
|
545
|
-
smartLinkBeforeAds: {
|
|
546
|
-
claim: "A free Smart Link is the fastest visible setup step because it produces a public asset, starts catalog context, and creates a natural handoff into campaign readiness.",
|
|
547
|
-
trigger: "User has an artist but no Smart Link or asks why the assistant recommends links before ads."
|
|
548
|
-
}
|
|
396
|
+
}
|
|
397
|
+
}),
|
|
398
|
+
uri: uri.href
|
|
399
|
+
}
|
|
400
|
+
]
|
|
401
|
+
}));
|
|
402
|
+
server.registerResource("playbook-label-or-manager", "dynamoi://playbooks/label-or-manager", {
|
|
403
|
+
description: "Persona playbook: how to onboard a label, manager, or anyone running a roster of multiple artists.",
|
|
404
|
+
mimeType: "application/json",
|
|
405
|
+
title: "Playbook: Label or Manager"
|
|
406
|
+
}, async (uri) => ({
|
|
407
|
+
contents: [
|
|
408
|
+
{
|
|
409
|
+
mimeType: "application/json",
|
|
410
|
+
text: JSON.stringify({
|
|
411
|
+
billingNote: "Consolidated billing across all artists in the organization. No per-seat charge, no per-artist fee.",
|
|
412
|
+
persona: "Label owner, manager, or distributor handling more than one artist. Goal: oversee promotion across a roster from one account.",
|
|
413
|
+
rolesNote: "Dynamoi supports admin, editor, and viewer roles at organization and artist level. Editors can mutate everything except admin management; viewers are read-only.",
|
|
414
|
+
sampleScript: "Dynamoi handles rosters: organizations with admin/editor/viewer roles, consolidated billing, and per-artist permissions. To start, create your first artist with a Spotify URL, then invite your team. We can layer in more artists from the same organization once you have one running.",
|
|
415
|
+
setupSequence: [
|
|
416
|
+
"If they have one artist ready: route to dynamoi://playbooks/spotify-artist for that first artist.",
|
|
417
|
+
"After the first artist is set up, mention team invites are managed in the dashboard at /dashboard/settings/organization (no MCP tool yet).",
|
|
418
|
+
"Cross-artist analytics are available via dynamoi_get_artist_analytics per artist; a roster-wide rollup is dashboard-only."
|
|
419
|
+
],
|
|
420
|
+
talkingPoints: {
|
|
421
|
+
consolidatedRoster: {
|
|
422
|
+
claim: "One organization can hold multiple artists with admin, editor, and viewer roles, while campaign launch and billing state stay visible per artist.",
|
|
423
|
+
trigger: "User says they manage more than one artist or asks whether a label/manager workflow is supported."
|
|
424
|
+
},
|
|
425
|
+
differentiatorComparison: {
|
|
426
|
+
claim: "Traditional Smart Link tools stop at links and analytics. Dynamoi keeps those free, then lets a roster operator move from link to managed campaign launch in the same assistant thread.",
|
|
427
|
+
trigger: "User compares Dynamoi to Linkfire, Feature.fm, Hypeddit, or a label marketing stack."
|
|
428
|
+
},
|
|
429
|
+
hesitationReassurance: {
|
|
430
|
+
claim: "Managed advertising billing is completed in the Dynamoi dashboard. In ChatGPT, keep the flow focused on roster setup, readiness checks, and campaign management after billing setup is complete.",
|
|
431
|
+
trigger: "User asks whether billing scales per seat or wants to test with one artist first."
|
|
549
432
|
}
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
);
|
|
433
|
+
}
|
|
434
|
+
}),
|
|
435
|
+
uri: uri.href
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
}));
|
|
439
|
+
server.registerResource("playbook-onboarding-tree", "dynamoi://playbooks/onboarding-tree", {
|
|
440
|
+
description: "Decision tree for routing a brand-new MCP user to the right persona playbook based on their first reply.",
|
|
441
|
+
mimeType: "application/json",
|
|
442
|
+
title: "Playbook: Onboarding Decision Tree"
|
|
443
|
+
}, async (uri) => ({
|
|
444
|
+
contents: [
|
|
445
|
+
{
|
|
446
|
+
mimeType: "application/json",
|
|
447
|
+
text: JSON.stringify({
|
|
448
|
+
nodes: [
|
|
449
|
+
{
|
|
450
|
+
do: [
|
|
451
|
+
{
|
|
452
|
+
match: "Spotify artist",
|
|
453
|
+
routeTo: "dynamoi://playbooks/spotify-artist"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
match: "YouTube creator",
|
|
457
|
+
routeTo: "dynamoi://playbooks/youtube-creator"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
match: "Label / manager / multiple artists",
|
|
461
|
+
routeTo: "dynamoi://playbooks/label-or-manager"
|
|
462
|
+
}
|
|
463
|
+
],
|
|
464
|
+
if: "state.hasAnyArtist === false",
|
|
465
|
+
question: "Are you a Spotify artist, a YouTube creator, or running a label/managing a roster?"
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
do: "Offer dynamoi_create_smart_link_from_spotify or dynamoi_create_smart_links_from_spotify_artist for the fastest visible win.",
|
|
469
|
+
if: "state.hasAnyArtist === true && state.hasAnySmartLink === false"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
do: "Offer dynamoi_get_campaign_readiness to validate launch inputs before creating anything.",
|
|
473
|
+
if: "state.hasAnyArtist === true && state.hasAnyActiveCampaign === false"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
do: "Tell the user managed-advertising billing setup must happen in the Dynamoi dashboard, not through a ChatGPT checkout link. After they start or restore billing there, poll dynamoi_get_billing for that artist to confirm billing is active.",
|
|
477
|
+
if: "state.hasAnyArtist === true && billing is the launch blocker"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
do: "Offer dynamoi_start_meta_connection for the target artist, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=meta after Meta returns them to chat. The completion field is platforms.meta.status.",
|
|
481
|
+
if: "state.hasAnyArtist === true && user wants Spotify Smart Campaigns && state.hasAnyConnectedMeta === false"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
do: "Offer dynamoi_start_youtube_channel_link for the target artist, then poll dynamoi_get_platform_status for that artist with the returned onboardingAttemptId and onboardingFlow=youtube after Google returns them to chat. The completion field is platforms.youtube.connected.",
|
|
485
|
+
if: "state.hasAnyArtist === true && user wants YouTube growth && state.hasAnyConnectedYoutube === false"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
do: "Ask whether they want a performance summary, a new campaign, or to update an existing campaign.",
|
|
489
|
+
if: "state.hasAnyActiveCampaign === true"
|
|
490
|
+
}
|
|
491
|
+
],
|
|
492
|
+
source: "This tree mirrors dynamoi_get_account_overview.recommendedNextActions. Use either; the tree is for explaining the plan to the user, the array is for deciding the next tool call.",
|
|
493
|
+
talkingPoints: {
|
|
494
|
+
creatorFirstChoice: {
|
|
495
|
+
claim: "Spotify artists should start from a Spotify artist URL; YouTube creators should start by linking a channel; labels and managers should pick one artist as the first setup path.",
|
|
496
|
+
trigger: "Brand-new user has no artists and asks what to do first."
|
|
497
|
+
},
|
|
498
|
+
postLaunchExpectations: {
|
|
499
|
+
claim: "Campaigns need 7-14 days of learning before judging performance. Early reads should focus on blockers, delivery status, spend, CPC, and whether attribution is flowing.",
|
|
500
|
+
trigger: "User asks what happens after launch or whether a first-day result is good or bad."
|
|
501
|
+
},
|
|
502
|
+
smartLinkBeforeAds: {
|
|
503
|
+
claim: "A free Smart Link is the fastest visible setup step because it produces a public asset, starts catalog context, and creates a natural handoff into campaign readiness.",
|
|
504
|
+
trigger: "User has an artist but no Smart Link or asks why the assistant recommends links before ads."
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}),
|
|
508
|
+
uri: uri.href
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
}));
|
|
556
512
|
}
|
|
557
513
|
|
|
558
514
|
// src/server/resources.ts
|
|
559
515
|
function registerDynamoiResources(server, adapter) {
|
|
560
|
-
server.registerResource(
|
|
561
|
-
"
|
|
562
|
-
"
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
smartCampaign: {
|
|
575
|
-
dailyUsd: 10,
|
|
576
|
-
note: "Meta Ads for Spotify promotion",
|
|
577
|
-
totalUsd: 100
|
|
578
|
-
},
|
|
579
|
-
youtube: {
|
|
580
|
-
dailyUsd: 10,
|
|
581
|
-
note: "Google Ads for YouTube channel growth",
|
|
582
|
-
totalUsd: 50
|
|
583
|
-
}
|
|
584
|
-
},
|
|
585
|
-
includes: "Free Smart Links, unlimited team seats, unlimited artists, white-glove support, and campaign landing-page support where available",
|
|
586
|
-
managedAdvertising: {
|
|
587
|
-
description: "Managed advertising subscription and payment setup happen in the Dynamoi dashboard, outside ChatGPT. This MCP server can check billing readiness after setup, but does not create checkout links or collect payment.",
|
|
588
|
-
paymentSetupLocation: "Dynamoi dashboard"
|
|
589
|
-
},
|
|
590
|
-
noContracts: true
|
|
591
|
-
}),
|
|
592
|
-
uri: uri.href
|
|
593
|
-
}
|
|
594
|
-
]
|
|
595
|
-
})
|
|
596
|
-
);
|
|
597
|
-
server.registerResource(
|
|
598
|
-
"platform-content-types",
|
|
599
|
-
"dynamoi://platform/content-types",
|
|
600
|
-
{ mimeType: "application/json", title: "Content Types" },
|
|
601
|
-
async (uri) => ({
|
|
602
|
-
contents: [
|
|
603
|
-
{
|
|
604
|
-
mimeType: "application/json",
|
|
605
|
-
text: JSON.stringify({
|
|
606
|
-
campaignTypes: {
|
|
607
|
-
SMART_CAMPAIGN: ["TRACK", "ALBUM", "PLAYLIST"],
|
|
608
|
-
YOUTUBE: ["VIDEO"]
|
|
516
|
+
server.registerResource("platform-pricing", "dynamoi://platform/pricing", {
|
|
517
|
+
description: "Dynamoi campaign setup guidance and campaign budget minimums.",
|
|
518
|
+
mimeType: "application/json",
|
|
519
|
+
title: "Pricing"
|
|
520
|
+
}, async (uri) => ({
|
|
521
|
+
contents: [
|
|
522
|
+
{
|
|
523
|
+
mimeType: "application/json",
|
|
524
|
+
text: JSON.stringify({
|
|
525
|
+
budgetMinimums: {
|
|
526
|
+
smartCampaign: {
|
|
527
|
+
dailyUsd: 10,
|
|
528
|
+
note: "Meta Ads for Spotify promotion",
|
|
529
|
+
totalUsd: 50
|
|
609
530
|
},
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
531
|
+
youtube: {
|
|
532
|
+
dailyUsd: 10,
|
|
533
|
+
note: "Google Ads for YouTube channel growth",
|
|
534
|
+
totalUsd: 50
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
includes: "Free Smart Links, unlimited team seats, unlimited artists, white-glove support, and campaign landing-page support where available",
|
|
538
|
+
managedAdvertising: {
|
|
539
|
+
description: "Managed advertising subscription and payment setup happen in the Dynamoi dashboard, outside ChatGPT. This MCP server can check billing readiness after setup, but does not create checkout links or collect payment.",
|
|
540
|
+
paymentSetupLocation: "Dynamoi dashboard"
|
|
541
|
+
},
|
|
542
|
+
noContracts: true
|
|
543
|
+
}),
|
|
544
|
+
uri: uri.href
|
|
545
|
+
}
|
|
546
|
+
]
|
|
547
|
+
}));
|
|
548
|
+
server.registerResource("platform-content-types", "dynamoi://platform/content-types", { mimeType: "application/json", title: "Content Types" }, async (uri) => ({
|
|
549
|
+
contents: [
|
|
550
|
+
{
|
|
551
|
+
mimeType: "application/json",
|
|
552
|
+
text: JSON.stringify({
|
|
553
|
+
campaignTypes: {
|
|
554
|
+
SMART_CAMPAIGN: ["TRACK", "ALBUM", "PLAYLIST"],
|
|
555
|
+
YOUTUBE: ["VIDEO"]
|
|
556
|
+
},
|
|
557
|
+
contentTypes: ["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]
|
|
558
|
+
}),
|
|
559
|
+
uri: uri.href
|
|
560
|
+
}
|
|
561
|
+
]
|
|
562
|
+
}));
|
|
617
563
|
const countryTargetingResource = async (uri) => ({
|
|
618
564
|
contents: [
|
|
619
565
|
{
|
|
@@ -637,383 +583,318 @@ function registerDynamoiResources(server, adapter) {
|
|
|
637
583
|
}
|
|
638
584
|
]
|
|
639
585
|
});
|
|
640
|
-
server.registerResource(
|
|
641
|
-
"
|
|
642
|
-
"
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
);
|
|
650
|
-
server.registerResource(
|
|
651
|
-
"
|
|
652
|
-
"
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
"smart-links-capabilities",
|
|
692
|
-
"dynamoi://smart-links/capabilities",
|
|
693
|
-
{ mimeType: "application/json", title: "Smart Link Capabilities" },
|
|
694
|
-
async (uri) => ({
|
|
695
|
-
contents: [
|
|
696
|
-
{
|
|
697
|
-
mimeType: "application/json",
|
|
698
|
-
text: JSON.stringify({
|
|
699
|
-
artistCatalogWorkflow: "Use dynamoi_create_smart_links_from_spotify_artist for Spotify artist URLs when the user wants the artist hub, catalog import, or all links. The tool creates/returns a starter link immediately and starts the background catalog import so the user does not need the dashboard.",
|
|
700
|
-
creationInputs: {
|
|
701
|
-
supportedSpotifyKinds: ["artist", "album", "track"],
|
|
702
|
-
unsupportedToday: ["playlist"]
|
|
703
|
-
},
|
|
704
|
-
mutableFields: {
|
|
705
|
-
artistLevel: [
|
|
706
|
-
"defaultTheme",
|
|
707
|
-
"metaPixelId",
|
|
708
|
-
"tiktokPixelId",
|
|
709
|
-
"googleAdsConversionId"
|
|
710
|
-
],
|
|
711
|
-
perLink: ["customDescription", "publishState"]
|
|
712
|
-
},
|
|
713
|
-
pixelPolicy: "Only validated pixel IDs are accepted. Arbitrary JavaScript, tag snippets, and script URLs are not supported.",
|
|
714
|
-
themes: ["classic", "brutalist", "aurora", "cinematic"]
|
|
715
|
-
}),
|
|
716
|
-
uri: uri.href
|
|
717
|
-
}
|
|
718
|
-
]
|
|
719
|
-
})
|
|
720
|
-
);
|
|
721
|
-
server.registerResource(
|
|
722
|
-
"business-free-vs-paid",
|
|
723
|
-
"dynamoi://business/free-vs-paid",
|
|
724
|
-
{
|
|
725
|
-
description: "Clear boundary between free Dynamoi Smart Links and paid managed advertising.",
|
|
726
|
-
mimeType: "application/json",
|
|
727
|
-
title: "Free Smart Links vs Paid Campaigns"
|
|
728
|
-
},
|
|
729
|
-
async (uri) => ({
|
|
730
|
-
contents: [
|
|
731
|
-
{
|
|
732
|
-
mimeType: "application/json",
|
|
733
|
-
text: JSON.stringify({
|
|
734
|
-
agentGuidance: "Do not imply that a Smart Link creates an ad campaign. Do not imply that campaign budgets are free.",
|
|
735
|
-
freeSmartLinks: {
|
|
736
|
-
claim: "Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing.",
|
|
737
|
-
useFor: "Spotify landing pages, public release links, link sharing, basic link analytics, artist-level themes, and validated pixel IDs."
|
|
738
|
-
},
|
|
739
|
-
managedAdvertising: {
|
|
740
|
-
paid: true,
|
|
741
|
-
pricing: "Billing and payment setup happen in the Dynamoi dashboard, outside ChatGPT.",
|
|
742
|
-
useFor: "Managed Meta and Google ad campaigns for Spotify promotion and YouTube channel growth."
|
|
743
|
-
}
|
|
744
|
-
}),
|
|
745
|
-
uri: uri.href
|
|
746
|
-
}
|
|
747
|
-
]
|
|
748
|
-
})
|
|
749
|
-
);
|
|
750
|
-
server.registerResource(
|
|
751
|
-
"smart-links-agent-guide",
|
|
752
|
-
"dynamoi://smart-links/agent-guide",
|
|
753
|
-
{
|
|
754
|
-
description: "How agents should answer Smart Link questions using Dynamoi MCP tools.",
|
|
755
|
-
mimeType: "application/json",
|
|
756
|
-
title: "Smart Link Agent Guide"
|
|
757
|
-
},
|
|
758
|
-
async (uri) => ({
|
|
759
|
-
contents: [
|
|
760
|
-
{
|
|
761
|
-
mimeType: "application/json",
|
|
762
|
-
text: JSON.stringify({
|
|
763
|
-
answerWith: [
|
|
764
|
-
"artist hub URL when present",
|
|
765
|
-
"release title",
|
|
766
|
-
"artist name",
|
|
767
|
-
"public URL",
|
|
768
|
-
"publish/live status",
|
|
769
|
-
"one next action when relevant"
|
|
770
|
-
],
|
|
771
|
-
avoidByDefault: [
|
|
772
|
-
"internal UUIDs",
|
|
773
|
-
"database model names",
|
|
774
|
-
"workflow IDs",
|
|
775
|
-
"provider implementation details"
|
|
586
|
+
server.registerResource("platform-country-targeting", "dynamoi://platform/country-targeting", {
|
|
587
|
+
description: "Explains Smart Campaign vs YouTube country-targeting catalogs.",
|
|
588
|
+
mimeType: "application/json",
|
|
589
|
+
title: "Country Targeting"
|
|
590
|
+
}, countryTargetingResource);
|
|
591
|
+
server.registerResource("platform-supported-countries", "dynamoi://platform/supported-countries", {
|
|
592
|
+
description: "Legacy alias for country-targeting guidance. Use dynamoi://platform/country-targeting for the canonical resource.",
|
|
593
|
+
mimeType: "application/json",
|
|
594
|
+
title: "Supported Countries"
|
|
595
|
+
}, countryTargetingResource);
|
|
596
|
+
server.registerResource("smart-links-free-plan", "dynamoi://smart-links/free-plan", {
|
|
597
|
+
description: "Canonical explanation of Dynamoi's free Smart Links plan and how it differs from paid managed advertising.",
|
|
598
|
+
mimeType: "application/json",
|
|
599
|
+
title: "Free Smart Links"
|
|
600
|
+
}, async (uri) => ({
|
|
601
|
+
contents: [
|
|
602
|
+
{
|
|
603
|
+
mimeType: "application/json",
|
|
604
|
+
text: JSON.stringify({
|
|
605
|
+
free: true,
|
|
606
|
+
included: [
|
|
607
|
+
"Unlimited free Smart Links for supported Spotify artist, album, and track URLs",
|
|
608
|
+
"Artist hub pages for catalog-level Smart Links",
|
|
609
|
+
"Smart Link analytics",
|
|
610
|
+
"Artist-level themes",
|
|
611
|
+
"Validated Meta, TikTok, and Google Ads pixel IDs",
|
|
612
|
+
"Artist-level public availability controls"
|
|
613
|
+
],
|
|
614
|
+
noCatch: "No per-link fee for Smart Link creation or management. High-popularity or unverifiable artist links may stay unpublished in verification hold until Dynamoi can verify the client relationship.",
|
|
615
|
+
paidSeparately: "Managed advertising campaigns and ad budgets are separate paid products."
|
|
616
|
+
}),
|
|
617
|
+
uri: uri.href
|
|
618
|
+
}
|
|
619
|
+
]
|
|
620
|
+
}));
|
|
621
|
+
server.registerResource("smart-links-capabilities", "dynamoi://smart-links/capabilities", { mimeType: "application/json", title: "Smart Link Capabilities" }, async (uri) => ({
|
|
622
|
+
contents: [
|
|
623
|
+
{
|
|
624
|
+
mimeType: "application/json",
|
|
625
|
+
text: JSON.stringify({
|
|
626
|
+
artistCatalogWorkflow: "Use dynamoi_create_smart_links_from_spotify_artist for Spotify artist URLs when the user wants the artist hub, catalog import, or all links. The tool creates/returns a starter link immediately and starts the background catalog import so the user does not need the dashboard.",
|
|
627
|
+
creationInputs: {
|
|
628
|
+
supportedSpotifyKinds: ["artist", "album", "track"],
|
|
629
|
+
unsupportedToday: ["playlist"]
|
|
630
|
+
},
|
|
631
|
+
mutableFields: {
|
|
632
|
+
artistLevel: [
|
|
633
|
+
"defaultTheme",
|
|
634
|
+
"metaPixelId",
|
|
635
|
+
"tiktokPixelId",
|
|
636
|
+
"googleAdsConversionId"
|
|
776
637
|
],
|
|
777
|
-
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
{
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
638
|
+
perLink: ["customDescription"]
|
|
639
|
+
},
|
|
640
|
+
pixelPolicy: "Only validated pixel IDs are accepted. Arbitrary JavaScript, tag snippets, and script URLs are not supported.",
|
|
641
|
+
themes: ["classic", "brutalist", "aurora", "cinematic"]
|
|
642
|
+
}),
|
|
643
|
+
uri: uri.href
|
|
644
|
+
}
|
|
645
|
+
]
|
|
646
|
+
}));
|
|
647
|
+
server.registerResource("business-free-vs-paid", "dynamoi://business/free-vs-paid", {
|
|
648
|
+
description: "Clear boundary between free Dynamoi Smart Links and paid managed advertising.",
|
|
649
|
+
mimeType: "application/json",
|
|
650
|
+
title: "Free Smart Links vs Paid Campaigns"
|
|
651
|
+
}, async (uri) => ({
|
|
652
|
+
contents: [
|
|
653
|
+
{
|
|
654
|
+
mimeType: "application/json",
|
|
655
|
+
text: JSON.stringify({
|
|
656
|
+
agentGuidance: "Do not imply that a Smart Link creates an ad campaign. Do not imply that campaign budgets are free.",
|
|
657
|
+
freeSmartLinks: {
|
|
658
|
+
claim: "Smart Links are free to create and manage. High-popularity or unverifiable artist links may require verification before public publishing.",
|
|
659
|
+
useFor: "Spotify landing pages, public release links, link sharing, basic link analytics, artist-level themes, and validated pixel IDs."
|
|
660
|
+
},
|
|
661
|
+
managedAdvertising: {
|
|
662
|
+
paid: true,
|
|
663
|
+
pricing: "Billing and payment setup happen in the Dynamoi dashboard, outside ChatGPT.",
|
|
664
|
+
useFor: "Managed Meta and Google ad campaigns for Spotify promotion and YouTube channel growth."
|
|
665
|
+
}
|
|
666
|
+
}),
|
|
667
|
+
uri: uri.href
|
|
668
|
+
}
|
|
669
|
+
]
|
|
670
|
+
}));
|
|
671
|
+
server.registerResource("smart-links-agent-guide", "dynamoi://smart-links/agent-guide", {
|
|
672
|
+
description: "How agents should answer Smart Link questions using Dynamoi MCP tools.",
|
|
673
|
+
mimeType: "application/json",
|
|
674
|
+
title: "Smart Link Agent Guide"
|
|
675
|
+
}, async (uri) => ({
|
|
676
|
+
contents: [
|
|
677
|
+
{
|
|
678
|
+
mimeType: "application/json",
|
|
679
|
+
text: JSON.stringify({
|
|
680
|
+
answerWith: [
|
|
681
|
+
"artist hub URL when present",
|
|
682
|
+
"release title",
|
|
683
|
+
"artist name",
|
|
684
|
+
"public URL",
|
|
685
|
+
"public status",
|
|
686
|
+
"one next action when relevant"
|
|
687
|
+
],
|
|
688
|
+
avoidByDefault: [
|
|
689
|
+
"internal UUIDs",
|
|
690
|
+
"database model names",
|
|
691
|
+
"workflow IDs",
|
|
692
|
+
"provider implementation details"
|
|
693
|
+
],
|
|
694
|
+
whenToUse: "Use Smart Link tools when the user asks for free release links, artist hubs, full-catalog Spotify landing pages, streaming landing pages, Spotify link pages, Smart Link analytics, themes, pixels, public status, or public URLs."
|
|
695
|
+
}),
|
|
696
|
+
uri: uri.href
|
|
697
|
+
}
|
|
698
|
+
]
|
|
699
|
+
}));
|
|
700
|
+
server.registerResource("mcp-tool-answering-rules", "dynamoi://mcp/tool-answering-rules", {
|
|
701
|
+
description: "General answer rules for Dynamoi MCP tools so agents stop after useful results.",
|
|
702
|
+
mimeType: "application/json",
|
|
703
|
+
title: "MCP Tool Answering Rules"
|
|
704
|
+
}, async (uri) => ({
|
|
705
|
+
contents: [
|
|
706
|
+
{
|
|
707
|
+
mimeType: "application/json",
|
|
708
|
+
text: JSON.stringify({
|
|
709
|
+
emptyStateRule: "Always call dynamoi_get_account_overview first for routing. If list_artists, list_campaigns, list_smart_links, or search return empty for a brand-new user, do not respond 'no records found' as a terminal answer; consult dynamoi_get_account_overview.recommendedNextActions or dynamoi://playbooks/onboarding-tree.",
|
|
710
|
+
genericAdvice: "Answer generic music marketing questions directly unless the user asks about their Dynamoi account or asks Dynamoi to take an action.",
|
|
711
|
+
stopRule: "If a read tool already returns the requested fact in summary form, answer the user instead of chaining more read tools.",
|
|
712
|
+
userFacingFields: "Prefer names, public URLs, statuses, money display values, and next actions over internal IDs.",
|
|
713
|
+
writeRule: "Before write tools, confirm what will change. After success, answer from the returned record."
|
|
714
|
+
}),
|
|
715
|
+
uri: uri.href
|
|
716
|
+
}
|
|
717
|
+
]
|
|
718
|
+
}));
|
|
808
719
|
registerPlaybookResources(server);
|
|
809
|
-
server.registerResource(
|
|
810
|
-
"music
|
|
811
|
-
"
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
useToolsFor: [
|
|
828
|
-
"finding the user's artists, campaigns, Smart Links, billing, platform connections, or analytics",
|
|
829
|
-
"creating or editing free Smart Links",
|
|
830
|
-
"confirmed campaign mutations such as pause, resume, budget update, or launch workflow"
|
|
831
|
-
]
|
|
832
|
-
}),
|
|
833
|
-
uri: uri.href
|
|
834
|
-
}
|
|
835
|
-
]
|
|
836
|
-
})
|
|
837
|
-
);
|
|
838
|
-
server.registerResource(
|
|
839
|
-
"platform-campaign-statuses",
|
|
840
|
-
"dynamoi://platform/campaign-statuses",
|
|
841
|
-
{ mimeType: "application/json", title: "Campaign Statuses" },
|
|
842
|
-
async (uri) => ({
|
|
843
|
-
contents: [
|
|
844
|
-
{
|
|
845
|
-
mimeType: "application/json",
|
|
846
|
-
text: JSON.stringify({
|
|
847
|
-
statuses: [
|
|
848
|
-
"AWAITING_SMART_LINK",
|
|
849
|
-
"CONTENT_VALIDATION",
|
|
850
|
-
"DEPLOYING",
|
|
851
|
-
"READY_FOR_REVIEW",
|
|
852
|
-
"ACTIVE",
|
|
853
|
-
"PAUSED",
|
|
854
|
-
"SUBSCRIPTION_PAUSED",
|
|
855
|
-
"FAILED",
|
|
856
|
-
"ARCHIVED",
|
|
857
|
-
"ENDED"
|
|
858
|
-
]
|
|
859
|
-
}),
|
|
860
|
-
uri: uri.href
|
|
861
|
-
}
|
|
862
|
-
]
|
|
863
|
-
})
|
|
864
|
-
);
|
|
865
|
-
server.registerResource(
|
|
866
|
-
"artist-resource",
|
|
867
|
-
new ResourceTemplate("dynamoi://artist/{artistId}", {
|
|
868
|
-
list: async () => ({ resources: [] })
|
|
869
|
-
}),
|
|
870
|
-
{ mimeType: "application/json", title: "Artist" },
|
|
871
|
-
async (uri, variables) => {
|
|
872
|
-
const artistId = variables["artistId"];
|
|
873
|
-
const parsed = z2.string().uuid().safeParse(artistId);
|
|
874
|
-
if (!parsed.success) {
|
|
875
|
-
return {
|
|
876
|
-
contents: [
|
|
877
|
-
{
|
|
878
|
-
mimeType: "application/json",
|
|
879
|
-
text: JSON.stringify({
|
|
880
|
-
message: "Invalid artistId",
|
|
881
|
-
status: "error"
|
|
882
|
-
}),
|
|
883
|
-
uri: uri.href
|
|
884
|
-
}
|
|
720
|
+
server.registerResource("music-marketing-when-to-use-dynamoi", "dynamoi://music-marketing/when-to-use-dynamoi", {
|
|
721
|
+
description: "When an assistant should use Dynamoi account tools versus answering music marketing questions natively.",
|
|
722
|
+
mimeType: "application/json",
|
|
723
|
+
title: "When To Use Dynamoi"
|
|
724
|
+
}, async (uri) => ({
|
|
725
|
+
contents: [
|
|
726
|
+
{
|
|
727
|
+
mimeType: "application/json",
|
|
728
|
+
text: JSON.stringify({
|
|
729
|
+
answerNativelyFor: [
|
|
730
|
+
"general promotion strategy",
|
|
731
|
+
"songwriting, branding, release-planning, or content ideas",
|
|
732
|
+
"music marketing education that does not require the user's Dynamoi data"
|
|
733
|
+
],
|
|
734
|
+
useToolsFor: [
|
|
735
|
+
"finding the user's artists, campaigns, Smart Links, billing, platform connections, or analytics",
|
|
736
|
+
"creating or editing free Smart Links",
|
|
737
|
+
"confirmed campaign mutations such as pause, resume, budget update, or launch workflow"
|
|
885
738
|
]
|
|
886
|
-
}
|
|
739
|
+
}),
|
|
740
|
+
uri: uri.href
|
|
887
741
|
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
742
|
+
]
|
|
743
|
+
}));
|
|
744
|
+
server.registerResource("platform-campaign-statuses", "dynamoi://platform/campaign-statuses", { mimeType: "application/json", title: "Campaign Statuses" }, async (uri) => ({
|
|
745
|
+
contents: [
|
|
746
|
+
{
|
|
747
|
+
mimeType: "application/json",
|
|
748
|
+
text: JSON.stringify({
|
|
749
|
+
statuses: [
|
|
750
|
+
"AWAITING_SMART_LINK",
|
|
751
|
+
"CONTENT_VALIDATION",
|
|
752
|
+
"DEPLOYING",
|
|
753
|
+
"READY_FOR_REVIEW",
|
|
754
|
+
"ACTIVE",
|
|
755
|
+
"PAUSED",
|
|
756
|
+
"SUBSCRIPTION_PAUSED",
|
|
757
|
+
"FAILED",
|
|
758
|
+
"ARCHIVED",
|
|
759
|
+
"ENDED"
|
|
760
|
+
]
|
|
761
|
+
}),
|
|
762
|
+
uri: uri.href
|
|
763
|
+
}
|
|
764
|
+
]
|
|
765
|
+
}));
|
|
766
|
+
server.registerResource("artist-resource", new ResourceTemplate("dynamoi://artist/{artistId}", {
|
|
767
|
+
list: async () => ({ resources: [] })
|
|
768
|
+
}), { mimeType: "application/json", title: "Artist" }, async (uri, variables) => {
|
|
769
|
+
const artistId = variables["artistId"];
|
|
770
|
+
const parsed = z2.string().uuid().safeParse(artistId);
|
|
771
|
+
if (!parsed.success) {
|
|
891
772
|
return {
|
|
892
773
|
contents: [
|
|
893
774
|
{
|
|
894
775
|
mimeType: "application/json",
|
|
895
|
-
text: JSON.stringify(
|
|
776
|
+
text: JSON.stringify({
|
|
777
|
+
message: "Invalid artistId",
|
|
778
|
+
status: "error"
|
|
779
|
+
}),
|
|
896
780
|
uri: uri.href
|
|
897
781
|
}
|
|
898
782
|
]
|
|
899
783
|
};
|
|
900
784
|
}
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
uri: uri.href
|
|
921
|
-
}
|
|
922
|
-
]
|
|
923
|
-
};
|
|
924
|
-
}
|
|
925
|
-
const envelope = await adapter.getCampaign({
|
|
926
|
-
campaignId: parsed.data
|
|
927
|
-
});
|
|
785
|
+
const envelope = await adapter.getArtist({
|
|
786
|
+
artistId: parsed.data
|
|
787
|
+
});
|
|
788
|
+
return {
|
|
789
|
+
contents: [
|
|
790
|
+
{
|
|
791
|
+
mimeType: "application/json",
|
|
792
|
+
text: JSON.stringify(envelope),
|
|
793
|
+
uri: uri.href
|
|
794
|
+
}
|
|
795
|
+
]
|
|
796
|
+
};
|
|
797
|
+
});
|
|
798
|
+
server.registerResource("campaign-resource", new ResourceTemplate("dynamoi://campaign/{campaignId}", {
|
|
799
|
+
list: async () => ({ resources: [] })
|
|
800
|
+
}), { mimeType: "application/json", title: "Campaign" }, async (uri, variables) => {
|
|
801
|
+
const campaignId = variables["campaignId"];
|
|
802
|
+
const parsed = z2.string().uuid().safeParse(campaignId);
|
|
803
|
+
if (!parsed.success) {
|
|
928
804
|
return {
|
|
929
805
|
contents: [
|
|
930
806
|
{
|
|
931
807
|
mimeType: "application/json",
|
|
932
|
-
text: JSON.stringify(
|
|
808
|
+
text: JSON.stringify({
|
|
809
|
+
message: "Invalid campaignId",
|
|
810
|
+
status: "error"
|
|
811
|
+
}),
|
|
933
812
|
uri: uri.href
|
|
934
813
|
}
|
|
935
814
|
]
|
|
936
815
|
};
|
|
937
816
|
}
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
uri: uri.href
|
|
958
|
-
}
|
|
959
|
-
]
|
|
960
|
-
};
|
|
961
|
-
}
|
|
962
|
-
const envelope = await adapter.getSmartLink({
|
|
963
|
-
playLinkId: parsed.data
|
|
964
|
-
});
|
|
817
|
+
const envelope = await adapter.getCampaign({
|
|
818
|
+
campaignId: parsed.data
|
|
819
|
+
});
|
|
820
|
+
return {
|
|
821
|
+
contents: [
|
|
822
|
+
{
|
|
823
|
+
mimeType: "application/json",
|
|
824
|
+
text: JSON.stringify(envelope),
|
|
825
|
+
uri: uri.href
|
|
826
|
+
}
|
|
827
|
+
]
|
|
828
|
+
};
|
|
829
|
+
});
|
|
830
|
+
server.registerResource("smart-link-resource", new ResourceTemplate("dynamoi://smart-link/{playLinkId}", {
|
|
831
|
+
list: async () => ({ resources: [] })
|
|
832
|
+
}), { mimeType: "application/json", title: "Smart Link" }, async (uri, variables) => {
|
|
833
|
+
const playLinkId = variables["playLinkId"];
|
|
834
|
+
const parsed = z2.string().uuid().safeParse(playLinkId);
|
|
835
|
+
if (!parsed.success) {
|
|
965
836
|
return {
|
|
966
837
|
contents: [
|
|
967
838
|
{
|
|
968
839
|
mimeType: "application/json",
|
|
969
|
-
text: JSON.stringify(
|
|
840
|
+
text: JSON.stringify({
|
|
841
|
+
message: "Invalid playLinkId",
|
|
842
|
+
status: "error"
|
|
843
|
+
}),
|
|
970
844
|
uri: uri.href
|
|
971
845
|
}
|
|
972
846
|
]
|
|
973
847
|
};
|
|
974
848
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
uri: uri.href
|
|
995
|
-
}
|
|
996
|
-
]
|
|
997
|
-
};
|
|
998
|
-
}
|
|
999
|
-
const envelope = await adapter.getSmartLinkArtistSettings({
|
|
1000
|
-
artistId: parsed.data
|
|
1001
|
-
});
|
|
849
|
+
const envelope = await adapter.getSmartLink({
|
|
850
|
+
playLinkId: parsed.data
|
|
851
|
+
});
|
|
852
|
+
return {
|
|
853
|
+
contents: [
|
|
854
|
+
{
|
|
855
|
+
mimeType: "application/json",
|
|
856
|
+
text: JSON.stringify(envelope),
|
|
857
|
+
uri: uri.href
|
|
858
|
+
}
|
|
859
|
+
]
|
|
860
|
+
};
|
|
861
|
+
});
|
|
862
|
+
server.registerResource("smart-link-artist-settings-resource", new ResourceTemplate("dynamoi://artist/{artistId}/smart-link-settings", {
|
|
863
|
+
list: async () => ({ resources: [] })
|
|
864
|
+
}), { mimeType: "application/json", title: "Smart Link Artist Settings" }, async (uri, variables) => {
|
|
865
|
+
const artistId = variables["artistId"];
|
|
866
|
+
const parsed = z2.string().uuid().safeParse(artistId);
|
|
867
|
+
if (!parsed.success) {
|
|
1002
868
|
return {
|
|
1003
869
|
contents: [
|
|
1004
870
|
{
|
|
1005
871
|
mimeType: "application/json",
|
|
1006
|
-
text: JSON.stringify(
|
|
872
|
+
text: JSON.stringify({
|
|
873
|
+
message: "Invalid artistId",
|
|
874
|
+
status: "error"
|
|
875
|
+
}),
|
|
1007
876
|
uri: uri.href
|
|
1008
877
|
}
|
|
1009
878
|
]
|
|
1010
879
|
};
|
|
1011
880
|
}
|
|
1012
|
-
|
|
881
|
+
const envelope = await adapter.getSmartLinkArtistSettings({
|
|
882
|
+
artistId: parsed.data
|
|
883
|
+
});
|
|
884
|
+
return {
|
|
885
|
+
contents: [
|
|
886
|
+
{
|
|
887
|
+
mimeType: "application/json",
|
|
888
|
+
text: JSON.stringify(envelope),
|
|
889
|
+
uri: uri.href
|
|
890
|
+
}
|
|
891
|
+
]
|
|
892
|
+
};
|
|
893
|
+
});
|
|
1013
894
|
}
|
|
1014
895
|
|
|
1015
|
-
// src/server/smart-link-
|
|
1016
|
-
import * as
|
|
896
|
+
// src/server/smart-link-theme-preview.ts
|
|
897
|
+
import * as z4 from "zod/v4";
|
|
1017
898
|
|
|
1018
899
|
// src/server/output-schemas.ts
|
|
1019
900
|
import * as z3 from "zod/v4";
|
|
@@ -1021,11 +902,30 @@ var MoneyDisplayOutputSchema = z3.object({
|
|
|
1021
902
|
amountUsd: z3.number(),
|
|
1022
903
|
formatted: z3.string()
|
|
1023
904
|
}).strict();
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
905
|
+
function createOutputEnvelopeSchema(dataSchema, options) {
|
|
906
|
+
const statuses = options?.allowPartial ? ["success", "partial_success", "error"] : ["success", "error"];
|
|
907
|
+
return z3.object({
|
|
908
|
+
data: dataSchema.optional(),
|
|
909
|
+
kind: z3.enum(["validation", "business", "platform", "unknown"]).optional(),
|
|
910
|
+
message: z3.string().optional(),
|
|
911
|
+
status: z3.enum(statuses)
|
|
912
|
+
}).strict().superRefine((value, context) => {
|
|
913
|
+
if (value.status === "error" && !value.message) {
|
|
914
|
+
context.addIssue({
|
|
915
|
+
code: "custom",
|
|
916
|
+
message: "Error tool results require a message.",
|
|
917
|
+
path: ["message"]
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
if (value.status !== "error" && value.data === undefined) {
|
|
921
|
+
context.addIssue({
|
|
922
|
+
code: "custom",
|
|
923
|
+
message: "Successful tool results require data.",
|
|
924
|
+
path: ["data"]
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
});
|
|
928
|
+
}
|
|
1029
929
|
var AnyToolDataOutputSchema = z3.object({}).passthrough();
|
|
1030
930
|
var MediaAssetSummaryOutputSchema = z3.object({
|
|
1031
931
|
aspectRatio: z3.string().optional(),
|
|
@@ -1087,9 +987,6 @@ var SmartLinkDetailsOutputSchema = SmartLinkSummaryOutputSchema.extend({
|
|
|
1087
987
|
customDescription: z3.string().nullable(),
|
|
1088
988
|
nextActions: z3.array(z3.string()),
|
|
1089
989
|
originalSpotifyUrl: z3.string().nullable(),
|
|
1090
|
-
resourceUri: z3.string(),
|
|
1091
|
-
settingsResourceUri: z3.string(),
|
|
1092
|
-
spotifyDiscographyId: z3.string(),
|
|
1093
990
|
summary: z3.string(),
|
|
1094
991
|
warnings: z3.array(z3.string()).optional()
|
|
1095
992
|
}).strict();
|
|
@@ -1129,9 +1026,7 @@ var SummaryWarningsActionsOutputSchema = z3.object({
|
|
|
1129
1026
|
var NormalizedTargetingOutputSchema = z3.union([
|
|
1130
1027
|
z3.object({ mode: z3.literal("GLOBAL") }).strict(),
|
|
1131
1028
|
z3.object({
|
|
1132
|
-
countries: z3.array(
|
|
1133
|
-
z3.object({ code: z3.string(), name: z3.string() }).strict()
|
|
1134
|
-
),
|
|
1029
|
+
countries: z3.array(z3.object({ code: z3.string(), name: z3.string() }).strict()),
|
|
1135
1030
|
mode: z3.literal("COUNTRIES")
|
|
1136
1031
|
}).strict()
|
|
1137
1032
|
]);
|
|
@@ -1148,7 +1043,6 @@ var GetCampaignReadinessDataOutputSchema = z3.object({
|
|
|
1148
1043
|
}).strict();
|
|
1149
1044
|
var CreateSmartLinkFromSpotifyDataOutputSchema = SmartLinkDetailsOutputSchema.extend({
|
|
1150
1045
|
outcome: z3.enum(["created", "existing"]),
|
|
1151
|
-
workflowRunId: z3.string().nullable(),
|
|
1152
1046
|
workflowWarning: z3.string().nullable()
|
|
1153
1047
|
}).strict();
|
|
1154
1048
|
var CreateSmartLinksFromSpotifyArtistDataOutputSchema = z3.object({
|
|
@@ -1157,10 +1051,8 @@ var CreateSmartLinksFromSpotifyArtistDataOutputSchema = z3.object({
|
|
|
1157
1051
|
artistId: z3.string(),
|
|
1158
1052
|
artistName: z3.string(),
|
|
1159
1053
|
catalogImportStatus: z3.enum(["started", "start_failed"]),
|
|
1160
|
-
catalogWorkflowRunId: z3.string().nullable(),
|
|
1161
1054
|
currentSmartLinkCount: z3.number(),
|
|
1162
1055
|
existingCount: z3.number(),
|
|
1163
|
-
initialRenderRunId: z3.string().nullable(),
|
|
1164
1056
|
initialSmartLink: SmartLinkSummaryOutputSchema.nullable(),
|
|
1165
1057
|
newlyAvailableCount: z3.number(),
|
|
1166
1058
|
nextActions: z3.array(z3.string()),
|
|
@@ -1183,92 +1075,300 @@ var LaunchCampaignDataOutputSchema = z3.object({
|
|
|
1183
1075
|
summary: z3.string(),
|
|
1184
1076
|
warnings: z3.array(z3.string()).optional()
|
|
1185
1077
|
}).strict();
|
|
1186
|
-
var AnyOutputEnvelopeSchema =
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
})
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
]
|
|
1078
|
+
var AnyOutputEnvelopeSchema = createOutputEnvelopeSchema(AnyToolDataOutputSchema, { allowPartial: true });
|
|
1079
|
+
var ListMediaAssetsOutputEnvelopeSchema = createOutputEnvelopeSchema(z3.union([
|
|
1080
|
+
ListMediaAssetsDataOutputSchema,
|
|
1081
|
+
ListMediaAssetsSummaryOutputSchema
|
|
1082
|
+
]));
|
|
1083
|
+
var LaunchCampaignOutputEnvelopeSchema = createOutputEnvelopeSchema(LaunchCampaignDataOutputSchema);
|
|
1084
|
+
var ListAvailableCountriesOutputEnvelopeSchema = createOutputEnvelopeSchema(z3.union([ListAvailableCountriesDataOutputSchema, SummaryCountOutputSchema]));
|
|
1085
|
+
var GetCampaignReadinessOutputEnvelopeSchema = createOutputEnvelopeSchema(z3.union([
|
|
1086
|
+
GetCampaignReadinessDataOutputSchema,
|
|
1087
|
+
SummaryWarningsActionsOutputSchema
|
|
1088
|
+
]));
|
|
1089
|
+
var CreateSmartLinkFromSpotifyOutputEnvelopeSchema = createOutputEnvelopeSchema(CreateSmartLinkFromSpotifyDataOutputSchema);
|
|
1090
|
+
var CreateSmartLinksFromSpotifyArtistOutputEnvelopeSchema = createOutputEnvelopeSchema(CreateSmartLinksFromSpotifyArtistDataOutputSchema);
|
|
1091
|
+
var ListSmartLinksOutputEnvelopeSchema = createOutputEnvelopeSchema(z3.union([ListSmartLinksDataOutputSchema, ListSmartLinksSummaryOutputSchema]));
|
|
1092
|
+
|
|
1093
|
+
// src/server/smart-link-theme-preview.ts
|
|
1094
|
+
var SMART_LINK_THEME_PREVIEW_RESOURCE_URI = "ui://dynamoi/smart-link-theme-preview-v1.html";
|
|
1095
|
+
var SampleTextSchema = z4.string().trim().min(1).max(80);
|
|
1096
|
+
var DynamoiPreviewSmartLinkThemesInputSchema = z4.object({
|
|
1097
|
+
artistName: SampleTextSchema.optional(),
|
|
1098
|
+
releaseTitle: SampleTextSchema.optional()
|
|
1099
|
+
}).strict();
|
|
1100
|
+
var SMART_LINK_THEME_PREVIEW_TOOL_DEFINITION = {
|
|
1101
|
+
description: "Use this when the user asks what Dynamoi Smart Link pages can look like, wants to compare Smart Link themes, or asks to preview the available themes before creating or updating a free Smart Link. This is a read-only visual preview and does not create, publish, update, or promote a Smart Link.",
|
|
1102
|
+
destructiveHint: false,
|
|
1103
|
+
name: "dynamoi_preview_smart_link_themes",
|
|
1104
|
+
openWorldHint: false,
|
|
1105
|
+
outputSchema: AnyOutputEnvelopeSchema,
|
|
1106
|
+
readOnlyHint: true,
|
|
1107
|
+
schema: DynamoiPreviewSmartLinkThemesInputSchema,
|
|
1108
|
+
title: "Preview Smart Link Themes"
|
|
1109
|
+
};
|
|
1110
|
+
function previewSmartLinkThemes(rawInput) {
|
|
1111
|
+
const input = DynamoiPreviewSmartLinkThemesInputSchema.parse(rawInput ?? {});
|
|
1112
|
+
const artistName = input.artistName ?? "Dynamoi Artist";
|
|
1113
|
+
const releaseTitle = input.releaseTitle ?? "New Single";
|
|
1114
|
+
const themes = [
|
|
1115
|
+
{
|
|
1116
|
+
accentColor: "#2ef2a2",
|
|
1117
|
+
backgroundColor: "#f8f6ef",
|
|
1118
|
+
description: "Clean editorial layout for release pages that should feel calm and polished.",
|
|
1119
|
+
id: "classic",
|
|
1120
|
+
name: "Classic",
|
|
1121
|
+
textColor: "#171717"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
accentColor: "#ffe45c",
|
|
1125
|
+
backgroundColor: "#111111",
|
|
1126
|
+
description: "Bold, poster-like treatment for artists who want sharp contrast and direct calls to action.",
|
|
1127
|
+
id: "brutalist",
|
|
1128
|
+
name: "Brutalist",
|
|
1129
|
+
textColor: "#f5f5f5"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
accentColor: "#73f7ff",
|
|
1133
|
+
backgroundColor: "#12172f",
|
|
1134
|
+
description: "Color-rich gradient atmosphere for pop, electronic, and high-energy releases.",
|
|
1135
|
+
id: "aurora",
|
|
1136
|
+
name: "Aurora",
|
|
1137
|
+
textColor: "#f8fbff"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
accentColor: "#ffb36b",
|
|
1141
|
+
backgroundColor: "#191512",
|
|
1142
|
+
description: "Moody cover-forward layout for cinematic, intimate, or premium release moments.",
|
|
1143
|
+
id: "cinematic",
|
|
1144
|
+
name: "Cinematic",
|
|
1145
|
+
textColor: "#fff6eb"
|
|
1146
|
+
}
|
|
1147
|
+
];
|
|
1148
|
+
return {
|
|
1149
|
+
data: {
|
|
1150
|
+
artistName,
|
|
1151
|
+
releaseTitle,
|
|
1152
|
+
summary: "Dynamoi Smart Links support four visual themes: Classic, Brutalist, Aurora, and Cinematic.",
|
|
1153
|
+
themes,
|
|
1154
|
+
widgetResourceUri: SMART_LINK_THEME_PREVIEW_RESOURCE_URI
|
|
1155
|
+
},
|
|
1156
|
+
status: "success"
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
var SMART_LINK_THEME_PREVIEW_HTML = `
|
|
1160
|
+
<div class="shell">
|
|
1161
|
+
<header>
|
|
1162
|
+
<p class="eyebrow">Smart Link themes</p>
|
|
1163
|
+
<h1 id="title">New Single</h1>
|
|
1164
|
+
<p id="artist">Dynamoi Artist</p>
|
|
1165
|
+
</header>
|
|
1166
|
+
<section id="themes" class="themes" aria-label="Smart Link theme previews"></section>
|
|
1167
|
+
</div>
|
|
1168
|
+
<script>
|
|
1169
|
+
const fallback = {
|
|
1170
|
+
artistName: "Dynamoi Artist",
|
|
1171
|
+
releaseTitle: "New Single",
|
|
1172
|
+
themes: [
|
|
1173
|
+
{ id: "classic", name: "Classic", description: "Clean editorial layout for release pages that should feel calm and polished.", backgroundColor: "#f8f6ef", textColor: "#171717", accentColor: "#2ef2a2" },
|
|
1174
|
+
{ id: "brutalist", name: "Brutalist", description: "Bold, poster-like treatment for artists who want sharp contrast and direct calls to action.", backgroundColor: "#111111", textColor: "#f5f5f5", accentColor: "#ffe45c" },
|
|
1175
|
+
{ id: "aurora", name: "Aurora", description: "Color-rich gradient atmosphere for pop, electronic, and high-energy releases.", backgroundColor: "#12172f", textColor: "#f8fbff", accentColor: "#73f7ff" },
|
|
1176
|
+
{ id: "cinematic", name: "Cinematic", description: "Moody cover-forward layout for cinematic, intimate, or premium release moments.", backgroundColor: "#191512", textColor: "#fff6eb", accentColor: "#ffb36b" }
|
|
1177
|
+
]
|
|
1178
|
+
};
|
|
1179
|
+
function normalize(output) {
|
|
1180
|
+
const candidate = output?.data ?? output?.structuredContent?.data ?? output?.structuredContent ?? output;
|
|
1181
|
+
return candidate?.themes ? candidate : fallback;
|
|
1182
|
+
}
|
|
1183
|
+
function render(output) {
|
|
1184
|
+
const data = normalize(output);
|
|
1185
|
+
document.getElementById("title").textContent = data.releaseTitle ?? fallback.releaseTitle;
|
|
1186
|
+
document.getElementById("artist").textContent = data.artistName ?? fallback.artistName;
|
|
1187
|
+
const themes = Array.isArray(data.themes) ? data.themes : fallback.themes;
|
|
1188
|
+
const allowedThemeIds = new Set(["classic", "brutalist", "aurora", "cinematic"]);
|
|
1189
|
+
document.getElementById("themes").replaceChildren(...themes.map((theme) => {
|
|
1190
|
+
const article = document.createElement("article");
|
|
1191
|
+
article.className = "theme";
|
|
1192
|
+
if (allowedThemeIds.has(theme.id)) article.classList.add("theme-" + theme.id);
|
|
1193
|
+
article.style.backgroundColor = theme.backgroundColor;
|
|
1194
|
+
article.style.color = theme.textColor;
|
|
1195
|
+
|
|
1196
|
+
const cover = document.createElement("div");
|
|
1197
|
+
cover.className = "cover";
|
|
1198
|
+
cover.style.backgroundColor = theme.accentColor;
|
|
1199
|
+
cover.append(document.createElement("span"));
|
|
1200
|
+
|
|
1201
|
+
const copy = document.createElement("div");
|
|
1202
|
+
copy.className = "theme-copy";
|
|
1203
|
+
const name = document.createElement("h2");
|
|
1204
|
+
name.textContent = theme.name;
|
|
1205
|
+
const description = document.createElement("p");
|
|
1206
|
+
description.textContent = theme.description;
|
|
1207
|
+
copy.append(name, description);
|
|
1208
|
+
|
|
1209
|
+
const cta = document.createElement("span");
|
|
1210
|
+
cta.className = "preview-cta";
|
|
1211
|
+
cta.style.borderColor = theme.accentColor;
|
|
1212
|
+
cta.style.color = theme.textColor;
|
|
1213
|
+
cta.textContent = "Listen on Spotify";
|
|
1214
|
+
article.append(cover, copy, cta);
|
|
1215
|
+
return article;
|
|
1216
|
+
}));
|
|
1217
|
+
}
|
|
1218
|
+
render(window.openai?.toolOutput);
|
|
1219
|
+
window.addEventListener("openai:set_globals", (event) => {
|
|
1220
|
+
render(event.detail?.globals?.toolOutput ?? window.openai?.toolOutput);
|
|
1221
|
+
}, { passive: true });
|
|
1222
|
+
</script>
|
|
1223
|
+
<style>
|
|
1224
|
+
:root {
|
|
1225
|
+
color-scheme: light dark;
|
|
1226
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
1227
|
+
}
|
|
1228
|
+
* { box-sizing: border-box; }
|
|
1229
|
+
body { margin: 0; }
|
|
1230
|
+
.shell {
|
|
1231
|
+
background: #f4f1e8;
|
|
1232
|
+
color: #151515;
|
|
1233
|
+
min-height: 100vh;
|
|
1234
|
+
padding: 18px;
|
|
1235
|
+
}
|
|
1236
|
+
header {
|
|
1237
|
+
display: grid;
|
|
1238
|
+
gap: 3px;
|
|
1239
|
+
margin: 0 0 14px;
|
|
1240
|
+
}
|
|
1241
|
+
.eyebrow {
|
|
1242
|
+
color: #5f675f;
|
|
1243
|
+
font-size: 12px;
|
|
1244
|
+
font-weight: 700;
|
|
1245
|
+
letter-spacing: 0;
|
|
1246
|
+
margin: 0;
|
|
1247
|
+
text-transform: uppercase;
|
|
1248
|
+
}
|
|
1249
|
+
h1 {
|
|
1250
|
+
font-size: 28px;
|
|
1251
|
+
line-height: 1;
|
|
1252
|
+
margin: 0;
|
|
1253
|
+
}
|
|
1254
|
+
header p:last-child {
|
|
1255
|
+
color: #59605a;
|
|
1256
|
+
font-size: 14px;
|
|
1257
|
+
margin: 0;
|
|
1258
|
+
}
|
|
1259
|
+
.themes {
|
|
1260
|
+
display: grid;
|
|
1261
|
+
gap: 12px;
|
|
1262
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1263
|
+
}
|
|
1264
|
+
.theme {
|
|
1265
|
+
border-radius: 8px;
|
|
1266
|
+
display: grid;
|
|
1267
|
+
gap: 10px;
|
|
1268
|
+
min-height: 232px;
|
|
1269
|
+
overflow: hidden;
|
|
1270
|
+
padding: 12px;
|
|
1271
|
+
}
|
|
1272
|
+
.cover {
|
|
1273
|
+
aspect-ratio: 1;
|
|
1274
|
+
border-radius: 6px;
|
|
1275
|
+
display: grid;
|
|
1276
|
+
overflow: hidden;
|
|
1277
|
+
place-items: center;
|
|
1278
|
+
}
|
|
1279
|
+
.cover span {
|
|
1280
|
+
background: rgba(255, 255, 255, 0.62);
|
|
1281
|
+
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
1282
|
+
border-radius: 999px;
|
|
1283
|
+
display: block;
|
|
1284
|
+
height: 54%;
|
|
1285
|
+
width: 54%;
|
|
1286
|
+
}
|
|
1287
|
+
.theme-aurora .cover {
|
|
1288
|
+
background: linear-gradient(135deg, #73f7ff, #ff6bd6 58%, #f6ff87) !important;
|
|
1289
|
+
}
|
|
1290
|
+
.theme-cinematic .cover {
|
|
1291
|
+
background: radial-gradient(circle at 48% 32%, #ffb36b, #7b3f2b 52%, #191512 76%) !important;
|
|
1292
|
+
}
|
|
1293
|
+
.theme h2 {
|
|
1294
|
+
font-size: 18px;
|
|
1295
|
+
line-height: 1.1;
|
|
1296
|
+
margin: 0 0 4px;
|
|
1297
|
+
}
|
|
1298
|
+
.theme p {
|
|
1299
|
+
font-size: 12px;
|
|
1300
|
+
line-height: 1.35;
|
|
1301
|
+
margin: 0;
|
|
1302
|
+
opacity: 0.78;
|
|
1303
|
+
}
|
|
1304
|
+
.preview-cta {
|
|
1305
|
+
background: transparent;
|
|
1306
|
+
border: 1px solid currentColor;
|
|
1307
|
+
border-radius: 999px;
|
|
1308
|
+
font: inherit;
|
|
1309
|
+
font-size: 12px;
|
|
1310
|
+
font-weight: 700;
|
|
1311
|
+
min-height: 34px;
|
|
1312
|
+
padding: 6px 10px;
|
|
1313
|
+
width: 100%;
|
|
1314
|
+
}
|
|
1315
|
+
@media (max-width: 520px) {
|
|
1316
|
+
.shell { padding: 14px; }
|
|
1317
|
+
.themes { grid-template-columns: 1fr; }
|
|
1318
|
+
h1 { font-size: 24px; }
|
|
1319
|
+
.theme {
|
|
1320
|
+
grid-template-columns: 82px minmax(0, 1fr);
|
|
1321
|
+
min-height: 0;
|
|
1322
|
+
}
|
|
1323
|
+
.cover { grid-row: span 2; }
|
|
1324
|
+
.preview-cta { grid-column: 2; }
|
|
1325
|
+
}
|
|
1326
|
+
</style>
|
|
1327
|
+
`.trim();
|
|
1328
|
+
function registerSmartLinkThemePreviewResource(server) {
|
|
1329
|
+
server.registerResource("smart-link-theme-preview", SMART_LINK_THEME_PREVIEW_RESOURCE_URI, {
|
|
1330
|
+
description: "Visual preview for the four Dynamoi Smart Link page themes.",
|
|
1331
|
+
mimeType: "text/html;profile=mcp-app",
|
|
1332
|
+
title: "Smart Link Theme Preview"
|
|
1333
|
+
}, async () => ({
|
|
1334
|
+
contents: [
|
|
1335
|
+
{
|
|
1336
|
+
_meta: {
|
|
1337
|
+
ui: {
|
|
1338
|
+
csp: {
|
|
1339
|
+
connectDomains: [],
|
|
1340
|
+
resourceDomains: []
|
|
1341
|
+
},
|
|
1342
|
+
domain: "https://dynamoi.com",
|
|
1343
|
+
prefersBorder: true
|
|
1344
|
+
}
|
|
1345
|
+
},
|
|
1346
|
+
mimeType: "text/html;profile=mcp-app",
|
|
1347
|
+
text: SMART_LINK_THEME_PREVIEW_HTML,
|
|
1348
|
+
uri: SMART_LINK_THEME_PREVIEW_RESOURCE_URI
|
|
1349
|
+
}
|
|
1350
|
+
]
|
|
1351
|
+
}));
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
// src/server/smart-link-tools.ts
|
|
1355
|
+
import * as z6 from "zod/v4";
|
|
1256
1356
|
|
|
1257
1357
|
// src/server/shared-schemas.ts
|
|
1258
|
-
import * as
|
|
1259
|
-
var ToolFormatSchema =
|
|
1260
|
-
var IsoDateSchema =
|
|
1261
|
-
var UserIntentSummarySchema =
|
|
1262
|
-
var ClientRequestIdSchema =
|
|
1263
|
-
var RequiredClientRequestIdSchema =
|
|
1358
|
+
import * as z5 from "zod/v4";
|
|
1359
|
+
var ToolFormatSchema = z5.enum(["json", "summary"]);
|
|
1360
|
+
var IsoDateSchema = z5.string().regex(/^\d{4}-\d{2}-\d{2}$/);
|
|
1361
|
+
var UserIntentSummarySchema = z5.string().trim().max(500).optional();
|
|
1362
|
+
var ClientRequestIdSchema = z5.string().uuid().optional();
|
|
1363
|
+
var RequiredClientRequestIdSchema = z5.string().uuid();
|
|
1264
1364
|
function isValidCalendarDate(value) {
|
|
1265
|
-
const date =
|
|
1365
|
+
const date = new Date(`${value}T00:00:00.000Z`);
|
|
1266
1366
|
return Number.isFinite(date.getTime()) && date.toISOString().slice(0, 10) === value;
|
|
1267
1367
|
}
|
|
1268
1368
|
var IsoCalendarDateSchema = IsoDateSchema.refine(isValidCalendarDate, {
|
|
1269
1369
|
message: "must be a valid calendar date"
|
|
1270
1370
|
});
|
|
1271
|
-
var DateRangeSchema =
|
|
1371
|
+
var DateRangeSchema = z5.object({
|
|
1272
1372
|
end: IsoDateSchema,
|
|
1273
1373
|
start: IsoDateSchema
|
|
1274
1374
|
}).strict().superRefine((data, ctx) => {
|
|
@@ -1297,25 +1397,23 @@ var DateRangeSchema = z4.object({
|
|
|
1297
1397
|
|
|
1298
1398
|
// src/server/smart-link-tools.ts
|
|
1299
1399
|
var SmartLinkStatusFiltersSchema = {
|
|
1300
|
-
claimStatus:
|
|
1400
|
+
claimStatus: z6.enum([
|
|
1301
1401
|
"auto_approved",
|
|
1302
1402
|
"pending_ops_review",
|
|
1303
1403
|
"verification_deferred",
|
|
1304
1404
|
"approved_by_ops",
|
|
1305
1405
|
"rejected"
|
|
1306
1406
|
]).optional(),
|
|
1307
|
-
publishState:
|
|
1308
|
-
renderState:
|
|
1407
|
+
publishState: z6.enum(["published", "unpublished"]).optional(),
|
|
1408
|
+
renderState: z6.enum(["queued", "rendering", "rendered", "failed"]).optional()
|
|
1309
1409
|
};
|
|
1310
|
-
var SmartLinkThemeSchema =
|
|
1410
|
+
var SmartLinkThemeSchema = z6.enum([
|
|
1311
1411
|
"classic",
|
|
1312
1412
|
"brutalist",
|
|
1313
1413
|
"aurora",
|
|
1314
1414
|
"cinematic"
|
|
1315
1415
|
]);
|
|
1316
|
-
var LegacySmartLinkIncludeSchema =
|
|
1317
|
-
z5.enum(["analytics", "artist_settings"])
|
|
1318
|
-
);
|
|
1416
|
+
var LegacySmartLinkIncludeSchema = z6.array(z6.enum(["analytics", "artist_settings"]));
|
|
1319
1417
|
function normalizeLegacySmartLinkInclude(rawInput) {
|
|
1320
1418
|
if (!rawInput || typeof rawInput !== "object" || Array.isArray(rawInput)) {
|
|
1321
1419
|
return rawInput;
|
|
@@ -1324,54 +1422,52 @@ function normalizeLegacySmartLinkInclude(rawInput) {
|
|
|
1324
1422
|
if (!Object.hasOwn(input, "include")) {
|
|
1325
1423
|
return rawInput;
|
|
1326
1424
|
}
|
|
1327
|
-
const legacyInclude = LegacySmartLinkIncludeSchema.safeParse(
|
|
1328
|
-
input["include"]
|
|
1329
|
-
);
|
|
1425
|
+
const legacyInclude = LegacySmartLinkIncludeSchema.safeParse(input["include"]);
|
|
1330
1426
|
if (!legacyInclude.success) {
|
|
1331
1427
|
return rawInput;
|
|
1332
1428
|
}
|
|
1333
1429
|
const { include: _include, ...normalized } = input;
|
|
1334
|
-
if (normalized["includeAnalytics"] ===
|
|
1430
|
+
if (normalized["includeAnalytics"] === undefined && legacyInclude.data.includes("analytics")) {
|
|
1335
1431
|
normalized["includeAnalytics"] = true;
|
|
1336
1432
|
}
|
|
1337
|
-
if (normalized["includeArtistSettings"] ===
|
|
1433
|
+
if (normalized["includeArtistSettings"] === undefined && legacyInclude.data.includes("artist_settings")) {
|
|
1338
1434
|
normalized["includeArtistSettings"] = true;
|
|
1339
1435
|
}
|
|
1340
1436
|
return normalized;
|
|
1341
1437
|
}
|
|
1342
|
-
var DynamoiCreateSmartLinkFromSpotifyInputSchema =
|
|
1343
|
-
artistId:
|
|
1438
|
+
var DynamoiCreateSmartLinkFromSpotifyInputSchema = z6.object({
|
|
1439
|
+
artistId: z6.string().uuid(),
|
|
1344
1440
|
clientRequestId: RequiredClientRequestIdSchema.optional(),
|
|
1345
|
-
customDescription:
|
|
1441
|
+
customDescription: z6.string().trim().max(500).optional(),
|
|
1346
1442
|
format: ToolFormatSchema.optional(),
|
|
1347
|
-
spotifyUrl:
|
|
1443
|
+
spotifyUrl: z6.string().trim().min(1).max(500),
|
|
1348
1444
|
userIntentSummary: UserIntentSummarySchema
|
|
1349
1445
|
}).strict();
|
|
1350
|
-
var DynamoiCreateSmartLinksFromSpotifyArtistInputSchema =
|
|
1351
|
-
artistId:
|
|
1446
|
+
var DynamoiCreateSmartLinksFromSpotifyArtistInputSchema = z6.object({
|
|
1447
|
+
artistId: z6.string().uuid().optional(),
|
|
1352
1448
|
clientRequestId: RequiredClientRequestIdSchema.optional(),
|
|
1353
1449
|
format: ToolFormatSchema.optional(),
|
|
1354
|
-
spotifyArtistUrl:
|
|
1450
|
+
spotifyArtistUrl: z6.string().trim().min(1).max(500),
|
|
1355
1451
|
userIntentSummary: UserIntentSummarySchema
|
|
1356
1452
|
}).strict();
|
|
1357
|
-
var DynamoiListSmartLinksInputSchema =
|
|
1358
|
-
artistId:
|
|
1359
|
-
cursor:
|
|
1453
|
+
var DynamoiListSmartLinksInputSchema = z6.object({
|
|
1454
|
+
artistId: z6.string().uuid(),
|
|
1455
|
+
cursor: z6.string().optional(),
|
|
1360
1456
|
format: ToolFormatSchema.optional(),
|
|
1361
|
-
limit:
|
|
1362
|
-
query:
|
|
1457
|
+
limit: z6.number().int().min(1).max(50).optional(),
|
|
1458
|
+
query: z6.string().trim().max(120).optional(),
|
|
1363
1459
|
...SmartLinkStatusFiltersSchema
|
|
1364
1460
|
}).strict();
|
|
1365
1461
|
var DynamoiGetSmartLinkInputShape = {
|
|
1366
|
-
artistId:
|
|
1462
|
+
artistId: z6.string().uuid().optional(),
|
|
1367
1463
|
dateRange: DateRangeSchema.optional(),
|
|
1368
1464
|
format: ToolFormatSchema.optional(),
|
|
1369
|
-
granularity:
|
|
1370
|
-
includeAnalytics:
|
|
1371
|
-
includeArtistSettings:
|
|
1372
|
-
includeBreakdowns:
|
|
1373
|
-
playLinkId:
|
|
1374
|
-
spotifyUrl:
|
|
1465
|
+
granularity: z6.enum(["TOTAL", "DAILY"]).optional(),
|
|
1466
|
+
includeAnalytics: z6.boolean().optional(),
|
|
1467
|
+
includeArtistSettings: z6.boolean().optional(),
|
|
1468
|
+
includeBreakdowns: z6.boolean().optional(),
|
|
1469
|
+
playLinkId: z6.string().uuid().optional(),
|
|
1470
|
+
spotifyUrl: z6.string().trim().min(1).max(500).optional()
|
|
1375
1471
|
};
|
|
1376
1472
|
function validateDynamoiGetSmartLinkInput(data, ctx) {
|
|
1377
1473
|
const settingsOnly = data.includeArtistSettings === true && !data.playLinkId && !data.spotifyUrl && Boolean(data.artistId);
|
|
@@ -1390,44 +1486,36 @@ function validateDynamoiGetSmartLinkInput(data, ctx) {
|
|
|
1390
1486
|
});
|
|
1391
1487
|
}
|
|
1392
1488
|
}
|
|
1393
|
-
var StrictDynamoiGetSmartLinkInputSchema =
|
|
1489
|
+
var StrictDynamoiGetSmartLinkInputSchema = z6.object(DynamoiGetSmartLinkInputShape).strict().superRefine(validateDynamoiGetSmartLinkInput);
|
|
1394
1490
|
var DynamoiGetSmartLinkInputSchema = StrictDynamoiGetSmartLinkInputSchema;
|
|
1395
1491
|
function parseDynamoiGetSmartLinkInput(rawInput) {
|
|
1396
|
-
return StrictDynamoiGetSmartLinkInputSchema.parse(
|
|
1397
|
-
normalizeLegacySmartLinkInclude(rawInput)
|
|
1398
|
-
);
|
|
1492
|
+
return StrictDynamoiGetSmartLinkInputSchema.parse(normalizeLegacySmartLinkInclude(rawInput));
|
|
1399
1493
|
}
|
|
1400
|
-
var DynamoiGetSmartLinkAnalyticsInputSchema =
|
|
1494
|
+
var DynamoiGetSmartLinkAnalyticsInputSchema = z6.object({
|
|
1401
1495
|
dateRange: DateRangeSchema.optional(),
|
|
1402
1496
|
format: ToolFormatSchema.optional(),
|
|
1403
|
-
granularity:
|
|
1404
|
-
includeBreakdowns:
|
|
1405
|
-
playLinkId:
|
|
1497
|
+
granularity: z6.enum(["TOTAL", "DAILY"]).optional(),
|
|
1498
|
+
includeBreakdowns: z6.boolean().optional(),
|
|
1499
|
+
playLinkId: z6.string().uuid()
|
|
1406
1500
|
}).strict();
|
|
1407
|
-
var DynamoiGetSmartLinkArtistSettingsInputSchema =
|
|
1408
|
-
artistId:
|
|
1501
|
+
var DynamoiGetSmartLinkArtistSettingsInputSchema = z6.object({
|
|
1502
|
+
artistId: z6.string().uuid(),
|
|
1409
1503
|
format: ToolFormatSchema.optional()
|
|
1410
1504
|
}).strict();
|
|
1411
|
-
var DynamoiUpdateSmartLinkInputSchema =
|
|
1412
|
-
action:
|
|
1413
|
-
|
|
1414
|
-
"update_artist_settings",
|
|
1415
|
-
"publish",
|
|
1416
|
-
"unpublish"
|
|
1417
|
-
]),
|
|
1418
|
-
artistId: z5.string().uuid().optional(),
|
|
1505
|
+
var DynamoiUpdateSmartLinkInputSchema = z6.object({
|
|
1506
|
+
action: z6.enum(["update_description", "update_artist_settings"]),
|
|
1507
|
+
artistId: z6.string().uuid().optional(),
|
|
1419
1508
|
clientRequestId: ClientRequestIdSchema,
|
|
1420
|
-
customDescription:
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
playLinkId: z5.string().uuid().optional(),
|
|
1509
|
+
customDescription: z6.string().max(500).nullable().optional(),
|
|
1510
|
+
expectedUpdatedAt: z6.string().datetime().optional(),
|
|
1511
|
+
googleAdsConversionId: z6.string().trim().max(32).nullable().optional(),
|
|
1512
|
+
metaPixelId: z6.string().trim().max(32).nullable().optional(),
|
|
1513
|
+
playLinkId: z6.string().uuid().optional(),
|
|
1426
1514
|
theme: SmartLinkThemeSchema.optional(),
|
|
1427
|
-
tiktokPixelId:
|
|
1515
|
+
tiktokPixelId: z6.string().trim().max(32).nullable().optional(),
|
|
1428
1516
|
userIntentSummary: UserIntentSummarySchema
|
|
1429
1517
|
}).strict().superRefine((data, ctx) => {
|
|
1430
|
-
if (data.action === "update_description" && data.customDescription ===
|
|
1518
|
+
if (data.action === "update_description" && data.customDescription === undefined) {
|
|
1431
1519
|
ctx.addIssue({
|
|
1432
1520
|
code: "custom",
|
|
1433
1521
|
message: "customDescription is required when action is update_description",
|
|
@@ -1437,7 +1525,7 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
|
|
|
1437
1525
|
if (data.action !== "update_artist_settings" && !data.playLinkId) {
|
|
1438
1526
|
ctx.addIssue({
|
|
1439
1527
|
code: "custom",
|
|
1440
|
-
message: "playLinkId is required when action is update_description
|
|
1528
|
+
message: "playLinkId is required when action is update_description",
|
|
1441
1529
|
path: ["playLinkId"]
|
|
1442
1530
|
});
|
|
1443
1531
|
}
|
|
@@ -1449,7 +1537,7 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
|
|
|
1449
1537
|
path: ["artistId"]
|
|
1450
1538
|
});
|
|
1451
1539
|
}
|
|
1452
|
-
if (data.theme ===
|
|
1540
|
+
if (data.theme === undefined && data.metaPixelId === undefined && data.tiktokPixelId === undefined && data.googleAdsConversionId === undefined) {
|
|
1453
1541
|
ctx.addIssue({
|
|
1454
1542
|
code: "custom",
|
|
1455
1543
|
message: "Provide at least one setting to update",
|
|
@@ -1457,13 +1545,6 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
|
|
|
1457
1545
|
});
|
|
1458
1546
|
}
|
|
1459
1547
|
}
|
|
1460
|
-
if ((data.action === "publish" || data.action === "unpublish") && data.customDescription !== void 0) {
|
|
1461
|
-
ctx.addIssue({
|
|
1462
|
-
code: "custom",
|
|
1463
|
-
message: "customDescription is only valid for update_description",
|
|
1464
|
-
path: ["customDescription"]
|
|
1465
|
-
});
|
|
1466
|
-
}
|
|
1467
1548
|
if (data.action !== "update_artist_settings") {
|
|
1468
1549
|
for (const field of [
|
|
1469
1550
|
"artistId",
|
|
@@ -1472,7 +1553,7 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
|
|
|
1472
1553
|
"theme",
|
|
1473
1554
|
"tiktokPixelId"
|
|
1474
1555
|
]) {
|
|
1475
|
-
if (data[field] !==
|
|
1556
|
+
if (data[field] !== undefined) {
|
|
1476
1557
|
ctx.addIssue({
|
|
1477
1558
|
code: "custom",
|
|
1478
1559
|
message: `${field} is only valid for update_artist_settings`,
|
|
@@ -1481,24 +1562,17 @@ var DynamoiUpdateSmartLinkInputSchema = z5.object({
|
|
|
1481
1562
|
}
|
|
1482
1563
|
}
|
|
1483
1564
|
}
|
|
1484
|
-
if (data.action !== "publish" && data.action !== "unpublish" && data.expectedPublishState !== void 0) {
|
|
1485
|
-
ctx.addIssue({
|
|
1486
|
-
code: "custom",
|
|
1487
|
-
message: "expectedPublishState is only valid for publish or unpublish",
|
|
1488
|
-
path: ["expectedPublishState"]
|
|
1489
|
-
});
|
|
1490
|
-
}
|
|
1491
1565
|
});
|
|
1492
|
-
var DynamoiUpdateSmartLinkArtistSettingsInputSchema =
|
|
1493
|
-
artistId:
|
|
1566
|
+
var DynamoiUpdateSmartLinkArtistSettingsInputSchema = z6.object({
|
|
1567
|
+
artistId: z6.string().uuid(),
|
|
1494
1568
|
clientRequestId: ClientRequestIdSchema,
|
|
1495
|
-
googleAdsConversionId:
|
|
1496
|
-
metaPixelId:
|
|
1569
|
+
googleAdsConversionId: z6.string().trim().max(32).nullable().optional(),
|
|
1570
|
+
metaPixelId: z6.string().trim().max(32).nullable().optional(),
|
|
1497
1571
|
theme: SmartLinkThemeSchema.optional(),
|
|
1498
|
-
tiktokPixelId:
|
|
1572
|
+
tiktokPixelId: z6.string().trim().max(32).nullable().optional(),
|
|
1499
1573
|
userIntentSummary: UserIntentSummarySchema
|
|
1500
1574
|
}).strict().superRefine((data, ctx) => {
|
|
1501
|
-
if (data.theme ===
|
|
1575
|
+
if (data.theme === undefined && data.metaPixelId === undefined && data.tiktokPixelId === undefined && data.googleAdsConversionId === undefined) {
|
|
1502
1576
|
ctx.addIssue({
|
|
1503
1577
|
code: "custom",
|
|
1504
1578
|
message: "Provide at least one setting to update",
|
|
@@ -1506,12 +1580,6 @@ var DynamoiUpdateSmartLinkArtistSettingsInputSchema = z5.object({
|
|
|
1506
1580
|
});
|
|
1507
1581
|
}
|
|
1508
1582
|
});
|
|
1509
|
-
var DynamoiPublishSmartLinkInputSchema = z5.object({
|
|
1510
|
-
clientRequestId: ClientRequestIdSchema,
|
|
1511
|
-
expectedPublishState: z5.enum(["published", "unpublished"]).optional(),
|
|
1512
|
-
playLinkId: z5.string().uuid(),
|
|
1513
|
-
userIntentSummary: UserIntentSummarySchema
|
|
1514
|
-
}).strict();
|
|
1515
1583
|
var PHASE_4_TOOL_DEFINITIONS = [
|
|
1516
1584
|
{
|
|
1517
1585
|
description: "Use this when the user wants to create one free Dynamoi Smart Link from a Spotify album or track URL/URI, or a single starter release from a Spotify artist URL. For full-catalog artist imports or artist hub requests, prefer dynamoi_create_smart_links_from_spotify_artist. Smart Links are free to create and manage. High-popularity or unverifiable artist links may stay unpublished in verification hold until Dynamoi can verify the client relationship. This does not create a paid ad campaign. Spotify playlist URLs are not supported today. If the Smart Link already exists, return the existing link instead of creating a duplicate; if customDescription is provided, update that Smart Link's public description. In the final answer, lead with the public URL and do not expose internal IDs unless asked.",
|
|
@@ -1556,7 +1624,7 @@ var PHASE_4_TOOL_DEFINITIONS = [
|
|
|
1556
1624
|
title: "Get Smart Link"
|
|
1557
1625
|
},
|
|
1558
1626
|
{
|
|
1559
|
-
description: "Use this when the user wants to change one Smart Link's public description
|
|
1627
|
+
description: "Use this when the user wants to change one Smart Link's public description or update artist-level Smart Link theme/pixel settings. Set action to update_description or update_artist_settings. Public availability is artist-wide in the dashboard; this tool does not publish or unpublish individual links. Theme-only updates switch instantly; description or pixel changes may queue background rendering.",
|
|
1560
1628
|
destructiveHint: true,
|
|
1561
1629
|
idempotentHint: true,
|
|
1562
1630
|
name: "dynamoi_update_smart_link",
|
|
@@ -1569,7 +1637,7 @@ var PHASE_4_TOOL_DEFINITIONS = [
|
|
|
1569
1637
|
];
|
|
1570
1638
|
|
|
1571
1639
|
// src/server/tools.ts
|
|
1572
|
-
import * as
|
|
1640
|
+
import * as z8 from "zod/v4";
|
|
1573
1641
|
|
|
1574
1642
|
// src/server/onboarding-tool-definitions.ts
|
|
1575
1643
|
function createPhaseOnboardingToolDefinitions(schemas) {
|
|
@@ -1600,20 +1668,15 @@ function createPhaseOnboardingToolDefinitions(schemas) {
|
|
|
1600
1668
|
}
|
|
1601
1669
|
|
|
1602
1670
|
// src/server/openai-tools.ts
|
|
1603
|
-
import * as
|
|
1604
|
-
var DynamoiOpenAiSearchInputSchema =
|
|
1605
|
-
query:
|
|
1671
|
+
import * as z7 from "zod/v4";
|
|
1672
|
+
var DynamoiOpenAiSearchInputSchema = z7.object({
|
|
1673
|
+
query: z7.string().trim().min(1).max(500)
|
|
1606
1674
|
}).strict();
|
|
1607
|
-
var DynamoiOpenAiFetchInputSchema =
|
|
1608
|
-
id:
|
|
1675
|
+
var DynamoiOpenAiFetchInputSchema = z7.object({
|
|
1676
|
+
id: z7.string().trim().min(1).max(200)
|
|
1609
1677
|
}).strict();
|
|
1610
1678
|
var OPENAI_TOOL_DEFINITIONS = [
|
|
1611
1679
|
{
|
|
1612
|
-
// OpenAI ChatGPT Connectors / Deep Research expects a tool literally
|
|
1613
|
-
// named `search` returning {results: [{id, title, text?, url?}]}. This
|
|
1614
|
-
// is the same data dynamoi_search returns, reshaped for OpenAI Deep
|
|
1615
|
-
// Research citation flows. ChatGPT will not call this tool directly in
|
|
1616
|
-
// regular chat — it picks dynamoi_search by description.
|
|
1617
1680
|
description: "OpenAI ChatGPT Deep Research / Connectors search contract. Returns matching Dynamoi artists, campaigns, and Smart Links so they can be cited in a deep-research session. For regular ChatGPT chat use dynamoi_search instead.",
|
|
1618
1681
|
destructiveHint: false,
|
|
1619
1682
|
name: "search",
|
|
@@ -1624,8 +1687,6 @@ var OPENAI_TOOL_DEFINITIONS = [
|
|
|
1624
1687
|
title: "Search (OpenAI Connectors)"
|
|
1625
1688
|
},
|
|
1626
1689
|
{
|
|
1627
|
-
// OpenAI Deep Research follow-up tool: given an id returned by `search`,
|
|
1628
|
-
// returns the full record so it can be cited.
|
|
1629
1690
|
description: "OpenAI ChatGPT Deep Research / Connectors fetch contract. Given an id returned by `search` (formatted as 'artist:<uuid>', 'campaign:<uuid>', or 'smartlink:<uuid>'), returns the full record for citation.",
|
|
1630
1691
|
destructiveHint: false,
|
|
1631
1692
|
name: "fetch",
|
|
@@ -1640,8 +1701,8 @@ var OPENAI_TOOL_DEFINITIONS = [
|
|
|
1640
1701
|
// src/server/tools.ts
|
|
1641
1702
|
var DateRangeSchema2 = DateRangeSchema;
|
|
1642
1703
|
var ToolFormatSchema2 = ToolFormatSchema;
|
|
1643
|
-
var OnboardingAttemptIdSchema =
|
|
1644
|
-
var ExpectedCampaignStatusEnum =
|
|
1704
|
+
var OnboardingAttemptIdSchema = z8.string().trim().min(1).max(120).optional();
|
|
1705
|
+
var ExpectedCampaignStatusEnum = z8.enum([
|
|
1645
1706
|
"AWAITING_SMART_LINK",
|
|
1646
1707
|
"ACTIVE",
|
|
1647
1708
|
"ARCHIVED",
|
|
@@ -1657,20 +1718,20 @@ var ExpectedCampaignStatusSchema = ExpectedCampaignStatusEnum.optional();
|
|
|
1657
1718
|
var CampaignStatusFilterSchema = ExpectedCampaignStatusEnum.exclude([
|
|
1658
1719
|
"ENDED"
|
|
1659
1720
|
]).optional();
|
|
1660
|
-
var DynamoiListArtistsInputSchema =
|
|
1661
|
-
artistId:
|
|
1662
|
-
cursor:
|
|
1721
|
+
var DynamoiListArtistsInputSchema = z8.object({
|
|
1722
|
+
artistId: z8.string().uuid().optional(),
|
|
1723
|
+
cursor: z8.string().optional(),
|
|
1663
1724
|
format: ToolFormatSchema2.optional(),
|
|
1664
|
-
limit:
|
|
1725
|
+
limit: z8.number().int().min(1).max(50).optional()
|
|
1665
1726
|
}).strict();
|
|
1666
|
-
var DynamoiSearchInputSchema =
|
|
1667
|
-
artistId:
|
|
1668
|
-
cursor:
|
|
1727
|
+
var DynamoiSearchInputSchema = z8.object({
|
|
1728
|
+
artistId: z8.string().uuid().optional(),
|
|
1729
|
+
cursor: z8.string().optional(),
|
|
1669
1730
|
format: ToolFormatSchema2.optional(),
|
|
1670
|
-
includeArchived:
|
|
1671
|
-
limit:
|
|
1672
|
-
query:
|
|
1673
|
-
type:
|
|
1731
|
+
includeArchived: z8.boolean().optional(),
|
|
1732
|
+
limit: z8.number().int().min(1).max(50).optional(),
|
|
1733
|
+
query: z8.string().trim().max(120).optional(),
|
|
1734
|
+
type: z8.enum(["artist", "campaign", "smartlink"]).optional()
|
|
1674
1735
|
}).strict().superRefine((data, ctx) => {
|
|
1675
1736
|
if (!(data.type || data.query)) {
|
|
1676
1737
|
ctx.addIssue({
|
|
@@ -1680,135 +1741,149 @@ var DynamoiSearchInputSchema = z7.object({
|
|
|
1680
1741
|
});
|
|
1681
1742
|
}
|
|
1682
1743
|
});
|
|
1683
|
-
var DynamoiGetCurrentUserIntentSchema =
|
|
1744
|
+
var DynamoiGetCurrentUserIntentSchema = z8.enum([
|
|
1684
1745
|
"account_overview",
|
|
1685
1746
|
"artist_access_check",
|
|
1686
1747
|
"organization_access_check",
|
|
1687
1748
|
"platform_connection_check"
|
|
1688
1749
|
]);
|
|
1689
|
-
var DynamoiGetCurrentUserInputSchema =
|
|
1750
|
+
var DynamoiGetCurrentUserInputSchema = z8.object({
|
|
1690
1751
|
format: ToolFormatSchema2.optional(),
|
|
1691
1752
|
intent: DynamoiGetCurrentUserIntentSchema
|
|
1692
1753
|
}).strict();
|
|
1693
|
-
var DynamoiGetArtistInputSchema =
|
|
1694
|
-
artistId:
|
|
1754
|
+
var DynamoiGetArtistInputSchema = z8.object({
|
|
1755
|
+
artistId: z8.string().uuid(),
|
|
1695
1756
|
format: ToolFormatSchema2.optional()
|
|
1696
1757
|
}).strict();
|
|
1697
|
-
var DynamoiListCampaignsInputSchema =
|
|
1698
|
-
artistId:
|
|
1699
|
-
campaignType:
|
|
1700
|
-
cursor:
|
|
1758
|
+
var DynamoiListCampaignsInputSchema = z8.object({
|
|
1759
|
+
artistId: z8.string().uuid(),
|
|
1760
|
+
campaignType: z8.enum(["SMART_CAMPAIGN", "YOUTUBE"]).optional(),
|
|
1761
|
+
cursor: z8.string().optional(),
|
|
1701
1762
|
format: ToolFormatSchema2.optional(),
|
|
1702
|
-
limit:
|
|
1763
|
+
limit: z8.number().int().min(1).max(50).optional(),
|
|
1703
1764
|
status: CampaignStatusFilterSchema
|
|
1704
1765
|
}).strict();
|
|
1705
|
-
var DynamoiGetCampaignInputSchema =
|
|
1766
|
+
var DynamoiGetCampaignInputSchema = z8.object({
|
|
1706
1767
|
analyticsDateRange: DateRangeSchema2.optional(),
|
|
1707
|
-
analyticsGranularity:
|
|
1708
|
-
campaignId:
|
|
1768
|
+
analyticsGranularity: z8.enum(["TOTAL", "DAILY"]).optional(),
|
|
1769
|
+
campaignId: z8.string().uuid(),
|
|
1709
1770
|
format: ToolFormatSchema2.optional(),
|
|
1710
|
-
includeAnalytics:
|
|
1711
|
-
includeCountries:
|
|
1712
|
-
includeDeploymentStatus:
|
|
1771
|
+
includeAnalytics: z8.boolean().optional(),
|
|
1772
|
+
includeCountries: z8.boolean().optional(),
|
|
1773
|
+
includeDeploymentStatus: z8.boolean().optional()
|
|
1713
1774
|
}).strict();
|
|
1714
|
-
var DynamoiGetCampaignAnalyticsInputSchema =
|
|
1715
|
-
campaignId:
|
|
1775
|
+
var DynamoiGetCampaignAnalyticsInputSchema = z8.object({
|
|
1776
|
+
campaignId: z8.string().uuid(),
|
|
1716
1777
|
dateRange: DateRangeSchema2.optional(),
|
|
1717
1778
|
format: ToolFormatSchema2.optional(),
|
|
1718
|
-
granularity:
|
|
1779
|
+
granularity: z8.enum(["TOTAL", "DAILY"]).optional()
|
|
1719
1780
|
}).strict();
|
|
1720
|
-
var DynamoiGetArtistAnalyticsInputSchema =
|
|
1721
|
-
artistId:
|
|
1781
|
+
var DynamoiGetArtistAnalyticsInputSchema = z8.object({
|
|
1782
|
+
artistId: z8.string().uuid(),
|
|
1722
1783
|
dateRange: DateRangeSchema2.optional(),
|
|
1723
1784
|
format: ToolFormatSchema2.optional(),
|
|
1724
|
-
granularity:
|
|
1785
|
+
granularity: z8.enum(["TOTAL", "DAILY"]).optional()
|
|
1725
1786
|
}).strict();
|
|
1726
|
-
var DynamoiGetBillingInputSchema =
|
|
1727
|
-
artistId:
|
|
1787
|
+
var DynamoiGetBillingInputSchema = z8.object({
|
|
1788
|
+
artistId: z8.string().uuid(),
|
|
1728
1789
|
format: ToolFormatSchema2.optional(),
|
|
1729
1790
|
onboardingAttemptId: OnboardingAttemptIdSchema
|
|
1730
1791
|
}).strict();
|
|
1731
|
-
var LocationTargetSchema =
|
|
1732
|
-
code:
|
|
1733
|
-
name:
|
|
1792
|
+
var LocationTargetSchema = z8.object({
|
|
1793
|
+
code: z8.string().trim().min(1).max(8),
|
|
1794
|
+
name: z8.string().trim().min(1).max(120)
|
|
1734
1795
|
}).strict();
|
|
1735
|
-
var DynamoiGetPlatformStatusInputSchema =
|
|
1736
|
-
artistId:
|
|
1796
|
+
var DynamoiGetPlatformStatusInputSchema = z8.object({
|
|
1797
|
+
artistId: z8.string().uuid(),
|
|
1737
1798
|
format: ToolFormatSchema2.optional(),
|
|
1738
1799
|
onboardingAttemptId: OnboardingAttemptIdSchema,
|
|
1739
|
-
onboardingFlow:
|
|
1800
|
+
onboardingFlow: z8.enum(["meta", "youtube"]).optional()
|
|
1740
1801
|
}).strict();
|
|
1741
|
-
var DynamoiStartYoutubeChannelLinkInputSchema =
|
|
1742
|
-
artistId:
|
|
1802
|
+
var DynamoiStartYoutubeChannelLinkInputSchema = z8.object({
|
|
1803
|
+
artistId: z8.string().uuid(),
|
|
1743
1804
|
format: ToolFormatSchema2.optional(),
|
|
1744
1805
|
userIntentSummary: UserIntentSummarySchema
|
|
1745
1806
|
}).strict();
|
|
1746
|
-
var DynamoiStartMetaConnectionInputSchema =
|
|
1747
|
-
artistId:
|
|
1807
|
+
var DynamoiStartMetaConnectionInputSchema = z8.object({
|
|
1808
|
+
artistId: z8.string().uuid(),
|
|
1748
1809
|
format: ToolFormatSchema2.optional(),
|
|
1749
1810
|
userIntentSummary: UserIntentSummarySchema
|
|
1750
1811
|
}).strict();
|
|
1751
|
-
var DynamoiListAvailableCountriesInputSchema =
|
|
1752
|
-
campaignType:
|
|
1753
|
-
cursor:
|
|
1812
|
+
var DynamoiListAvailableCountriesInputSchema = z8.object({
|
|
1813
|
+
campaignType: z8.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
|
|
1814
|
+
cursor: z8.string().optional(),
|
|
1754
1815
|
format: ToolFormatSchema2.optional(),
|
|
1755
|
-
limit:
|
|
1756
|
-
query:
|
|
1816
|
+
limit: z8.number().int().min(1).max(100).optional(),
|
|
1817
|
+
query: z8.string().trim().max(120).optional()
|
|
1757
1818
|
}).strict();
|
|
1758
|
-
var DynamoiGetOnboardingStatusInputSchema =
|
|
1759
|
-
artistId:
|
|
1819
|
+
var DynamoiGetOnboardingStatusInputSchema = z8.object({
|
|
1820
|
+
artistId: z8.string().uuid(),
|
|
1760
1821
|
format: ToolFormatSchema2.optional()
|
|
1761
1822
|
}).strict();
|
|
1762
|
-
var DynamoiGetCampaignReadinessInputSchema =
|
|
1763
|
-
artistId:
|
|
1764
|
-
budgetAmount:
|
|
1765
|
-
budgetType:
|
|
1766
|
-
campaignType:
|
|
1767
|
-
contentType:
|
|
1823
|
+
var DynamoiGetCampaignReadinessInputSchema = z8.object({
|
|
1824
|
+
artistId: z8.string().uuid(),
|
|
1825
|
+
budgetAmount: z8.number().finite().positive().optional(),
|
|
1826
|
+
budgetType: z8.enum(["DAILY", "TOTAL"]).optional(),
|
|
1827
|
+
campaignType: z8.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
|
|
1828
|
+
contentType: z8.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]).optional(),
|
|
1768
1829
|
endDate: IsoCalendarDateSchema.optional(),
|
|
1769
1830
|
format: ToolFormatSchema2.optional(),
|
|
1770
|
-
locationTargets:
|
|
1771
|
-
mediaAssetIds:
|
|
1772
|
-
spotifyUrl:
|
|
1773
|
-
youtubeVideoId:
|
|
1831
|
+
locationTargets: z8.array(LocationTargetSchema).optional(),
|
|
1832
|
+
mediaAssetIds: z8.array(z8.string().uuid()).optional(),
|
|
1833
|
+
spotifyUrl: z8.string().trim().min(1).max(500).optional(),
|
|
1834
|
+
youtubeVideoId: z8.string().trim().min(1).max(128).optional()
|
|
1774
1835
|
}).strict();
|
|
1775
|
-
var DynamoiGetCampaignDeploymentStatusInputSchema =
|
|
1776
|
-
campaignId:
|
|
1836
|
+
var DynamoiGetCampaignDeploymentStatusInputSchema = z8.object({
|
|
1837
|
+
campaignId: z8.string().uuid(),
|
|
1777
1838
|
format: ToolFormatSchema2.optional()
|
|
1778
1839
|
}).strict();
|
|
1779
|
-
var DynamoiPauseCampaignInputSchema =
|
|
1780
|
-
campaignId:
|
|
1840
|
+
var DynamoiPauseCampaignInputSchema = z8.object({
|
|
1841
|
+
campaignId: z8.string().uuid(),
|
|
1781
1842
|
clientRequestId: ClientRequestIdSchema,
|
|
1782
1843
|
expectedCurrentStatus: ExpectedCampaignStatusSchema,
|
|
1783
1844
|
userIntentSummary: UserIntentSummarySchema
|
|
1784
1845
|
}).strict();
|
|
1785
|
-
var DynamoiResumeCampaignInputSchema =
|
|
1786
|
-
campaignId:
|
|
1846
|
+
var DynamoiResumeCampaignInputSchema = z8.object({
|
|
1847
|
+
campaignId: z8.string().uuid(),
|
|
1787
1848
|
clientRequestId: ClientRequestIdSchema,
|
|
1788
1849
|
expectedCurrentStatus: ExpectedCampaignStatusSchema,
|
|
1789
1850
|
userIntentSummary: UserIntentSummarySchema
|
|
1790
1851
|
}).strict();
|
|
1791
|
-
var DynamoiUpdateBudgetInputSchema =
|
|
1792
|
-
|
|
1793
|
-
|
|
1852
|
+
var DynamoiUpdateBudgetInputSchema = z8.object({
|
|
1853
|
+
acceptedConsentCopyHash: z8.literal(PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH).optional(),
|
|
1854
|
+
acceptedConsentVersion: z8.literal(PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION).optional(),
|
|
1855
|
+
authorizeAutomaticDailyFunding: z8.literal(true).describe(`Set only after the client explicitly accepts: “${PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY}”`).optional(),
|
|
1856
|
+
budgetAmount: z8.number().finite().positive(),
|
|
1857
|
+
campaignId: z8.string().uuid(),
|
|
1794
1858
|
clientRequestId: ClientRequestIdSchema,
|
|
1795
1859
|
endDate: IsoCalendarDateSchema.optional(),
|
|
1796
|
-
expectedCurrentBudgetAmount:
|
|
1860
|
+
expectedCurrentBudgetAmount: z8.number().finite().positive().optional(),
|
|
1797
1861
|
expectedCurrentEndDate: IsoCalendarDateSchema.optional(),
|
|
1798
1862
|
userIntentSummary: UserIntentSummarySchema
|
|
1799
|
-
}).strict()
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1863
|
+
}).strict().superRefine((data, ctx) => {
|
|
1864
|
+
if (data.authorizeAutomaticDailyFunding && !(data.acceptedConsentCopyHash && data.acceptedConsentVersion && data.clientRequestId)) {
|
|
1865
|
+
ctx.addIssue({
|
|
1866
|
+
code: "custom",
|
|
1867
|
+
message: "acceptedConsentCopyHash, acceptedConsentVersion, and clientRequestId are required with automatic daily funding authorization",
|
|
1868
|
+
path: ["authorizeAutomaticDailyFunding"]
|
|
1869
|
+
});
|
|
1870
|
+
}
|
|
1871
|
+
});
|
|
1872
|
+
var DynamoiUpdateCampaignInputSchema = z8.object({
|
|
1873
|
+
action: z8.enum(["pause", "resume", "update_budget"]),
|
|
1874
|
+
acceptedConsentCopyHash: z8.literal(PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH).optional(),
|
|
1875
|
+
acceptedConsentVersion: z8.literal(PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION).optional(),
|
|
1876
|
+
authorizeAutomaticDailyFunding: z8.literal(true).describe(`Set only after the client explicitly accepts: “${PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY}”`).optional(),
|
|
1877
|
+
budgetAmount: z8.number().finite().positive().optional(),
|
|
1878
|
+
campaignId: z8.string().uuid(),
|
|
1804
1879
|
clientRequestId: ClientRequestIdSchema,
|
|
1805
1880
|
endDate: IsoCalendarDateSchema.optional(),
|
|
1806
|
-
expectedCurrentBudgetAmount:
|
|
1881
|
+
expectedCurrentBudgetAmount: z8.number().finite().positive().optional(),
|
|
1807
1882
|
expectedCurrentEndDate: IsoCalendarDateSchema.optional(),
|
|
1808
1883
|
expectedCurrentStatus: ExpectedCampaignStatusSchema,
|
|
1809
1884
|
userIntentSummary: UserIntentSummarySchema
|
|
1810
1885
|
}).strict().superRefine((data, ctx) => {
|
|
1811
|
-
if (data.action === "update_budget" && data.budgetAmount ===
|
|
1886
|
+
if (data.action === "update_budget" && data.budgetAmount === undefined) {
|
|
1812
1887
|
ctx.addIssue({
|
|
1813
1888
|
code: "custom",
|
|
1814
1889
|
message: "budgetAmount is required when action is update_budget",
|
|
@@ -1817,12 +1892,15 @@ var DynamoiUpdateCampaignInputSchema = z7.object({
|
|
|
1817
1892
|
}
|
|
1818
1893
|
if (data.action !== "update_budget") {
|
|
1819
1894
|
for (const field of [
|
|
1895
|
+
"acceptedConsentCopyHash",
|
|
1896
|
+
"acceptedConsentVersion",
|
|
1820
1897
|
"budgetAmount",
|
|
1898
|
+
"authorizeAutomaticDailyFunding",
|
|
1821
1899
|
"endDate",
|
|
1822
1900
|
"expectedCurrentBudgetAmount",
|
|
1823
1901
|
"expectedCurrentEndDate"
|
|
1824
1902
|
]) {
|
|
1825
|
-
if (data[field] !==
|
|
1903
|
+
if (data[field] !== undefined) {
|
|
1826
1904
|
ctx.addIssue({
|
|
1827
1905
|
code: "custom",
|
|
1828
1906
|
message: `${field} is only valid when action is update_budget`,
|
|
@@ -1831,46 +1909,41 @@ var DynamoiUpdateCampaignInputSchema = z7.object({
|
|
|
1831
1909
|
}
|
|
1832
1910
|
}
|
|
1833
1911
|
}
|
|
1912
|
+
if (data.authorizeAutomaticDailyFunding && !(data.acceptedConsentCopyHash && data.acceptedConsentVersion && data.clientRequestId)) {
|
|
1913
|
+
ctx.addIssue({
|
|
1914
|
+
code: "custom",
|
|
1915
|
+
message: "acceptedConsentCopyHash, acceptedConsentVersion, and clientRequestId are required with automatic daily funding authorization",
|
|
1916
|
+
path: ["authorizeAutomaticDailyFunding"]
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1834
1919
|
});
|
|
1835
|
-
var DynamoiListMediaAssetsInputSchema =
|
|
1836
|
-
artistId:
|
|
1837
|
-
cursor:
|
|
1920
|
+
var DynamoiListMediaAssetsInputSchema = z8.object({
|
|
1921
|
+
artistId: z8.string().uuid(),
|
|
1922
|
+
cursor: z8.string().optional(),
|
|
1838
1923
|
format: ToolFormatSchema2.optional(),
|
|
1839
|
-
includeUrls:
|
|
1840
|
-
limit:
|
|
1924
|
+
includeUrls: z8.boolean().optional(),
|
|
1925
|
+
limit: z8.number().int().min(1).max(50).optional()
|
|
1841
1926
|
}).strict();
|
|
1842
|
-
var DynamoiLaunchCampaignInputSchema =
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
),
|
|
1853
|
-
budgetType: z7.enum(["DAILY", "TOTAL"]),
|
|
1854
|
-
campaignType: z7.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
|
|
1855
|
-
// Idempotency (client-generated UUID)
|
|
1856
|
-
clientRequestId: z7.string().uuid(),
|
|
1857
|
-
// Content
|
|
1858
|
-
contentTitle: z7.string().trim().min(1).max(160),
|
|
1859
|
-
contentType: z7.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]),
|
|
1927
|
+
var DynamoiLaunchCampaignInputSchema = z8.object({
|
|
1928
|
+
adCopy: z8.string().trim().max(500).optional(),
|
|
1929
|
+
appleMusicUrl: z8.string().trim().min(1).max(500).optional(),
|
|
1930
|
+
artistId: z8.string().uuid(),
|
|
1931
|
+
budgetAmount: z8.number().finite().positive(),
|
|
1932
|
+
budgetSplits: z8.record(z8.enum(["META", "GOOGLE"]), z8.number().int().min(0).max(100)),
|
|
1933
|
+
budgetType: z8.enum(["DAILY", "TOTAL"]),
|
|
1934
|
+
campaignType: z8.enum(["SMART_CAMPAIGN", "YOUTUBE"]),
|
|
1935
|
+
clientRequestId: z8.string().uuid(),
|
|
1936
|
+
contentTitle: z8.string().trim().min(1).max(160),
|
|
1937
|
+
contentType: z8.enum(["TRACK", "ALBUM", "PLAYLIST", "VIDEO"]),
|
|
1860
1938
|
endDate: IsoCalendarDateSchema.optional(),
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
spotifyUrl: z7.string().trim().min(1).max(500).optional(),
|
|
1866
|
-
useAiGeneratedCopy: z7.boolean().optional(),
|
|
1939
|
+
locationTargets: z8.array(LocationTargetSchema).optional(),
|
|
1940
|
+
mediaAssetIds: z8.array(z8.string().uuid()).optional(),
|
|
1941
|
+
spotifyUrl: z8.string().trim().min(1).max(500).optional(),
|
|
1942
|
+
useAiGeneratedCopy: z8.boolean().optional(),
|
|
1867
1943
|
userIntentSummary: UserIntentSummarySchema,
|
|
1868
|
-
youtubeVideoId:
|
|
1944
|
+
youtubeVideoId: z8.string().trim().min(1).max(128).optional()
|
|
1869
1945
|
}).strict().superRefine((data, ctx) => {
|
|
1870
|
-
const sum = Object.values(data.budgetSplits ?? {}).reduce(
|
|
1871
|
-
(acc, v) => acc + (Number.isFinite(v) ? v : 0),
|
|
1872
|
-
0
|
|
1873
|
-
);
|
|
1946
|
+
const sum = Object.values(data.budgetSplits ?? {}).reduce((acc, v) => acc + (Number.isFinite(v) ? v : 0), 0);
|
|
1874
1947
|
if (!(sum > 0)) {
|
|
1875
1948
|
ctx.addIssue({
|
|
1876
1949
|
code: "custom",
|
|
@@ -1951,7 +2024,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1951
2024
|
title: "Get Account Overview"
|
|
1952
2025
|
},
|
|
1953
2026
|
{
|
|
1954
|
-
description: "Use this when the user wants to see which artists or YouTube channels they manage, along with billing status, active campaign count, and their role. Pass artistId when you need the full profile/readiness details for one artist instead of a roster page. Do not use this for campaign details; use dynamoi_list_campaigns or dynamoi_get_campaign. Never use this for generic social-media or marketing advice, including Instagram follower-growth questions, unless the user explicitly asked about their Dynamoi roster. If the result is empty, the user is brand-new
|
|
2027
|
+
description: "Use this when the user wants to see which artists or YouTube channels they manage, along with billing status, active campaign count, and their role. Pass artistId when you need the full profile/readiness details for one artist instead of a roster page. Do not use this for campaign details; use dynamoi_list_campaigns or dynamoi_get_campaign. Never use this for generic social-media or marketing advice, including Instagram follower-growth questions, unless the user explicitly asked about their Dynamoi roster. If the result is empty, the user is brand-new — do not stop with 'no records found'; route through dynamoi_get_account_overview.recommendedNextActions.",
|
|
1955
2028
|
destructiveHint: false,
|
|
1956
2029
|
name: "dynamoi_list_artists",
|
|
1957
2030
|
openWorldHint: false,
|
|
@@ -1961,7 +2034,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1961
2034
|
title: "List Artists"
|
|
1962
2035
|
},
|
|
1963
2036
|
{
|
|
1964
|
-
description: "Use this when the user mentions an artist, release, campaign, or smart link but you do not yet know the exact record to inspect. Do not use this for analytics summaries or billing questions once you already know the target record. If the result is empty for a brand-new user (no artists yet), do not respond 'no records found' as a terminal answer
|
|
2037
|
+
description: "Use this when the user mentions an artist, release, campaign, or smart link but you do not yet know the exact record to inspect. Do not use this for analytics summaries or billing questions once you already know the target record. If the result is empty for a brand-new user (no artists yet), do not respond 'no records found' as a terminal answer — instead suggest creating their first artist hub via dynamoi_create_smart_links_from_spotify_artist.",
|
|
1965
2038
|
destructiveHint: false,
|
|
1966
2039
|
name: "dynamoi_search",
|
|
1967
2040
|
openWorldHint: false,
|
|
@@ -1972,7 +2045,7 @@ var PHASE_1_TOOL_DEFINITIONS = [
|
|
|
1972
2045
|
},
|
|
1973
2046
|
...OPENAI_TOOL_DEFINITIONS,
|
|
1974
2047
|
{
|
|
1975
|
-
description: "Use this when the user wants to browse campaigns for one artist, optionally filtered by type or status. Do not use this for a single campaign deep dive; use dynamoi_get_campaign for that. Never use this to personalize generic marketing advice. If the user has no artists yet, do not call this
|
|
2048
|
+
description: "Use this when the user wants to browse campaigns for one artist, optionally filtered by type or status. Do not use this for a single campaign deep dive; use dynamoi_get_campaign for that. Never use this to personalize generic marketing advice. If the user has no artists yet, do not call this — route via dynamoi_get_account_overview first.",
|
|
1976
2049
|
destructiveHint: false,
|
|
1977
2050
|
name: "dynamoi_list_campaigns",
|
|
1978
2051
|
openWorldHint: false,
|
|
@@ -2086,20 +2159,122 @@ var PHASE_3_TOOL_DEFINITIONS = [
|
|
|
2086
2159
|
];
|
|
2087
2160
|
|
|
2088
2161
|
// src/server/create-server.ts
|
|
2089
|
-
|
|
2090
|
-
|
|
2162
|
+
function buildDynamoiToolSecuritySchemes(scopes) {
|
|
2163
|
+
return [{ scopes: [...scopes], type: "oauth2" }];
|
|
2164
|
+
}
|
|
2165
|
+
var DescriptiveEntitySchema = z9.object({
|
|
2166
|
+
id: z9.string().optional(),
|
|
2167
|
+
name: z9.string().optional(),
|
|
2168
|
+
publicUrl: z9.string().optional(),
|
|
2169
|
+
summary: z9.string().optional()
|
|
2091
2170
|
}).passthrough();
|
|
2092
|
-
|
|
2093
|
-
|
|
2171
|
+
var CHATGPT_DESCRIPTIVE_DATA_SCHEMAS = {
|
|
2172
|
+
dynamoi_get_account_overview: z9.object({
|
|
2173
|
+
artistCount: z9.number().optional(),
|
|
2174
|
+
artists: z9.object({
|
|
2175
|
+
count: z9.number(),
|
|
2176
|
+
summaries: z9.array(DescriptiveEntitySchema)
|
|
2177
|
+
}).optional(),
|
|
2178
|
+
organizationCount: z9.number().optional(),
|
|
2179
|
+
recommendedNextActions: z9.array(z9.string()).optional(),
|
|
2180
|
+
state: z9.object({}).passthrough().optional(),
|
|
2181
|
+
summary: z9.string().optional(),
|
|
2182
|
+
user: z9.object({ name: z9.string().optional() }).optional()
|
|
2183
|
+
}).passthrough(),
|
|
2184
|
+
dynamoi_get_artist_analytics: z9.object({
|
|
2185
|
+
artistId: z9.string().optional(),
|
|
2186
|
+
artistName: z9.string().optional(),
|
|
2187
|
+
dateRange: z9.object({ end: z9.string(), start: z9.string() }).optional(),
|
|
2188
|
+
summary: z9.string().optional()
|
|
2189
|
+
}).passthrough(),
|
|
2190
|
+
dynamoi_get_campaign: DescriptiveEntitySchema.extend({
|
|
2191
|
+
artistId: z9.string().optional(),
|
|
2192
|
+
contentTitle: z9.string().optional(),
|
|
2193
|
+
nextActions: z9.array(z9.string()).optional(),
|
|
2194
|
+
status: z9.string().optional()
|
|
2195
|
+
}).passthrough(),
|
|
2196
|
+
dynamoi_get_platform_status: z9.object({
|
|
2197
|
+
artistId: z9.string().optional(),
|
|
2198
|
+
artistName: z9.string().optional(),
|
|
2199
|
+
platforms: z9.object({}).passthrough().optional(),
|
|
2200
|
+
summary: z9.string().optional()
|
|
2201
|
+
}).passthrough(),
|
|
2202
|
+
dynamoi_get_smart_link: DescriptiveEntitySchema.extend({
|
|
2203
|
+
artistId: z9.string().optional(),
|
|
2204
|
+
artistName: z9.string().optional(),
|
|
2205
|
+
nextActions: z9.array(z9.string()).optional(),
|
|
2206
|
+
publishState: z9.string().optional(),
|
|
2207
|
+
releaseTitle: z9.string().optional(),
|
|
2208
|
+
theme: z9.string().optional()
|
|
2209
|
+
}).passthrough(),
|
|
2210
|
+
dynamoi_list_artists: z9.object({
|
|
2211
|
+
artists: z9.array(DescriptiveEntitySchema).optional(),
|
|
2212
|
+
nextCursor: z9.string().optional(),
|
|
2213
|
+
summary: z9.string().optional(),
|
|
2214
|
+
totalCount: z9.number().optional()
|
|
2215
|
+
}).passthrough(),
|
|
2216
|
+
dynamoi_list_campaigns: z9.object({
|
|
2217
|
+
campaigns: z9.array(DescriptiveEntitySchema).optional(),
|
|
2218
|
+
nextCursor: z9.string().optional(),
|
|
2219
|
+
summary: z9.string().optional(),
|
|
2220
|
+
totalCount: z9.number().optional()
|
|
2221
|
+
}).passthrough(),
|
|
2222
|
+
dynamoi_preview_smart_link_themes: z9.object({
|
|
2223
|
+
artistName: z9.string(),
|
|
2224
|
+
releaseTitle: z9.string(),
|
|
2225
|
+
themes: z9.array(DescriptiveEntitySchema)
|
|
2226
|
+
}).passthrough(),
|
|
2227
|
+
dynamoi_search: z9.object({
|
|
2228
|
+
nextCursor: z9.string().optional(),
|
|
2229
|
+
results: z9.array(DescriptiveEntitySchema).optional(),
|
|
2230
|
+
summary: z9.string().optional(),
|
|
2231
|
+
totalCount: z9.number().optional()
|
|
2232
|
+
}).passthrough(),
|
|
2233
|
+
dynamoi_update_smart_link: DescriptiveEntitySchema.extend({
|
|
2234
|
+
artistId: z9.string().optional(),
|
|
2235
|
+
artistName: z9.string().optional(),
|
|
2236
|
+
defaultTheme: z9.string().optional(),
|
|
2237
|
+
renderQueuedCount: z9.number().optional(),
|
|
2238
|
+
renderWarning: z9.string().nullable().optional()
|
|
2239
|
+
}).passthrough(),
|
|
2240
|
+
fetch: DescriptiveEntitySchema,
|
|
2241
|
+
search: z9.object({ results: z9.array(DescriptiveEntitySchema).optional() }).passthrough()
|
|
2242
|
+
};
|
|
2243
|
+
function getAdvertisedToolOutputSchema(options) {
|
|
2244
|
+
if (options.toolProfile !== "chatgpt-app") {
|
|
2245
|
+
return options.canonical;
|
|
2246
|
+
}
|
|
2247
|
+
const dataSchema = CHATGPT_DESCRIPTIVE_DATA_SCHEMAS[options.toolName];
|
|
2248
|
+
if (!dataSchema) {
|
|
2249
|
+
return options.canonical;
|
|
2250
|
+
}
|
|
2251
|
+
return z9.object({
|
|
2252
|
+
data: dataSchema.optional(),
|
|
2253
|
+
kind: z9.string().optional(),
|
|
2254
|
+
message: z9.string().optional(),
|
|
2255
|
+
status: z9.enum(["success", "partial_success", "error"])
|
|
2256
|
+
}).passthrough();
|
|
2257
|
+
}
|
|
2258
|
+
function getDynamoiToolOAuthScopes(toolName, providerScopes) {
|
|
2259
|
+
const requiredScopes = DYNAMOI_MCP_TOOL_SCOPES[toolName];
|
|
2260
|
+
if (!providerScopes.some((scope) => scope.startsWith("dynamoi:"))) {
|
|
2261
|
+
return providerScopes;
|
|
2262
|
+
}
|
|
2263
|
+
const missingScopes = requiredScopes.filter((scope) => !providerScopes.includes(scope));
|
|
2264
|
+
if (missingScopes.length > 0) {
|
|
2265
|
+
throw new Error(`MCP provider does not support ${toolName} scopes: ${missingScopes.join(", ")}`);
|
|
2266
|
+
}
|
|
2267
|
+
return requiredScopes;
|
|
2094
2268
|
}
|
|
2095
2269
|
var DYNAMOI_TOOL_DEFINITIONS = [
|
|
2096
2270
|
...PHASE_1_TOOL_DEFINITIONS,
|
|
2097
2271
|
...PHASE_ONBOARDING_TOOL_DEFINITIONS,
|
|
2098
2272
|
...PHASE_2_TOOL_DEFINITIONS,
|
|
2099
2273
|
...PHASE_3_TOOL_DEFINITIONS,
|
|
2274
|
+
SMART_LINK_THEME_PREVIEW_TOOL_DEFINITION,
|
|
2100
2275
|
...PHASE_4_TOOL_DEFINITIONS
|
|
2101
2276
|
];
|
|
2102
|
-
var CHATGPT_APP_EXCLUDED_TOOL_NAMES =
|
|
2277
|
+
var CHATGPT_APP_EXCLUDED_TOOL_NAMES = new Set([
|
|
2103
2278
|
"dynamoi_get_billing",
|
|
2104
2279
|
"dynamoi_get_campaign_readiness",
|
|
2105
2280
|
"dynamoi_launch_campaign",
|
|
@@ -2114,9 +2289,7 @@ function getDynamoiToolDefinitions(options) {
|
|
|
2114
2289
|
if ((options?.toolProfile ?? "full") !== "chatgpt-app") {
|
|
2115
2290
|
return definitions;
|
|
2116
2291
|
}
|
|
2117
|
-
return definitions.filter(
|
|
2118
|
-
(definition) => !CHATGPT_APP_EXCLUDED_TOOL_NAMES.has(definition.name)
|
|
2119
|
-
);
|
|
2292
|
+
return definitions.filter((definition) => !CHATGPT_APP_EXCLUDED_TOOL_NAMES.has(definition.name));
|
|
2120
2293
|
}
|
|
2121
2294
|
var DYNAMOI_TOOL_DISPATCHERS = {
|
|
2122
2295
|
dynamoi_create_smart_link_from_spotify: (adapter, input) => adapter.createSmartLinkFromSpotify(input),
|
|
@@ -2134,6 +2307,7 @@ var DYNAMOI_TOOL_DISPATCHERS = {
|
|
|
2134
2307
|
dynamoi_list_campaigns: (adapter, input) => adapter.listCampaigns(input),
|
|
2135
2308
|
dynamoi_list_media_assets: (adapter, input) => adapter.listMediaAssets(input),
|
|
2136
2309
|
dynamoi_list_smart_links: (adapter, input) => adapter.listSmartLinks(input),
|
|
2310
|
+
dynamoi_preview_smart_link_themes: (_adapter, input) => Promise.resolve(previewSmartLinkThemes(input)),
|
|
2137
2311
|
dynamoi_search: (adapter, input) => adapter.search(input),
|
|
2138
2312
|
dynamoi_start_meta_connection: (adapter, input) => adapter.startMetaConnection(input),
|
|
2139
2313
|
dynamoi_start_youtube_channel_link: (adapter, input) => adapter.startYoutubeChannelLink(input),
|
|
@@ -2181,115 +2355,82 @@ function asValidatedTextResult(options) {
|
|
|
2181
2355
|
}
|
|
2182
2356
|
function createDynamoiMcpServer(options) {
|
|
2183
2357
|
const toolProfile = options.toolProfile ?? "full";
|
|
2184
|
-
const server = new McpServer(
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
instructions: toolProfile === "chatgpt-app" ? DYNAMOI_CHATGPT_APP_INSTRUCTIONS : DYNAMOI_MCP_INSTRUCTIONS
|
|
2192
|
-
}
|
|
2193
|
-
);
|
|
2358
|
+
const server = new McpServer({
|
|
2359
|
+
name: "dynamoi",
|
|
2360
|
+
version: DYNAMOI_MCP_VERSION,
|
|
2361
|
+
websiteUrl: options.websiteUrl ?? "https://dynamoi.com"
|
|
2362
|
+
}, {
|
|
2363
|
+
instructions: toolProfile === "chatgpt-app" ? DYNAMOI_CHATGPT_APP_INSTRUCTIONS : DYNAMOI_MCP_INSTRUCTIONS
|
|
2364
|
+
});
|
|
2194
2365
|
for (const def of getDynamoiToolDefinitions({ toolProfile })) {
|
|
2195
2366
|
const title = def.title;
|
|
2196
2367
|
const dispatcher = DYNAMOI_TOOL_DISPATCHERS[def.name];
|
|
2197
|
-
const idempotentHint = "idempotentHint" in def && typeof def.idempotentHint === "boolean" ? def.idempotentHint :
|
|
2198
|
-
server.registerTool(
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
inputSchema: def.schema,
|
|
2212
|
-
// The SDK's runtime output validator currently only normalizes object
|
|
2213
|
-
// schemas; our canonical output schemas are unions of success/error
|
|
2214
|
-
// envelopes and are validated below in asValidatedTextResult().
|
|
2215
|
-
outputSchema: SdkToolOutputEnvelopeSchema,
|
|
2216
|
-
title
|
|
2368
|
+
const idempotentHint = "idempotentHint" in def && typeof def.idempotentHint === "boolean" ? def.idempotentHint : undefined;
|
|
2369
|
+
server.registerTool(def.name, {
|
|
2370
|
+
_meta: {
|
|
2371
|
+
securitySchemes: buildDynamoiToolSecuritySchemes(getDynamoiToolOAuthScopes(def.name, options.oauthScopes ?? DYNAMOI_BETTER_AUTH_MCP_SCOPES)),
|
|
2372
|
+
...def.name === "dynamoi_preview_smart_link_themes" ? {
|
|
2373
|
+
"openai/outputTemplate": SMART_LINK_THEME_PREVIEW_RESOURCE_URI,
|
|
2374
|
+
ui: { resourceUri: SMART_LINK_THEME_PREVIEW_RESOURCE_URI }
|
|
2375
|
+
} : {}
|
|
2376
|
+
},
|
|
2377
|
+
annotations: {
|
|
2378
|
+
destructiveHint: def.destructiveHint,
|
|
2379
|
+
...typeof idempotentHint === "boolean" ? { idempotentHint } : {},
|
|
2380
|
+
openWorldHint: def.openWorldHint,
|
|
2381
|
+
readOnlyHint: def.readOnlyHint
|
|
2217
2382
|
},
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2383
|
+
description: def.description,
|
|
2384
|
+
inputSchema: def.schema,
|
|
2385
|
+
outputSchema: getAdvertisedToolOutputSchema({
|
|
2386
|
+
canonical: def.outputSchema,
|
|
2387
|
+
toolName: def.name,
|
|
2388
|
+
toolProfile
|
|
2389
|
+
}),
|
|
2390
|
+
title
|
|
2391
|
+
}, async (input) => {
|
|
2392
|
+
const startedAt = Date.now();
|
|
2393
|
+
try {
|
|
2394
|
+
const envelope = await dispatcher(options.adapter, input);
|
|
2395
|
+
try {
|
|
2396
|
+
await options.onToolCall?.({
|
|
2397
|
+
durationMs: Date.now() - startedAt,
|
|
2398
|
+
result: envelope,
|
|
2399
|
+
toolName: def.name
|
|
2400
|
+
});
|
|
2401
|
+
} catch {}
|
|
2402
|
+
return asValidatedTextResult({
|
|
2403
|
+
envelope,
|
|
2404
|
+
outputSchema: def.outputSchema,
|
|
2405
|
+
toolName: def.name
|
|
2406
|
+
});
|
|
2407
|
+
} catch (error) {
|
|
2408
|
+
try {
|
|
2409
|
+
await options.onToolCall?.({
|
|
2410
|
+
durationMs: Date.now() - startedAt,
|
|
2411
|
+
error,
|
|
2412
|
+
toolName: def.name
|
|
2413
|
+
});
|
|
2414
|
+
} catch {}
|
|
2415
|
+
throw error;
|
|
2416
|
+
}
|
|
2417
|
+
});
|
|
2224
2418
|
}
|
|
2419
|
+
registerSmartLinkThemePreviewResource(server);
|
|
2225
2420
|
if (toolProfile === "full") {
|
|
2226
2421
|
registerDynamoiPrompts(server);
|
|
2227
2422
|
registerDynamoiResources(server, options.adapter);
|
|
2228
2423
|
}
|
|
2229
2424
|
return server;
|
|
2230
2425
|
}
|
|
2231
|
-
|
|
2232
2426
|
// src/transport/http.ts
|
|
2233
|
-
import { randomUUID } from "crypto";
|
|
2234
2427
|
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
|
|
2235
|
-
import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
2236
|
-
var transports = /* @__PURE__ */ new Map();
|
|
2237
|
-
var SESSION_TTL_MS = 30 * 60 * 1e3;
|
|
2238
|
-
var MAX_SESSIONS = 250;
|
|
2239
|
-
function closeTransportBestEffort(entry) {
|
|
2240
|
-
void entry.transport.close().catch(() => {
|
|
2241
|
-
});
|
|
2242
|
-
}
|
|
2243
|
-
function cleanupTransports(nowMs) {
|
|
2244
|
-
for (const [sid, entry] of transports.entries()) {
|
|
2245
|
-
const expired = nowMs - entry.lastUsedAtMs > SESSION_TTL_MS;
|
|
2246
|
-
if (expired) {
|
|
2247
|
-
closeTransportBestEffort(entry);
|
|
2248
|
-
transports.delete(sid);
|
|
2249
|
-
}
|
|
2250
|
-
}
|
|
2251
|
-
if (transports.size > MAX_SESSIONS) {
|
|
2252
|
-
const entries = Array.from(transports.entries()).sort(
|
|
2253
|
-
(a, b) => a[1].lastUsedAtMs - b[1].lastUsedAtMs
|
|
2254
|
-
);
|
|
2255
|
-
const over = transports.size - MAX_SESSIONS;
|
|
2256
|
-
for (let i = 0; i < over; i += 1) {
|
|
2257
|
-
const sid = entries[i]?.[0];
|
|
2258
|
-
if (sid) {
|
|
2259
|
-
const entry = entries[i]?.[1];
|
|
2260
|
-
if (entry) {
|
|
2261
|
-
closeTransportBestEffort(entry);
|
|
2262
|
-
}
|
|
2263
|
-
transports.delete(sid);
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
function getHeader(request, name) {
|
|
2269
|
-
const value = request.headers.get(name);
|
|
2270
|
-
return value && value.trim().length > 0 ? value : null;
|
|
2271
|
-
}
|
|
2272
|
-
function jsonRpcSessionNotFound() {
|
|
2273
|
-
return new Response(
|
|
2274
|
-
JSON.stringify({
|
|
2275
|
-
error: { code: -32001, message: "Session not found" },
|
|
2276
|
-
id: null,
|
|
2277
|
-
jsonrpc: "2.0"
|
|
2278
|
-
}),
|
|
2279
|
-
{
|
|
2280
|
-
headers: { "content-type": "application/json" },
|
|
2281
|
-
status: 404
|
|
2282
|
-
}
|
|
2283
|
-
);
|
|
2284
|
-
}
|
|
2285
2428
|
function isRecord(value) {
|
|
2286
2429
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2287
2430
|
}
|
|
2288
2431
|
function normalizeLegacyDynamoiToolCallArguments(parsedBody) {
|
|
2289
2432
|
if (Array.isArray(parsedBody)) {
|
|
2290
|
-
return parsedBody.map(
|
|
2291
|
-
(message) => normalizeLegacyDynamoiToolCallArguments(message)
|
|
2292
|
-
);
|
|
2433
|
+
return parsedBody.map((message) => normalizeLegacyDynamoiToolCallArguments(message));
|
|
2293
2434
|
}
|
|
2294
2435
|
if (!isRecord(parsedBody) || parsedBody.method !== "tools/call") {
|
|
2295
2436
|
return parsedBody;
|
|
@@ -2311,46 +2452,21 @@ function normalizeLegacyDynamoiToolCallArguments(parsedBody) {
|
|
|
2311
2452
|
};
|
|
2312
2453
|
}
|
|
2313
2454
|
async function handleMcpHttpRequest(options) {
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
transports.delete(sessionId);
|
|
2326
|
-
return jsonRpcSessionNotFound();
|
|
2327
|
-
}
|
|
2328
|
-
existing.lastUsedAtMs = nowMs;
|
|
2329
|
-
const response = await existing.transport.handleRequest(options.request, {
|
|
2330
|
-
parsedBody
|
|
2455
|
+
if (options.request.method.toUpperCase() !== "POST") {
|
|
2456
|
+
return new Response(JSON.stringify({
|
|
2457
|
+
error: { code: -32000, message: "Method not allowed." },
|
|
2458
|
+
id: null,
|
|
2459
|
+
jsonrpc: "2.0"
|
|
2460
|
+
}), {
|
|
2461
|
+
headers: {
|
|
2462
|
+
Allow: "POST",
|
|
2463
|
+
"content-type": "application/json"
|
|
2464
|
+
},
|
|
2465
|
+
status: 405
|
|
2331
2466
|
});
|
|
2332
|
-
if (options.request.method.toUpperCase() === "DELETE" && sessionId) {
|
|
2333
|
-
closeTransportBestEffort(existing);
|
|
2334
|
-
transports.delete(sessionId);
|
|
2335
|
-
}
|
|
2336
|
-
return response;
|
|
2337
|
-
}
|
|
2338
|
-
if (sessionId && !isInitializeRequest(parsedBody)) {
|
|
2339
|
-
return jsonRpcSessionNotFound();
|
|
2340
2467
|
}
|
|
2341
|
-
const
|
|
2342
|
-
const transport = new WebStandardStreamableHTTPServerTransport
|
|
2343
|
-
onsessioninitialized: (sid) => {
|
|
2344
|
-
transports.set(sid, {
|
|
2345
|
-
contextKey: options.sessionContextKey,
|
|
2346
|
-
createdAtMs: nowMs,
|
|
2347
|
-
lastUsedAtMs: nowMs,
|
|
2348
|
-
transport
|
|
2349
|
-
});
|
|
2350
|
-
cleanupTransports(Date.now());
|
|
2351
|
-
},
|
|
2352
|
-
...enableSessions && isInit ? { sessionIdGenerator: () => randomUUID() } : {}
|
|
2353
|
-
});
|
|
2468
|
+
const parsedBody = normalizeLegacyDynamoiToolCallArguments(options.parsedBody);
|
|
2469
|
+
const transport = new WebStandardStreamableHTTPServerTransport;
|
|
2354
2470
|
const server = options.createServer();
|
|
2355
2471
|
await server.connect(transport);
|
|
2356
2472
|
return transport.handleRequest(options.request, {
|
|
@@ -2358,54 +2474,60 @@ async function handleMcpHttpRequest(options) {
|
|
|
2358
2474
|
});
|
|
2359
2475
|
}
|
|
2360
2476
|
export {
|
|
2361
|
-
|
|
2362
|
-
DYNAMOI_MCP_VERSION,
|
|
2363
|
-
DateRangeSchema2 as DateRangeSchema,
|
|
2364
|
-
DynamoiCreateSmartLinkFromSpotifyInputSchema,
|
|
2365
|
-
DynamoiCreateSmartLinksFromSpotifyArtistInputSchema,
|
|
2366
|
-
DynamoiGetArtistAnalyticsInputSchema,
|
|
2367
|
-
DynamoiGetArtistInputSchema,
|
|
2368
|
-
DynamoiGetBillingInputSchema,
|
|
2369
|
-
DynamoiGetCampaignAnalyticsInputSchema,
|
|
2370
|
-
DynamoiGetCampaignDeploymentStatusInputSchema,
|
|
2371
|
-
DynamoiGetCampaignInputSchema,
|
|
2372
|
-
DynamoiGetCampaignReadinessInputSchema,
|
|
2373
|
-
DynamoiGetCurrentUserInputSchema,
|
|
2374
|
-
DynamoiGetOnboardingStatusInputSchema,
|
|
2375
|
-
DynamoiGetPlatformStatusInputSchema,
|
|
2376
|
-
DynamoiGetSmartLinkAnalyticsInputSchema,
|
|
2377
|
-
DynamoiGetSmartLinkArtistSettingsInputSchema,
|
|
2378
|
-
DynamoiGetSmartLinkInputSchema,
|
|
2379
|
-
DynamoiLaunchCampaignInputSchema,
|
|
2380
|
-
DynamoiListArtistsInputSchema,
|
|
2381
|
-
DynamoiListAvailableCountriesInputSchema,
|
|
2382
|
-
DynamoiListCampaignsInputSchema,
|
|
2383
|
-
DynamoiListMediaAssetsInputSchema,
|
|
2384
|
-
DynamoiListSmartLinksInputSchema,
|
|
2385
|
-
DynamoiOpenAiFetchInputSchema,
|
|
2386
|
-
DynamoiOpenAiSearchInputSchema,
|
|
2387
|
-
DynamoiPauseCampaignInputSchema,
|
|
2388
|
-
DynamoiPublishSmartLinkInputSchema,
|
|
2389
|
-
DynamoiResumeCampaignInputSchema,
|
|
2390
|
-
DynamoiSearchInputSchema,
|
|
2391
|
-
DynamoiStartMetaConnectionInputSchema,
|
|
2392
|
-
DynamoiStartYoutubeChannelLinkInputSchema,
|
|
2393
|
-
DynamoiUpdateBudgetInputSchema,
|
|
2394
|
-
DynamoiUpdateCampaignInputSchema,
|
|
2395
|
-
DynamoiUpdateSmartLinkArtistSettingsInputSchema,
|
|
2396
|
-
DynamoiUpdateSmartLinkInputSchema,
|
|
2397
|
-
PHASE_1_TOOL_DEFINITIONS,
|
|
2398
|
-
PHASE_2_TOOL_DEFINITIONS,
|
|
2399
|
-
PHASE_3_TOOL_DEFINITIONS,
|
|
2400
|
-
PHASE_4_TOOL_DEFINITIONS,
|
|
2401
|
-
PHASE_ONBOARDING_TOOL_DEFINITIONS,
|
|
2402
|
-
ToolFormatSchema2 as ToolFormatSchema,
|
|
2403
|
-
buildProtectedResourceMetadata,
|
|
2404
|
-
buildWwwAuthenticateHeader,
|
|
2405
|
-
createDynamoiMcpServer,
|
|
2406
|
-
getDynamoiToolDefinitions,
|
|
2407
|
-
handleMcpHttpRequest,
|
|
2477
|
+
verifyAccessToken,
|
|
2408
2478
|
parseDynamoiGetSmartLinkInput,
|
|
2409
|
-
|
|
2479
|
+
handleMcpHttpRequest,
|
|
2480
|
+
getDynamoiToolDefinitions,
|
|
2481
|
+
createDynamoiMcpServer,
|
|
2482
|
+
buildWwwAuthenticateHeader,
|
|
2483
|
+
buildProtectedResourceMetadata,
|
|
2484
|
+
ToolFormatSchema2 as ToolFormatSchema,
|
|
2485
|
+
PROSPECTIVE_BUDGET_FUNDING_CONSENT_VERSION,
|
|
2486
|
+
PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY_HASH,
|
|
2487
|
+
PROSPECTIVE_BUDGET_FUNDING_CONSENT_COPY,
|
|
2488
|
+
PHASE_ONBOARDING_TOOL_DEFINITIONS,
|
|
2489
|
+
PHASE_4_TOOL_DEFINITIONS,
|
|
2490
|
+
PHASE_3_TOOL_DEFINITIONS,
|
|
2491
|
+
PHASE_2_TOOL_DEFINITIONS,
|
|
2492
|
+
PHASE_1_TOOL_DEFINITIONS,
|
|
2493
|
+
DynamoiUpdateSmartLinkInputSchema,
|
|
2494
|
+
DynamoiUpdateSmartLinkArtistSettingsInputSchema,
|
|
2495
|
+
DynamoiUpdateCampaignInputSchema,
|
|
2496
|
+
DynamoiUpdateBudgetInputSchema,
|
|
2497
|
+
DynamoiStartYoutubeChannelLinkInputSchema,
|
|
2498
|
+
DynamoiStartMetaConnectionInputSchema,
|
|
2499
|
+
DynamoiSearchInputSchema,
|
|
2500
|
+
DynamoiResumeCampaignInputSchema,
|
|
2501
|
+
DynamoiPauseCampaignInputSchema,
|
|
2502
|
+
DynamoiOpenAiSearchInputSchema,
|
|
2503
|
+
DynamoiOpenAiFetchInputSchema,
|
|
2504
|
+
DynamoiListSmartLinksInputSchema,
|
|
2505
|
+
DynamoiListMediaAssetsInputSchema,
|
|
2506
|
+
DynamoiListCampaignsInputSchema,
|
|
2507
|
+
DynamoiListAvailableCountriesInputSchema,
|
|
2508
|
+
DynamoiListArtistsInputSchema,
|
|
2509
|
+
DynamoiLaunchCampaignInputSchema,
|
|
2510
|
+
DynamoiGetSmartLinkInputSchema,
|
|
2511
|
+
DynamoiGetSmartLinkArtistSettingsInputSchema,
|
|
2512
|
+
DynamoiGetSmartLinkAnalyticsInputSchema,
|
|
2513
|
+
DynamoiGetPlatformStatusInputSchema,
|
|
2514
|
+
DynamoiGetOnboardingStatusInputSchema,
|
|
2515
|
+
DynamoiGetCurrentUserInputSchema,
|
|
2516
|
+
DynamoiGetCampaignReadinessInputSchema,
|
|
2517
|
+
DynamoiGetCampaignInputSchema,
|
|
2518
|
+
DynamoiGetCampaignDeploymentStatusInputSchema,
|
|
2519
|
+
DynamoiGetCampaignAnalyticsInputSchema,
|
|
2520
|
+
DynamoiGetBillingInputSchema,
|
|
2521
|
+
DynamoiGetArtistInputSchema,
|
|
2522
|
+
DynamoiGetArtistAnalyticsInputSchema,
|
|
2523
|
+
DynamoiCreateSmartLinksFromSpotifyArtistInputSchema,
|
|
2524
|
+
DynamoiCreateSmartLinkFromSpotifyInputSchema,
|
|
2525
|
+
DateRangeSchema2 as DateRangeSchema,
|
|
2526
|
+
DYNAMOI_MCP_VERSION,
|
|
2527
|
+
DYNAMOI_MCP_TOOL_SCOPES,
|
|
2528
|
+
DYNAMOI_MCP_SCOPES,
|
|
2529
|
+
DYNAMOI_BETTER_AUTH_MCP_SCOPES
|
|
2410
2530
|
};
|
|
2411
|
-
|
|
2531
|
+
|
|
2532
|
+
//# debugId=5EEF6599A31E134864756E2164756E21
|
|
2533
|
+
//# sourceMappingURL=index.js.map
|