@dynamoi/mcp 1.0.7 → 1.0.8

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.
@@ -8,7 +8,7 @@ catalog access are authorization capabilities, not evidence of workflow parity.
8
8
  The canonical catalog owner is `getDynamoiToolDefinitions` in
9
9
  `src/server/create-server.ts`; do not maintain a second availability registry here.
10
10
 
11
- The full profile serves 37 tools. The directory profile advertises 24 tools:
11
+ The full profile serves 56 tools: 54 Dynamoi operations plus `search` and `fetch`. The directory profile advertises 24 tools:
12
12
  22 Dynamoi operations and the OpenAI Connector `search` and `fetch` tools.
13
13
  It uses separate directory-only tools for Smart Link description and artist
14
14
  settings updates. The prior combined schema remains callable for compatibility
@@ -25,13 +25,13 @@ work. Everything else is refused.
25
25
 
26
26
  | Family | Existing agent surface | Not equivalent or still missing |
27
27
  | --- | --- | --- |
28
- | Account/artist orientation | Account overview, roster and single-artist reads | Organization invites/roles, full artist settings and account deletion |
29
- | Smart Links | Spotify ingestion, list/detail, description, artist theme/pixels, per-link analytics and theme previews | Full studio/availability controls, every field, aggregate analytics and promotion request workflow |
30
- | Campaigns | List/detail, provider analytics, readiness, existing-asset launch, YouTube draft inspect/discard, pause/resume and eligible single-provider budgets | Draft state machines, source uploads, creative generation/selection/approval, screening, existing targeting edits and multi-provider budgets |
31
- | Analytics | Campaign-provider rollups, growth audit (`dynamoi_get_growth_audit`), tracked playlist analytics (`dynamoi_get_playlist_analytics`), streaming audience analytics (`dynamoi_get_audience_analytics`), per-link analytics and observed YouTube channel data (`dynamoi_get_youtube_channel_data`) | Artist-wide Smart Link aggregation |
32
- | Connections | Meta and YouTube browser OAuth handoffs and status reads | Headless provider login, owner selection or bypass of ownership verification |
33
- | Distribution | Five scored requirements, application state and explicit adult-attested application submission for manual review | Agreement execution, release intake/catalog, rights/splits, royalties, tax, payout and takedown workflows |
34
- | Billing and Shop | Managed billing observations and read-only existing-campaign resume funding breakdown (`dynamoi_get_resume_funding`); unpaid Add campaign funds Checkout creation (`dynamoi_add_campaign_funds`); full-profile Shop quote and unpaid Stripe checkout creation | Managed subscription changes, invoice/funding workflows or agent payment settlement. Shop checkout is not a campaign launch or paid order. |
28
+ | Account/artist orientation | Account overview, roster and single-artist reads | Organization invites/roles, full artist settings and confirmed account profile/deletion bindings |
29
+ | Smart Links | Spotify ingestion, list/detail, description, artist theme/pixels, per-link analytics, full-profile artist-wide link aggregation and theme previews | Full studio/availability controls, every field and promotion request workflow |
30
+ | Campaigns | List/detail, provider analytics, readiness, existing-asset launch, YouTube draft inspect/discard, Smart Campaign draft ad-copy read/save, Smart Campaign generation/source-audio reads, asynchronous generation start/retry/clear (poll with read), generated selection, direct source-audio multipart upload with status/abort and public Dropbox source-MP3 import on a draft, pause/resume and eligible single-provider budgets | Draft state machines, Google Drive import (unsupported: Google API key required), artist approval/submission, screening, existing targeting edits and multi-provider budgets |
31
+ | Analytics | Campaign-provider rollups, growth audit (`dynamoi_get_growth_audit`), tracked playlist analytics (`dynamoi_get_playlist_analytics`), streaming audience analytics (`dynamoi_get_audience_analytics`), per-link analytics and observed YouTube channel data (`dynamoi_get_youtube_channel_data`) | Link unique counts are sums across days and links; requested-window completeness remains unverified |
32
+ | Connections | Meta and YouTube browser OAuth handoffs, status reads and full-profile Action Center revision/tasks/actions | Headless provider login, owner selection or bypass of ownership verification |
33
+ | Distribution | Five scored requirements, application, agreement, scoped catalog and latest release status (`dynamoi_get_distribution_status`, full only), private expiring release preparation handoffs (`dynamoi_prepare_distribution_release`), and explicit adult-attested application submission for manual review; full-profile payee own-USD totals, bounded filtered detail pages, rankings with filtered totals, geographic views and statement export data with statement/earned month axis | Rights and agreement attestation and sending releases to stores stay with the artist in web/app; tax, payout and takedown workflows |
34
+ | Billing and Shop | Managed billing observations including masked payment-method display, and read-only existing-campaign resume funding breakdown (`dynamoi_get_resume_funding`); unpaid Add campaign funds Checkout creation (`dynamoi_add_campaign_funds`); full-profile Shop quote, unpaid Stripe checkout creation and bounded authorized-artist order status/fulfillment reads | Managed subscription changes, invoice/funding workflows or agent payment settlement. Shop checkout is not a campaign launch or paid order. |
35
35
 
36
36
  A real campaign launch, budget edit or pause/resume runs the same shared
37
37
  backend functions as web and mobile. Operations that need automatic daily card
@@ -64,3 +64,13 @@ Do not advertise universal host compatibility without host journey tests.
64
64
  ## Read-only workspace
65
65
 
66
66
  `dynamoi_open_workspace` exposes a bounded authorized artist roster and an MCP Apps HTML resource with global/thread entrypoints. The view reads existing campaign and Smart Link records through individually registered directory read tools. Selected context is explicit and bounded; only the selected record and artist IDs, displayed name/status and qualified observed results are shared, with no billing fields, raw records or spend. Host support is capability-detected. The existing theme-preview resource is retained. Composer mentions, settings, file viewers, events and public host acceptance are not implemented or claimed.
67
+
68
+ ## Catalog and CLI coverage
69
+
70
+ The CLI exposes the current catalog's `dynamoi_` tools as schema-derived commands:
71
+ 49 in full and 22 in directory at this revision. Connector `search`/`fetch` and
72
+ hidden compatibility handlers are not generated CLI commands. A planned or
73
+ partial MCP row is also a CLI gap; CLI transport availability does not close it.
74
+ `tools --query` returns at most ten keyword matches and `help <tool> --json`
75
+ returns the exact selected definition. Both use `tools/list`; there is no second
76
+ command or capability registry. Top-level help works offline.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.0.8] - 2026-10-31
11
+
12
+ ### Security
13
+
14
+ - Pin the standalone package to Zod 4.6.7, including the constrained-collection memory-exhaustion fix. Tool schemas, permissions and consent requirements are unchanged.
15
+
10
16
  ## [1.0.7] - 2026-10-22
11
17
 
12
18
  ### Changed
package/README.md CHANGED
@@ -180,7 +180,7 @@ including what did not work.
180
180
  ## Money and permissions
181
181
 
182
182
  - **Smart Links are free.** Starter is $25/month per artist, and the plan
183
- price becomes ad credit. Campaigns run from $10 a day. See
183
+ includes monthly campaign credit. Campaigns run from $10 a day. See
184
184
  [pricing](https://dynamoi.com/pricing).
185
185
  - **Nothing is charged without consent.** Every launch, budget change or
186
186
  card-funded resume needs the artist to accept the exact consent text, which
@@ -193,8 +193,7 @@ including what did not work.
193
193
  - **Each client gets one of two tool sets**, chosen from the identity it signs
194
194
  in with. Reviewed clients and apps that sign in on your own computer
195
195
  (Claude Code, Codex, Cursor, VS Code, Gemini CLI, OpenClaw and the `dynamoi`
196
- CLI) get All 39 tools. ChatGPT, Claude added from its directory listing and
197
- other web apps get 24 review-safe advertised tools: reads, Smart Links,
196
+ CLI) get All 57 tools. ChatGPT, Claude added from its directory listing and other web apps get 24 review-safe advertised tools: reads, Smart Links,
198
197
  distribution applications and About, with no billing, launches or checkout.
199
198
  - **Sign-in is OAuth 2.1**, and every call still checks its scopes and the
200
199
  user's role for that artist. See
@@ -202,9 +201,7 @@ including what did not work.
202
201
 
203
202
  ## Tools
204
203
 
205
- "Reads" tools are marked read-only. "Changes data" tools write to Dynamoi or
206
- start an action with an outside provider. Full descriptions and input schemas
207
- come from `tools/list`.
204
+ "Reads" tools are read-only; "Changes data" tools write to Dynamoi or start a provider action. Full descriptions and input schemas come from `tools/list`.
208
205
 
209
206
  | Tool | What it does | Access | Catalog |
210
207
  | --- | --- | --- | --- |
@@ -216,12 +213,15 @@ come from `tools/list`.
216
213
  | `search` / `fetch` | ChatGPT deep research search and fetch | Reads | Both |
217
214
  | `dynamoi_list_campaigns` | An artist's campaigns, with type and status filters | Reads | Both |
218
215
  | `dynamoi_get_campaign` | One campaign, with optional analytics, delivery status, and countries | Reads | Both |
219
- | `dynamoi_get_artist_analytics` | Artist-level analytics across campaigns | Reads | Both |
216
+ | `dynamoi_get_artist_analytics` | Artist campaign analytics; full profile also includes qualified artist-wide Smart Link totals and up to ten top links | Reads | Both |
220
217
  | `dynamoi_get_growth_audit` | Spotify growth score, recommendations, listener trends, and playlist reach with status and coverage evidence | Reads | Both |
221
218
  | `dynamoi_get_playlist_analytics` | Tracked playlist placements, reach, and movement with freshness and snapshot dates | Reads | Both |
222
219
  | `dynamoi_get_audience_analytics` | Streaming audience by date range, country, service, and paid/free tier | Reads | Both |
223
220
  | `dynamoi_get_youtube_channel_data` | Observed YouTube channel data by dataset, with coverage and campaign dates | Reads | Both |
221
+ | `dynamoi_onboard_artist` | Search or preview Spotify artists; intake Spotify or YouTube artists with workspace caps and claim checks | Changes data | Full |
224
222
  | `dynamoi_get_platform_status` | Spotify, Meta, and YouTube connection status and setup blockers | Reads | Both |
223
+ | `dynamoi_get_distribution_status` | Application, agreement, scoped catalog and latest release status; artist attestation and store delivery stay in web/app | Reads | Full |
224
+ | `dynamoi_prepare_distribution_release` | Private 30-minute metadata, track and split proposal handoff; the artist reviews and submits on web | Changes data | Full |
225
225
  | `dynamoi_get_distribution_application` | The five distribution requirements and application status | Reads | Both |
226
226
  | `dynamoi_apply_for_distribution` | Submit a distribution application for manual review | Changes data | Both |
227
227
  | `dynamoi_preview_smart_link_themes` | Visual preview of the Smart Link themes | Reads | Both |
@@ -232,9 +232,18 @@ come from `tools/list`.
232
232
  | `dynamoi_update_smart_link_description` | Update one Smart Link's public description | Changes data | Directory |
233
233
  | `dynamoi_update_smart_link_artist_settings` | Update an artist's Smart Link theme or validated pixel settings | Changes data | Directory |
234
234
  | `dynamoi_update_smart_link` | Prior multi-action schema for description or artist settings | Changes data | Full |
235
+ | `dynamoi_smart_link_controls` | Native catalog sync, availability, tracking and promote analytics | Changes data | Full |
235
236
  | `dynamoi_update_smart_link_release_settings` | Update one Smart Link's release video or destination visibility | Changes data | Full |
236
237
  | `dynamoi_update_smart_link_artist_hub_settings` | Update an artist's hub introduction, official profile links or service order | Changes data | Full |
237
- | `dynamoi_get_billing` | Billing status, credit balance, and promo limits | Reads | Full |
238
+ | `dynamoi_get_action_center` | Artist Action Center revision, task states and distinct actions | Reads | Full |
239
+ | `dynamoi_get_earnings` | Authenticated payee own-USD earnings, month axis, filtered detail pages, rankings, geographic views and statement export data; no payout/tax authority | Reads | Full |
240
+ | `dynamoi_get_team` | Organization members and pending invitations; organization authority required. | Reads | Full |
241
+ | `dynamoi_get_artist_billing_country` | Read current billing country; not tax residency. | Reads | Full |
242
+ | `dynamoi_manage_team` | Change organization member roles, remove members or revoke pending invitations with web authority and owner protections. | Changes data | Full |
243
+ | `dynamoi_get_audit_log` | Sanitized artist/organization audit events with scope-bound cursors, plus your 12 recent account activity entries. | Reads | Full |
244
+ | `dynamoi_claim_referral_code` | Claim or change your own referral code. Accept program terms yourself in the app or web. | Changes data | Full |
245
+ | `dynamoi_get_referrals` | Your referral snapshot; no attribution or commission writes. Pending and available amounts are not approved or paid payouts. | Reads | Full |
246
+ | `dynamoi_get_billing` | Billing status, credit balance, promo limits and masked payment-method display | Reads | Full |
238
247
  | `dynamoi_add_campaign_funds` | Create the unpaid Add campaign funds Stripe Checkout link, after the user approves the amount and currency | Changes data | Full |
239
248
  | `dynamoi_get_resume_funding` | Campaign resume-funding breakdown, refusal, and consent requirements | Reads | Full |
240
249
  | `dynamoi_list_available_countries` | Countries a Smart Campaign or YouTube campaign can target | Reads | Full |
@@ -242,10 +251,16 @@ come from `tools/list`.
242
251
  | `dynamoi_list_media_assets` | Uploaded images and videos that a launch can reuse | Reads | Full |
243
252
  | `dynamoi_launch_campaign` | Launch a Smart Campaign or YouTube campaign | Changes data | Full |
244
253
  | `dynamoi_update_campaign` | Pause, resume, or change a campaign's budget or end date | Changes data | Full |
254
+ | `dynamoi_smart_campaign_ad_copy` | Read/save Smart Campaign creation-draft copy with shared validation and revision checks; never submits or launches | Changes data | Full |
255
+ | `dynamoi_manage_smart_campaign_creative` | All 9 native draft creative operations: read generation/source audio, start/retry/clear asynchronous generation (poll with read), select creatives, and start/status/complete/abort direct MP3 multipart upload or import_source_audio from a public Dropbox share link on a draft; Google Drive unsupported (Google API key required); no approval or submission | Changes data | Full |
245
256
  | `dynamoi_manage_youtube_draft` | Inspect an interrupted YouTube launch draft, or discard it when the user asks | Changes data | Full |
246
257
  | `dynamoi_start_meta_connection` | Start the Facebook Page and Instagram connection in the browser | Changes data | Full |
247
258
  | `dynamoi_start_youtube_channel_link` | Start the YouTube channel connection in the browser | Changes data | Full |
248
259
  | `dynamoi_contact_support` | Send a support request or feedback to Dynamoi | Changes data | Full |
260
+ | `dynamoi_delete_account` | Preview eligibility and explicitly start irreversible account deletion; cleanup is asynchronous and required records may be retained | Changes data | Full |
261
+ | `dynamoi_update_account_profile` | Preview or explicitly confirm a display name or preferred language change | Changes data | Full |
262
+ | `dynamoi_set_artist_billing_country` | Preview or explicitly confirm an artist checkout-currency suggestion country; existing currency stays fixed | Changes data | Full |
263
+ | `dynamoi_shop_list_orders` | Read your authorized artist’s newest Shop order status and fulfillment timestamps | Reads | Full |
249
264
  | `dynamoi_shop_get_quote` | Estimate a one-off YouTube promotion | Reads | Full |
250
265
  | `dynamoi_shop_create_checkout` | Create an unpaid Stripe Checkout link for that promotion | Changes data | Full |
251
266
 
@@ -6,18 +6,29 @@ export declare const DYNAMOI_MCP_TOOL_SCOPES: {
6
6
  readonly dynamoi_contact_support: readonly ["dynamoi:read"];
7
7
  readonly dynamoi_create_smart_link_from_spotify: readonly ["dynamoi:read", "dynamoi:smart_links.write"];
8
8
  readonly dynamoi_create_smart_links_from_spotify_artist: readonly ["dynamoi:read", "dynamoi:smart_links.write"];
9
+ readonly dynamoi_delete_account: readonly ["dynamoi:read", "dynamoi:mcp.full"];
9
10
  readonly dynamoi_get_account_overview: readonly ["dynamoi:read"];
11
+ readonly dynamoi_get_action_center: readonly ["dynamoi:read", "dynamoi:platform.read"];
10
12
  readonly dynamoi_get_artist_analytics: readonly ["dynamoi:read"];
13
+ readonly dynamoi_onboard_artist: readonly ["dynamoi:read", "dynamoi:mcp.full"];
11
14
  readonly dynamoi_get_audience_analytics: readonly ["dynamoi:read"];
15
+ readonly dynamoi_get_artist_billing_country: readonly ["dynamoi:read", "dynamoi:mcp.full"];
16
+ readonly dynamoi_get_audit_log: readonly ["dynamoi:read"];
12
17
  readonly dynamoi_get_billing: readonly ["dynamoi:read", "dynamoi:billing.read"];
13
18
  readonly dynamoi_get_campaign: readonly ["dynamoi:read"];
14
19
  readonly dynamoi_get_campaign_readiness: readonly ["dynamoi:read"];
15
20
  readonly dynamoi_get_distribution_application: readonly ["dynamoi:read", "dynamoi:distribution.read"];
21
+ readonly dynamoi_get_distribution_status: readonly ["dynamoi:read", "dynamoi:distribution.read", "dynamoi:mcp.full"];
22
+ readonly dynamoi_get_earnings: readonly ["dynamoi:read", "dynamoi:distribution.read"];
16
23
  readonly dynamoi_get_growth_audit: readonly ["dynamoi:read"];
17
24
  readonly dynamoi_get_platform_status: readonly ["dynamoi:read", "dynamoi:platform.read"];
25
+ readonly dynamoi_prepare_distribution_release: readonly ["dynamoi:read", "dynamoi:distribution.apply", "dynamoi:mcp.full"];
18
26
  readonly dynamoi_get_playlist_analytics: readonly ["dynamoi:read"];
27
+ readonly dynamoi_claim_referral_code: readonly ["dynamoi:read", "dynamoi:mcp.full"];
28
+ readonly dynamoi_get_referrals: readonly ["dynamoi:read"];
19
29
  readonly dynamoi_get_resume_funding: readonly ["dynamoi:read", "dynamoi:billing.read"];
20
30
  readonly dynamoi_get_smart_link: readonly ["dynamoi:read"];
31
+ readonly dynamoi_get_team: readonly ["dynamoi:read"];
21
32
  readonly dynamoi_get_youtube_channel_data: readonly ["dynamoi:read"];
22
33
  readonly dynamoi_launch_campaign: readonly ["dynamoi:read", "dynamoi:campaign.launch"];
23
34
  readonly dynamoi_list_artists: readonly ["dynamoi:read"];
@@ -25,14 +36,21 @@ export declare const DYNAMOI_MCP_TOOL_SCOPES: {
25
36
  readonly dynamoi_list_campaigns: readonly ["dynamoi:read"];
26
37
  readonly dynamoi_list_media_assets: readonly ["dynamoi:read"];
27
38
  readonly dynamoi_list_smart_links: readonly ["dynamoi:read"];
39
+ readonly dynamoi_manage_smart_campaign_creative: readonly ["dynamoi:read", "dynamoi:campaign.write"];
40
+ readonly dynamoi_manage_team: readonly ["dynamoi:read", "dynamoi:mcp.full"];
28
41
  readonly dynamoi_manage_youtube_draft: readonly ["dynamoi:read", "dynamoi:campaign.write"];
29
42
  readonly dynamoi_open_workspace: readonly ["dynamoi:read"];
30
43
  readonly dynamoi_preview_smart_link_themes: readonly ["dynamoi:read"];
31
44
  readonly dynamoi_search: readonly ["dynamoi:read"];
45
+ readonly dynamoi_set_artist_billing_country: readonly ["dynamoi:read", "dynamoi:mcp.full"];
32
46
  readonly dynamoi_shop_create_checkout: readonly ["dynamoi:read", "dynamoi:mcp.full"];
33
47
  readonly dynamoi_shop_get_quote: readonly ["dynamoi:read", "dynamoi:mcp.full"];
48
+ readonly dynamoi_shop_list_orders: readonly ["dynamoi:read", "dynamoi:mcp.full"];
49
+ readonly dynamoi_smart_campaign_ad_copy: readonly ["dynamoi:read", "dynamoi:campaign.write"];
50
+ readonly dynamoi_smart_link_controls: readonly ["dynamoi:read", "dynamoi:smart_links.write"];
34
51
  readonly dynamoi_start_meta_connection: readonly ["dynamoi:read", "dynamoi:platform.write"];
35
52
  readonly dynamoi_start_youtube_channel_link: readonly ["dynamoi:read", "dynamoi:platform.write"];
53
+ readonly dynamoi_update_account_profile: readonly ["dynamoi:read", "dynamoi:mcp.full"];
36
54
  readonly dynamoi_update_campaign: readonly ["dynamoi:read", "dynamoi:campaign.write"];
37
55
  readonly dynamoi_update_smart_link: readonly ["dynamoi:read", "dynamoi:smart_links.write"];
38
56
  readonly dynamoi_update_smart_link_artist_hub_settings: readonly ["dynamoi:read", "dynamoi:smart_links.write"];
@@ -1,3 +1,366 @@
1
+ // src/server/audience-analytics.generated.ts
2
+ import { z } from "zod";
3
+ var MobileAudienceAnalyticsResponseSchema = z.object({
4
+ byCountry: z.array(z.object({
5
+ countryCode: z.string().min(1),
6
+ fans: z.number().int().nonnegative()
7
+ })),
8
+ byService: z.array(z.object({
9
+ fans: z.number().int().nonnegative(),
10
+ free: z.number().int().nonnegative(),
11
+ paid: z.number().int().nonnegative(),
12
+ service: z.enum(["spotify", "apple_music", "other"])
13
+ })),
14
+ daily: z.array(z.object({
15
+ date: z.string(),
16
+ fans: z.number().int().nonnegative()
17
+ })),
18
+ dataThroughDate: z.string().nullable(),
19
+ range: z.enum(["7d", "30d", "90d"]),
20
+ totals: z.object({
21
+ fans: z.number().int().nonnegative(),
22
+ free: z.number().int().nonnegative(),
23
+ paid: z.number().int().nonnegative()
24
+ })
25
+ });
26
+ var AUDIENCE_ANALYTICS_CONTRACT = {
27
+ capabilityId: "ios_audience_analytics",
28
+ kind: "query",
29
+ mcp: {
30
+ definition: {
31
+ description: "Use this when the user asks about an artist's streaming audience by country, service, paid/free tier, or daily trend. Choose range=7d, 30d, or 90d; it defaults to 30d. The response comes from audience analytics and preserves the requested date range. If the source is temporarily unavailable, report that instead of treating it as zero audience.",
32
+ destructiveHint: false,
33
+ name: "dynamoi_get_audience_analytics",
34
+ openWorldHint: false,
35
+ profiles: { directory: "advertised", full: "advertised" },
36
+ readOnlyHint: true,
37
+ schema: z.object({
38
+ artistId: z.string().uuid(),
39
+ range: z.enum(["7d", "30d", "90d"]).default("30d")
40
+ }).strict(),
41
+ title: "Get Audience Analytics"
42
+ },
43
+ directoryReason: "Read-only streaming audience analytics are directory-safe.",
44
+ scopes: ["dynamoi:read"]
45
+ },
46
+ mobile: {
47
+ auth: "bearer",
48
+ method: "GET",
49
+ operationId: "getMobileArtistAudienceAnalytics",
50
+ paramsSchema: z.object({ artistId: z.string().trim().min(1) }),
51
+ path: "/api/mobile/artists/{artistId}/audience-analytics",
52
+ platforms: ["android", "ios"],
53
+ querySchema: z.object({
54
+ range: z.enum(["7d", "30d", "90d"]).nullable().default("30d")
55
+ }),
56
+ responseSchema: MobileAudienceAnalyticsResponseSchema
57
+ },
58
+ version: 1
59
+ };
60
+
61
+ // src/server/billing-country.generated.ts
62
+ import { z as z2 } from "zod";
63
+ var mobile = {
64
+ auth: "bearer",
65
+ paramsSchema: z2.object({ artistId: z2.string().trim().min(1) }),
66
+ path: "/api/mobile/artists/{artistId}/billing-country",
67
+ platforms: ["android", "ios"],
68
+ responseSchema: z2.object({ countryCode: z2.string().nullable() })
69
+ };
70
+ var mcp = {
71
+ directoryReason: "Account management is full-profile only.",
72
+ scopes: ["dynamoi:read", "dynamoi:mcp.full"]
73
+ };
74
+ var profiles = { directory: "excluded", full: "advertised" };
75
+ var journeys = ["billing-country", "billing-country-saved"];
76
+ var BILLING_COUNTRY_READ_CONTRACT = {
77
+ capabilityId: "billing_country",
78
+ journeys,
79
+ kind: "query",
80
+ mcp: {
81
+ ...mcp,
82
+ definition: {
83
+ description: "Read the artist billing country. Existing commercial currency stays fixed. This is not tax residency. Full profile only.",
84
+ destructiveHint: false,
85
+ name: "dynamoi_get_artist_billing_country",
86
+ openWorldHint: false,
87
+ profiles,
88
+ readOnlyHint: true,
89
+ schema: z2.object({ artistId: z2.string().uuid() }).strict(),
90
+ title: "Get Artist Billing Country"
91
+ }
92
+ },
93
+ mobile: {
94
+ ...mobile,
95
+ method: "GET",
96
+ operationId: "getMobileArtistBillingCountry"
97
+ },
98
+ version: 1
99
+ };
100
+ var BILLING_COUNTRY_SET_CONTRACT = {
101
+ capabilityId: "billing_country",
102
+ journeys,
103
+ kind: "command",
104
+ mcp: {
105
+ ...mcp,
106
+ definition: {
107
+ description: "Preview an artist checkout-currency suggestion country. Existing commercial currency stays fixed. Obtain explicit confirmation and echo expectedCountryCode with confirm=true.",
108
+ destructiveHint: true,
109
+ name: "dynamoi_set_artist_billing_country",
110
+ openWorldHint: false,
111
+ profiles,
112
+ readOnlyHint: false,
113
+ schema: z2.object({
114
+ artistId: z2.string().uuid(),
115
+ confirm: z2.boolean().optional(),
116
+ countryCode: z2.string(),
117
+ expectedCountryCode: z2.string().nullable()
118
+ }).strict(),
119
+ title: "Set Artist Billing Country"
120
+ }
121
+ },
122
+ mobile: {
123
+ ...mobile,
124
+ bodySchema: z2.object({ countryCode: z2.string().trim().min(1) }),
125
+ idempotent: true,
126
+ method: "PATCH",
127
+ operationId: "patchMobileArtistBillingCountry"
128
+ },
129
+ version: 1
130
+ };
131
+
132
+ // src/server/growth-audit.generated.ts
133
+ import { z as z3 } from "zod";
134
+ var MobileSpotifyGrowthAuditStatusSchema = z3.enum([
135
+ "available",
136
+ "building",
137
+ "unavailable",
138
+ "stale"
139
+ ]);
140
+ var MobileSpotifyGrowthAuditArtistSchema = z3.object({
141
+ artistName: z3.string(),
142
+ externalSpotifyUrl: z3.url().nullable(),
143
+ imageUrl: z3.url().nullable(),
144
+ spotifyArtistId: z3.string().nullable()
145
+ });
146
+ var MobileSpotifyGrowthAuditMarketSummarySchema = z3.object({
147
+ chartEntries: z3.number().int().nonnegative(),
148
+ currentPlaylistCount: z3.number().int().nonnegative().nullable(),
149
+ monthlyListenerChange: z3.number().nullable(),
150
+ monthlyListenerPercentChange: z3.number().nullable(),
151
+ monthlyListeners: z3.number().int().nonnegative().nullable(),
152
+ peerArtists: z3.array(z3.string()),
153
+ playlistReach: z3.number().int().nonnegative().nullable(),
154
+ playlistReachPercentChange: z3.number().nullable(),
155
+ radioSpins: z3.number().int().nonnegative(),
156
+ radioStations: z3.number().int().nonnegative(),
157
+ shortVideos: z3.number().int().nonnegative(),
158
+ topMarkets: z3.array(z3.object({
159
+ countryCode: z3.string(),
160
+ countryName: z3.string().nullable(),
161
+ value: z3.number().nullable()
162
+ })),
163
+ upcomingEvents: z3.number().int().nonnegative()
164
+ });
165
+ var MobileSpotifyGrowthAuditVisualizationsSchema = z3.object({
166
+ listenerTrend: z3.array(z3.object({
167
+ date: z3.string(),
168
+ value: z3.number()
169
+ })),
170
+ playlistReachTrend: z3.array(z3.object({
171
+ date: z3.string(),
172
+ playlistCount: z3.number().nullable(),
173
+ value: z3.number()
174
+ })),
175
+ topCities: z3.array(z3.object({
176
+ city: z3.string(),
177
+ countryCode: z3.string(),
178
+ value: z3.number()
179
+ })),
180
+ topPlaylists: z3.array(z3.object({
181
+ artworkUrl: z3.string().nullable(),
182
+ currentPosition: z3.number().int().positive().nullable(),
183
+ name: z3.string(),
184
+ peakPosition: z3.number().int().positive().nullable(),
185
+ songName: z3.string().nullable(),
186
+ subscribers: z3.number().int().nonnegative(),
187
+ type: z3.string().nullable()
188
+ }))
189
+ });
190
+ var MobileSpotifyGrowthAuditSchema = z3.object({
191
+ biggestGapId: z3.string().nullable(),
192
+ confidenceLabel: z3.enum(["High", "Medium", "Low"]),
193
+ confidenceScore: z3.number().int().min(0).max(100),
194
+ coverageLabel: z3.string(),
195
+ growthScore: z3.number().int().min(0).max(100),
196
+ headlineVerdict: z3.object({
197
+ body: z3.string(),
198
+ label: z3.string(),
199
+ tone: z3.string()
200
+ }).nullable(),
201
+ latestReleaseDate: z3.string().nullable(),
202
+ limitations: z3.array(z3.string()),
203
+ marketSummary: MobileSpotifyGrowthAuditMarketSummarySchema,
204
+ primaryLever: z3.object({
205
+ body: z3.string(),
206
+ id: z3.string(),
207
+ label: z3.string(),
208
+ recommendedAction: z3.string()
209
+ }).nullable(),
210
+ recommendations: z3.array(z3.object({
211
+ body: z3.string(),
212
+ label: z3.string(),
213
+ tone: z3.enum(["ready", "watch", "neutral"])
214
+ })),
215
+ releaseCount: z3.number().int().nonnegative(),
216
+ stageBody: z3.string(),
217
+ stageLabel: z3.string(),
218
+ syntheticDemo: z3.boolean().optional(),
219
+ visualizations: MobileSpotifyGrowthAuditVisualizationsSchema
220
+ });
221
+ var MobileSpotifyGrowthAuditResponseSchema = z3.object({
222
+ artist: MobileSpotifyGrowthAuditArtistSchema,
223
+ audit: MobileSpotifyGrowthAuditSchema.nullable(),
224
+ dataThroughDate: z3.string().nullable(),
225
+ generatedAtIso: z3.iso.datetime(),
226
+ metricDataThroughDates: z3.object({
227
+ currentPlaylists: z3.string().nullable(),
228
+ monthlyListeners: z3.string().nullable(),
229
+ playlistReach: z3.string().nullable()
230
+ }),
231
+ nextAction: z3.object({
232
+ kind: z3.enum(["promote_web_handoff", "create_smart_link", "none"]),
233
+ label: z3.string(),
234
+ webPath: z3.string().nullable()
235
+ }),
236
+ status: MobileSpotifyGrowthAuditStatusSchema
237
+ });
238
+ var partial = {
239
+ reason: "Shared verified-context owner; frozen observed, unknown and explicitly synthetic feature receipts are still required on both native apps. Installed native clients retain live observations and never opt into the MCP sample.",
240
+ status: "partial"
241
+ };
242
+ var GROWTH_AUDIT_CONTRACT = {
243
+ capabilityId: "growth_audit",
244
+ kind: "query",
245
+ mcp: {
246
+ definition: {
247
+ description: "Use this when the user asks for an artist's Spotify monthly listeners, listener growth over time, growth audit or score, playlist reach, or growth recommendations. The response carries its status, coverage dates, and limitations; preserve unavailable or stale status and do not treat a missing metric as zero. This is Spotify and market insight data, not paid campaign performance.",
248
+ destructiveHint: false,
249
+ name: "dynamoi_get_growth_audit",
250
+ openWorldHint: false,
251
+ profiles: { directory: "advertised", full: "advertised" },
252
+ readOnlyHint: true,
253
+ schema: z3.object({ artistId: z3.string().uuid() }).strict(),
254
+ title: "Get Spotify Growth Audit"
255
+ },
256
+ directoryReason: "Read-only growth audit insights are directory-safe.",
257
+ scopes: ["dynamoi:read"]
258
+ },
259
+ mobile: {
260
+ auth: "bearer",
261
+ method: "GET",
262
+ operationId: "getMobileArtistGrowthAudit",
263
+ paramsSchema: z3.object({ artistId: z3.string().trim().min(1) }),
264
+ path: "/api/mobile/artists/{artistId}/growth-audit",
265
+ platforms: ["android", "ios"],
266
+ responseSchema: MobileSpotifyGrowthAuditResponseSchema
267
+ },
268
+ parity: {
269
+ android: partial,
270
+ cli: partial,
271
+ ios: partial,
272
+ mcp: partial,
273
+ web: partial
274
+ },
275
+ version: 1
276
+ };
277
+
278
+ // src/server/playlist-analytics.generated.ts
279
+ import { z as z4 } from "zod";
280
+ var MobilePlaylistMovementStateSchema = z4.enum([
281
+ "empty",
282
+ "single_snapshot",
283
+ "rich"
284
+ ]);
285
+ var MobilePlaylistTrendPointSchema = z4.object({
286
+ date: z4.string(),
287
+ playlistCount: z4.number().int().nonnegative().nullable(),
288
+ value: z4.number().int().nonnegative()
289
+ });
290
+ var MobilePlaylistRowSchema = z4.object({
291
+ currentPosition: z4.number().int().positive().nullable(),
292
+ entryDate: z4.string().nullable(),
293
+ peakPosition: z4.number().int().positive().nullable(),
294
+ platform: z4.string(),
295
+ playlistArtworkUrl: z4.url().nullable(),
296
+ playlistExternalUrl: z4.url().nullable(),
297
+ playlistId: z4.string(),
298
+ playlistName: z4.string(),
299
+ songName: z4.string().nullable(),
300
+ subscriberChange: z4.number().int().nullable(),
301
+ subscribers: z4.number().int().nonnegative(),
302
+ typeLabel: z4.string()
303
+ });
304
+ var MobilePlaylistMovementEventSchema = z4.object({
305
+ ...MobilePlaylistRowSchema.shape,
306
+ kind: z4.enum(["add", "drop", "position", "subscriber"]),
307
+ positionChange: z4.number().int().nullable(),
308
+ previousPosition: z4.number().int().positive().nullable(),
309
+ previousSubscribers: z4.number().int().nonnegative().nullable(),
310
+ subscriberPercentChange: z4.number().nullable()
311
+ });
312
+ var MobilePlaylistAnalyticsResponseSchema = z4.object({
313
+ freshnessLabel: z4.enum(["Updated daily", "Updated weekly"]),
314
+ kpis: z4.object({
315
+ monthlyListeners: z4.number().int().nonnegative().nullable(),
316
+ monthlyListenersChange: z4.number().int().nullable(),
317
+ playlistCount: z4.number().int().nonnegative(),
318
+ totalReach: z4.number().int().nonnegative().nullable(),
319
+ totalReachChange: z4.number().int().nullable()
320
+ }),
321
+ lastUpdatedAtUTC: z4.iso.datetime().nullable(),
322
+ latestDateUTC: z4.string().nullable(),
323
+ movement: z4.object({
324
+ adds: z4.array(MobilePlaylistMovementEventSchema),
325
+ drops: z4.array(MobilePlaylistMovementEventSchema),
326
+ positionMoves: z4.array(MobilePlaylistMovementEventSchema),
327
+ subscriberMoves: z4.array(MobilePlaylistMovementEventSchema),
328
+ topMovers: z4.array(MobilePlaylistMovementEventSchema)
329
+ }),
330
+ playlists: z4.array(MobilePlaylistRowSchema),
331
+ reachTrend: z4.array(MobilePlaylistTrendPointSchema),
332
+ state: MobilePlaylistMovementStateSchema
333
+ });
334
+ var PlaylistAnalyticsMcpInputSchema = z4.object({ artistId: z4.string().uuid() }).strict();
335
+ var PLAYLIST_ANALYTICS_CONTRACT = {
336
+ capabilityId: "playlist_analytics",
337
+ kind: "query",
338
+ mcp: {
339
+ definition: {
340
+ description: "Use this when the user asks about an artist's tracked playlist placements, reach, or playlist movement. The response includes freshness and snapshot dates with the playlist and movement rows. These observed placements are not attributed to a paid campaign.",
341
+ destructiveHint: false,
342
+ name: "dynamoi_get_playlist_analytics",
343
+ openWorldHint: false,
344
+ profiles: { directory: "advertised", full: "advertised" },
345
+ readOnlyHint: true,
346
+ schema: PlaylistAnalyticsMcpInputSchema,
347
+ title: "Get Playlist Analytics"
348
+ },
349
+ directoryReason: "Read-only playlist analytics are directory-safe.",
350
+ scopes: ["dynamoi:read"]
351
+ },
352
+ mobile: {
353
+ auth: "bearer",
354
+ method: "GET",
355
+ operationId: "getMobileArtistPlaylistAnalytics",
356
+ paramsSchema: z4.object({ artistId: z4.string().trim().min(1) }),
357
+ path: "/api/mobile/artists/{artistId}/playlist-analytics",
358
+ platforms: ["android", "ios"],
359
+ responseSchema: MobilePlaylistAnalyticsResponseSchema
360
+ },
361
+ version: 1
362
+ };
363
+
1
364
  // src/auth/protected-resource.ts
2
365
  var DYNAMOI_BETTER_AUTH_MCP_SCOPES = [
3
366
  "dynamoi:read",
@@ -27,9 +390,14 @@ var DYNAMOI_MCP_TOOL_SCOPES = {
27
390
  "dynamoi:read",
28
391
  "dynamoi:smart_links.write"
29
392
  ],
393
+ dynamoi_delete_account: ["dynamoi:read", "dynamoi:mcp.full"],
30
394
  dynamoi_get_account_overview: ["dynamoi:read"],
395
+ dynamoi_get_action_center: ["dynamoi:read", "dynamoi:platform.read"],
31
396
  dynamoi_get_artist_analytics: ["dynamoi:read"],
32
- dynamoi_get_audience_analytics: ["dynamoi:read"],
397
+ dynamoi_onboard_artist: ["dynamoi:read", "dynamoi:mcp.full"],
398
+ [AUDIENCE_ANALYTICS_CONTRACT.mcp.definition.name]: AUDIENCE_ANALYTICS_CONTRACT.mcp.scopes,
399
+ [BILLING_COUNTRY_READ_CONTRACT.mcp.definition.name]: BILLING_COUNTRY_READ_CONTRACT.mcp.scopes,
400
+ dynamoi_get_audit_log: ["dynamoi:read"],
33
401
  dynamoi_get_billing: ["dynamoi:read", "dynamoi:billing.read"],
34
402
  dynamoi_get_campaign: ["dynamoi:read"],
35
403
  dynamoi_get_campaign_readiness: ["dynamoi:read"],
@@ -37,11 +405,25 @@ var DYNAMOI_MCP_TOOL_SCOPES = {
37
405
  "dynamoi:read",
38
406
  "dynamoi:distribution.read"
39
407
  ],
40
- dynamoi_get_growth_audit: ["dynamoi:read"],
408
+ dynamoi_get_distribution_status: [
409
+ "dynamoi:read",
410
+ "dynamoi:distribution.read",
411
+ "dynamoi:mcp.full"
412
+ ],
413
+ dynamoi_get_earnings: ["dynamoi:read", "dynamoi:distribution.read"],
414
+ [GROWTH_AUDIT_CONTRACT.mcp.definition.name]: GROWTH_AUDIT_CONTRACT.mcp.scopes,
41
415
  dynamoi_get_platform_status: ["dynamoi:read", "dynamoi:platform.read"],
42
- dynamoi_get_playlist_analytics: ["dynamoi:read"],
416
+ dynamoi_prepare_distribution_release: [
417
+ "dynamoi:read",
418
+ "dynamoi:distribution.apply",
419
+ "dynamoi:mcp.full"
420
+ ],
421
+ [PLAYLIST_ANALYTICS_CONTRACT.mcp.definition.name]: PLAYLIST_ANALYTICS_CONTRACT.mcp.scopes,
422
+ dynamoi_claim_referral_code: ["dynamoi:read", "dynamoi:mcp.full"],
423
+ dynamoi_get_referrals: ["dynamoi:read"],
43
424
  dynamoi_get_resume_funding: ["dynamoi:read", "dynamoi:billing.read"],
44
425
  dynamoi_get_smart_link: ["dynamoi:read"],
426
+ dynamoi_get_team: ["dynamoi:read"],
45
427
  dynamoi_get_youtube_channel_data: ["dynamoi:read"],
46
428
  dynamoi_launch_campaign: ["dynamoi:read", "dynamoi:campaign.launch"],
47
429
  dynamoi_list_artists: ["dynamoi:read"],
@@ -49,17 +431,27 @@ var DYNAMOI_MCP_TOOL_SCOPES = {
49
431
  dynamoi_list_campaigns: ["dynamoi:read"],
50
432
  dynamoi_list_media_assets: ["dynamoi:read"],
51
433
  dynamoi_list_smart_links: ["dynamoi:read"],
434
+ dynamoi_manage_smart_campaign_creative: [
435
+ "dynamoi:read",
436
+ "dynamoi:campaign.write"
437
+ ],
438
+ dynamoi_manage_team: ["dynamoi:read", "dynamoi:mcp.full"],
52
439
  dynamoi_manage_youtube_draft: ["dynamoi:read", "dynamoi:campaign.write"],
53
440
  dynamoi_open_workspace: ["dynamoi:read"],
54
441
  dynamoi_preview_smart_link_themes: ["dynamoi:read"],
55
442
  dynamoi_search: ["dynamoi:read"],
443
+ [BILLING_COUNTRY_SET_CONTRACT.mcp.definition.name]: BILLING_COUNTRY_SET_CONTRACT.mcp.scopes,
56
444
  dynamoi_shop_create_checkout: ["dynamoi:read", "dynamoi:mcp.full"],
57
445
  dynamoi_shop_get_quote: ["dynamoi:read", "dynamoi:mcp.full"],
446
+ dynamoi_shop_list_orders: ["dynamoi:read", "dynamoi:mcp.full"],
447
+ dynamoi_smart_campaign_ad_copy: ["dynamoi:read", "dynamoi:campaign.write"],
448
+ dynamoi_smart_link_controls: ["dynamoi:read", "dynamoi:smart_links.write"],
58
449
  dynamoi_start_meta_connection: ["dynamoi:read", "dynamoi:platform.write"],
59
450
  dynamoi_start_youtube_channel_link: [
60
451
  "dynamoi:read",
61
452
  "dynamoi:platform.write"
62
453
  ],
454
+ dynamoi_update_account_profile: ["dynamoi:read", "dynamoi:mcp.full"],
63
455
  dynamoi_update_campaign: ["dynamoi:read", "dynamoi:campaign.write"],
64
456
  dynamoi_update_smart_link: ["dynamoi:read", "dynamoi:smart_links.write"],
65
457
  dynamoi_update_smart_link_artist_hub_settings: [