@dynamoi/mcp 1.0.1 → 1.0.3
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/CAPABILITY_PARITY.md +24 -16
- package/CHANGELOG.md +124 -0
- package/README.md +76 -24
- package/dist/auth/protected-resource.d.ts +12 -1
- package/dist/auth/protected-resource.js +107 -11
- package/dist/consent.d.ts +101 -4
- package/dist/consent.js +83 -11
- package/dist/flow-types.d.ts +72 -3
- package/dist/index.d.ts +15 -6
- package/dist/index.js +2741 -639
- package/dist/readiness-types.d.ts +21 -1
- package/dist/server/about.d.ts +18 -15
- package/dist/server/account-schema.generated.d.ts +62 -0
- package/dist/server/channel-results-schema.d.ts +104 -0
- package/dist/server/create-server.d.ts +41 -30
- package/dist/server/distribution-tools.d.ts +31 -24
- package/dist/server/messaging.d.ts +2 -3
- package/dist/server/openai-tools.d.ts +30 -23
- package/dist/server/output-schemas.d.ts +416 -73
- package/dist/server/shop-tools.d.ts +36 -29
- package/dist/server/smart-link-tools.d.ts +511 -73
- package/dist/server/support-tools.d.ts +88 -0
- package/dist/server/tools.d.ts +753 -223
- package/dist/server/workflow-tools.d.ts +99 -86
- package/dist/server/workspace/data.d.ts +67 -0
- package/dist/server/workspace/tool.d.ts +82 -0
- package/dist/server/youtube-channel-data-schema.d.ts +169 -0
- package/dist/server/youtube-strategy-guide.d.ts +103 -0
- package/dist/transport/http.d.ts +0 -1
- package/dist/types.d.ts +135 -12
- package/dist/version.d.ts +0 -1
- package/dist/youtube-metrics.d.ts +135 -0
- package/dist/youtube-metrics.js +114 -0
- package/package.json +50 -13
- package/server.json +2 -2
- package/dist/auth/protected-resource.d.ts.map +0 -1
- package/dist/auth/protected-resource.js.map +0 -9
- package/dist/chunk-3htwe57a.js +0 -85
- package/dist/chunk-3htwe57a.js.map +0 -10
- package/dist/chunk-n5xmtwjj.js +0 -9
- package/dist/chunk-n5xmtwjj.js.map +0 -10
- package/dist/consent.d.ts.map +0 -1
- package/dist/consent.js.map +0 -9
- package/dist/flow-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -28
- package/dist/readiness-types.d.ts.map +0 -1
- package/dist/server/about.d.ts.map +0 -1
- package/dist/server/create-server.d.ts.map +0 -1
- package/dist/server/distribution-tools.d.ts.map +0 -1
- package/dist/server/instructions.d.ts +0 -3
- package/dist/server/instructions.d.ts.map +0 -1
- package/dist/server/messaging.d.ts.map +0 -1
- package/dist/server/onboarding-tool-definitions.d.ts +0 -106
- package/dist/server/onboarding-tool-definitions.d.ts.map +0 -1
- package/dist/server/openai-tools.d.ts.map +0 -1
- package/dist/server/output-schemas.d.ts.map +0 -1
- package/dist/server/playbook-resources.d.ts +0 -3
- package/dist/server/playbook-resources.d.ts.map +0 -1
- package/dist/server/prompts.d.ts +0 -3
- package/dist/server/prompts.d.ts.map +0 -1
- package/dist/server/resources.d.ts +0 -4
- package/dist/server/resources.d.ts.map +0 -1
- package/dist/server/shared-schemas.d.ts +0 -14
- package/dist/server/shared-schemas.d.ts.map +0 -1
- package/dist/server/shop-tools.d.ts.map +0 -1
- package/dist/server/smart-link-theme-preview.d.ts +0 -73
- package/dist/server/smart-link-theme-preview.d.ts.map +0 -1
- package/dist/server/smart-link-tools.d.ts.map +0 -1
- package/dist/server/tools.d.ts.map +0 -1
- package/dist/server/workflow-tools.d.ts.map +0 -1
- package/dist/transport/http.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/version.d.ts.map +0 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export declare const YOUTUBE_CAMPAIGN_STRATEGIES_RESOURCE_URI = "dynamoi://youtube/campaign-strategies";
|
|
3
|
+
export declare const YouTubeStrategyKeySchema: z.ZodEnum<{
|
|
4
|
+
CHEAPEST_VIEWS: "CHEAPEST_VIEWS";
|
|
5
|
+
ORGANIC_VIEWS: "ORGANIC_VIEWS";
|
|
6
|
+
SUBSCRIBERS: "SUBSCRIBERS";
|
|
7
|
+
ORGANIC_VIEWS_AND_SUBSCRIBERS: "ORGANIC_VIEWS_AND_SUBSCRIBERS";
|
|
8
|
+
ADSENSE_ROI: "ADSENSE_ROI";
|
|
9
|
+
}>;
|
|
10
|
+
export type YouTubeStrategyKey = z.infer<typeof YouTubeStrategyKeySchema>;
|
|
11
|
+
type YouTubeStrategyGuideEntry = {
|
|
12
|
+
adNetworkOptimizesFor: string;
|
|
13
|
+
bestFor: string;
|
|
14
|
+
goal: string;
|
|
15
|
+
judgeBy: string[];
|
|
16
|
+
key: YouTubeStrategyKey;
|
|
17
|
+
label: string;
|
|
18
|
+
misleadingSignals: string[];
|
|
19
|
+
placements: string;
|
|
20
|
+
requirements: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function buildYouTubeCampaignStrategiesGuide(): {
|
|
23
|
+
playlistWaterfall: {
|
|
24
|
+
readonly advice: readonly ["Use long playlists, up to about 10 hours; repeat the catalog when there are not enough videos.", "The video after the promoted one must be the artist's own.", "Similar-artist videos further down the playlist are only an optional idea the artist decides on.", "Do not claim that every stream earns revenue."];
|
|
25
|
+
readonly measurement: "Views per ad click (channel views divided by ad clicks, over days that have both) measures the waterfall. Ad clicks that land in a playlist are credited mostly to PLAYLIST and SUBSCRIBER, so the ADVERTISING traffic source shows only a small share of ad-driven views, and other-source views are not organic.";
|
|
26
|
+
readonly measurementLimits: "YouTube data reports totals by day, video and traffic source. It does not follow individual viewers from video to video, so no data source proves how many views the playlist itself caused. Report playlist starts, views per playlist start, views per ad click, campaign-period lift and organic lift; do not claim exact playlist-caused views.";
|
|
27
|
+
readonly mechanism: "Except the Views strategy, each campaign promotes a video as the entry point into a playlist of the artist's own videos. After a viewer clicks, playback continues through that playlist instead of YouTube autoplay choosing unrelated videos.";
|
|
28
|
+
readonly purpose: "Keep ad-driven and background listeners on the artist's channel. It improves listener quality; it is not a hidden view multiplier.";
|
|
29
|
+
};
|
|
30
|
+
resultTiming: {
|
|
31
|
+
readonly baseline: "Compare with the channel's own pre-campaign period of similar length, on complete days only.";
|
|
32
|
+
readonly dataLag: "YouTube views, subscribers and revenue arrive about 2-3 days late, and the latest days may be partial. Check the coverage fields (observedThroughDay, revenueThroughDay) before comparing.";
|
|
33
|
+
readonly learning: "The ad network learns for about 7-14 days after launch or a strategy change. Delivery and cost swing during this time; do not give a verdict in the first week.";
|
|
34
|
+
readonly missingData: "Missing days are unknown, not zero.";
|
|
35
|
+
};
|
|
36
|
+
strategies: ({
|
|
37
|
+
readonly adNetworkOptimizesFor: "Google bids for viewers likely to keep watching your channel. Dynamoi then measures the extra AdSense against your usual earnings. The ad network does not use AdSense revenue while bidding.";
|
|
38
|
+
readonly bestFor: "Monetized channels that want channel revenue to grow faster than campaign spend.";
|
|
39
|
+
readonly goal: "Grow the channel's YouTube ad revenue from the views the campaign brings.";
|
|
40
|
+
readonly judgeBy: ["For each campaign, usual earnings are the weekday averages from the 28 days before that campaign, starting with the channel’s first earning day. At least 14 samples are required; otherwise there is no baseline. Pre-monetization zeros are excluded. Extra AdSense is channel AdSense minus that baseline over the campaign and 28 days after it ends, capped by available channel and billed-through dates. Each counted day belongs to one campaign (the later one), so rows add up. Negative results stay negative: “No lift yet”. Earned back in AdSense = total extra AdSense ÷ total billed budget of measurable campaigns. It appears after 14 counted days and remains provisional while data is arriving. Royalties are not included.", "Revenue per 1,000 monetized playbacks by country and by video.", "Campaign-period lift: channel views above the pre-campaign baseline while the campaign runs. These are mostly ad sessions, because ad click-throughs into the playlist appear as PLAYLIST and SUBSCRIBER traffic.", "Organic lift: growth in sources the ads do not touch (YT_SEARCH, RELATED_VIDEO suggested views, browse features and similar), plus lift that persists after spend stops."];
|
|
41
|
+
readonly key: "ADSENSE_ROI";
|
|
42
|
+
readonly label: "Revenue";
|
|
43
|
+
readonly misleadingSignals: ["Cheap views or clicks from viewers who do not earn are a miss, not a win.", "Revenue for the latest 2-3 days is incomplete; YouTube also revises its revenue estimates.", "YouTube traffic sources are not organic proof: PLAYLIST and SUBSCRIBER views during the campaign are mostly ad sessions, and only a small share of ad-driven views is tagged ADVERTISING.", "Ad network-credited continued views are the organic views directly attributed to the campaign by click date. Do not say whether they include the first watch after the click, and they are not proof of overall organic growth."];
|
|
44
|
+
readonly placements: "In-feed YouTube placements (home feed, watch-next and search) plus the ad network's Discover feed.";
|
|
45
|
+
readonly requirements: "Monetized channels only: YouTube revenue or monetized playbacks in the last 90 days. A playlist entry point is required.";
|
|
46
|
+
} | {
|
|
47
|
+
readonly adNetworkOptimizesFor: "The most video ad views for the budget, as a fixed-length video campaign.";
|
|
48
|
+
readonly bestFor: "A launch push or a one-off view target for a single video.";
|
|
49
|
+
readonly goal: "Show the promoted video to as many viewers as possible for the budget.";
|
|
50
|
+
readonly judgeBy: ["Ad network-reported views and cost per view against the budget and end date.", "Watch time per ad network view, to check viewers actually watched."];
|
|
51
|
+
readonly key: "CHEAPEST_VIEWS";
|
|
52
|
+
readonly label: "Views";
|
|
53
|
+
readonly misleadingSignals: ["Weak organic lift or few subscribers are expected: this strategy does not aim for them.", "Many ad network views come from ads shown before or during other videos, so they can carry less watch time than in-feed views."];
|
|
54
|
+
readonly placements: "All YouTube video placements, including ads that play before or during other videos.";
|
|
55
|
+
readonly requirements: "One video; a playlist is optional. Uses a total budget with an end date.";
|
|
56
|
+
} | {
|
|
57
|
+
readonly adNetworkOptimizesFor: "Bids for continued views after the ad, not minutes watched.";
|
|
58
|
+
readonly bestFor: "Channels that want ongoing views of their catalog, not just the promoted video.";
|
|
59
|
+
readonly goal: "Grow the channel's ongoing views by reaching viewers who keep watching after the ad, and look for lift that lasts beyond the spend.";
|
|
60
|
+
readonly judgeBy: ["Campaign-period lift: channel views above the pre-campaign baseline while the campaign runs. These are mostly ad sessions, because ad click-throughs into the playlist appear as PLAYLIST and SUBSCRIBER traffic.", "Organic lift: growth in sources the ads do not touch (YT_SEARCH, RELATED_VIDEO suggested views, browse features and similar), plus lift that persists after spend stops.", "Views per ad click (the playlist waterfall signal): channel views divided by ad clicks, over days that have both.", "Watch time, playlist starts and views per playlist start.", "Cost per click or per ad network view only as a secondary efficiency check."];
|
|
61
|
+
readonly key: "ORGANIC_VIEWS";
|
|
62
|
+
readonly label: "Watch Time";
|
|
63
|
+
readonly misleadingSignals: ["A low cost per click or per ad network view with no organic lift is a miss, not a win.", "YouTube traffic sources are not organic proof: PLAYLIST and SUBSCRIBER views during the campaign are mostly ad sessions, and only a small share of ad-driven views is tagged ADVERTISING.", "Ad network-credited continued views are the organic views directly attributed to the campaign by click date. Do not say whether they include the first watch after the click, and they are not proof of overall organic growth."];
|
|
64
|
+
readonly placements: "In-feed YouTube placements: home feed, watch-next and search results.";
|
|
65
|
+
readonly requirements: "A playlist entry point is required.";
|
|
66
|
+
} | {
|
|
67
|
+
readonly adNetworkOptimizesFor: "Both continued watching after the ad and new subscribers, balanced by the ad network.";
|
|
68
|
+
readonly bestFor: "Most channels that are not monetized yet; this is Dynamoi's default for them.";
|
|
69
|
+
readonly goal: "Grow views and subscribers together, and look for lift that lasts beyond the spend.";
|
|
70
|
+
readonly judgeBy: ["Campaign-period lift: channel views above the pre-campaign baseline while the campaign runs. These are mostly ad sessions, because ad click-throughs into the playlist appear as PLAYLIST and SUBSCRIBER traffic.", "Organic lift: growth in sources the ads do not touch (YT_SEARCH, RELATED_VIDEO suggested views, browse features and similar), plus lift that persists after spend stops.", "Views per ad click (the playlist waterfall signal): channel views divided by ad clicks, over days that have both.", "Net subscribers (gained minus lost) compared with the pre-campaign baseline.", "Watch time and playlist starts."];
|
|
71
|
+
readonly key: "ORGANIC_VIEWS_AND_SUBSCRIBERS";
|
|
72
|
+
readonly label: "Channel Growth";
|
|
73
|
+
readonly misleadingSignals: ["A low cost per click or per ad network view with no organic lift is a miss, not a win.", "Subscribers gained without subscribers lost overstates growth.", "YouTube traffic sources are not organic proof: PLAYLIST and SUBSCRIBER views during the campaign are mostly ad sessions, and only a small share of ad-driven views is tagged ADVERTISING.", "Ad network-credited continued views are the organic views directly attributed to the campaign by click date. Do not say whether they include the first watch after the click, and they are not proof of overall organic growth."];
|
|
74
|
+
readonly placements: "In-feed YouTube placements: home feed, watch-next and search results.";
|
|
75
|
+
readonly requirements: "A playlist entry point is required.";
|
|
76
|
+
} | {
|
|
77
|
+
readonly adNetworkOptimizesFor: "Viewers it predicts will subscribe to the channel after the ad.";
|
|
78
|
+
readonly bestFor: "Channels whose main goal is audience size, for example to reach monetization thresholds.";
|
|
79
|
+
readonly goal: "Grow the channel's subscriber base.";
|
|
80
|
+
readonly judgeBy: ["Net subscribers (gained minus lost) compared with the pre-campaign baseline.", "Campaign spend per net subscriber."];
|
|
81
|
+
readonly key: "SUBSCRIBERS";
|
|
82
|
+
readonly label: "Subscribers";
|
|
83
|
+
readonly misleadingSignals: ["View volume: this strategy can trade views for subscribers.", "Subscribers gained without subscribers lost overstates growth."];
|
|
84
|
+
readonly placements: "In-feed YouTube placements: home feed, watch-next and search results.";
|
|
85
|
+
readonly requirements: "A playlist entry point is required.";
|
|
86
|
+
})[];
|
|
87
|
+
vocabulary: {
|
|
88
|
+
readonly adNetwork: "Dynamoi YouTube campaigns run on Google's ad network and serve on YouTube. When reporting to users, say 'the ad network' (you may name Google once); do not repeat 'Google Ads'.";
|
|
89
|
+
readonly adNetworkReportedContinuedViews: "Organic views directly attributed: continued views of the artist's videos that the ad account credits to the campaign, by click date and provisional for two days. Do not claim whether the count includes the first watch after the click. It is not YouTube's channel view count and not proof of overall organic growth.";
|
|
90
|
+
readonly advertisingSourceViews: "Channel views YouTube tags with traffic source ADVERTISING. It undercounts ad-driven views: an ad click that lands in a playlist is credited mostly to PLAYLIST and SUBSCRIBER, not ADVERTISING.";
|
|
91
|
+
readonly campaignPeriodLift: "Channel views above the pre-campaign baseline during the campaign. They are mostly ad sessions, because ad click-throughs into the playlist appear as PLAYLIST and SUBSCRIBER traffic. It shows what the campaign period delivered, not what the channel keeps.";
|
|
92
|
+
readonly organicLift: "Growth in sources the ads do not touch (YT_SEARCH, RELATED_VIDEO suggested views, browse features and similar), plus lift that persists after spend stops. The comparison with the pre-campaign baseline, not the raw total, shows it. Neither YouTube traffic sources nor the ad network's continued views are organic proof.";
|
|
93
|
+
readonly otherSourceViews: "Every channel view not tagged ADVERTISING. It is not organic: it includes ad sessions credited to PLAYLIST and SUBSCRIBER.";
|
|
94
|
+
readonly strategyNames: "Use the strategy label with users (for example 'Revenue'); use the key (for example ADSENSE_ROI) only in tool calls.";
|
|
95
|
+
readonly viewsPerAdClick: "Channel views divided by ad clicks from campaign analytics, over the campaign window's days that have both. It is the playlist waterfall signal: how many views each ad click produces once playback continues through the playlist. It is not attributed per viewer.";
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export type YouTubeStrategyGuide = YouTubeStrategyGuideEntry & {
|
|
99
|
+
moreDetail: string;
|
|
100
|
+
resultTiming: string;
|
|
101
|
+
};
|
|
102
|
+
export declare function buildYouTubeStrategyGuide(strategy: string): YouTubeStrategyGuide | null;
|
|
103
|
+
export {};
|
package/dist/transport/http.d.ts
CHANGED
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>;
|
|
@@ -328,7 +389,9 @@ export type ListCampaignsJsonData = {
|
|
|
328
389
|
budgetType: "DAILY" | "TOTAL";
|
|
329
390
|
platforms: string[];
|
|
330
391
|
createdAt: string;
|
|
392
|
+
/** Last day ads run (Pacific time). */
|
|
331
393
|
endDate?: string;
|
|
394
|
+
endDateLabel?: string;
|
|
332
395
|
}>;
|
|
333
396
|
nextCursor?: string;
|
|
334
397
|
};
|
|
@@ -338,6 +401,7 @@ export type ListCampaignsSummaryData = {
|
|
|
338
401
|
nextCursor?: string;
|
|
339
402
|
};
|
|
340
403
|
export type GetCampaignData = {
|
|
404
|
+
channelResults?: import("./server/channel-results-schema").ChannelResults;
|
|
341
405
|
summary: string;
|
|
342
406
|
id: string;
|
|
343
407
|
contentTitle: string;
|
|
@@ -363,7 +427,9 @@ export type GetCampaignData = {
|
|
|
363
427
|
}>;
|
|
364
428
|
createdAt: string;
|
|
365
429
|
updatedAt: string;
|
|
430
|
+
/** Last day ads run (Pacific time). */
|
|
366
431
|
endDate?: string;
|
|
432
|
+
endDateLabel?: string;
|
|
367
433
|
artistId: string;
|
|
368
434
|
artistName: string;
|
|
369
435
|
smartLinkUrl?: string;
|
|
@@ -378,6 +444,49 @@ export type GetCampaignSummaryData = {
|
|
|
378
444
|
actionRequired?: string[];
|
|
379
445
|
};
|
|
380
446
|
export type GetCampaignAnalyticsJsonData = {
|
|
447
|
+
/** Count-read completeness; sample identifies the existing demo reader. Independent of spend/status notes. */
|
|
448
|
+
countsAvailability?: "available" | "incomplete" | "sample" | "not_linked";
|
|
449
|
+
/**
|
|
450
|
+
* YouTube campaigns only, and only when the ad network reported it. Organic
|
|
451
|
+
* views directly attributed: follow-on views the ad account credits to the
|
|
452
|
+
* campaign by click date (provisional for two days). The field name predates
|
|
453
|
+
* that definition and is kept for compatibility. Whether the credit includes
|
|
454
|
+
* the first watch after the click is unconfirmed. `daily` appears with DAILY
|
|
455
|
+
* granularity.
|
|
456
|
+
*/
|
|
457
|
+
adNetworkReportedContinuedViews?: {
|
|
458
|
+
daily?: Array<{
|
|
459
|
+
date: string;
|
|
460
|
+
views: number;
|
|
461
|
+
}>;
|
|
462
|
+
note: string;
|
|
463
|
+
total: number;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* YouTube campaigns only: present, as "pending", when organic views directly
|
|
467
|
+
* attributed and subscribers are not available yet. They are withheld rather
|
|
468
|
+
* than reported as zero, so an absent figure with this marker is not zero.
|
|
469
|
+
*/
|
|
470
|
+
directCreditAvailability?: {
|
|
471
|
+
note: string;
|
|
472
|
+
status: "pending";
|
|
473
|
+
};
|
|
474
|
+
/**
|
|
475
|
+
* YouTube campaigns only: subscriptions the ad account credits to the
|
|
476
|
+
* campaign (all_conversions by click date, provisional for two days).
|
|
477
|
+
*/
|
|
478
|
+
subscribersDirectlyAttributed?: {
|
|
479
|
+
note: string;
|
|
480
|
+
total: number;
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* YouTube campaigns only: viewers who clicked the ad through to the YouTube
|
|
484
|
+
* watch page (Google Ads clicks). Not interactions and not TrueView views.
|
|
485
|
+
*/
|
|
486
|
+
viewsThroughAd?: {
|
|
487
|
+
note: string;
|
|
488
|
+
total: number;
|
|
489
|
+
};
|
|
381
490
|
campaignId: string;
|
|
382
491
|
contentTitle: string;
|
|
383
492
|
status: CampaignDisplayStatus;
|
|
@@ -388,7 +497,12 @@ export type GetCampaignAnalyticsJsonData = {
|
|
|
388
497
|
totals: {
|
|
389
498
|
impressions: number;
|
|
390
499
|
clicks: number;
|
|
391
|
-
|
|
500
|
+
/**
|
|
501
|
+
* Summed spend in the artist's currency. `null` when today's exchange
|
|
502
|
+
* rate is unavailable or when spend is not reported for this campaign
|
|
503
|
+
* (a warning says so); counts stay, and CPC and CPM are then `null` too.
|
|
504
|
+
*/
|
|
505
|
+
spend: MoneyDisplay | null;
|
|
392
506
|
cpc: MoneyDisplay | null;
|
|
393
507
|
cpm: MoneyDisplay | null;
|
|
394
508
|
ctr: number | null;
|
|
@@ -397,19 +511,21 @@ export type GetCampaignAnalyticsJsonData = {
|
|
|
397
511
|
platform: "META" | "GOOGLE";
|
|
398
512
|
impressions: number;
|
|
399
513
|
clicks: number;
|
|
400
|
-
spend
|
|
514
|
+
/** `null` when today's exchange rate is unavailable or spend is not reported. */
|
|
515
|
+
spend: MoneyDisplay | null;
|
|
401
516
|
daily?: Array<{
|
|
402
517
|
date: string;
|
|
403
518
|
impressions: number;
|
|
404
519
|
clicks: number;
|
|
405
|
-
spend
|
|
520
|
+
/** `null` when today's exchange rate is unavailable or spend is not reported. */
|
|
521
|
+
spend: MoneyDisplay | null;
|
|
406
522
|
}>;
|
|
407
523
|
}>;
|
|
408
524
|
daily?: Array<{
|
|
409
525
|
date: string;
|
|
410
526
|
impressions: number;
|
|
411
527
|
clicks: number;
|
|
412
|
-
spend: MoneyDisplay;
|
|
528
|
+
spend: MoneyDisplay | null;
|
|
413
529
|
}>;
|
|
414
530
|
warnings?: string[];
|
|
415
531
|
};
|
|
@@ -418,6 +534,8 @@ export type GetCampaignAnalyticsSummaryData = {
|
|
|
418
534
|
warnings?: string[];
|
|
419
535
|
};
|
|
420
536
|
export type GetArtistAnalyticsJsonData = {
|
|
537
|
+
/** Count-read completeness; sample identifies the existing demo reader. */
|
|
538
|
+
countsAvailability?: "available" | "incomplete" | "sample" | "not_linked";
|
|
421
539
|
artistId: string;
|
|
422
540
|
campaignCount: number;
|
|
423
541
|
dateRange: {
|
|
@@ -427,7 +545,11 @@ export type GetArtistAnalyticsJsonData = {
|
|
|
427
545
|
totals: {
|
|
428
546
|
impressions: number;
|
|
429
547
|
clicks: number;
|
|
430
|
-
|
|
548
|
+
/**
|
|
549
|
+
* In the artist's currency; `null` when today's exchange rate is unavailable
|
|
550
|
+
* or when spend is not reported for the selection (a warning says so).
|
|
551
|
+
*/
|
|
552
|
+
spend: MoneyDisplay | null;
|
|
431
553
|
cpc: MoneyDisplay | null;
|
|
432
554
|
cpm: MoneyDisplay | null;
|
|
433
555
|
ctr: number | null;
|
|
@@ -436,19 +558,19 @@ export type GetArtistAnalyticsJsonData = {
|
|
|
436
558
|
platform: "META" | "GOOGLE";
|
|
437
559
|
impressions: number;
|
|
438
560
|
clicks: number;
|
|
439
|
-
spend: MoneyDisplay;
|
|
561
|
+
spend: MoneyDisplay | null;
|
|
440
562
|
daily?: Array<{
|
|
441
563
|
date: string;
|
|
442
564
|
impressions: number;
|
|
443
565
|
clicks: number;
|
|
444
|
-
spend: MoneyDisplay;
|
|
566
|
+
spend: MoneyDisplay | null;
|
|
445
567
|
}>;
|
|
446
568
|
}>;
|
|
447
569
|
daily?: Array<{
|
|
448
570
|
date: string;
|
|
449
571
|
impressions: number;
|
|
450
572
|
clicks: number;
|
|
451
|
-
spend: MoneyDisplay;
|
|
573
|
+
spend: MoneyDisplay | null;
|
|
452
574
|
}>;
|
|
453
575
|
strongestCampaign?: {
|
|
454
576
|
campaignId: string;
|
|
@@ -461,6 +583,8 @@ export type GetArtistAnalyticsJsonData = {
|
|
|
461
583
|
warnings?: string[];
|
|
462
584
|
};
|
|
463
585
|
export type GetArtistAnalyticsSummaryData = {
|
|
586
|
+
/** Count-read completeness; sample identifies the existing demo reader. */
|
|
587
|
+
countsAvailability?: "available" | "incomplete" | "sample" | "not_linked";
|
|
464
588
|
summary: string;
|
|
465
589
|
campaignCount?: number;
|
|
466
590
|
dateRange?: {
|
|
@@ -478,4 +602,3 @@ export type GetArtistAnalyticsSummaryData = {
|
|
|
478
602
|
};
|
|
479
603
|
warnings?: string[];
|
|
480
604
|
};
|
|
481
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/version.d.ts
CHANGED
|
@@ -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 organic views directly attributed and subscribers credited by the ad account. 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: continued 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";
|