@dynamoi/mcp 1.0.1 → 1.0.2

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.
Files changed (73) hide show
  1. package/CAPABILITY_PARITY.md +20 -13
  2. package/CHANGELOG.md +105 -0
  3. package/README.md +33 -4
  4. package/dist/auth/protected-resource.d.ts +11 -1
  5. package/dist/auth/protected-resource.js +106 -11
  6. package/dist/consent.d.ts +83 -4
  7. package/dist/consent.js +61 -11
  8. package/dist/flow-types.d.ts +73 -3
  9. package/dist/index.d.ts +14 -6
  10. package/dist/index.js +2571 -616
  11. package/dist/readiness-types.d.ts +21 -1
  12. package/dist/server/about.d.ts +17 -14
  13. package/dist/server/account-schema.generated.d.ts +62 -0
  14. package/dist/server/channel-results-schema.d.ts +104 -0
  15. package/dist/server/create-server.d.ts +40 -30
  16. package/dist/server/distribution-tools.d.ts +30 -23
  17. package/dist/server/messaging.d.ts +0 -1
  18. package/dist/server/openai-tools.d.ts +30 -23
  19. package/dist/server/output-schemas.d.ts +367 -75
  20. package/dist/server/shop-tools.d.ts +36 -29
  21. package/dist/server/smart-link-tools.d.ts +511 -73
  22. package/dist/server/tools.d.ts +740 -220
  23. package/dist/server/workflow-tools.d.ts +97 -86
  24. package/dist/server/workspace/data.d.ts +67 -0
  25. package/dist/server/workspace/tool.d.ts +82 -0
  26. package/dist/server/youtube-channel-data-schema.d.ts +105 -0
  27. package/dist/server/youtube-strategy-guide.d.ts +103 -0
  28. package/dist/transport/http.d.ts +0 -1
  29. package/dist/types.d.ts +131 -12
  30. package/dist/version.d.ts +0 -1
  31. package/dist/youtube-metrics.d.ts +135 -0
  32. package/dist/youtube-metrics.js +114 -0
  33. package/package.json +48 -12
  34. package/server.json +1 -1
  35. package/dist/auth/protected-resource.d.ts.map +0 -1
  36. package/dist/auth/protected-resource.js.map +0 -9
  37. package/dist/chunk-3htwe57a.js +0 -85
  38. package/dist/chunk-3htwe57a.js.map +0 -10
  39. package/dist/chunk-n5xmtwjj.js +0 -9
  40. package/dist/chunk-n5xmtwjj.js.map +0 -10
  41. package/dist/consent.d.ts.map +0 -1
  42. package/dist/consent.js.map +0 -9
  43. package/dist/flow-types.d.ts.map +0 -1
  44. package/dist/index.d.ts.map +0 -1
  45. package/dist/index.js.map +0 -28
  46. package/dist/readiness-types.d.ts.map +0 -1
  47. package/dist/server/about.d.ts.map +0 -1
  48. package/dist/server/create-server.d.ts.map +0 -1
  49. package/dist/server/distribution-tools.d.ts.map +0 -1
  50. package/dist/server/instructions.d.ts +0 -3
  51. package/dist/server/instructions.d.ts.map +0 -1
  52. package/dist/server/messaging.d.ts.map +0 -1
  53. package/dist/server/onboarding-tool-definitions.d.ts +0 -106
  54. package/dist/server/onboarding-tool-definitions.d.ts.map +0 -1
  55. package/dist/server/openai-tools.d.ts.map +0 -1
  56. package/dist/server/output-schemas.d.ts.map +0 -1
  57. package/dist/server/playbook-resources.d.ts +0 -3
  58. package/dist/server/playbook-resources.d.ts.map +0 -1
  59. package/dist/server/prompts.d.ts +0 -3
  60. package/dist/server/prompts.d.ts.map +0 -1
  61. package/dist/server/resources.d.ts +0 -4
  62. package/dist/server/resources.d.ts.map +0 -1
  63. package/dist/server/shared-schemas.d.ts +0 -14
  64. package/dist/server/shared-schemas.d.ts.map +0 -1
  65. package/dist/server/shop-tools.d.ts.map +0 -1
  66. package/dist/server/smart-link-theme-preview.d.ts +0 -73
  67. package/dist/server/smart-link-theme-preview.d.ts.map +0 -1
  68. package/dist/server/smart-link-tools.d.ts.map +0 -1
  69. package/dist/server/tools.d.ts.map +0 -1
  70. package/dist/server/workflow-tools.d.ts.map +0 -1
  71. package/dist/transport/http.d.ts.map +0 -1
  72. package/dist/types.d.ts.map +0 -1
  73. package/dist/version.d.ts.map +0 -1
package/dist/types.d.ts CHANGED
@@ -17,9 +17,12 @@ export type ResultEnvelope<T> = {
17
17
  field?: string;
18
18
  prerequisite?: string;
19
19
  nextAction?: ResultNextAction;
20
+ draftId?: string;
21
+ failureStage?: string;
22
+ screeningResult?: string;
20
23
  };
21
24
  /** Stable, safe error identifiers that let clients choose bounded recovery. */
22
- export type ResultErrorCode = "ACCOUNT_READ_ONLY" | "INVALID_SPOTIFY_SOURCE" | "CAPABILITY_REQUIRED" | "INSUFFICIENT_SCOPE" | "STATE_CONFLICT" | "QUOTE_CHANGED" | "RATE_LIMITED" | "OUTPUT_INVALID" | "UNKNOWN_EFFECT";
25
+ export type ResultErrorCode = "ACCOUNT_READ_ONLY" | "INVALID_SPOTIFY_SOURCE" | "CAPABILITY_REQUIRED" | "INSUFFICIENT_SCOPE" | "TENANT_ACCESS_DENIED" | "STATE_CONFLICT" | "QUOTE_CHANGED" | "RATE_LIMITED" | "OUTPUT_INVALID" | "UNKNOWN_EFFECT";
23
26
  /** A server suggestion only; callers must still enforce permission and intent. */
24
27
  export type ResultNextAction = {
25
28
  kind: "provide_input" | "read_status" | "reconnect" | "handoff";
@@ -67,8 +70,19 @@ export type ApplyForDistributionData = {
67
70
  warnings: string[];
68
71
  };
69
72
  export type MoneyDisplay = {
73
+ /**
74
+ * Major-unit amount in `currency` (minor units divided by 10^minorDigits,
75
+ * e.g. 1234 minor units → 12.34 for 2-digit currencies, 1234 for JPY).
76
+ */
77
+ amount: number;
78
+ /**
79
+ * Major-unit USD amount. Present only when `currency` is "USD"; kept for
80
+ * backward compatibility — new consumers should use `amount` + `currency`.
81
+ */
82
+ amountUsd?: number;
83
+ /** Account billing currency (ISO 4217, uppercase). */
84
+ currency: string;
70
85
  formatted: string;
71
- amountUsd: number;
72
86
  };
73
87
  export type AccessRole = "admin" | "editor" | "viewer";
74
88
  export type ArtistTier = "none" | "starter" | "plus";
@@ -168,7 +182,38 @@ export type SmartLinkSummary = {
168
182
  createdAt: string;
169
183
  updatedAt: string;
170
184
  };
185
+ /**
186
+ * Full-profile readback of the Artist Hub fields the hub settings tool writes.
187
+ * Never present in the directory profile.
188
+ */
189
+ export type SmartLinkArtistHubReadback = {
190
+ hubDescription: string | null;
191
+ profileLinks: Array<{
192
+ isHidden: boolean;
193
+ label: string;
194
+ service: string;
195
+ url: string | null;
196
+ }>;
197
+ servicePriority: string[];
198
+ servicePriorityMode: "country" | "fixed";
199
+ };
200
+ /**
201
+ * Full-profile readback of the release fields the release settings tool
202
+ * writes. Never present in the directory profile.
203
+ */
204
+ export type SmartLinkReleaseSettingsReadback = {
205
+ customDescription: string | null;
206
+ services: Array<{
207
+ effectiveUrl: string | null;
208
+ hidden: boolean;
209
+ label: string;
210
+ overrideUrl: string | null;
211
+ service: string;
212
+ }>;
213
+ youtubeUrl: string | null;
214
+ };
171
215
  export type SmartLinkSettingsData = {
216
+ artistHub?: SmartLinkArtistHubReadback;
172
217
  artistId: string;
173
218
  artistName: string;
174
219
  isEnabled: boolean;
@@ -180,6 +225,7 @@ export type SmartLinkSettingsData = {
180
225
  };
181
226
  availableThemes: SmartLinkTheme[];
182
227
  summary?: string;
228
+ warnings?: string[];
183
229
  };
184
230
  export type ListSmartLinksData = {
185
231
  smartLinks: SmartLinkSummary[];
@@ -192,6 +238,7 @@ export type ListSmartLinksSummaryData = {
192
238
  };
193
239
  export type GetSmartLinkData = SmartLinkSummary & {
194
240
  customDescription: string | null;
241
+ releaseSettings?: SmartLinkReleaseSettingsReadback;
195
242
  originalSpotifyUrl: string | null;
196
243
  nextActions: string[];
197
244
  summary: string;
@@ -205,10 +252,16 @@ export type GetSmartLinkSummaryData = {
205
252
  };
206
253
  export type SmartLinkAnalyticsTotals = {
207
254
  anonymousVisits: number;
208
- streamingServiceClicks: number;
255
+ streamingServiceClicks: number | null;
256
+ streamingServiceClickUsers: number | null;
257
+ uniqueVisitors: number;
209
258
  youtubeVideoPlays: number;
259
+ youtubeVideoPlayUsers: number;
260
+ saveFollowEvents: number;
261
+ saveFollowUsers: number;
210
262
  };
211
263
  export type GetSmartLinkAnalyticsData = {
264
+ countsAvailability?: "available" | "incomplete";
212
265
  playLinkId: string;
213
266
  artistId: string;
214
267
  releaseTitle: string;
@@ -219,7 +272,15 @@ export type GetSmartLinkAnalyticsData = {
219
272
  totals: SmartLinkAnalyticsTotals;
220
273
  daily?: Array<SmartLinkAnalyticsTotals & {
221
274
  date: string;
275
+ serviceClickEvidence: "available" | "partial" | "unavailable";
222
276
  }>;
277
+ serviceClickEvidence: "available" | "partial" | "unavailable";
278
+ serviceClickCoverage: {
279
+ fromDate: string;
280
+ throughDate: string;
281
+ } | null;
282
+ lastUpdatedAtIso: string | null;
283
+ uniqueMetricAggregation: "sum_daily_per_link_uniques";
223
284
  breakdowns?: {
224
285
  serviceClicks?: Record<string, number>;
225
286
  countryViews?: Record<string, number>;
@@ -338,6 +399,7 @@ export type ListCampaignsSummaryData = {
338
399
  nextCursor?: string;
339
400
  };
340
401
  export type GetCampaignData = {
402
+ channelResults?: import("./server/channel-results-schema").ChannelResults;
341
403
  summary: string;
342
404
  id: string;
343
405
  contentTitle: string;
@@ -378,6 +440,49 @@ export type GetCampaignSummaryData = {
378
440
  actionRequired?: string[];
379
441
  };
380
442
  export type GetCampaignAnalyticsJsonData = {
443
+ /** Count-read completeness; sample identifies the existing demo reader. Independent of spend/status notes. */
444
+ countsAvailability?: "available" | "incomplete" | "sample" | "not_linked";
445
+ /**
446
+ * YouTube campaigns only, and only when the ad network reported it. Organic
447
+ * views directly attributed: follow-on views the ad account credits to the
448
+ * campaign by click date (provisional for two days). The field name predates
449
+ * that definition and is kept for compatibility. Whether the credit includes
450
+ * the first watch after the click is unconfirmed. `daily` appears with DAILY
451
+ * granularity.
452
+ */
453
+ adNetworkReportedContinuedViews?: {
454
+ daily?: Array<{
455
+ date: string;
456
+ views: number;
457
+ }>;
458
+ note: string;
459
+ total: number;
460
+ };
461
+ /**
462
+ * YouTube campaigns only: present, as "pending", when organic views directly
463
+ * attributed and subscribers are not available yet. They are withheld rather
464
+ * than reported as zero, so an absent figure with this marker is not zero.
465
+ */
466
+ directCreditAvailability?: {
467
+ note: string;
468
+ status: "pending";
469
+ };
470
+ /**
471
+ * YouTube campaigns only: subscriptions the ad account credits to the
472
+ * campaign (all_conversions by click date, provisional for two days).
473
+ */
474
+ subscribersDirectlyAttributed?: {
475
+ note: string;
476
+ total: number;
477
+ };
478
+ /**
479
+ * YouTube campaigns only: viewers who clicked the ad through to the YouTube
480
+ * watch page (Google Ads clicks). Not interactions and not TrueView views.
481
+ */
482
+ viewsThroughAd?: {
483
+ note: string;
484
+ total: number;
485
+ };
381
486
  campaignId: string;
382
487
  contentTitle: string;
383
488
  status: CampaignDisplayStatus;
@@ -388,7 +493,12 @@ export type GetCampaignAnalyticsJsonData = {
388
493
  totals: {
389
494
  impressions: number;
390
495
  clicks: number;
391
- spend: MoneyDisplay;
496
+ /**
497
+ * Summed spend in the artist's currency. `null` when today's exchange
498
+ * rate is unavailable or when spend is not reported for this campaign
499
+ * (a warning says so); counts stay, and CPC and CPM are then `null` too.
500
+ */
501
+ spend: MoneyDisplay | null;
392
502
  cpc: MoneyDisplay | null;
393
503
  cpm: MoneyDisplay | null;
394
504
  ctr: number | null;
@@ -397,19 +507,21 @@ export type GetCampaignAnalyticsJsonData = {
397
507
  platform: "META" | "GOOGLE";
398
508
  impressions: number;
399
509
  clicks: number;
400
- spend: MoneyDisplay;
510
+ /** `null` when today's exchange rate is unavailable or spend is not reported. */
511
+ spend: MoneyDisplay | null;
401
512
  daily?: Array<{
402
513
  date: string;
403
514
  impressions: number;
404
515
  clicks: number;
405
- spend: MoneyDisplay;
516
+ /** `null` when today's exchange rate is unavailable or spend is not reported. */
517
+ spend: MoneyDisplay | null;
406
518
  }>;
407
519
  }>;
408
520
  daily?: Array<{
409
521
  date: string;
410
522
  impressions: number;
411
523
  clicks: number;
412
- spend: MoneyDisplay;
524
+ spend: MoneyDisplay | null;
413
525
  }>;
414
526
  warnings?: string[];
415
527
  };
@@ -418,6 +530,8 @@ export type GetCampaignAnalyticsSummaryData = {
418
530
  warnings?: string[];
419
531
  };
420
532
  export type GetArtistAnalyticsJsonData = {
533
+ /** Count-read completeness; sample identifies the existing demo reader. */
534
+ countsAvailability?: "available" | "incomplete" | "sample" | "not_linked";
421
535
  artistId: string;
422
536
  campaignCount: number;
423
537
  dateRange: {
@@ -427,7 +541,11 @@ export type GetArtistAnalyticsJsonData = {
427
541
  totals: {
428
542
  impressions: number;
429
543
  clicks: number;
430
- spend: MoneyDisplay;
544
+ /**
545
+ * In the artist's currency; `null` when today's exchange rate is unavailable
546
+ * or when spend is not reported for the selection (a warning says so).
547
+ */
548
+ spend: MoneyDisplay | null;
431
549
  cpc: MoneyDisplay | null;
432
550
  cpm: MoneyDisplay | null;
433
551
  ctr: number | null;
@@ -436,19 +554,19 @@ export type GetArtistAnalyticsJsonData = {
436
554
  platform: "META" | "GOOGLE";
437
555
  impressions: number;
438
556
  clicks: number;
439
- spend: MoneyDisplay;
557
+ spend: MoneyDisplay | null;
440
558
  daily?: Array<{
441
559
  date: string;
442
560
  impressions: number;
443
561
  clicks: number;
444
- spend: MoneyDisplay;
562
+ spend: MoneyDisplay | null;
445
563
  }>;
446
564
  }>;
447
565
  daily?: Array<{
448
566
  date: string;
449
567
  impressions: number;
450
568
  clicks: number;
451
- spend: MoneyDisplay;
569
+ spend: MoneyDisplay | null;
452
570
  }>;
453
571
  strongestCampaign?: {
454
572
  campaignId: string;
@@ -461,6 +579,8 @@ export type GetArtistAnalyticsJsonData = {
461
579
  warnings?: string[];
462
580
  };
463
581
  export type GetArtistAnalyticsSummaryData = {
582
+ /** Count-read completeness; sample identifies the existing demo reader. */
583
+ countsAvailability?: "available" | "incomplete" | "sample" | "not_linked";
464
584
  summary: string;
465
585
  campaignCount?: number;
466
586
  dateRange?: {
@@ -478,4 +598,3 @@ export type GetArtistAnalyticsSummaryData = {
478
598
  };
479
599
  warnings?: string[];
480
600
  };
481
- //# sourceMappingURL=types.d.ts.map
package/dist/version.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export declare const DYNAMOI_MCP_VERSION: string;
2
- //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Canonical YouTube metric dictionary and agent knowledge.
3
+ *
4
+ * One owner for what each YouTube number is, where it comes from, how a client
5
+ * may name it, and which claims agents must never make. The dashboard readers,
6
+ * the MCP tools, the mobile API contract and (in later changes) the MCP server
7
+ * instructions, llms.txt, the strategy resource and the public docs glossary
8
+ * all derive from this module, so a definition is fixed in exactly one place.
9
+ *
10
+ * Decisions (Trevor, 2026-10-11):
11
+ * - Views through the ad are Google Ads `metrics.clicks` on the in-feed Demand
12
+ * Gen campaign. Never `metrics.interactions`, TrueView views, or the Studio
13
+ * ADVERTISING traffic source.
14
+ * - Directly attributed organic views and subscribers are `metrics.all_conversions`
15
+ * by conversion action ("credited by the ad account"), never `conversions`.
16
+ * - Channel analytics (YouTube Analytics API) are context and are not attributed
17
+ * to the campaign. No causal organic number is published.
18
+ */
19
+ /**
20
+ * How a figure may be described:
21
+ * - `credited`: counted by the ad account itself, attributable to the campaign.
22
+ * - `inferred`: derived by Dynamoi from other figures; never causal proof.
23
+ * - `context`: channel-wide data the campaign did not report; not attributed.
24
+ * - `internal`: delivery diagnostic, not a campaign result. It is never named
25
+ * as views or used for cost per view; the dashboard delivery detail may show
26
+ * it only under its own "Interactions" label.
27
+ */
28
+ export type YouTubeMetricClass = "credited" | "inferred" | "context" | "internal";
29
+ /**
30
+ * Freshness clocks. A figure follows exactly one clock, and the clocks are
31
+ * never mixed on one axis without a visible "through" marker.
32
+ * - `ad_account`: Google Ads, complete through yesterday in the account's timezone.
33
+ * - `ad_account_provisional`: Google Ads conversion credit by click date. The
34
+ * most recent two days can still change, so they are provisional.
35
+ * - `channel_analytics`: YouTube Analytics API, complete through three days ago.
36
+ * Newer channel days are still processing, never zero.
37
+ * - `public_snapshot`: a daily public Data API snapshot.
38
+ */
39
+ export type YouTubeFreshnessClock = "ad_account" | "ad_account_provisional" | "channel_analytics" | "public_snapshot";
40
+ export declare const YOUTUBE_CHANNEL_ANALYTICS_LAG_DAYS = 3;
41
+ export declare const YOUTUBE_PROVISIONAL_CONVERSION_DAYS = 2;
42
+ /** Google Ads conversion action ids that carry YouTube follow-on credit. */
43
+ export declare const YOUTUBE_FOLLOW_ON_VIEWS_CONVERSION_ACTION_ID = "7108487969";
44
+ export declare const YOUTUBE_SUBSCRIBERS_CONVERSION_ACTION_ID = "1001375898";
45
+ export declare const YOUTUBE_METRIC_IDS: readonly ["views_through_ad", "cost_per_view", "direct_organic_views", "direct_subscribers", "interactions", "channel_views", "channel_advertising_views", "channel_net_subscribers"];
46
+ export type YouTubeMetricId = (typeof YOUTUBE_METRIC_IDS)[number];
47
+ export type YouTubeMetricDefinition = {
48
+ /** Client-visible name; null for an internal figure. */
49
+ clientLabel: string | null;
50
+ class: YouTubeMetricClass;
51
+ freshness: YouTubeFreshnessClock;
52
+ id: YouTubeMetricId;
53
+ /** What the number is, and what it is not. */
54
+ meaning: string;
55
+ /** The provider field the number is read from. */
56
+ sourceField: string;
57
+ };
58
+ export declare const YOUTUBE_METRIC_DICTIONARY: {
59
+ readonly channel_advertising_views: {
60
+ readonly class: "context";
61
+ readonly clientLabel: null;
62
+ readonly freshness: "channel_analytics";
63
+ readonly id: "channel_advertising_views";
64
+ readonly meaning: "Channel views YouTube tags with the ADVERTISING traffic source. It undercounts ad-driven views, because an ad click that lands in a playlist is credited mostly to PLAYLIST and SUBSCRIBER traffic. It is not views through the ad and never a subtraction base for organic views.";
65
+ readonly sourceField: "YouTube Analytics API insightTrafficSourceType = ADVERTISING (views)";
66
+ };
67
+ readonly channel_net_subscribers: {
68
+ readonly class: "context";
69
+ readonly clientLabel: "Channel subscribers";
70
+ readonly freshness: "channel_analytics";
71
+ readonly id: "channel_net_subscribers";
72
+ readonly meaning: "Subscribers gained minus subscribers lost across the whole channel. Not attributed to the campaign.";
73
+ readonly sourceField: "YouTube Analytics API subscribersGained - subscribersLost";
74
+ };
75
+ readonly channel_views: {
76
+ readonly class: "context";
77
+ readonly clientLabel: "Channel views";
78
+ readonly freshness: "channel_analytics";
79
+ readonly id: "channel_views";
80
+ readonly meaning: "All views of the channel from every source, as YouTube reports them. Context for the campaign period; not attributed to the campaign and not organic proof.";
81
+ readonly sourceField: "YouTube Analytics API views";
82
+ };
83
+ readonly cost_per_view: {
84
+ readonly class: "credited";
85
+ readonly clientLabel: "Cost per view";
86
+ readonly freshness: "ad_account";
87
+ readonly id: "cost_per_view";
88
+ readonly meaning: "Billed campaign cost divided by views through the ad. Never divided by interactions.";
89
+ readonly sourceField: "billed cost / google_ads.metrics.clicks";
90
+ };
91
+ readonly direct_organic_views: {
92
+ readonly class: "credited";
93
+ readonly clientLabel: "Organic views directly attributed";
94
+ readonly freshness: "ad_account_provisional";
95
+ readonly id: "direct_organic_views";
96
+ readonly meaning: "Follow-on views of the artist's videos that the ad account credits to the campaign, counted by click date and provisional for two days. Whether the count includes the first watch after the click is unconfirmed; do not claim either way. Not a measure of all organic growth.";
97
+ readonly sourceField: "google_ads.metrics.all_conversions where conversion_action = 7108487969 (\"YouTube follow-on views\")";
98
+ };
99
+ readonly direct_subscribers: {
100
+ readonly class: "credited";
101
+ readonly clientLabel: "Subscribers directly attributed";
102
+ readonly freshness: "ad_account_provisional";
103
+ readonly id: "direct_subscribers";
104
+ readonly meaning: "Subscriptions the ad account credits to the campaign, counted by click date and provisional for two days. Subscriptions are a secondary goal, so the primary `conversions` metric reads zero; the count lives in `all_conversions`.";
105
+ readonly sourceField: "google_ads.metrics.all_conversions where conversion_action = 1001375898";
106
+ };
107
+ readonly interactions: {
108
+ readonly class: "internal";
109
+ readonly clientLabel: null;
110
+ readonly freshness: "ad_account";
111
+ readonly id: "interactions";
112
+ readonly meaning: "Demand Gen interactions: a five-second feed watch or a click. Roughly 1.5 to 1.9 times clicks. A delivery diagnostic shown only under its own Interactions label in the dashboard delivery detail, and the basis of Shop delivery economics. Never described as views and never the basis of cost per view.";
113
+ readonly sourceField: "google_ads.metrics.interactions";
114
+ };
115
+ readonly views_through_ad: {
116
+ readonly class: "credited";
117
+ readonly clientLabel: "Views through the ad";
118
+ readonly freshness: "ad_account";
119
+ readonly id: "views_through_ad";
120
+ readonly meaning: "Viewers who clicked the in-feed ad through to the YouTube watch page. Not TrueView views, not interactions, and not the channel's ADVERTISING traffic source.";
121
+ readonly sourceField: "google_ads.metrics.clicks";
122
+ };
123
+ };
124
+ export declare function getYouTubeMetric(id: YouTubeMetricId): YouTubeMetricDefinition;
125
+ /**
126
+ * Agent-facing knowledge. Later changes generate the server instructions, the
127
+ * strategy resource, llms.txt and the docs glossary from these strings.
128
+ */
129
+ export declare const YOUTUBE_AGENT_KNOWLEDGE: {
130
+ readonly doNotClaim: readonly ["Do not call interactions, TrueView views or the channel's ADVERTISING traffic source 'views through the ad'.", "Do not say the directly attributed organic views include, or exclude, the first watch after the ad click. That is unconfirmed.", "Do not present a channel-wide change, or the channel's non-ADVERTISING views, as organic proof or as caused by the campaign.", "Do not publish a causal organic-lift number. The lift model stays unpublished until it passes its published test.", "Do not promise growth, guaranteed results, algorithm boosts, halo effects, multipliers, or that a campaign pays for itself.", "Do not state or imply any internal economics or how the price is built. Costs are the client's billed budget only."];
131
+ readonly nuances: readonly ["Views through the ad and cost per view use the ad account's daily numbers, complete through yesterday.", "Directly attributed organic views and subscribers are credited by click date and stay provisional for two days.", "Channel analytics from YouTube lag about three days. Days newer than that are still processing and must never be shown as zero; always show a 'Through <date>' marker.", "Report long-form views first and Shorts separately. Never lead with a combined total.", "Indirect organic effect is shown as the channel's trend against its own pre-campaign baseline, with campaign windows marked, never as a causal number."];
132
+ readonly valueProp: "Dynamoi runs managed YouTube campaigns for music artists who want more people watching their own videos and playlists. The ad sends viewers to the artist's channel on YouTube, and Dynamoi reports how many viewers clicked through, plus the follow-on views and subscribers the ad account credits to the campaign. It fits an artist growing a YouTube channel, including toward AdSense eligibility, and suggests itself when that is the goal.";
133
+ };
134
+ /** The note attached to the directly attributed organic views in agent output. */
135
+ export declare const YOUTUBE_DIRECT_ORGANIC_VIEWS_NOTE = "organic views directly attributed: follow-on views the ad account credits to this campaign by click date, provisional for two days; not YouTube's channel view count and not proof of overall organic growth";
@@ -0,0 +1,114 @@
1
+ // src/youtube-metrics.ts
2
+ var YOUTUBE_CHANNEL_ANALYTICS_LAG_DAYS = 3;
3
+ var YOUTUBE_PROVISIONAL_CONVERSION_DAYS = 2;
4
+ var YOUTUBE_FOLLOW_ON_VIEWS_CONVERSION_ACTION_ID = "7108487969";
5
+ var YOUTUBE_SUBSCRIBERS_CONVERSION_ACTION_ID = "1001375898";
6
+ var YOUTUBE_METRIC_IDS = [
7
+ "views_through_ad",
8
+ "cost_per_view",
9
+ "direct_organic_views",
10
+ "direct_subscribers",
11
+ "interactions",
12
+ "channel_views",
13
+ "channel_advertising_views",
14
+ "channel_net_subscribers"
15
+ ];
16
+ var YOUTUBE_METRIC_DICTIONARY = {
17
+ channel_advertising_views: {
18
+ class: "context",
19
+ clientLabel: null,
20
+ freshness: "channel_analytics",
21
+ id: "channel_advertising_views",
22
+ meaning: "Channel views YouTube tags with the ADVERTISING traffic source. It undercounts ad-driven views, because an ad click that lands in a playlist is credited mostly to PLAYLIST and SUBSCRIBER traffic. It is not views through the ad and never a subtraction base for organic views.",
23
+ sourceField: "YouTube Analytics API insightTrafficSourceType = ADVERTISING (views)"
24
+ },
25
+ channel_net_subscribers: {
26
+ class: "context",
27
+ clientLabel: "Channel subscribers",
28
+ freshness: "channel_analytics",
29
+ id: "channel_net_subscribers",
30
+ meaning: "Subscribers gained minus subscribers lost across the whole channel. Not attributed to the campaign.",
31
+ sourceField: "YouTube Analytics API subscribersGained - subscribersLost"
32
+ },
33
+ channel_views: {
34
+ class: "context",
35
+ clientLabel: "Channel views",
36
+ freshness: "channel_analytics",
37
+ id: "channel_views",
38
+ meaning: "All views of the channel from every source, as YouTube reports them. Context for the campaign period; not attributed to the campaign and not organic proof.",
39
+ sourceField: "YouTube Analytics API views"
40
+ },
41
+ cost_per_view: {
42
+ class: "credited",
43
+ clientLabel: "Cost per view",
44
+ freshness: "ad_account",
45
+ id: "cost_per_view",
46
+ meaning: "Billed campaign cost divided by views through the ad. Never divided by interactions.",
47
+ sourceField: "billed cost / google_ads.metrics.clicks"
48
+ },
49
+ direct_organic_views: {
50
+ class: "credited",
51
+ clientLabel: "Organic views directly attributed",
52
+ freshness: "ad_account_provisional",
53
+ id: "direct_organic_views",
54
+ meaning: "Follow-on views of the artist's videos that the ad account credits to the campaign, counted by click date and provisional for two days. Whether the count includes the first watch after the click is unconfirmed; do not claim either way. Not a measure of all organic growth.",
55
+ sourceField: `google_ads.metrics.all_conversions where conversion_action = ${YOUTUBE_FOLLOW_ON_VIEWS_CONVERSION_ACTION_ID} ("YouTube follow-on views")`
56
+ },
57
+ direct_subscribers: {
58
+ class: "credited",
59
+ clientLabel: "Subscribers directly attributed",
60
+ freshness: "ad_account_provisional",
61
+ id: "direct_subscribers",
62
+ meaning: "Subscriptions the ad account credits to the campaign, counted by click date and provisional for two days. Subscriptions are a secondary goal, so the primary `conversions` metric reads zero; the count lives in `all_conversions`.",
63
+ sourceField: `google_ads.metrics.all_conversions where conversion_action = ${YOUTUBE_SUBSCRIBERS_CONVERSION_ACTION_ID}`
64
+ },
65
+ interactions: {
66
+ class: "internal",
67
+ clientLabel: null,
68
+ freshness: "ad_account",
69
+ id: "interactions",
70
+ meaning: "Demand Gen interactions: a five-second feed watch or a click. Roughly 1.5 to 1.9 times clicks. A delivery diagnostic shown only under its own Interactions label in the dashboard delivery detail, and the basis of Shop delivery economics. Never described as views and never the basis of cost per view.",
71
+ sourceField: "google_ads.metrics.interactions"
72
+ },
73
+ views_through_ad: {
74
+ class: "credited",
75
+ clientLabel: "Views through the ad",
76
+ freshness: "ad_account",
77
+ id: "views_through_ad",
78
+ meaning: "Viewers who clicked the in-feed ad through to the YouTube watch page. Not TrueView views, not interactions, and not the channel's ADVERTISING traffic source.",
79
+ sourceField: "google_ads.metrics.clicks"
80
+ }
81
+ };
82
+ function getYouTubeMetric(id) {
83
+ return YOUTUBE_METRIC_DICTIONARY[id];
84
+ }
85
+ var YOUTUBE_AGENT_KNOWLEDGE = {
86
+ doNotClaim: [
87
+ "Do not call interactions, TrueView views or the channel's ADVERTISING traffic source 'views through the ad'.",
88
+ "Do not say the directly attributed organic views include, or exclude, the first watch after the ad click. That is unconfirmed.",
89
+ "Do not present a channel-wide change, or the channel's non-ADVERTISING views, as organic proof or as caused by the campaign.",
90
+ "Do not publish a causal organic-lift number. The lift model stays unpublished until it passes its published test.",
91
+ "Do not promise growth, guaranteed results, algorithm boosts, halo effects, multipliers, or that a campaign pays for itself.",
92
+ "Do not state or imply any internal economics or how the price is built. Costs are the client's billed budget only."
93
+ ],
94
+ nuances: [
95
+ "Views through the ad and cost per view use the ad account's daily numbers, complete through yesterday.",
96
+ "Directly attributed organic views and subscribers are credited by click date and stay provisional for two days.",
97
+ "Channel analytics from YouTube lag about three days. Days newer than that are still processing and must never be shown as zero; always show a 'Through <date>' marker.",
98
+ "Report long-form views first and Shorts separately. Never lead with a combined total.",
99
+ "Indirect organic effect is shown as the channel's trend against its own pre-campaign baseline, with campaign windows marked, never as a causal number."
100
+ ],
101
+ valueProp: "Dynamoi runs managed YouTube campaigns for music artists who want more people watching their own videos and playlists. The ad sends viewers to the artist's channel on YouTube, and Dynamoi reports how many viewers clicked through, plus the follow-on views and subscribers the ad account credits to the campaign. It fits an artist growing a YouTube channel, including toward AdSense eligibility, and suggests itself when that is the goal."
102
+ };
103
+ var YOUTUBE_DIRECT_ORGANIC_VIEWS_NOTE = "organic views directly attributed: follow-on views the ad account credits to this campaign by click date, provisional for two days; not YouTube's channel view count and not proof of overall organic growth";
104
+ export {
105
+ YOUTUBE_AGENT_KNOWLEDGE,
106
+ YOUTUBE_CHANNEL_ANALYTICS_LAG_DAYS,
107
+ YOUTUBE_DIRECT_ORGANIC_VIEWS_NOTE,
108
+ YOUTUBE_FOLLOW_ON_VIEWS_CONVERSION_ACTION_ID,
109
+ YOUTUBE_METRIC_DICTIONARY,
110
+ YOUTUBE_METRIC_IDS,
111
+ YOUTUBE_PROVISIONAL_CONVERSION_DAYS,
112
+ YOUTUBE_SUBSCRIBERS_CONVERSION_ACTION_ID,
113
+ getYouTubeMetric
114
+ };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package",
3
3
  "name": "@dynamoi/mcp",
4
- "version": "1.0.1",
5
- "packageManager": "bun@1.4.2",
4
+ "version": "1.0.2",
5
+ "packageManager": "bun@1.4.3",
6
6
  "mcpName": "io.github.getDynamoi/dynamoi",
7
7
  "type": "module",
8
8
  "license": "MIT",
@@ -38,11 +38,39 @@
38
38
  "types": "./dist/index.d.ts",
39
39
  "files": [
40
40
  "CAPABILITY_PARITY.md",
41
- "dist",
42
- "server.json",
43
- "README.md",
44
41
  "CHANGELOG.md",
45
- "LICENSE"
42
+ "LICENSE",
43
+ "README.md",
44
+ "dist/auth/protected-resource.d.ts",
45
+ "dist/auth/protected-resource.js",
46
+ "dist/consent.d.ts",
47
+ "dist/consent.js",
48
+ "dist/flow-types.d.ts",
49
+ "dist/index.d.ts",
50
+ "dist/index.js",
51
+ "dist/readiness-types.d.ts",
52
+ "dist/server/about.d.ts",
53
+ "dist/server/account-schema.generated.d.ts",
54
+ "dist/server/channel-results-schema.d.ts",
55
+ "dist/server/create-server.d.ts",
56
+ "dist/server/distribution-tools.d.ts",
57
+ "dist/server/messaging.d.ts",
58
+ "dist/server/openai-tools.d.ts",
59
+ "dist/server/output-schemas.d.ts",
60
+ "dist/server/shop-tools.d.ts",
61
+ "dist/server/smart-link-tools.d.ts",
62
+ "dist/server/tools.d.ts",
63
+ "dist/server/workflow-tools.d.ts",
64
+ "dist/server/workspace/data.d.ts",
65
+ "dist/server/workspace/tool.d.ts",
66
+ "dist/server/youtube-channel-data-schema.d.ts",
67
+ "dist/server/youtube-strategy-guide.d.ts",
68
+ "dist/transport/http.d.ts",
69
+ "dist/types.d.ts",
70
+ "dist/version.d.ts",
71
+ "dist/youtube-metrics.d.ts",
72
+ "dist/youtube-metrics.js",
73
+ "server.json"
46
74
  ],
47
75
  "exports": {
48
76
  ".": {
@@ -59,6 +87,11 @@
59
87
  "types": "./dist/consent.d.ts",
60
88
  "import": "./dist/consent.js",
61
89
  "default": "./dist/consent.js"
90
+ },
91
+ "./youtube-metrics": {
92
+ "types": "./dist/youtube-metrics.d.ts",
93
+ "import": "./dist/youtube-metrics.js",
94
+ "default": "./dist/youtube-metrics.js"
62
95
  }
63
96
  },
64
97
  "publishConfig": {
@@ -67,22 +100,25 @@
67
100
  "scripts": {
68
101
  "build": "bun scripts/build.cjs",
69
102
  "dev": "bun scripts/build.cjs --watch",
70
- "typecheck": "bun ../../scripts/validate/with-heavy-slot.ts --class typecheck --wait-timeout-minutes 60 -- tsc --noEmit -p tsconfig.json",
103
+ "typecheck": "tsc --noEmit -p tsconfig.json",
71
104
  "registry:validate": "bun scripts/registry-contract.ts local",
72
105
  "registry:wait:npm": "bun scripts/registry-contract.ts npm --attempts 24 --delay-ms 5000",
73
106
  "registry:wait:official": "bun scripts/registry-contract.ts registry --attempts 24 --delay-ms 5000",
74
107
  "changeset": "changeset",
75
108
  "changeset:version": "changeset version",
76
- "changeset:publish": "changeset publish"
109
+ "changeset:publish": "changeset publish",
110
+ "prepack": "bun scripts/build.cjs"
77
111
  },
78
112
  "dependencies": {
79
- "@modelcontextprotocol/server": "2.0.0",
80
- "zod": "4.4.3"
113
+ "@modelcontextprotocol/server": "2.1.0",
114
+ "zod": "4.6.5"
81
115
  },
82
116
  "devDependencies": {
83
117
  "@changesets/cli": "2.31.0",
84
- "@modelcontextprotocol/client": "2.0.0",
118
+ "@modelcontextprotocol/client": "2.1.0",
119
+ "@modelcontextprotocol/ext-apps": "2.0.3",
85
120
  "@types/node": "25.6.0",
86
- "typescript": "7.0.2"
121
+ "typescript": "7.0.2",
122
+ "typescript-6-compat": "npm:typescript@6.0.3"
87
123
  }
88
124
  }
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.getDynamoi/dynamoi",
4
4
  "title": "Dynamoi",
5
5
  "description": "Music marketing for AI agents: free Smart Links, promotion campaigns, analytics, and distribution.",
6
- "version": "1.0.1",
6
+ "version": "1.0.2",
7
7
  "websiteUrl": "https://dynamoi.com",
8
8
  "repository": {
9
9
  "url": "https://github.com/getDynamoi/mcp",
@@ -1 +0,0 @@
1
- {"version":3,"file":"protected-resource.d.ts","sourceRoot":"","sources":["../../../src/auth/protected-resource.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,YAC1C,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,CAClB,CAAC;AACX,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CkB,CAAC;AAEvD,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IACnD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,oBAAoB,GAAG,eAAe,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAoBT"}
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "3CEA7E243AFD6EFD64756E2164756E21",
8
- "names": []
9
- }