@canonry/canonry 4.172.2 → 4.172.4

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 (28) hide show
  1. package/assets/agent-workspace/skills/canonry/references/server-side-traffic.md +9 -7
  2. package/assets/assets/{AuditHistoryPanel-DnqySUw3.js → AuditHistoryPanel-CARZK_Wi.js} +1 -1
  3. package/assets/assets/{BacklinksPage-CbcHWD-G.js → BacklinksPage-BEA9vbC2.js} +1 -1
  4. package/assets/assets/{HistoryPage-BYFSyxuB.js → HistoryPage-DKcDQw1a.js} +1 -1
  5. package/assets/assets/{MeasurementPropertyPage-BBnXQPIv.js → MeasurementPropertyPage-BRPI_icI.js} +1 -1
  6. package/assets/assets/ProjectPage-B4_EEP8k.js +9 -0
  7. package/assets/assets/{RunRow-lfyHktTf.js → RunRow-C8C7wrzp.js} +1 -1
  8. package/assets/assets/{RunsPage-ngnP0Y_D.js → RunsPage-BeotkZcg.js} +1 -1
  9. package/assets/assets/{SettingsPage-DEg74T20.js → SettingsPage-BukBukvW.js} +1 -1
  10. package/assets/assets/{SiteHealthSection-C6ycXwbt.js → SiteHealthSection-C7RuR9AA.js} +3 -3
  11. package/assets/assets/{TrafficPage-hrJ1IDqA.js → TrafficPage-D_zPUxGq.js} +1 -1
  12. package/assets/assets/{TrafficSourceDetailPage-fu7nPl3E.js → TrafficSourceDetailPage-CetULBhn.js} +1 -1
  13. package/assets/assets/{extract-error-message-dcdO9njP.js → extract-error-message-CDRTdeQI.js} +1 -1
  14. package/assets/assets/{index-D1mXm81Z.css → index-CFzo8iAY.css} +1 -1
  15. package/assets/assets/{index-DpQ_-QC_.js → index-D156-4Hr.js} +19 -19
  16. package/assets/assets/{react-sigma_core.esm.min-DZGxGBSe.js → react-sigma_core.esm.min-CU8AjIPg.js} +1 -1
  17. package/assets/index.html +2 -2
  18. package/dist/{chunk-PXTSQ67Z.js → chunk-2CXNT2AC.js} +13083 -1260
  19. package/dist/{chunk-YXDCVM5U.js → chunk-BZDNTUCZ.js} +1 -1
  20. package/dist/{chunk-TI3SZAVI.js → chunk-N53TZMMR.js} +178 -168
  21. package/dist/{chunk-U5JTZM66.js → chunk-WFVK3XC7.js} +2 -2
  22. package/dist/{chunk-EGGQSFQL.js → chunk-WGN2VT7L.js} +49 -1
  23. package/dist/cli.js +40 -5
  24. package/dist/index.js +4 -4
  25. package/dist/{intelligence-service-H7756PBD.js → intelligence-service-2E7F6I7I.js} +2 -2
  26. package/dist/mcp.js +3 -3
  27. package/package.json +12 -12
  28. package/assets/assets/ProjectPage-Cq5bHpmk.js +0 -9
@@ -5,11 +5,11 @@ import {
5
5
  installSkills,
6
6
  loadConfigRaw,
7
7
  saveConfigPatch
8
- } from "./chunk-YXDCVM5U.js";
8
+ } from "./chunk-BZDNTUCZ.js";
9
9
  import {
10
10
  SKILL_MANIFEST_FILENAME,
11
11
  SkillsClients
12
- } from "./chunk-EGGQSFQL.js";
12
+ } from "./chunk-WGN2VT7L.js";
13
13
 
14
14
  // src/skills-autosync.ts
15
15
  import fs from "fs";
@@ -7650,6 +7650,47 @@ var gscPerformanceTrendsSchema = z19.object({
7650
7650
  ctr: linearTrendSchema.nullable(),
7651
7651
  position: linearTrendSchema.nullable()
7652
7652
  });
7653
+ var gscPeriodTotalsSchema = z19.object({
7654
+ startDate: z19.string(),
7655
+ endDate: z19.string(),
7656
+ clicks: z19.number(),
7657
+ impressions: z19.number(),
7658
+ /** The period's own `clicks / impressions`, never a mean of daily ratios. */
7659
+ ctr: z19.number().nullable(),
7660
+ /** Impression-weighted mean position, or null when no day carried one. */
7661
+ position: z19.number().nullable(),
7662
+ /**
7663
+ * Which table the figures came from. `gsc_daily_totals` (property-daily) and
7664
+ * `SUM(gsc_search_data)` (dimensioned) are not interchangeable: on one real
7665
+ * property-month the same period reads 1,142 clicks / 34,916 impressions from
7666
+ * the first and 792 / 45,266 from the second.
7667
+ */
7668
+ source: z19.enum(["property-daily", "dimensioned", "mixed", "empty"])
7669
+ });
7670
+ var gscPeriodComparisonSchema = z19.object({
7671
+ /** Length of EACH period in calendar days. */
7672
+ days: z19.number(),
7673
+ prior: gscPeriodTotalsSchema,
7674
+ trailing: gscPeriodTotalsSchema,
7675
+ /**
7676
+ * False when either period contains dimensioned fallback totals, in which
7677
+ * case every `change` is null. Empty/property-daily halves are comparable;
7678
+ * `SUM(gsc_search_data)` is never valid for property totals.
7679
+ */
7680
+ comparable: z19.boolean(),
7681
+ /**
7682
+ * Relative change as a ratio (0.5 = +50%), null where the prior period gives
7683
+ * nothing to divide by or the trailing metric is unavailable. The sign is
7684
+ * mathematical: a POSITIVE `position` means the rank number rose, which is
7685
+ * worse. Desirability is the renderer's call.
7686
+ */
7687
+ change: z19.object({
7688
+ clicks: z19.number().nullable(),
7689
+ impressions: z19.number().nullable(),
7690
+ ctr: z19.number().nullable(),
7691
+ position: z19.number().nullable()
7692
+ })
7693
+ });
7653
7694
  var gscPerformanceDailyDtoSchema = z19.object({
7654
7695
  totals: z19.object({
7655
7696
  clicks: z19.number(),
@@ -7681,7 +7722,14 @@ var gscPerformanceDailyDtoSchema = z19.object({
7681
7722
  * Optional for the same reason as `window`: a server older than this field
7682
7723
  * omits it, and the chart guards for that skew.
7683
7724
  */
7684
- trends: gscPerformanceTrendsSchema.optional()
7725
+ trends: gscPerformanceTrendsSchema.optional(),
7726
+ /**
7727
+ * Optional for the same reason as `window` and `trends`, and additionally
7728
+ * null when the window is too short to split into two periods, has no
7729
+ * evidence, or extends beyond the project's known GSC data frontier. A
7730
+ * consumer must render the absence rather than substitute a percentage.
7731
+ */
7732
+ periodComparison: gscPeriodComparisonSchema.nullable().optional()
7685
7733
  });
7686
7734
  var gscTopPageRowSchema = z19.object({
7687
7735
  page: z19.string(),
package/dist/cli.js CHANGED
@@ -26,11 +26,11 @@ import {
26
26
  showFirstRunNotice,
27
27
  trackCliCommandFinished,
28
28
  trackEvent
29
- } from "./chunk-TI3SZAVI.js";
29
+ } from "./chunk-N53TZMMR.js";
30
30
  import {
31
31
  autoSyncSkills,
32
32
  formatAutoSyncNotice
33
- } from "./chunk-U5JTZM66.js";
33
+ } from "./chunk-WFVK3XC7.js";
34
34
  import {
35
35
  CliError,
36
36
  EXIT_SYSTEM_ERROR,
@@ -55,7 +55,7 @@ import {
55
55
  saveConfigPatch,
56
56
  systemError,
57
57
  usageError
58
- } from "./chunk-YXDCVM5U.js";
58
+ } from "./chunk-BZDNTUCZ.js";
59
59
  import {
60
60
  CLOUDFLARE_WORKER_BINDINGS,
61
61
  CLOUDFLARE_WORKER_GENERATED_MARKER,
@@ -69,7 +69,7 @@ import {
69
69
  projects,
70
70
  queries,
71
71
  renderReportHtml
72
- } from "./chunk-PXTSQ67Z.js";
72
+ } from "./chunk-2CXNT2AC.js";
73
73
  import {
74
74
  AdsDeliverySnapshotStatuses,
75
75
  AdsHistoricalCampaignRollupStatuses,
@@ -137,7 +137,7 @@ import {
137
137
  providerQuotaPolicySchema,
138
138
  resolveProviderInput,
139
139
  winnabilityClassSchema
140
- } from "./chunk-EGGQSFQL.js";
140
+ } from "./chunk-WGN2VT7L.js";
141
141
 
142
142
  // src/cli.ts
143
143
  import { pathToFileURL } from "url";
@@ -7792,6 +7792,41 @@ async function googlePerformanceDaily(project, opts) {
7792
7792
  Trend (least-squares fit over ${days} day${days === 1 ? "" : "s"}):`);
7793
7793
  for (const line of trendLines) console.log(line);
7794
7794
  }
7795
+ const cmp = data.periodComparison;
7796
+ if (cmp && !cmp.comparable) {
7797
+ console.log(
7798
+ `
7799
+ No period comparison: period comparison needs property-level daily data. Sync again, or pick a range covered by property totals.`
7800
+ );
7801
+ } else if (cmp) {
7802
+ const pct4 = (ratio, prior, trailing, inverted) => {
7803
+ if (ratio === null) {
7804
+ if (prior !== null && trailing !== null && prior <= 0 && trailing > 0) {
7805
+ return `new in last ${cmp.days} day${cmp.days === 1 ? "" : "s"}`;
7806
+ }
7807
+ if (prior === null || prior <= 0) return "no prior period to compare";
7808
+ if (trailing === null) return `no value in last ${cmp.days} day${cmp.days === 1 ? "" : "s"}`;
7809
+ return "comparison unavailable";
7810
+ }
7811
+ if (ratio === 0) return "no change";
7812
+ const better = inverted ? ratio < 0 : ratio > 0;
7813
+ const magnitude = Math.abs(ratio * 100);
7814
+ const shown = magnitude < 0.1 ? "<0.1" : magnitude.toFixed(1);
7815
+ return `${ratio > 0 ? "+" : "-"}${shown}% ${better ? "better" : "worse"}`;
7816
+ };
7817
+ console.log(
7818
+ `
7819
+ Last ${cmp.days} day${cmp.days === 1 ? "" : "s"} (${cmp.trailing.startDate} to ${cmp.trailing.endDate}) vs prior ${cmp.days} (${cmp.prior.startDate} to ${cmp.prior.endDate}):`
7820
+ );
7821
+ for (const [label, ratio, prior, trailing, inverted] of [
7822
+ ["Clicks", cmp.change.clicks, cmp.prior.clicks, cmp.trailing.clicks, false],
7823
+ ["Impressions", cmp.change.impressions, cmp.prior.impressions, cmp.trailing.impressions, false],
7824
+ ["CTR", cmp.change.ctr, cmp.prior.ctr, cmp.trailing.ctr, false],
7825
+ ["Position", cmp.change.position, cmp.prior.position, cmp.trailing.position, true]
7826
+ ]) {
7827
+ console.log(` ${`${label}:`.padEnd(13)}${pct4(ratio, prior, trailing, inverted)}`);
7828
+ }
7829
+ }
7795
7830
  console.log();
7796
7831
  console.log(` ${"DATE".padEnd(12)}${"CLICKS".padStart(10)}${"IMPR".padStart(12)}${"CTR".padStart(10)}${"POS".padStart(9)}`);
7797
7832
  console.log(` ${"\u2500".repeat(12)}${"\u2500".repeat(10)}${"\u2500".repeat(12)}${"\u2500".repeat(10)}${"\u2500".repeat(9)}`);
package/dist/index.js CHANGED
@@ -3,12 +3,12 @@ import {
3
3
  createGoogleMarketingCredentialStore,
4
4
  createGoogleMarketingRuntime,
5
5
  createServer
6
- } from "./chunk-TI3SZAVI.js";
6
+ } from "./chunk-N53TZMMR.js";
7
7
  import {
8
8
  loadConfig
9
- } from "./chunk-YXDCVM5U.js";
10
- import "./chunk-PXTSQ67Z.js";
11
- import "./chunk-EGGQSFQL.js";
9
+ } from "./chunk-BZDNTUCZ.js";
10
+ import "./chunk-2CXNT2AC.js";
11
+ import "./chunk-WGN2VT7L.js";
12
12
  export {
13
13
  GoogleMarketingRuntimeError,
14
14
  createGoogleMarketingCredentialStore,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IntelligenceService
3
- } from "./chunk-PXTSQ67Z.js";
4
- import "./chunk-EGGQSFQL.js";
3
+ } from "./chunk-2CXNT2AC.js";
4
+ import "./chunk-WGN2VT7L.js";
5
5
  export {
6
6
  IntelligenceService
7
7
  };
package/dist/mcp.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  autoSyncSkills
3
- } from "./chunk-U5JTZM66.js";
3
+ } from "./chunk-WFVK3XC7.js";
4
4
  import {
5
5
  CliError,
6
6
  PACKAGE_VERSION,
7
7
  canonryMcpTools,
8
8
  createApiClient
9
- } from "./chunk-YXDCVM5U.js";
9
+ } from "./chunk-BZDNTUCZ.js";
10
10
  import {
11
11
  isReadOnlyKey
12
- } from "./chunk-EGGQSFQL.js";
12
+ } from "./chunk-WGN2VT7L.js";
13
13
 
14
14
  // src/mcp/cli.ts
15
15
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonry/canonry",
3
- "version": "4.172.2",
3
+ "version": "4.172.4",
4
4
  "type": "module",
5
5
  "description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
6
6
  "license": "FSL-1.1-ALv2",
@@ -72,29 +72,29 @@
72
72
  "tsx": "^4.19.0",
73
73
  "@ainyc/canonry-api-client": "0.0.0",
74
74
  "@ainyc/canonry-api-routes": "0.0.0",
75
- "@ainyc/canonry-contracts": "0.0.0",
76
75
  "@ainyc/canonry-config": "0.0.0",
76
+ "@ainyc/canonry-contracts": "0.0.0",
77
77
  "@ainyc/canonry-db": "0.0.0",
78
78
  "@ainyc/canonry-integration-bing": "0.0.0",
79
- "@ainyc/canonry-integration-cloud-run": "0.0.0",
80
- "@ainyc/canonry-integration-openai-ads": "0.0.0",
81
79
  "@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
82
- "@ainyc/canonry-integration-commoncrawl": "0.0.0",
83
80
  "@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
81
+ "@ainyc/canonry-integration-openai-ads": "0.0.0",
82
+ "@ainyc/canonry-integration-cloud-run": "0.0.0",
84
83
  "@ainyc/canonry-integration-google": "0.0.0",
85
84
  "@ainyc/canonry-integration-google-ads": "0.0.0",
86
- "@ainyc/canonry-integration-google-places": "0.0.0",
85
+ "@ainyc/canonry-integration-commoncrawl": "0.0.0",
87
86
  "@ainyc/canonry-integration-google-business-profile": "0.0.0",
88
- "@ainyc/canonry-integration-google-tag-manager": "0.0.0",
87
+ "@ainyc/canonry-integration-traffic": "0.0.0",
88
+ "@ainyc/canonry-integration-google-places": "0.0.0",
89
89
  "@ainyc/canonry-integration-wordpress": "0.0.0",
90
90
  "@ainyc/canonry-intelligence": "0.0.0",
91
- "@ainyc/canonry-integration-traffic": "0.0.0",
92
- "@ainyc/canonry-provider-local": "0.0.0",
93
- "@ainyc/canonry-provider-gemini": "0.0.0",
94
91
  "@ainyc/canonry-provider-cdp": "0.0.0",
95
- "@ainyc/canonry-provider-openai": "0.0.0",
96
92
  "@ainyc/canonry-provider-claude": "0.0.0",
97
- "@ainyc/canonry-provider-perplexity": "0.0.0"
93
+ "@ainyc/canonry-provider-local": "0.0.0",
94
+ "@ainyc/canonry-provider-openai": "0.0.0",
95
+ "@ainyc/canonry-provider-perplexity": "0.0.0",
96
+ "@ainyc/canonry-provider-gemini": "0.0.0",
97
+ "@ainyc/canonry-integration-google-tag-manager": "0.0.0"
98
98
  },
99
99
  "scripts": {
100
100
  "build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",