@canonry/canonry 4.169.0 → 4.170.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/assets/{AuditHistoryPanel-B3APGWB4.js → AuditHistoryPanel-BpIn6E7p.js} +1 -1
- package/assets/assets/{BacklinksPage-C-7KAx5g.js → BacklinksPage-BvOWgx1l.js} +1 -1
- package/assets/assets/{HistoryPage-Cf-dJuPA.js → HistoryPage-BXaQyur8.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-C1W-BG81.js → MeasurementPropertyPage-Buj708lc.js} +1 -1
- package/assets/assets/{ProjectPage-CnZC8AA7.js → ProjectPage-BwC29w2_.js} +1 -1
- package/assets/assets/{RunRow-DJQ4Up9f.js → RunRow-C9hp5yEp.js} +1 -1
- package/assets/assets/{RunsPage-BbtbYLgP.js → RunsPage-DmkRH1iu.js} +1 -1
- package/assets/assets/{SettingsPage-DG-6IuO1.js → SettingsPage-BIyuj-gL.js} +1 -1
- package/assets/assets/{SiteHealthSection-rCrAk98W.js → SiteHealthSection-ZlYR3JtG.js} +3 -3
- package/assets/assets/{TrafficPage-CpS4K8eT.js → TrafficPage-PxIetTWH.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-D_zPmdUz.js → TrafficSourceDetailPage-BhF_leby.js} +1 -1
- package/assets/assets/{extract-error-message-40mUXcbq.js → extract-error-message-Dd2su-BK.js} +1 -1
- package/assets/assets/{index-Nk2MzD2d.js → index-DyjfMyum.js} +21 -21
- package/assets/assets/{react-sigma_core.esm.min-BOZ1RPZp.js → react-sigma_core.esm.min-CsNemdas.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-HVBAGSQC.js → chunk-BMW3AURU.js} +567 -5
- package/dist/{chunk-U2X42SKN.js → chunk-CCZNCH7Y.js} +3641 -1154
- package/dist/{chunk-K7XXDKYY.js → chunk-HJ7W2LXI.js} +165 -1
- package/dist/{chunk-ANA3GJSC.js → chunk-HTUI6BSK.js} +2 -2
- package/dist/{chunk-T2UJAYTX.js → chunk-NMCLLN5X.js} +3376 -137
- package/dist/cli.js +5 -5
- package/dist/index.d.ts +132 -2
- package/dist/index.js +10 -4
- package/dist/{intelligence-service-6ZYTEFXX.js → intelligence-service-64IPZ4NU.js} +2 -2
- package/dist/mcp.js +3 -3
- package/package.json +10 -10
|
@@ -5194,7 +5194,9 @@ var runKindSchema = z8.enum([
|
|
|
5194
5194
|
"aeo-discover-seed",
|
|
5195
5195
|
"aeo-discover-probe",
|
|
5196
5196
|
"gbp-sync",
|
|
5197
|
-
"ads-sync"
|
|
5197
|
+
"ads-sync",
|
|
5198
|
+
"google-ads-sync",
|
|
5199
|
+
"gtm-sync"
|
|
5198
5200
|
]);
|
|
5199
5201
|
var RunKinds = runKindSchema.enum;
|
|
5200
5202
|
var runTriggerSchema = z8.enum(["manual", "scheduled", "config-apply", "backfill", "probe"]);
|
|
@@ -5453,6 +5455,8 @@ var PROJECTS_WRITE_SCOPE = "projects.write";
|
|
|
5453
5455
|
var ADS_WRITE_SCOPE = "ads.write";
|
|
5454
5456
|
var ADS_APPROVE_SCOPE = "ads.approve";
|
|
5455
5457
|
var ADS_ACTIVATE_SCOPE = "ads.activate";
|
|
5458
|
+
var GOOGLE_MARKETING_LIVE_READ_SCOPE = "google-marketing.read-live";
|
|
5459
|
+
var GOOGLE_MARKETING_WRITE_SCOPE = "google-marketing.write";
|
|
5456
5460
|
function grantsWrite(scope) {
|
|
5457
5461
|
return scope === WILDCARD_SCOPE || scope === "write" || scope.endsWith(".write") || scope === ADS_APPROVE_SCOPE || scope === ADS_ACTIVATE_SCOPE;
|
|
5458
5462
|
}
|
|
@@ -8020,6 +8024,100 @@ var googleAdsEffectiveGoalGraphDtoSchema = z19.object({
|
|
|
8020
8024
|
derivedAt: z19.string(),
|
|
8021
8025
|
campaigns: z19.array(googleAdsEffectiveCampaignGoalDtoSchema)
|
|
8022
8026
|
}).strict();
|
|
8027
|
+
function sortedUnique2(ids) {
|
|
8028
|
+
return [...new Set(ids)].sort((left, right) => left.localeCompare(right));
|
|
8029
|
+
}
|
|
8030
|
+
function actionMembership(actionIds, actionsById) {
|
|
8031
|
+
const primary = [];
|
|
8032
|
+
const secondary = [];
|
|
8033
|
+
const missing = [];
|
|
8034
|
+
for (const actionId of sortedUnique2(actionIds)) {
|
|
8035
|
+
const action = actionsById.get(actionId);
|
|
8036
|
+
if (!action) {
|
|
8037
|
+
missing.push(actionId);
|
|
8038
|
+
continue;
|
|
8039
|
+
}
|
|
8040
|
+
if (action.primaryForGoal) primary.push(actionId);
|
|
8041
|
+
else secondary.push(actionId);
|
|
8042
|
+
}
|
|
8043
|
+
return {
|
|
8044
|
+
conversionActionIds: sortedUnique2(actionIds),
|
|
8045
|
+
primaryConversionActionIds: primary,
|
|
8046
|
+
secondaryConversionActionIds: secondary,
|
|
8047
|
+
missingConversionActionIds: missing
|
|
8048
|
+
};
|
|
8049
|
+
}
|
|
8050
|
+
function categoryGoalActions(goal, actions) {
|
|
8051
|
+
return actions.filter((action) => action.category === goal.category && action.origin === goal.origin).map((action) => action.id);
|
|
8052
|
+
}
|
|
8053
|
+
function deriveGoogleAdsEffectiveGoalGraph(inventory) {
|
|
8054
|
+
const actionsById = new Map(inventory.conversionActions.map((action) => [action.id, action]));
|
|
8055
|
+
const configurationsByCampaign = new Map(
|
|
8056
|
+
[...inventory.campaignGoalConfigurations].sort((left, right) => left.campaignId.localeCompare(right.campaignId)).map((configuration) => [configuration.campaignId, configuration])
|
|
8057
|
+
);
|
|
8058
|
+
const customGoalsById = new Map(inventory.customConversionGoals.map((goal) => [goal.id, goal]));
|
|
8059
|
+
const customerGoals = [...inventory.customerConversionGoals].sort((left, right) => `${left.category}\0${left.origin}`.localeCompare(`${right.category}\0${right.origin}`));
|
|
8060
|
+
const campaignGoalsByCampaign = /* @__PURE__ */ new Map();
|
|
8061
|
+
for (const goal of inventory.campaignConversionGoals) {
|
|
8062
|
+
const existing = campaignGoalsByCampaign.get(goal.campaignId) ?? [];
|
|
8063
|
+
existing.push(goal);
|
|
8064
|
+
campaignGoalsByCampaign.set(goal.campaignId, existing);
|
|
8065
|
+
}
|
|
8066
|
+
for (const goals of campaignGoalsByCampaign.values()) {
|
|
8067
|
+
goals.sort((left, right) => `${left.category}\0${left.origin}`.localeCompare(`${right.category}\0${right.origin}`));
|
|
8068
|
+
}
|
|
8069
|
+
return {
|
|
8070
|
+
customerId: inventory.customerId,
|
|
8071
|
+
derivedAt: inventory.fetchedAt,
|
|
8072
|
+
campaigns: [...inventory.campaigns].sort((left, right) => left.id.localeCompare(right.id)).map((campaign) => {
|
|
8073
|
+
const configuration = configurationsByCampaign.get(campaign.id);
|
|
8074
|
+
const goalConfigLevel = configuration?.goalConfigLevel ?? GoogleAdsGoalConfigurationLevels.customer;
|
|
8075
|
+
const customGoalId = configuration?.customGoalId ?? null;
|
|
8076
|
+
if (customGoalId) {
|
|
8077
|
+
const customGoal = customGoalsById.get(customGoalId);
|
|
8078
|
+
if (!customGoal) {
|
|
8079
|
+
return {
|
|
8080
|
+
campaignId: campaign.id,
|
|
8081
|
+
goalConfigLevel,
|
|
8082
|
+
customGoalId,
|
|
8083
|
+
missingCustomGoalId: customGoalId,
|
|
8084
|
+
goals: []
|
|
8085
|
+
};
|
|
8086
|
+
}
|
|
8087
|
+
return {
|
|
8088
|
+
campaignId: campaign.id,
|
|
8089
|
+
goalConfigLevel,
|
|
8090
|
+
customGoalId,
|
|
8091
|
+
missingCustomGoalId: null,
|
|
8092
|
+
goals: [{
|
|
8093
|
+
source: GoogleAdsEffectiveGoalSources["custom-goal"],
|
|
8094
|
+
category: null,
|
|
8095
|
+
origin: null,
|
|
8096
|
+
customGoalId,
|
|
8097
|
+
biddable: null,
|
|
8098
|
+
...actionMembership(customGoal.conversionActionIds, actionsById)
|
|
8099
|
+
}]
|
|
8100
|
+
};
|
|
8101
|
+
}
|
|
8102
|
+
const configuredGoals = goalConfigLevel === GoogleAdsGoalConfigurationLevels.campaign ? campaignGoalsByCampaign.get(campaign.id) ?? [] : customerGoals;
|
|
8103
|
+
const source = goalConfigLevel === GoogleAdsGoalConfigurationLevels.campaign ? GoogleAdsEffectiveGoalSources["campaign-goal"] : GoogleAdsEffectiveGoalSources["customer-goal"];
|
|
8104
|
+
return {
|
|
8105
|
+
campaignId: campaign.id,
|
|
8106
|
+
goalConfigLevel,
|
|
8107
|
+
customGoalId: null,
|
|
8108
|
+
missingCustomGoalId: null,
|
|
8109
|
+
goals: configuredGoals.map((goal) => ({
|
|
8110
|
+
source,
|
|
8111
|
+
category: goal.category,
|
|
8112
|
+
origin: goal.origin,
|
|
8113
|
+
customGoalId: null,
|
|
8114
|
+
biddable: goal.biddable,
|
|
8115
|
+
...actionMembership(categoryGoalActions(goal, inventory.conversionActions), actionsById)
|
|
8116
|
+
}))
|
|
8117
|
+
};
|
|
8118
|
+
})
|
|
8119
|
+
};
|
|
8120
|
+
}
|
|
8023
8121
|
var GOOGLE_ADS_CAMPAIGN_METRICS_MAX_CAMPAIGNS = 50;
|
|
8024
8122
|
var GOOGLE_ADS_CAMPAIGN_METRICS_MAX_DAYS = 31;
|
|
8025
8123
|
var GOOGLE_ADS_CAMPAIGN_METRICS_MAX_ROWS = GOOGLE_ADS_CAMPAIGN_METRICS_MAX_CAMPAIGNS * GOOGLE_ADS_CAMPAIGN_METRICS_MAX_DAYS;
|
|
@@ -8543,6 +8641,18 @@ var conversionTrackingIntegrityEvidenceSchema = z21.object({
|
|
|
8543
8641
|
runtimeVerificationRequired: z21.boolean(),
|
|
8544
8642
|
runtimeObservation: conversionTrackingRuntimeObservationSchema
|
|
8545
8643
|
}).strict();
|
|
8644
|
+
function deriveConversionTrackingIntegrityStatus(evidence) {
|
|
8645
|
+
if (evidence.staticCheck !== ConversionTrackingStaticCheckStates.consistent) {
|
|
8646
|
+
return ConversionTrackingIntegrityStatuses.configured;
|
|
8647
|
+
}
|
|
8648
|
+
if (!evidence.runtimeVerificationRequired) {
|
|
8649
|
+
return ConversionTrackingIntegrityStatuses["statically-consistent"];
|
|
8650
|
+
}
|
|
8651
|
+
if (evidence.runtimeObservation === ConversionTrackingRuntimeObservations.observed) {
|
|
8652
|
+
return ConversionTrackingIntegrityStatuses.observed;
|
|
8653
|
+
}
|
|
8654
|
+
return ConversionTrackingIntegrityStatuses["runtime-unverified"];
|
|
8655
|
+
}
|
|
8546
8656
|
var conversionTrackingIntegrityFindingDtoSchema = z21.object({
|
|
8547
8657
|
code: conversionTrackingFindingCodeSchema,
|
|
8548
8658
|
subject: z21.string().trim().min(1),
|
|
@@ -16082,6 +16192,58 @@ export {
|
|
|
16082
16192
|
gscSubmitSitemapsRequestDtoSchema,
|
|
16083
16193
|
gscSubmitSitemapsResponseDtoSchema,
|
|
16084
16194
|
gscDiscoverSitemapsResponseDtoSchema,
|
|
16195
|
+
GoogleAdsConnectionStates,
|
|
16196
|
+
GoogleAdsCustomerStatuses,
|
|
16197
|
+
GoogleAdsCampaignStatuses,
|
|
16198
|
+
GoogleAdsConversionActionStatuses,
|
|
16199
|
+
GoogleAdsGoalConfigurationLevels,
|
|
16200
|
+
googleAdsAccessibleCustomerDtoSchema,
|
|
16201
|
+
googleAdsAccessibleCustomersResponseSchema,
|
|
16202
|
+
googleAdsConnectionStatusDtoSchema,
|
|
16203
|
+
deriveGoogleAdsEffectiveGoalGraph,
|
|
16204
|
+
GOOGLE_ADS_CAMPAIGN_METRICS_MAX_CAMPAIGNS,
|
|
16205
|
+
GOOGLE_ADS_CAMPAIGN_METRICS_MAX_DAYS,
|
|
16206
|
+
GOOGLE_ADS_CAMPAIGN_METRICS_MAX_ROWS,
|
|
16207
|
+
googleAdsCampaignMetricsQuerySchema,
|
|
16208
|
+
GoogleAdsSnapshotKinds,
|
|
16209
|
+
googleAdsRawSnapshotDtoSchema,
|
|
16210
|
+
GtmConnectionStates,
|
|
16211
|
+
gtmAccountsResponseSchema,
|
|
16212
|
+
gtmContainerListResponseSchema,
|
|
16213
|
+
gtmWorkspaceListResponseSchema,
|
|
16214
|
+
gtmGoogleAdsConversionIdMappingDtoSchema,
|
|
16215
|
+
gtmGoogleAdsConversionLabelMappingDtoSchema,
|
|
16216
|
+
gtmGoogleAdsConversionValueMappingDtoSchema,
|
|
16217
|
+
gtmGoogleAdsTransactionIdMappingDtoSchema,
|
|
16218
|
+
gtmGoogleAdsCurrencyMappingDtoSchema,
|
|
16219
|
+
gtmConnectionStatusDtoSchema,
|
|
16220
|
+
GtmSnapshotKinds,
|
|
16221
|
+
gtmRawSnapshotDtoSchema,
|
|
16222
|
+
ConversionTrackingFindingOutcomes,
|
|
16223
|
+
ConversionTrackingFindingCodes,
|
|
16224
|
+
conversionTrackingContractSchema,
|
|
16225
|
+
conversionTrackingContractWriteRequestSchema,
|
|
16226
|
+
ConversionTrackingStaticCheckStates,
|
|
16227
|
+
ConversionTrackingRuntimeObservations,
|
|
16228
|
+
deriveConversionTrackingIntegrityStatus,
|
|
16229
|
+
conversionTrackingIntegrityAssessmentDtoSchema,
|
|
16230
|
+
canonicalizeGtmAccountId,
|
|
16231
|
+
canonicalizeGtmContainerId,
|
|
16232
|
+
canonicalizeGoogleAdsCustomerSelection,
|
|
16233
|
+
canonicalizeGtmResourceSelection,
|
|
16234
|
+
googleMarketingProviderSchema,
|
|
16235
|
+
GoogleMarketingProviders,
|
|
16236
|
+
googleMarketingOAuthConnectRequestSchema,
|
|
16237
|
+
googleMarketingOAuthConnectResponseSchema,
|
|
16238
|
+
googleAdsCustomerSelectionRequestSchema,
|
|
16239
|
+
gtmResourceSelectionRequestSchema,
|
|
16240
|
+
googleMarketingDisconnectResponseSchema,
|
|
16241
|
+
GOOGLE_MARKETING_STORED_SNAPSHOT_PAGE_MAX,
|
|
16242
|
+
googleAdsStoredSnapshotPageSchema,
|
|
16243
|
+
googleAdsStoredSnapshotReadEnvelopeSchema,
|
|
16244
|
+
gtmStoredSnapshotPageSchema,
|
|
16245
|
+
gtmStoredSnapshotReadEnvelopeSchema,
|
|
16246
|
+
conversionTrackingIntegrityReadEnvelopeSchema,
|
|
16085
16247
|
gbpAccountListResponseSchema,
|
|
16086
16248
|
gbpLocationDtoSchema,
|
|
16087
16249
|
gbpLocationListResponseSchema,
|
|
@@ -16460,6 +16622,8 @@ export {
|
|
|
16460
16622
|
ADS_WRITE_SCOPE,
|
|
16461
16623
|
ADS_APPROVE_SCOPE,
|
|
16462
16624
|
ADS_ACTIVATE_SCOPE,
|
|
16625
|
+
GOOGLE_MARKETING_LIVE_READ_SCOPE,
|
|
16626
|
+
GOOGLE_MARKETING_WRITE_SCOPE,
|
|
16463
16627
|
isReadOnlyKey,
|
|
16464
16628
|
UserRoles,
|
|
16465
16629
|
USER_PASSWORD_MIN_LENGTH,
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
installSkills,
|
|
6
6
|
loadConfigRaw,
|
|
7
7
|
saveConfigPatch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BMW3AURU.js";
|
|
9
9
|
import {
|
|
10
10
|
SKILL_MANIFEST_FILENAME,
|
|
11
11
|
SkillsClients
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HJ7W2LXI.js";
|
|
13
13
|
|
|
14
14
|
// src/skills-autosync.ts
|
|
15
15
|
import fs from "fs";
|