@canonry/canonry 7.50.1 → 7.51.1
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/agent-workspace/skills/canonry/references/canonry-cli.md +10 -4
- package/assets/assets/{AuditHistoryPanel-CX61JUTX.js → AuditHistoryPanel-CtWNkC6F.js} +1 -1
- package/assets/assets/{BacklinksPage-DqnhCPLf.js → BacklinksPage-Cs3_j55C.js} +1 -1
- package/assets/assets/{ChartPrimitives-CZ4wVBJL.js → ChartPrimitives-B6ryduMN.js} +1 -1
- package/assets/assets/{HistoryPage-rRFCtFL5.js → HistoryPage-_5Vwj01m.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-CfIZVKgg.js → MeasurementPropertyPage-B2yBTUZd.js} +3 -3
- package/assets/assets/ProjectPage-hs-9PcoS.js +8 -0
- package/assets/assets/RunsPage-B_mhz9vj.js +1 -0
- package/assets/assets/{SettingsPage-098-3JC1.js → SettingsPage-D1Lzcw03.js} +1 -1
- package/assets/assets/{SiteHealthSection-CfcQYuwU.js → SiteHealthSection-CGlrPdrk.js} +3 -3
- package/assets/assets/{TrafficPage-Bl6INnLT.js → TrafficPage-C27a0rQp.js} +3 -3
- package/assets/assets/{TrafficSourceDetailPage-Bu_0hPCZ.js → TrafficSourceDetailPage-DOSoQySv.js} +1 -1
- package/assets/assets/{extract-error-message-Dp43pOCs.js → extract-error-message-itBoiivg.js} +1 -1
- package/assets/assets/{index-Bll2LqWk.css → index-Br2WtEIO.css} +1 -1
- package/assets/assets/index-CdAuyP-X.js +86 -0
- package/assets/assets/{react-sigma_core.esm.min-DFuzq2Lx.js → react-sigma_core.esm.min-CPYhSQFc.js} +1 -1
- package/assets/assets/{v2-overview-adapter-CjEkLZwJ.js → v2-overview-adapter-DQXWmK0B.js} +1 -1
- package/assets/assets/{vendor-recharts-D-cUuLZo.js → vendor-recharts-D_R6YxjS.js} +1 -1
- package/assets/index.html +3 -3
- package/dist/{chunk-Q2XQ2YRP.js → chunk-35QQMVO6.js} +3 -3
- package/dist/{chunk-PNY6B5NF.js → chunk-GZPJ7TSE.js} +2 -2
- package/dist/{chunk-LAFRGDAN.js → chunk-J6WFXMTX.js} +6 -6
- package/dist/{chunk-ALZAMWTF.js → chunk-KU4TPVZV.js} +1 -1
- package/dist/{chunk-IFIPKXEP.js → chunk-P6D6P337.js} +3 -3
- package/dist/{chunk-4KAZO6PU.js → chunk-QQP7OQTW.js} +160 -31
- package/dist/{chunk-BGQV35Y6.js → chunk-RUWELF3K.js} +1 -1
- package/dist/{chunk-7MDPU6T5.js → chunk-W3BVUYOR.js} +36 -9
- package/dist/{chunk-HGWJCYGW.js → chunk-W43I4JKI.js} +2 -2
- package/dist/{chunk-WYI6KLC4.js → chunk-YOGHHIGE.js} +2376 -2172
- package/dist/{cli-catalog-XOBGGUUS.js → cli-catalog-KTQ6BHEU.js} +3 -3
- package/dist/cli-commands-NAUTCUCJ.js +15 -0
- package/dist/cli.js +10 -10
- package/dist/{demo-server-4E3LDHBX.js → demo-server-AKJZISIL.js} +86 -5
- package/dist/index.js +6 -6
- package/dist/{intelligence-service-ITB34LC7.js → intelligence-service-7BOU7ZAR.js} +2 -2
- package/dist/mcp.js +4 -4
- package/package.json +7 -7
- package/assets/assets/ProjectPage-DU88Joxp.js +0 -8
- package/assets/assets/RunsPage-B3NIVoWb.js +0 -1
- package/assets/assets/index-je69pgAK.js +0 -86
- package/dist/cli-commands-Y2YQGMEZ.js +0 -15
package/assets/index.html
CHANGED
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
|
|
13
13
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
|
14
14
|
<title>Canonry</title>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-CdAuyP-X.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-ZXXkndVj.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-twS1M3FF.js">
|
|
18
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-
|
|
18
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-D_R6YxjS.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="./assets/vendor-lucide-Y6jANGfG.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="./assets/vendor-markdown-B4giJcws.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="./assets/vendor-yaml-GWJz5H2G.js">
|
|
22
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
22
|
+
<link rel="stylesheet" crossorigin href="./assets/index-Br2WtEIO.css">
|
|
23
23
|
</head>
|
|
24
24
|
<body>
|
|
25
25
|
<div id="root"></div>
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
resolveCliAccess,
|
|
5
5
|
resolveCliAccessForInvocation,
|
|
6
6
|
windowOptions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KU4TPVZV.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError,
|
|
10
10
|
EXIT_USER_ERROR,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-HGMYEDAQ.js";
|
|
13
13
|
import {
|
|
14
14
|
OperationAccesses
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YOGHHIGE.js";
|
|
16
16
|
|
|
17
17
|
// src/cli-catalog.ts
|
|
18
18
|
import { createRequire } from "module";
|
|
@@ -109,7 +109,7 @@ async function dispatchRegisteredCommand(args, fallbackFormat, specs) {
|
|
|
109
109
|
const accessValue = accessFilterFromArgs(argsWithoutHelp);
|
|
110
110
|
validateAccessFilter(accessValue);
|
|
111
111
|
if (fallbackFormat !== "text") {
|
|
112
|
-
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-
|
|
112
|
+
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-KTQ6BHEU.js");
|
|
113
113
|
const group2 = argsWithoutHelp.find((arg) => !arg.startsWith("--"));
|
|
114
114
|
printCliCatalog2(specs, fallbackFormat, group2, accessValue);
|
|
115
115
|
return true;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
PACKAGE_VERSION,
|
|
3
3
|
canonryMcpTools,
|
|
4
4
|
toolOperationAccess
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RUWELF3K.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError,
|
|
8
8
|
EXIT_SYSTEM_ERROR,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
skillsClientSchema,
|
|
58
58
|
upgradeCaveatFor,
|
|
59
59
|
upgradeCommandFor
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-YOGHHIGE.js";
|
|
61
61
|
|
|
62
62
|
// src/config.ts
|
|
63
63
|
import fs from "fs";
|
|
@@ -22,19 +22,19 @@ import {
|
|
|
22
22
|
saveConfig,
|
|
23
23
|
saveConfigPatch,
|
|
24
24
|
sentimentInstallReadiness
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GZPJ7TSE.js";
|
|
26
26
|
import {
|
|
27
27
|
computeFactorAverages,
|
|
28
28
|
deleteSiteCrawlGraphLayout,
|
|
29
29
|
persistSiteCrawlGraphLayout,
|
|
30
30
|
prepareSiteCrawlGraphLayout,
|
|
31
31
|
recordedSharePct
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-W43I4JKI.js";
|
|
33
33
|
import {
|
|
34
34
|
CanonryMcpToolNames,
|
|
35
35
|
PACKAGE_VERSION,
|
|
36
36
|
canonryMcpTools
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-RUWELF3K.js";
|
|
38
38
|
import {
|
|
39
39
|
CliError
|
|
40
40
|
} from "./chunk-HGMYEDAQ.js";
|
|
@@ -241,7 +241,7 @@ import {
|
|
|
241
241
|
webhookResponseReason,
|
|
242
242
|
webhookTargetRefusalReason,
|
|
243
243
|
writeAuditLog
|
|
244
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-QQP7OQTW.js";
|
|
245
245
|
import {
|
|
246
246
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
247
247
|
AGENT_NONE,
|
|
@@ -489,7 +489,7 @@ import {
|
|
|
489
489
|
winnabilityClassLabel,
|
|
490
490
|
withRetry,
|
|
491
491
|
withSkippedProviders
|
|
492
|
-
} from "./chunk-
|
|
492
|
+
} from "./chunk-YOGHHIGE.js";
|
|
493
493
|
|
|
494
494
|
// src/runtime-context.ts
|
|
495
495
|
function cliRuntimeContext(env = process.env, stdio = process) {
|
|
@@ -8625,7 +8625,7 @@ function nonBlank(value) {
|
|
|
8625
8625
|
return trimmed ? trimmed : void 0;
|
|
8626
8626
|
}
|
|
8627
8627
|
function resolveBuildCommit(env = process.env) {
|
|
8628
|
-
const embedded = true ? "
|
|
8628
|
+
const embedded = true ? "3670fc2cb7d325827885188a8c94669d11a5f758" : void 0;
|
|
8629
8629
|
return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
|
|
8630
8630
|
}
|
|
8631
8631
|
function resolveInstanceIdentity(env = process.env) {
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
installSkills,
|
|
5
5
|
loadConfigRaw,
|
|
6
6
|
saveConfigPatch
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GZPJ7TSE.js";
|
|
8
8
|
import {
|
|
9
9
|
PACKAGE_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RUWELF3K.js";
|
|
11
11
|
import {
|
|
12
12
|
SKILL_MANIFEST_FILENAME,
|
|
13
13
|
SkillsClients
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YOGHHIGE.js";
|
|
15
15
|
|
|
16
16
|
// src/skills-autosync.ts
|
|
17
17
|
import fs from "fs";
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
ADS_WRITE_SCOPE,
|
|
7
7
|
AI_ENGINE_DOMAINS,
|
|
8
8
|
AI_PROVIDER_INFRA_DOMAINS,
|
|
9
|
+
AI_REFERRAL_ENGINE_DEFINITIONS,
|
|
9
10
|
AUTO_ALIAS_SCAN_MAX_RUNS,
|
|
10
11
|
AUTO_ALIAS_SCAN_MAX_SNAPSHOTS,
|
|
11
12
|
AdsActivationEntityTypes,
|
|
@@ -295,6 +296,7 @@ import {
|
|
|
295
296
|
buildMeasurementExecutionIdentity,
|
|
296
297
|
buildMeasurementRunManifestV1,
|
|
297
298
|
buildRedactedNotificationUrl,
|
|
299
|
+
buildStackedDailySeries,
|
|
298
300
|
businessProfileReviewsCover,
|
|
299
301
|
calendarDateRange,
|
|
300
302
|
calendarDateSchema,
|
|
@@ -850,6 +852,8 @@ import {
|
|
|
850
852
|
snapshotReportSchema,
|
|
851
853
|
snapshotRequestInputSchema,
|
|
852
854
|
snapshotRequestSchema,
|
|
855
|
+
socialPlatformForReferralSource,
|
|
856
|
+
socialPlatformLabel,
|
|
853
857
|
sortedUnique,
|
|
854
858
|
sourceBreakdownDtoSchema,
|
|
855
859
|
sourceBreakdownQuerySchema,
|
|
@@ -917,7 +921,7 @@ import {
|
|
|
917
921
|
wordpressSchemaDeployResultDtoSchema,
|
|
918
922
|
wordpressSchemaStatusResultDtoSchema,
|
|
919
923
|
wordpressStatusDtoSchema
|
|
920
|
-
} from "./chunk-
|
|
924
|
+
} from "./chunk-YOGHHIGE.js";
|
|
921
925
|
|
|
922
926
|
// src/intelligence-service.ts
|
|
923
927
|
import { eq as eq99, desc as desc45, asc as asc20, and as and82, ne as ne17, or as or24, inArray as inArray40, gte as gte26, lte as lte23, isNull as isNull19, sql as sql37, exists as exists2 } from "drizzle-orm";
|
|
@@ -35957,6 +35961,105 @@ async function trafficSamplesRoutes(app) {
|
|
|
35957
35961
|
// ../api-routes/src/referral-assessment.ts
|
|
35958
35962
|
import { and as and39, desc as desc22, eq as eq48, gte as gte10, lte as lte10, ne as ne11, sql as sql17 } from "drizzle-orm";
|
|
35959
35963
|
|
|
35964
|
+
// ../api-routes/src/ga-referral-groups.ts
|
|
35965
|
+
var CHART_SERIES_LIMIT = 5;
|
|
35966
|
+
var UNATTRIBUTED_AI_LABEL = "Unattributed AI";
|
|
35967
|
+
var UNATTRIBUTED_AI_KEY = "unattributed";
|
|
35968
|
+
var PAID_SOCIAL_CHANNEL_GROUP = "Paid Social";
|
|
35969
|
+
function bySessionsThenLabel(a, b) {
|
|
35970
|
+
return b.sessions - a.sessions || a.label.localeCompare(b.label);
|
|
35971
|
+
}
|
|
35972
|
+
function socialGroupKey(source, platform) {
|
|
35973
|
+
return platform ?? `source:${source}`;
|
|
35974
|
+
}
|
|
35975
|
+
function isPaidSocialChannel(channelGroup) {
|
|
35976
|
+
return channelGroup === PAID_SOCIAL_CHANNEL_GROUP;
|
|
35977
|
+
}
|
|
35978
|
+
function groupSocialPlatforms(rows) {
|
|
35979
|
+
const groups = /* @__PURE__ */ new Map();
|
|
35980
|
+
for (const row of rows) {
|
|
35981
|
+
const platform = socialPlatformForReferralSource(row.source);
|
|
35982
|
+
const key = socialGroupKey(row.source, platform);
|
|
35983
|
+
let group = groups.get(key);
|
|
35984
|
+
if (!group) {
|
|
35985
|
+
group = {
|
|
35986
|
+
platform,
|
|
35987
|
+
label: platform ? socialPlatformLabel(platform) : row.source,
|
|
35988
|
+
sessions: 0,
|
|
35989
|
+
organicSessions: 0,
|
|
35990
|
+
paidSessions: 0,
|
|
35991
|
+
sources: []
|
|
35992
|
+
};
|
|
35993
|
+
groups.set(key, group);
|
|
35994
|
+
}
|
|
35995
|
+
group.sessions += row.sessions;
|
|
35996
|
+
if (isPaidSocialChannel(row.channelGroup)) group.paidSessions += row.sessions;
|
|
35997
|
+
else group.organicSessions += row.sessions;
|
|
35998
|
+
group.sources.push(row);
|
|
35999
|
+
}
|
|
36000
|
+
const sorted = [...groups.values()].sort(bySessionsThenLabel);
|
|
36001
|
+
const shares = breakdownShares(sorted.map((group) => group.sessions));
|
|
36002
|
+
return sorted.map((group, index2) => ({
|
|
36003
|
+
...group,
|
|
36004
|
+
share: shares[index2] ?? 0,
|
|
36005
|
+
sources: [...group.sources].sort((a, b) => b.sessions - a.sessions || a.source.localeCompare(b.source))
|
|
36006
|
+
}));
|
|
36007
|
+
}
|
|
36008
|
+
function socialPlatformDailySeries(rows) {
|
|
36009
|
+
return buildStackedDailySeries(
|
|
36010
|
+
[...rows].map((row) => {
|
|
36011
|
+
const platform = socialPlatformForReferralSource(row.source);
|
|
36012
|
+
return {
|
|
36013
|
+
date: row.date,
|
|
36014
|
+
key: socialGroupKey(row.source, platform),
|
|
36015
|
+
label: platform ? socialPlatformLabel(platform) : row.source,
|
|
36016
|
+
sessions: row.sessions
|
|
36017
|
+
};
|
|
36018
|
+
}),
|
|
36019
|
+
{ limit: CHART_SERIES_LIMIT, otherLabel: "Other" }
|
|
36020
|
+
);
|
|
36021
|
+
}
|
|
36022
|
+
function paidSocialSummary(rows) {
|
|
36023
|
+
const total = rows.reduce((sum, row) => sum + row.sessions, 0);
|
|
36024
|
+
const paidSocialSessions = rows.filter((row) => isPaidSocialChannel(row.channelGroup)).reduce((sum, row) => sum + row.sessions, 0);
|
|
36025
|
+
return { paidSocialSessions, paidSocialShare: shareOf(paidSocialSessions, total) ?? 0 };
|
|
36026
|
+
}
|
|
36027
|
+
function aiEngineGroup(source) {
|
|
36028
|
+
const engine = aiEngineForReferralSource(source);
|
|
36029
|
+
return engine ? { engine, key: engine, label: aiReferralEngineLabel(engine) } : { engine: null, key: UNATTRIBUTED_AI_KEY, label: UNATTRIBUTED_AI_LABEL };
|
|
36030
|
+
}
|
|
36031
|
+
function groupAiEngines(rows) {
|
|
36032
|
+
const groups = /* @__PURE__ */ new Map();
|
|
36033
|
+
for (const row of rows) {
|
|
36034
|
+
const { engine, key, label } = aiEngineGroup(row.source);
|
|
36035
|
+
let group = groups.get(key);
|
|
36036
|
+
if (!group) {
|
|
36037
|
+
group = { engine, label, sessions: 0, organicSessions: 0, paidSessions: 0, sources: [] };
|
|
36038
|
+
groups.set(key, group);
|
|
36039
|
+
}
|
|
36040
|
+
group.sessions += row.sessions;
|
|
36041
|
+
if (row.trafficClass === AiReferralTrafficClasses.paid) group.paidSessions += row.sessions;
|
|
36042
|
+
else group.organicSessions += row.sessions;
|
|
36043
|
+
group.sources.push(row);
|
|
36044
|
+
}
|
|
36045
|
+
const sorted = [...groups.values()].sort((a, b) => Number(a.engine === null) - Number(b.engine === null) || bySessionsThenLabel(a, b));
|
|
36046
|
+
const shares = breakdownShares(sorted.map((group) => group.sessions));
|
|
36047
|
+
return sorted.map((group, index2) => ({
|
|
36048
|
+
...group,
|
|
36049
|
+
share: shares[index2] ?? 0,
|
|
36050
|
+
sources: [...group.sources].sort((a, b) => b.sessions - a.sessions || a.source.localeCompare(b.source))
|
|
36051
|
+
}));
|
|
36052
|
+
}
|
|
36053
|
+
function aiEngineDailySeries(winners) {
|
|
36054
|
+
return buildStackedDailySeries(
|
|
36055
|
+
[...winners].map((winner) => {
|
|
36056
|
+
const { key, label } = aiEngineGroup(winner.source);
|
|
36057
|
+
return { date: winner.date, key, label, sessions: winner.sessions };
|
|
36058
|
+
}),
|
|
36059
|
+
{ limit: CHART_SERIES_LIMIT, otherLabel: "Other" }
|
|
36060
|
+
);
|
|
36061
|
+
}
|
|
36062
|
+
|
|
35960
36063
|
// ../api-routes/src/ga-ai-referral-aggregation.ts
|
|
35961
36064
|
function normalizeAiTrafficClass(value) {
|
|
35962
36065
|
return value === AiReferralTrafficClasses.paid ? AiReferralTrafficClasses.paid : AiReferralTrafficClasses.organic;
|
|
@@ -36066,7 +36169,8 @@ function buildAiReferralDailySeries(rows) {
|
|
|
36066
36169
|
let totalSessions = 0;
|
|
36067
36170
|
let totalPaidSessions = 0;
|
|
36068
36171
|
let totalOrganicSessions = 0;
|
|
36069
|
-
|
|
36172
|
+
const winners = resolveWinningDimensions(rows);
|
|
36173
|
+
for (const winner of winners) {
|
|
36070
36174
|
const sessions = winner.paidSessions + winner.organicSessions;
|
|
36071
36175
|
let bySource = byDate.get(winner.date);
|
|
36072
36176
|
if (!bySource) {
|
|
@@ -36097,7 +36201,12 @@ function buildAiReferralDailySeries(rows) {
|
|
|
36097
36201
|
};
|
|
36098
36202
|
});
|
|
36099
36203
|
const sources = [...sourceTotals.entries()].sort(([aSource, aSessions], [bSource, bSessions]) => bSessions - aSessions || aSource.localeCompare(bSource)).map(([source]) => source);
|
|
36100
|
-
|
|
36204
|
+
const byEngine = aiEngineDailySeries(winners.map((winner) => ({
|
|
36205
|
+
date: winner.date,
|
|
36206
|
+
source: winner.source,
|
|
36207
|
+
sessions: winner.paidSessions + winner.organicSessions
|
|
36208
|
+
})));
|
|
36209
|
+
return { days, sources, totalSessions, totalPaidSessions, totalOrganicSessions, byEngine };
|
|
36101
36210
|
}
|
|
36102
36211
|
|
|
36103
36212
|
// ../api-routes/src/referral-assessment.ts
|
|
@@ -50494,24 +50603,28 @@ async function fetchLeadEvents(accessToken, propertyId, eventNames, days) {
|
|
|
50494
50603
|
}));
|
|
50495
50604
|
return { ...dateRange, attributionScope, rows };
|
|
50496
50605
|
}
|
|
50497
|
-
var AI_REFERRAL_SOURCE_FILTERS =
|
|
50498
|
-
{
|
|
50499
|
-
|
|
50500
|
-
|
|
50501
|
-
|
|
50502
|
-
|
|
50503
|
-
|
|
50504
|
-
|
|
50505
|
-
|
|
50506
|
-
|
|
50507
|
-
|
|
50508
|
-
|
|
50509
|
-
|
|
50510
|
-
|
|
50511
|
-
|
|
50512
|
-
|
|
50513
|
-
|
|
50514
|
-
|
|
50606
|
+
var AI_REFERRAL_SOURCE_FILTERS = AI_REFERRAL_ENGINE_DEFINITIONS.flatMap(
|
|
50607
|
+
({ domains, tokens, labels, appIds }) => {
|
|
50608
|
+
const filters = [
|
|
50609
|
+
...domains.flatMap((domain) => [
|
|
50610
|
+
{ matchType: "EXACT", value: domain },
|
|
50611
|
+
{ matchType: "ENDS_WITH", value: `.${domain}` }
|
|
50612
|
+
]),
|
|
50613
|
+
...tokens.map((token) => ({ matchType: "EXACT", value: token })),
|
|
50614
|
+
...appIds.flatMap((appId) => [
|
|
50615
|
+
{ matchType: "EXACT", value: appId },
|
|
50616
|
+
{ matchType: "EXACT", value: `android-app://${appId}` },
|
|
50617
|
+
{ matchType: "BEGINS_WITH", value: `android-app://${appId}/` }
|
|
50618
|
+
])
|
|
50619
|
+
];
|
|
50620
|
+
if (labels.length === 0) return filters;
|
|
50621
|
+
return [
|
|
50622
|
+
...filters,
|
|
50623
|
+
...labels.map((label) => ({ matchType: "BEGINS_WITH", value: `${label}_` })),
|
|
50624
|
+
...domains.map((domain) => ({ matchType: "BEGINS_WITH", value: `${domain}_` }))
|
|
50625
|
+
];
|
|
50626
|
+
}
|
|
50627
|
+
);
|
|
50515
50628
|
var AI_REFERRAL_PASSES = [
|
|
50516
50629
|
{
|
|
50517
50630
|
label: "session",
|
|
@@ -62438,6 +62551,11 @@ async function ga4Routes(app, opts) {
|
|
|
62438
62551
|
// conclusion the AI-referral surfaces reached in 4.135.0.
|
|
62439
62552
|
sessions: sql27`SUM(${gaSocialReferrals.sessions})`
|
|
62440
62553
|
}).from(gaSocialReferrals).where(and57(...socialConditions)).groupBy(gaSocialReferrals.source, gaSocialReferrals.medium, gaSocialReferrals.channelGroup).orderBy(sql27`SUM(${gaSocialReferrals.sessions}) DESC`).all();
|
|
62554
|
+
const socialDailyRows = app.db.select({
|
|
62555
|
+
date: gaSocialReferrals.date,
|
|
62556
|
+
source: gaSocialReferrals.source,
|
|
62557
|
+
sessions: sql27`SUM(${gaSocialReferrals.sessions})`
|
|
62558
|
+
}).from(gaSocialReferrals).where(and57(...socialConditions)).groupBy(gaSocialReferrals.date, gaSocialReferrals.source).all();
|
|
62441
62559
|
const socialTotals = app.db.select({
|
|
62442
62560
|
sessions: sql27`SUM(${gaSocialReferrals.sessions})`
|
|
62443
62561
|
}).from(gaSocialReferrals).where(and57(...socialConditions)).get();
|
|
@@ -62456,6 +62574,19 @@ async function ga4Routes(app, opts) {
|
|
|
62456
62574
|
directSessions: totalDirectSessions,
|
|
62457
62575
|
aiSessionsByChannelGroup: aiSummary.bySessionChannelGroup
|
|
62458
62576
|
});
|
|
62577
|
+
const aiReferralDtos = withSessionShares(aiReferrals.map((r) => ({
|
|
62578
|
+
source: r.source,
|
|
62579
|
+
medium: r.medium,
|
|
62580
|
+
trafficClass: normalizeAiTrafficClass(r.trafficClass),
|
|
62581
|
+
sourceDimension: r.sourceDimension,
|
|
62582
|
+
sessions: r.sessions ?? 0
|
|
62583
|
+
})));
|
|
62584
|
+
const socialReferralDtos = withSessionShares(socialReferrals.map((r) => ({
|
|
62585
|
+
source: r.source,
|
|
62586
|
+
medium: r.medium,
|
|
62587
|
+
channelGroup: r.channelGroup,
|
|
62588
|
+
sessions: r.sessions ?? 0
|
|
62589
|
+
})));
|
|
62459
62590
|
return {
|
|
62460
62591
|
totalSessions: total,
|
|
62461
62592
|
totalOrganicSessions,
|
|
@@ -62482,13 +62613,8 @@ async function ga4Routes(app, opts) {
|
|
|
62482
62613
|
// Shares of the rows' own sum, not of `aiSessionsDeduped`: that total
|
|
62483
62614
|
// keeps the winning lens per day, these rows one lens per source over the
|
|
62484
62615
|
// window, so it can exceed what the rows add up to.
|
|
62485
|
-
aiReferrals:
|
|
62486
|
-
|
|
62487
|
-
medium: r.medium,
|
|
62488
|
-
trafficClass: normalizeAiTrafficClass(r.trafficClass),
|
|
62489
|
-
sourceDimension: r.sourceDimension,
|
|
62490
|
-
sessions: r.sessions ?? 0
|
|
62491
|
-
}))),
|
|
62616
|
+
aiReferrals: aiReferralDtos,
|
|
62617
|
+
aiEngines: groupAiEngines(aiReferralDtos),
|
|
62492
62618
|
aiReferralLandingPages: aiReferralLandingPages.map((r) => ({
|
|
62493
62619
|
source: r.source,
|
|
62494
62620
|
medium: r.medium,
|
|
@@ -62505,13 +62631,15 @@ async function ga4Routes(app, opts) {
|
|
|
62505
62631
|
organicAiSessionsBySession: aiSummary.organicBySession.sessions,
|
|
62506
62632
|
// These rows partition `socialSessions` (same window, one lens), so each
|
|
62507
62633
|
// share is also the row's share of that total.
|
|
62508
|
-
socialReferrals:
|
|
62634
|
+
socialReferrals: socialReferralDtos,
|
|
62635
|
+
socialPlatforms: groupSocialPlatforms(socialReferralDtos),
|
|
62636
|
+
socialPlatformDaily: socialPlatformDailySeries(socialDailyRows.map((r) => ({
|
|
62637
|
+
date: r.date,
|
|
62509
62638
|
source: r.source,
|
|
62510
|
-
medium: r.medium,
|
|
62511
|
-
channelGroup: r.channelGroup,
|
|
62512
62639
|
sessions: r.sessions ?? 0
|
|
62513
62640
|
}))),
|
|
62514
62641
|
socialSessions,
|
|
62642
|
+
...paidSocialSummary(socialReferralDtos),
|
|
62515
62643
|
channelBreakdown,
|
|
62516
62644
|
organicSharePct: percentOf(totalOrganicSessions, total) ?? 0,
|
|
62517
62645
|
aiSharePct: percentOf(aiSummary.deduped.sessions, total) ?? 0,
|
|
@@ -95748,6 +95876,7 @@ export {
|
|
|
95748
95876
|
gaLeadEventsDaily,
|
|
95749
95877
|
gaMeasurementSyncStates,
|
|
95750
95878
|
gaAiReferrals,
|
|
95879
|
+
gaSocialReferrals,
|
|
95751
95880
|
gaTrafficSummaries,
|
|
95752
95881
|
gaTrafficWindowSummaries,
|
|
95753
95882
|
gaSearchLandingWindows,
|
|
@@ -163,7 +163,7 @@ import {
|
|
|
163
163
|
trafficSeriesGranularitySchema,
|
|
164
164
|
visibilityCompareSelectionSchema,
|
|
165
165
|
visibilityReportRequestSchema
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-YOGHHIGE.js";
|
|
167
167
|
|
|
168
168
|
// src/package-version.ts
|
|
169
169
|
import { createRequire } from "module";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
trackFeatureCompleted,
|
|
32
32
|
trackIntegrationConnection,
|
|
33
33
|
waitForServerRuntimeStartup
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-J6WFXMTX.js";
|
|
35
35
|
import {
|
|
36
36
|
clearDashboardPassword,
|
|
37
37
|
configExists,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
saveConfigPatch,
|
|
51
51
|
shouldPrintServeSkillsNudge,
|
|
52
52
|
withBootstrapProviderDefaults
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-GZPJ7TSE.js";
|
|
54
54
|
import {
|
|
55
55
|
emitJsonl,
|
|
56
56
|
getBoolean,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
resolveCliAccess,
|
|
65
65
|
stringOption,
|
|
66
66
|
unknownSubcommand
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-KU4TPVZV.js";
|
|
68
68
|
import {
|
|
69
69
|
DEFAULT_DEMO_TRUSTED_PROXIES,
|
|
70
70
|
trustedProxiesProblem,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
resolveDiscoveredGscSitemapUrls,
|
|
78
78
|
runMeasurementDraftAction,
|
|
79
79
|
submitGscSitemapBatches
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-RUWELF3K.js";
|
|
81
81
|
import {
|
|
82
82
|
CANONRY_DISCORD_URL,
|
|
83
83
|
CANONRY_ISSUES_URL,
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
rawEventSamples,
|
|
123
123
|
readMarketCompetitorNames,
|
|
124
124
|
runs
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-QQP7OQTW.js";
|
|
126
126
|
import {
|
|
127
127
|
AdsDeliverySnapshotStatuses,
|
|
128
128
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -278,7 +278,7 @@ import {
|
|
|
278
278
|
visibilityCompareSelectionSchema,
|
|
279
279
|
visibilityReportRequestSchema,
|
|
280
280
|
winnabilityClassSchema
|
|
281
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-YOGHHIGE.js";
|
|
282
282
|
|
|
283
283
|
// src/cli-commands/sentiment.ts
|
|
284
284
|
import "zod";
|
|
@@ -586,7 +586,7 @@ function parseDemoTrustedProxies(values) {
|
|
|
586
586
|
async function demoCommand(options) {
|
|
587
587
|
const { host, port } = parseDemoListenOptions(options);
|
|
588
588
|
const trustProxy = parseDemoTrustedProxies(options.trustProxy);
|
|
589
|
-
const { createDemoServer } = await import("./demo-server-
|
|
589
|
+
const { createDemoServer } = await import("./demo-server-AKJZISIL.js");
|
|
590
590
|
const app = await createDemoServer({ trustProxy });
|
|
591
591
|
let stopping = false;
|
|
592
592
|
const stop = () => {
|
|
@@ -1000,7 +1000,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
|
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
async function backfillInsightsCommand(project2, opts) {
|
|
1003
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
1003
|
+
const { IntelligenceService } = await import("./intelligence-service-7BOU7ZAR.js");
|
|
1004
1004
|
const config = loadConfig();
|
|
1005
1005
|
const db = createClient(config.database);
|
|
1006
1006
|
migrate(db);
|
|
@@ -5462,6 +5462,9 @@ async function gaTraffic(project2, opts) {
|
|
|
5462
5462
|
}
|
|
5463
5463
|
}
|
|
5464
5464
|
console.log();
|
|
5465
|
+
if ((result.aiEngines?.length ?? 0) > 0) {
|
|
5466
|
+
printReferralGroups("AI REFERRALS BY ENGINE", "ENGINE", result.aiEngines);
|
|
5467
|
+
}
|
|
5465
5468
|
if (result.aiReferrals.length > 0) {
|
|
5466
5469
|
const attrWidth = 12;
|
|
5467
5470
|
const classWidth = 8;
|
|
@@ -5496,6 +5499,13 @@ async function gaTraffic(project2, opts) {
|
|
|
5496
5499
|
const chanWidth = 12;
|
|
5497
5500
|
if (result.socialSessions > 0) {
|
|
5498
5501
|
console.log(` Social Sessions: ${result.socialSessions} (${result.socialSharePctDisplay} of total)`);
|
|
5502
|
+
if ((result.paidSocialSessions ?? 0) > 0) {
|
|
5503
|
+
console.log(` Paid Social: ${result.paidSocialSessions} (${formatPercent(result.paidSocialShare)} of social)`);
|
|
5504
|
+
}
|
|
5505
|
+
console.log();
|
|
5506
|
+
}
|
|
5507
|
+
if ((result.socialPlatforms?.length ?? 0) > 0) {
|
|
5508
|
+
printReferralGroups("SOCIAL PLATFORMS", "PLATFORM", result.socialPlatforms);
|
|
5499
5509
|
}
|
|
5500
5510
|
console.log(" SOCIAL REFERRAL SOURCES");
|
|
5501
5511
|
console.log(` ${"SOURCE".padEnd(25)} ${"MEDIUM".padEnd(15)} ${"CHANNEL".padEnd(chanWidth)} ${"SESSIONS".padEnd(10)} SHARE`);
|
|
@@ -5637,6 +5647,19 @@ async function gaAiReferralHistory(project2, opts) {
|
|
|
5637
5647
|
);
|
|
5638
5648
|
}
|
|
5639
5649
|
}
|
|
5650
|
+
function printReferralGroups(heading, column, groups) {
|
|
5651
|
+
const labelWidth = Math.min(30, Math.max(column.length, ...groups.map((group) => group.label.length)));
|
|
5652
|
+
console.log(` ${heading}`);
|
|
5653
|
+
console.log(` ${column.padEnd(labelWidth)} ${"SESSIONS".padEnd(10)}${"ORGANIC".padEnd(9)}${"PAID".padEnd(8)}${"SHARE".padEnd(8)}SOURCES`);
|
|
5654
|
+
console.log(` ${"\u2500".repeat(labelWidth)} ${"\u2500".repeat(10)}${"\u2500".repeat(9)}${"\u2500".repeat(8)}${"\u2500".repeat(8)}${"\u2500".repeat(7)}`);
|
|
5655
|
+
for (const group of groups) {
|
|
5656
|
+
const label = group.label.length > labelWidth ? group.label.slice(0, labelWidth - 3) + "..." : group.label;
|
|
5657
|
+
console.log(
|
|
5658
|
+
` ${label.padEnd(labelWidth)} ${String(group.sessions).padEnd(10)}${String(group.organicSessions).padEnd(9)}${String(group.paidSessions).padEnd(8)}${formatPercent(group.share).padEnd(8)}${group.sources.length}`
|
|
5659
|
+
);
|
|
5660
|
+
}
|
|
5661
|
+
console.log();
|
|
5662
|
+
}
|
|
5640
5663
|
async function gaAiReferralDaily(project2, opts) {
|
|
5641
5664
|
const client = getClient7();
|
|
5642
5665
|
const result = await client.gaAiReferralDaily(project2, rangeParams(opts));
|
|
@@ -5666,6 +5689,10 @@ async function gaAiReferralDaily(project2, opts) {
|
|
|
5666
5689
|
}
|
|
5667
5690
|
console.log(`
|
|
5668
5691
|
Total: ${result.totalSessions} sessions (${result.totalPaidSessions} paid, ${result.totalOrganicSessions} organic)`);
|
|
5692
|
+
if (result.byEngine && result.byEngine.series.length > 0) {
|
|
5693
|
+
const folded = result.byEngine.otherCount > 0 ? ` (Other folds ${result.byEngine.otherCount})` : "";
|
|
5694
|
+
console.log(` By engine${folded}: ${result.byEngine.series.map((series) => `${series.label} ${series.sessions}`).join(" \xB7 ")}`);
|
|
5695
|
+
}
|
|
5669
5696
|
}
|
|
5670
5697
|
async function gaSocialReferralHistory(project2, opts) {
|
|
5671
5698
|
const client = getClient7();
|
|
@@ -19378,7 +19405,7 @@ var SYSTEM_CLI_COMMANDS = [
|
|
|
19378
19405
|
options: { access: stringOption() },
|
|
19379
19406
|
run: async (input) => {
|
|
19380
19407
|
if (input.positionals.length > 1) throw usageError("Expected at most one command group");
|
|
19381
|
-
const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-
|
|
19408
|
+
const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-KTQ6BHEU.js"), import("./cli-commands-NAUTCUCJ.js")]);
|
|
19382
19409
|
printCliCatalog(REGISTERED_CLI_COMMANDS2, input.format, input.positionals[0], getString(input.values, "access"));
|
|
19383
19410
|
}
|
|
19384
19411
|
},
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
siteCrawlGraphNodes,
|
|
6
6
|
siteCrawlPages,
|
|
7
7
|
siteCrawlSnapshots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QQP7OQTW.js";
|
|
9
9
|
import {
|
|
10
10
|
SITE_CRAWL_GRAPH_MAX_EDGES,
|
|
11
11
|
SITE_CRAWL_GRAPH_MAX_NODES,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
factorStatusFromDistribution,
|
|
16
16
|
factorStatusFromScore,
|
|
17
17
|
roundPreservingTotal
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YOGHHIGE.js";
|
|
19
19
|
|
|
20
20
|
// src/site-audit-factors.ts
|
|
21
21
|
function recordedSharePct(factor) {
|