@canonry/canonry 7.50.1 → 7.51.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.
Files changed (40) hide show
  1. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +9 -3
  2. package/assets/assets/{AuditHistoryPanel-CX61JUTX.js → AuditHistoryPanel-wdUF2gRW.js} +1 -1
  3. package/assets/assets/{BacklinksPage-DqnhCPLf.js → BacklinksPage-CJY1OPYR.js} +1 -1
  4. package/assets/assets/{ChartPrimitives-CZ4wVBJL.js → ChartPrimitives-B6ryduMN.js} +1 -1
  5. package/assets/assets/{HistoryPage-rRFCtFL5.js → HistoryPage-BuJ6rkxQ.js} +1 -1
  6. package/assets/assets/{MeasurementPropertyPage-CfIZVKgg.js → MeasurementPropertyPage-B2L33Gl3.js} +3 -3
  7. package/assets/assets/ProjectPage-26oduSKK.js +8 -0
  8. package/assets/assets/RunsPage-BLflXqnd.js +1 -0
  9. package/assets/assets/{SettingsPage-098-3JC1.js → SettingsPage-Dh5p6mPo.js} +1 -1
  10. package/assets/assets/{SiteHealthSection-CfcQYuwU.js → SiteHealthSection-ulXVd0QR.js} +3 -3
  11. package/assets/assets/{TrafficPage-Bl6INnLT.js → TrafficPage-DKn4SB01.js} +3 -3
  12. package/assets/assets/{TrafficSourceDetailPage-Bu_0hPCZ.js → TrafficSourceDetailPage-Ew3DvkC2.js} +1 -1
  13. package/assets/assets/{extract-error-message-Dp43pOCs.js → extract-error-message-Bqp9rHty.js} +1 -1
  14. package/assets/assets/{index-Bll2LqWk.css → index-Br2WtEIO.css} +1 -1
  15. package/assets/assets/{index-je69pgAK.js → index-CKxYUKlD.js} +26 -26
  16. package/assets/assets/{react-sigma_core.esm.min-DFuzq2Lx.js → react-sigma_core.esm.min-CmQ0UJ-q.js} +1 -1
  17. package/assets/assets/{v2-overview-adapter-CjEkLZwJ.js → v2-overview-adapter-P6JaB0ii.js} +1 -1
  18. package/assets/assets/{vendor-recharts-D-cUuLZo.js → vendor-recharts-D_R6YxjS.js} +1 -1
  19. package/assets/index.html +3 -3
  20. package/dist/{chunk-PNY6B5NF.js → chunk-2SWNW5O6.js} +2 -2
  21. package/dist/{chunk-BGQV35Y6.js → chunk-5ZYVREGG.js} +1 -1
  22. package/dist/{chunk-WYI6KLC4.js → chunk-77T24PPR.js} +2347 -2162
  23. package/dist/{chunk-IFIPKXEP.js → chunk-CNBKVUMJ.js} +3 -3
  24. package/dist/{chunk-HGWJCYGW.js → chunk-GG6ECPAO.js} +2 -2
  25. package/dist/{chunk-ALZAMWTF.js → chunk-IKIAETMK.js} +1 -1
  26. package/dist/{chunk-7MDPU6T5.js → chunk-T4EXTQQK.js} +36 -9
  27. package/dist/{chunk-4KAZO6PU.js → chunk-UJLIMXPX.js} +137 -13
  28. package/dist/{chunk-LAFRGDAN.js → chunk-WTATIC3M.js} +6 -6
  29. package/dist/{chunk-Q2XQ2YRP.js → chunk-ZKIUO7RY.js} +3 -3
  30. package/dist/{cli-catalog-XOBGGUUS.js → cli-catalog-MGEBTBSU.js} +3 -3
  31. package/dist/cli-commands-D5TBJLXO.js +15 -0
  32. package/dist/cli.js +10 -10
  33. package/dist/{demo-server-4E3LDHBX.js → demo-server-GJD7I6FS.js} +86 -5
  34. package/dist/index.js +6 -6
  35. package/dist/{intelligence-service-ITB34LC7.js → intelligence-service-COKNG64A.js} +2 -2
  36. package/dist/mcp.js +4 -4
  37. package/package.json +12 -12
  38. package/assets/assets/ProjectPage-DU88Joxp.js +0 -8
  39. package/assets/assets/RunsPage-B3NIVoWb.js +0 -1
  40. package/dist/cli-commands-Y2YQGMEZ.js +0 -15
@@ -4,14 +4,14 @@ import {
4
4
  installSkills,
5
5
  loadConfigRaw,
6
6
  saveConfigPatch
7
- } from "./chunk-PNY6B5NF.js";
7
+ } from "./chunk-2SWNW5O6.js";
8
8
  import {
9
9
  PACKAGE_VERSION
10
- } from "./chunk-BGQV35Y6.js";
10
+ } from "./chunk-5ZYVREGG.js";
11
11
  import {
12
12
  SKILL_MANIFEST_FILENAME,
13
13
  SkillsClients
14
- } from "./chunk-WYI6KLC4.js";
14
+ } from "./chunk-77T24PPR.js";
15
15
 
16
16
  // src/skills-autosync.ts
17
17
  import fs from "fs";
@@ -5,7 +5,7 @@ import {
5
5
  siteCrawlGraphNodes,
6
6
  siteCrawlPages,
7
7
  siteCrawlSnapshots
8
- } from "./chunk-4KAZO6PU.js";
8
+ } from "./chunk-UJLIMXPX.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-WYI6KLC4.js";
18
+ } from "./chunk-77T24PPR.js";
19
19
 
20
20
  // src/site-audit-factors.ts
21
21
  function recordedSharePct(factor) {
@@ -5,7 +5,7 @@ import {
5
5
  AppError,
6
6
  parseWindowIn,
7
7
  resolveDateRange
8
- } from "./chunk-WYI6KLC4.js";
8
+ } from "./chunk-77T24PPR.js";
9
9
 
10
10
  // src/cli-access.ts
11
11
  var CLI_ACCESS_BY_ID = Object.freeze({
@@ -31,7 +31,7 @@ import {
31
31
  trackFeatureCompleted,
32
32
  trackIntegrationConnection,
33
33
  waitForServerRuntimeStartup
34
- } from "./chunk-LAFRGDAN.js";
34
+ } from "./chunk-WTATIC3M.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-PNY6B5NF.js";
53
+ } from "./chunk-2SWNW5O6.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-ALZAMWTF.js";
67
+ } from "./chunk-IKIAETMK.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-BGQV35Y6.js";
80
+ } from "./chunk-5ZYVREGG.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-4KAZO6PU.js";
125
+ } from "./chunk-UJLIMXPX.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-WYI6KLC4.js";
281
+ } from "./chunk-77T24PPR.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-4E3LDHBX.js");
589
+ const { createDemoServer } = await import("./demo-server-GJD7I6FS.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-ITB34LC7.js");
1003
+ const { IntelligenceService } = await import("./intelligence-service-COKNG64A.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-XOBGGUUS.js"), import("./cli-commands-Y2YQGMEZ.js")]);
19408
+ const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-MGEBTBSU.js"), import("./cli-commands-D5TBJLXO.js")]);
19382
19409
  printCliCatalog(REGISTERED_CLI_COMMANDS2, input.format, input.positionals[0], getString(input.values, "access"));
19383
19410
  }
19384
19411
  },
@@ -295,6 +295,7 @@ import {
295
295
  buildMeasurementExecutionIdentity,
296
296
  buildMeasurementRunManifestV1,
297
297
  buildRedactedNotificationUrl,
298
+ buildStackedDailySeries,
298
299
  businessProfileReviewsCover,
299
300
  calendarDateRange,
300
301
  calendarDateSchema,
@@ -850,6 +851,8 @@ import {
850
851
  snapshotReportSchema,
851
852
  snapshotRequestInputSchema,
852
853
  snapshotRequestSchema,
854
+ socialPlatformForReferralSource,
855
+ socialPlatformLabel,
853
856
  sortedUnique,
854
857
  sourceBreakdownDtoSchema,
855
858
  sourceBreakdownQuerySchema,
@@ -917,7 +920,7 @@ import {
917
920
  wordpressSchemaDeployResultDtoSchema,
918
921
  wordpressSchemaStatusResultDtoSchema,
919
922
  wordpressStatusDtoSchema
920
- } from "./chunk-WYI6KLC4.js";
923
+ } from "./chunk-77T24PPR.js";
921
924
 
922
925
  // src/intelligence-service.ts
923
926
  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 +35960,105 @@ async function trafficSamplesRoutes(app) {
35957
35960
  // ../api-routes/src/referral-assessment.ts
35958
35961
  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
35962
 
35963
+ // ../api-routes/src/ga-referral-groups.ts
35964
+ var CHART_SERIES_LIMIT = 5;
35965
+ var UNATTRIBUTED_AI_LABEL = "Unattributed AI";
35966
+ var UNATTRIBUTED_AI_KEY = "unattributed";
35967
+ var PAID_SOCIAL_CHANNEL_GROUP = "Paid Social";
35968
+ function bySessionsThenLabel(a, b) {
35969
+ return b.sessions - a.sessions || a.label.localeCompare(b.label);
35970
+ }
35971
+ function socialGroupKey(source, platform) {
35972
+ return platform ?? `source:${source}`;
35973
+ }
35974
+ function isPaidSocialChannel(channelGroup) {
35975
+ return channelGroup === PAID_SOCIAL_CHANNEL_GROUP;
35976
+ }
35977
+ function groupSocialPlatforms(rows) {
35978
+ const groups = /* @__PURE__ */ new Map();
35979
+ for (const row of rows) {
35980
+ const platform = socialPlatformForReferralSource(row.source);
35981
+ const key = socialGroupKey(row.source, platform);
35982
+ let group = groups.get(key);
35983
+ if (!group) {
35984
+ group = {
35985
+ platform,
35986
+ label: platform ? socialPlatformLabel(platform) : row.source,
35987
+ sessions: 0,
35988
+ organicSessions: 0,
35989
+ paidSessions: 0,
35990
+ sources: []
35991
+ };
35992
+ groups.set(key, group);
35993
+ }
35994
+ group.sessions += row.sessions;
35995
+ if (isPaidSocialChannel(row.channelGroup)) group.paidSessions += row.sessions;
35996
+ else group.organicSessions += row.sessions;
35997
+ group.sources.push(row);
35998
+ }
35999
+ const sorted = [...groups.values()].sort(bySessionsThenLabel);
36000
+ const shares = breakdownShares(sorted.map((group) => group.sessions));
36001
+ return sorted.map((group, index2) => ({
36002
+ ...group,
36003
+ share: shares[index2] ?? 0,
36004
+ sources: [...group.sources].sort((a, b) => b.sessions - a.sessions || a.source.localeCompare(b.source))
36005
+ }));
36006
+ }
36007
+ function socialPlatformDailySeries(rows) {
36008
+ return buildStackedDailySeries(
36009
+ [...rows].map((row) => {
36010
+ const platform = socialPlatformForReferralSource(row.source);
36011
+ return {
36012
+ date: row.date,
36013
+ key: socialGroupKey(row.source, platform),
36014
+ label: platform ? socialPlatformLabel(platform) : row.source,
36015
+ sessions: row.sessions
36016
+ };
36017
+ }),
36018
+ { limit: CHART_SERIES_LIMIT, otherLabel: "Other" }
36019
+ );
36020
+ }
36021
+ function paidSocialSummary(rows) {
36022
+ const total = rows.reduce((sum, row) => sum + row.sessions, 0);
36023
+ const paidSocialSessions = rows.filter((row) => isPaidSocialChannel(row.channelGroup)).reduce((sum, row) => sum + row.sessions, 0);
36024
+ return { paidSocialSessions, paidSocialShare: shareOf(paidSocialSessions, total) ?? 0 };
36025
+ }
36026
+ function aiEngineGroup(source) {
36027
+ const engine = aiEngineForReferralSource(source);
36028
+ return engine ? { engine, key: engine, label: aiReferralEngineLabel(engine) } : { engine: null, key: UNATTRIBUTED_AI_KEY, label: UNATTRIBUTED_AI_LABEL };
36029
+ }
36030
+ function groupAiEngines(rows) {
36031
+ const groups = /* @__PURE__ */ new Map();
36032
+ for (const row of rows) {
36033
+ const { engine, key, label } = aiEngineGroup(row.source);
36034
+ let group = groups.get(key);
36035
+ if (!group) {
36036
+ group = { engine, label, sessions: 0, organicSessions: 0, paidSessions: 0, sources: [] };
36037
+ groups.set(key, group);
36038
+ }
36039
+ group.sessions += row.sessions;
36040
+ if (row.trafficClass === AiReferralTrafficClasses.paid) group.paidSessions += row.sessions;
36041
+ else group.organicSessions += row.sessions;
36042
+ group.sources.push(row);
36043
+ }
36044
+ const sorted = [...groups.values()].sort((a, b) => Number(a.engine === null) - Number(b.engine === null) || bySessionsThenLabel(a, b));
36045
+ const shares = breakdownShares(sorted.map((group) => group.sessions));
36046
+ return sorted.map((group, index2) => ({
36047
+ ...group,
36048
+ share: shares[index2] ?? 0,
36049
+ sources: [...group.sources].sort((a, b) => b.sessions - a.sessions || a.source.localeCompare(b.source))
36050
+ }));
36051
+ }
36052
+ function aiEngineDailySeries(winners) {
36053
+ return buildStackedDailySeries(
36054
+ [...winners].map((winner) => {
36055
+ const { key, label } = aiEngineGroup(winner.source);
36056
+ return { date: winner.date, key, label, sessions: winner.sessions };
36057
+ }),
36058
+ { limit: CHART_SERIES_LIMIT, otherLabel: "Other" }
36059
+ );
36060
+ }
36061
+
35960
36062
  // ../api-routes/src/ga-ai-referral-aggregation.ts
35961
36063
  function normalizeAiTrafficClass(value) {
35962
36064
  return value === AiReferralTrafficClasses.paid ? AiReferralTrafficClasses.paid : AiReferralTrafficClasses.organic;
@@ -36066,7 +36168,8 @@ function buildAiReferralDailySeries(rows) {
36066
36168
  let totalSessions = 0;
36067
36169
  let totalPaidSessions = 0;
36068
36170
  let totalOrganicSessions = 0;
36069
- for (const winner of resolveWinningDimensions(rows)) {
36171
+ const winners = resolveWinningDimensions(rows);
36172
+ for (const winner of winners) {
36070
36173
  const sessions = winner.paidSessions + winner.organicSessions;
36071
36174
  let bySource = byDate.get(winner.date);
36072
36175
  if (!bySource) {
@@ -36097,7 +36200,12 @@ function buildAiReferralDailySeries(rows) {
36097
36200
  };
36098
36201
  });
36099
36202
  const sources = [...sourceTotals.entries()].sort(([aSource, aSessions], [bSource, bSessions]) => bSessions - aSessions || aSource.localeCompare(bSource)).map(([source]) => source);
36100
- return { days, sources, totalSessions, totalPaidSessions, totalOrganicSessions };
36203
+ const byEngine = aiEngineDailySeries(winners.map((winner) => ({
36204
+ date: winner.date,
36205
+ source: winner.source,
36206
+ sessions: winner.paidSessions + winner.organicSessions
36207
+ })));
36208
+ return { days, sources, totalSessions, totalPaidSessions, totalOrganicSessions, byEngine };
36101
36209
  }
36102
36210
 
36103
36211
  // ../api-routes/src/referral-assessment.ts
@@ -62438,6 +62546,11 @@ async function ga4Routes(app, opts) {
62438
62546
  // conclusion the AI-referral surfaces reached in 4.135.0.
62439
62547
  sessions: sql27`SUM(${gaSocialReferrals.sessions})`
62440
62548
  }).from(gaSocialReferrals).where(and57(...socialConditions)).groupBy(gaSocialReferrals.source, gaSocialReferrals.medium, gaSocialReferrals.channelGroup).orderBy(sql27`SUM(${gaSocialReferrals.sessions}) DESC`).all();
62549
+ const socialDailyRows = app.db.select({
62550
+ date: gaSocialReferrals.date,
62551
+ source: gaSocialReferrals.source,
62552
+ sessions: sql27`SUM(${gaSocialReferrals.sessions})`
62553
+ }).from(gaSocialReferrals).where(and57(...socialConditions)).groupBy(gaSocialReferrals.date, gaSocialReferrals.source).all();
62441
62554
  const socialTotals = app.db.select({
62442
62555
  sessions: sql27`SUM(${gaSocialReferrals.sessions})`
62443
62556
  }).from(gaSocialReferrals).where(and57(...socialConditions)).get();
@@ -62456,6 +62569,19 @@ async function ga4Routes(app, opts) {
62456
62569
  directSessions: totalDirectSessions,
62457
62570
  aiSessionsByChannelGroup: aiSummary.bySessionChannelGroup
62458
62571
  });
62572
+ const aiReferralDtos = withSessionShares(aiReferrals.map((r) => ({
62573
+ source: r.source,
62574
+ medium: r.medium,
62575
+ trafficClass: normalizeAiTrafficClass(r.trafficClass),
62576
+ sourceDimension: r.sourceDimension,
62577
+ sessions: r.sessions ?? 0
62578
+ })));
62579
+ const socialReferralDtos = withSessionShares(socialReferrals.map((r) => ({
62580
+ source: r.source,
62581
+ medium: r.medium,
62582
+ channelGroup: r.channelGroup,
62583
+ sessions: r.sessions ?? 0
62584
+ })));
62459
62585
  return {
62460
62586
  totalSessions: total,
62461
62587
  totalOrganicSessions,
@@ -62482,13 +62608,8 @@ async function ga4Routes(app, opts) {
62482
62608
  // Shares of the rows' own sum, not of `aiSessionsDeduped`: that total
62483
62609
  // keeps the winning lens per day, these rows one lens per source over the
62484
62610
  // window, so it can exceed what the rows add up to.
62485
- aiReferrals: withSessionShares(aiReferrals.map((r) => ({
62486
- source: r.source,
62487
- medium: r.medium,
62488
- trafficClass: normalizeAiTrafficClass(r.trafficClass),
62489
- sourceDimension: r.sourceDimension,
62490
- sessions: r.sessions ?? 0
62491
- }))),
62611
+ aiReferrals: aiReferralDtos,
62612
+ aiEngines: groupAiEngines(aiReferralDtos),
62492
62613
  aiReferralLandingPages: aiReferralLandingPages.map((r) => ({
62493
62614
  source: r.source,
62494
62615
  medium: r.medium,
@@ -62505,13 +62626,15 @@ async function ga4Routes(app, opts) {
62505
62626
  organicAiSessionsBySession: aiSummary.organicBySession.sessions,
62506
62627
  // These rows partition `socialSessions` (same window, one lens), so each
62507
62628
  // share is also the row's share of that total.
62508
- socialReferrals: withSessionShares(socialReferrals.map((r) => ({
62629
+ socialReferrals: socialReferralDtos,
62630
+ socialPlatforms: groupSocialPlatforms(socialReferralDtos),
62631
+ socialPlatformDaily: socialPlatformDailySeries(socialDailyRows.map((r) => ({
62632
+ date: r.date,
62509
62633
  source: r.source,
62510
- medium: r.medium,
62511
- channelGroup: r.channelGroup,
62512
62634
  sessions: r.sessions ?? 0
62513
62635
  }))),
62514
62636
  socialSessions,
62637
+ ...paidSocialSummary(socialReferralDtos),
62515
62638
  channelBreakdown,
62516
62639
  organicSharePct: percentOf(totalOrganicSessions, total) ?? 0,
62517
62640
  aiSharePct: percentOf(aiSummary.deduped.sessions, total) ?? 0,
@@ -95748,6 +95871,7 @@ export {
95748
95871
  gaLeadEventsDaily,
95749
95872
  gaMeasurementSyncStates,
95750
95873
  gaAiReferrals,
95874
+ gaSocialReferrals,
95751
95875
  gaTrafficSummaries,
95752
95876
  gaTrafficWindowSummaries,
95753
95877
  gaSearchLandingWindows,
@@ -22,19 +22,19 @@ import {
22
22
  saveConfig,
23
23
  saveConfigPatch,
24
24
  sentimentInstallReadiness
25
- } from "./chunk-PNY6B5NF.js";
25
+ } from "./chunk-2SWNW5O6.js";
26
26
  import {
27
27
  computeFactorAverages,
28
28
  deleteSiteCrawlGraphLayout,
29
29
  persistSiteCrawlGraphLayout,
30
30
  prepareSiteCrawlGraphLayout,
31
31
  recordedSharePct
32
- } from "./chunk-HGWJCYGW.js";
32
+ } from "./chunk-GG6ECPAO.js";
33
33
  import {
34
34
  CanonryMcpToolNames,
35
35
  PACKAGE_VERSION,
36
36
  canonryMcpTools
37
- } from "./chunk-BGQV35Y6.js";
37
+ } from "./chunk-5ZYVREGG.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-4KAZO6PU.js";
244
+ } from "./chunk-UJLIMXPX.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-WYI6KLC4.js";
492
+ } from "./chunk-77T24PPR.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 ? "a36190c8c42b049004b2d307f0b7a12225d95e04" : void 0;
8628
+ const embedded = true ? "2694af820e6c8ba6e9be675cc1087c332a2c093d" : void 0;
8629
8629
  return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
8630
8630
  }
8631
8631
  function resolveInstanceIdentity(env = process.env) {
@@ -4,7 +4,7 @@ import {
4
4
  resolveCliAccess,
5
5
  resolveCliAccessForInvocation,
6
6
  windowOptions
7
- } from "./chunk-ALZAMWTF.js";
7
+ } from "./chunk-IKIAETMK.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-WYI6KLC4.js";
15
+ } from "./chunk-77T24PPR.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-XOBGGUUS.js");
112
+ const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-MGEBTBSU.js");
113
113
  const group2 = argsWithoutHelp.find((arg) => !arg.startsWith("--"));
114
114
  printCliCatalog2(specs, fallbackFormat, group2, accessValue);
115
115
  return true;
@@ -3,10 +3,10 @@ import {
3
3
  buildCliCatalog,
4
4
  printCliCatalog,
5
5
  renderTopLevelHelp
6
- } from "./chunk-Q2XQ2YRP.js";
7
- import "./chunk-ALZAMWTF.js";
6
+ } from "./chunk-ZKIUO7RY.js";
7
+ import "./chunk-IKIAETMK.js";
8
8
  import "./chunk-HGMYEDAQ.js";
9
- import "./chunk-WYI6KLC4.js";
9
+ import "./chunk-77T24PPR.js";
10
10
  export {
11
11
  CLI_ROOT_SUMMARIES,
12
12
  buildCliCatalog,
@@ -0,0 +1,15 @@
1
+ import {
2
+ REGISTERED_CLI_COMMANDS
3
+ } from "./chunk-T4EXTQQK.js";
4
+ import "./chunk-WTATIC3M.js";
5
+ import "./chunk-2SWNW5O6.js";
6
+ import "./chunk-IKIAETMK.js";
7
+ import "./chunk-RB2F4D3Z.js";
8
+ import "./chunk-GG6ECPAO.js";
9
+ import "./chunk-5ZYVREGG.js";
10
+ import "./chunk-HGMYEDAQ.js";
11
+ import "./chunk-UJLIMXPX.js";
12
+ import "./chunk-77T24PPR.js";
13
+ export {
14
+ REGISTERED_CLI_COMMANDS
15
+ };
package/dist/cli.js CHANGED
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  autoSyncSkills,
4
4
  formatAutoSyncNotice
5
- } from "./chunk-IFIPKXEP.js";
5
+ } from "./chunk-CNBKVUMJ.js";
6
6
  import {
7
7
  accessFilterFromArgs,
8
8
  dispatchRegisteredCommand,
9
9
  printCliCatalog
10
- } from "./chunk-Q2XQ2YRP.js";
10
+ } from "./chunk-ZKIUO7RY.js";
11
11
  import {
12
12
  REGISTERED_CLI_COMMANDS,
13
13
  buildSetupState,
14
14
  consumePendingServeHandoff,
15
15
  serveCommand
16
- } from "./chunk-7MDPU6T5.js";
16
+ } from "./chunk-T4EXTQQK.js";
17
17
  import {
18
18
  checkLatestVersionForCli,
19
19
  cliRuntimeContext,
@@ -27,14 +27,14 @@ import {
27
27
  showFirstRunNotice,
28
28
  trackCliCommandFinished,
29
29
  trackEvent
30
- } from "./chunk-LAFRGDAN.js";
31
- import "./chunk-PNY6B5NF.js";
30
+ } from "./chunk-WTATIC3M.js";
31
+ import "./chunk-2SWNW5O6.js";
32
32
  import {
33
33
  resolveCliAccess
34
- } from "./chunk-ALZAMWTF.js";
34
+ } from "./chunk-IKIAETMK.js";
35
35
  import "./chunk-RB2F4D3Z.js";
36
- import "./chunk-HGWJCYGW.js";
37
- import "./chunk-BGQV35Y6.js";
36
+ import "./chunk-GG6ECPAO.js";
37
+ import "./chunk-5ZYVREGG.js";
38
38
  import {
39
39
  CliError,
40
40
  EXIT_SYSTEM_ERROR,
@@ -42,10 +42,10 @@ import {
42
42
  printCliError,
43
43
  usageError
44
44
  } from "./chunk-HGMYEDAQ.js";
45
- import "./chunk-4KAZO6PU.js";
45
+ import "./chunk-UJLIMXPX.js";
46
46
  import {
47
47
  OperationAccesses
48
- } from "./chunk-WYI6KLC4.js";
48
+ } from "./chunk-77T24PPR.js";
49
49
 
50
50
  // src/cli.ts
51
51
  import { pathToFileURL } from "url";