@canonry/canonry 7.16.0 → 7.17.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 (30) hide show
  1. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +22 -6
  2. package/assets/assets/{AuditHistoryPanel-Cl9tUvSZ.js → AuditHistoryPanel-CUde9U_6.js} +1 -1
  3. package/assets/assets/{BacklinksPage-CTeTJ9dh.js → BacklinksPage-DMQPw8ks.js} +1 -1
  4. package/assets/assets/{HistoryPage-DpOoXr2P.js → HistoryPage-DZSa1gYf.js} +1 -1
  5. package/assets/assets/{MeasurementPropertyPage-DxXsgM25.js → MeasurementPropertyPage-DgW17Jpd.js} +1 -1
  6. package/assets/assets/ProjectPage-C8vdtqtA.js +8 -0
  7. package/assets/assets/{RunsPage-CfDi7I1z.js → RunsPage-DRfNd-Jp.js} +1 -1
  8. package/assets/assets/{SettingsPage-BHDb1apK.js → SettingsPage-D38Gl1Nv.js} +1 -1
  9. package/assets/assets/{SiteHealthSection-DQZyy4P_.js → SiteHealthSection-CR3zB84D.js} +3 -3
  10. package/assets/assets/{TrafficPage-DX_vN2RL.js → TrafficPage-DX3qRPgQ.js} +2 -2
  11. package/assets/assets/{TrafficSourceDetailPage-Cg92zrtZ.js → TrafficSourceDetailPage-CigB82vX.js} +1 -1
  12. package/assets/assets/{extract-error-message-BKxVCbov.js → extract-error-message-DsMnnkxT.js} +1 -1
  13. package/assets/assets/{index-DoQJETc6.js → index-DBr6ISbx.js} +25 -25
  14. package/assets/assets/{react-sigma_core.esm.min-BhqZcSgh.js → react-sigma_core.esm.min-CkYxzGpi.js} +1 -1
  15. package/assets/assets/{v2-overview-adapter-DZ5YsE_G.js → v2-overview-adapter-5x8UiA07.js} +1 -1
  16. package/assets/index.html +1 -1
  17. package/dist/{chunk-O6XPXEN6.js → chunk-2MBI5SYB.js} +3 -3
  18. package/dist/{chunk-SPZRSKCF.js → chunk-3NAZXITW.js} +1381 -797
  19. package/dist/{chunk-6LS2R477.js → chunk-PVWGKDY6.js} +98 -2
  20. package/dist/{chunk-2S7U2YHI.js → chunk-QPOXDS43.js} +2 -2
  21. package/dist/{chunk-KDWTNI4Z.js → chunk-RBQUGZM4.js} +23 -1
  22. package/dist/{chunk-VWSUFTW5.js → chunk-WEKVQK3O.js} +6 -6
  23. package/dist/{chunk-3ZGBSHZ2.js → chunk-WVBLFG7H.js} +30 -3
  24. package/dist/cli.js +123 -12
  25. package/dist/{demo-server-6OE3H2KL.js → demo-server-BVJFYR4V.js} +68 -15
  26. package/dist/index.js +6 -6
  27. package/dist/{intelligence-service-USSTKAKC.js → intelligence-service-FK2W72X7.js} +2 -2
  28. package/dist/mcp.js +4 -4
  29. package/package.json +14 -14
  30. package/assets/assets/ProjectPage-By9arjLJ.js +0 -8
@@ -5,11 +5,11 @@ import {
5
5
  computeFactorAverages,
6
6
  layoutSiteCrawlGraphInput,
7
7
  persistSiteCrawlGraphLayout
8
- } from "./chunk-2S7U2YHI.js";
8
+ } from "./chunk-QPOXDS43.js";
9
9
  import {
10
10
  PACKAGE_VERSION,
11
11
  canonryMcpTools
12
- } from "./chunk-KDWTNI4Z.js";
12
+ } from "./chunk-RBQUGZM4.js";
13
13
  import {
14
14
  HISTORY_WINDOW_RUNS,
15
15
  IntelligenceService,
@@ -42,6 +42,8 @@ import {
42
42
  gaDailyTotals,
43
43
  gaLeadEventsDaily,
44
44
  gaMeasurementSyncStates,
45
+ gaSearchLandingPages,
46
+ gaSearchLandingWindows,
45
47
  gaTrafficSnapshots,
46
48
  gaTrafficSummaries,
47
49
  gaTrafficWindowSummaries,
@@ -83,7 +85,7 @@ import {
83
85
  siteCrawlPages,
84
86
  siteCrawlSnapshots,
85
87
  trafficSources
86
- } from "./chunk-SPZRSKCF.js";
88
+ } from "./chunk-3NAZXITW.js";
87
89
  import {
88
90
  RunKinds,
89
91
  SiteCrawlFetchStates,
@@ -112,7 +114,7 @@ import {
112
114
  roundPreservingTotal,
113
115
  siteAuditPageFactorSchema,
114
116
  wilsonInterval
115
- } from "./chunk-6LS2R477.js";
117
+ } from "./chunk-PVWGKDY6.js";
116
118
 
117
119
  // src/demo-server.ts
118
120
  import { dirname, join as join2 } from "path";
@@ -1170,6 +1172,7 @@ var DEMO_READ_ROUTES = /* @__PURE__ */ new Set([
1170
1172
  "/api/v1/projects/:name/ga/attribution-trend",
1171
1173
  "/api/v1/projects/:name/ga/coverage",
1172
1174
  "/api/v1/projects/:name/ga/measurement-analysis",
1175
+ "/api/v1/projects/:name/ga/search-landing-pages",
1173
1176
  "/api/v1/projects/:name/ga/session-history",
1174
1177
  "/api/v1/projects/:name/ga/social-referral-history",
1175
1178
  "/api/v1/projects/:name/ga/social-referral-trend",
@@ -2082,6 +2085,16 @@ function seedDemoCore(db, context) {
2082
2085
  seedDemoAnswerIntelligence(db, context.simple);
2083
2086
  }
2084
2087
 
2088
+ // src/demo/types.ts
2089
+ var DEMO_GA4_PROPERTY_ID = "demo-property";
2090
+ function createDemoSeedContext(now = /* @__PURE__ */ new Date()) {
2091
+ return {
2092
+ now,
2093
+ simple: { id: "demo-project-summit", name: "summit-roofing", displayName: "Summit Roofing", domain: "summit-roofing.example" },
2094
+ portfolio: { id: "demo-project-harbor", name: "harbor-resorts", displayName: "Harbor Resorts", domain: "harbor-resorts.example" }
2095
+ };
2096
+ }
2097
+
2085
2098
  // src/demo/seed-site-crawl.ts
2086
2099
  var DEMO_AUDIT_FACTORS = [
2087
2100
  { id: "structured-data", name: "Structured Data (JSON-LD)", weight: 12, bias: 4, found: "JSON-LD markup describes this page.", missing: "JSON-LD markup is missing or incomplete.", recommendation: "Add JSON-LD that describes the business and this page." },
@@ -2794,6 +2807,54 @@ async function seedDemoSignals(db, context) {
2794
2807
  await seedProjectSignals(db, project, context.now, index);
2795
2808
  }
2796
2809
  }
2810
+ function seedSearchLandingPages(db, input) {
2811
+ const windows = [["7d", 7, 1], ["28d", 28, 4], ["90d", 90, 12]];
2812
+ for (const [windowKey, days, scale] of windows) {
2813
+ const clicks = (140 + input.variant * 25) * scale;
2814
+ const impressions = (5200 + input.variant * 640) * scale;
2815
+ db.insert(gaSearchLandingWindows).values({
2816
+ id: `${input.prefix}-ga-search-window-${windowKey}`,
2817
+ projectId: input.projectId,
2818
+ propertyId: DEMO_GA4_PROPERTY_ID,
2819
+ windowKey,
2820
+ periodStart: day(input.now, -days),
2821
+ periodEnd: day(input.now, -1),
2822
+ timeZone: "UTC",
2823
+ totalClicks: clicks,
2824
+ totalImpressions: impressions,
2825
+ totalCtr: clicks / impressions,
2826
+ totalAveragePosition: 7.4 - input.variant * 0.6,
2827
+ totalActiveUsers: (170 + input.variant * 30) * scale,
2828
+ reportRowCount: 24,
2829
+ rowsCapped: true,
2830
+ syncedAt: input.nowIso,
2831
+ syncRunId: input.syncRunId,
2832
+ createdAt: input.nowIso
2833
+ }).run();
2834
+ const pages = [
2835
+ ["/", 0.55, 0.32, 5.1],
2836
+ ["/services/", 0.21, 0.27, 7.8]
2837
+ ];
2838
+ for (const [landingPage, clickShare, impressionShare, position] of pages) {
2839
+ const pageClicks = Math.round(clicks * clickShare);
2840
+ const pageImpressions = Math.round(impressions * impressionShare);
2841
+ db.insert(gaSearchLandingPages).values({
2842
+ id: `${input.prefix}-ga-search-page-${windowKey}-${landingPage}`,
2843
+ projectId: input.projectId,
2844
+ windowKey,
2845
+ landingPage,
2846
+ clicks: pageClicks,
2847
+ impressions: pageImpressions,
2848
+ ctr: pageClicks / pageImpressions,
2849
+ averagePosition: position,
2850
+ activeUsers: Math.round(pageClicks * 1.2),
2851
+ syncedAt: input.nowIso,
2852
+ syncRunId: input.syncRunId,
2853
+ createdAt: input.nowIso
2854
+ }).run();
2855
+ }
2856
+ }
2857
+ }
2797
2858
  async function seedProjectSignals(db, project, now, variant) {
2798
2859
  const nowIso = now.toISOString();
2799
2860
  const prefix = `demo-signals-${project.id}`;
@@ -2834,7 +2895,8 @@ async function seedProjectSignals(db, project, now, variant) {
2834
2895
  db.insert(gscUrlInspections).values({ id: `${prefix}-gsc-inspection`, projectId: project.id, syncRunId, url: `${root}services/`, indexingState: "INDEXING_ALLOWED", verdict: "PASS", coverageState: "Submitted and indexed", pageFetchState: "SUCCESSFUL", robotsTxtState: "ALLOWED", crawlTime: nowIso, lastCrawlResult: "SUCCESSFUL", isMobileFriendly: true, richResults: ["Sample FAQ"], referringUrls: [root], inspectedAt: nowIso, createdAt: nowIso }).run();
2835
2896
  db.insert(bingKeywordStats).values(searchTerms.map((query, i) => ({ id: `${prefix}-bing-keyword-${i}`, projectId: project.id, query, impressions: 310 - i * 70, clicks: 22 - i * 4, ctr: "0.071", averagePosition: String(6 + i), syncedAt: nowIso, createdAt: nowIso }))).run();
2836
2897
  db.insert(bingUrlInspections).values({ id: `${prefix}-bing-inspection`, projectId: project.id, url: root, httpCode: 200, inIndex: true, lastCrawledDate: dates.at(-2), inIndexDate: dates.at(-8), inspectedAt: nowIso, syncRunId, createdAt: nowIso, documentSize: 24120, anchorCount: 18, discoveryDate: dates[0] }).run();
2837
- db.insert(gaMeasurementSyncStates).values({ projectId: project.id, acquisitionStatus: "ready", acquisitionSyncedAt: nowIso, leadStatus: "ready", leadSyncedAt: nowIso, leadAttributionScope: "landing-page", updatedAt: nowIso }).run();
2898
+ db.insert(gaMeasurementSyncStates).values({ projectId: project.id, acquisitionStatus: "ready", acquisitionSyncedAt: nowIso, leadStatus: "ready", leadSyncedAt: nowIso, leadAttributionScope: "landing-page", searchLandingStatus: "ready", searchLandingSyncedAt: nowIso, searchLandingAttemptedAt: nowIso, updatedAt: nowIso }).run();
2899
+ seedSearchLandingPages(db, { projectId: project.id, prefix, syncRunId, nowIso, now, variant });
2838
2900
  db.insert(gaTrafficSummaries).values({ id: `${prefix}-ga-summary`, projectId: project.id, periodStart: dates[0], periodEnd: dates.at(-1), totalSessions: 1610, totalOrganicSessions: 980, totalUsers: 1214, syncedAt: nowIso, syncRunId }).run();
2839
2901
  db.insert(gaTrafficWindowSummaries).values({ id: `${prefix}-ga-window`, projectId: project.id, windowKey: "30d", periodStart: dates[0], periodEnd: dates.at(-1), totalSessions: 1610, totalOrganicSessions: 980, totalDirectSessions: 284, totalUsers: 1214, syncedAt: nowIso, syncRunId }).run();
2840
2902
  const inventory = variant === 0 ? summitRoofingInventory() : harborResortsInventory();
@@ -2915,7 +2977,7 @@ function demoReadOptions(db, context) {
2915
2977
  ga4CredentialStore: {
2916
2978
  getConnection: (projectName) => {
2917
2979
  const project = [context.simple, context.portfolio].find((item) => item.name === projectName);
2918
- return project ? { projectName, propertyId: "demo-property", clientEmail: "sample@analytics.example", privateKey: "", createdAt: context.now.toISOString(), updatedAt: context.now.toISOString() } : void 0;
2980
+ return project ? { projectName, propertyId: DEMO_GA4_PROPERTY_ID, clientEmail: "sample@analytics.example", privateKey: "", createdAt: context.now.toISOString(), updatedAt: context.now.toISOString() } : void 0;
2919
2981
  },
2920
2982
  upsertConnection: refuseMutation,
2921
2983
  deleteConnection: refuseMutation
@@ -2953,15 +3015,6 @@ function demoReadOptions(db, context) {
2953
3015
  };
2954
3016
  }
2955
3017
 
2956
- // src/demo/types.ts
2957
- function createDemoSeedContext(now = /* @__PURE__ */ new Date()) {
2958
- return {
2959
- now,
2960
- simple: { id: "demo-project-summit", name: "summit-roofing", displayName: "Summit Roofing", domain: "summit-roofing.example" },
2961
- portfolio: { id: "demo-project-harbor", name: "harbor-resorts", displayName: "Harbor Resorts", domain: "harbor-resorts.example" }
2962
- };
2963
- }
2964
-
2965
3018
  // src/demo-server.ts
2966
3019
  async function createDemoServer(options = {}) {
2967
3020
  const db = createClient(":memory:");
package/dist/index.js CHANGED
@@ -3,14 +3,14 @@ import {
3
3
  createGoogleMarketingCredentialStore,
4
4
  createGoogleMarketingRuntime,
5
5
  createServer
6
- } from "./chunk-VWSUFTW5.js";
6
+ } from "./chunk-WEKVQK3O.js";
7
7
  import {
8
8
  loadConfig
9
- } from "./chunk-3ZGBSHZ2.js";
10
- import "./chunk-2S7U2YHI.js";
11
- import "./chunk-KDWTNI4Z.js";
12
- import "./chunk-SPZRSKCF.js";
13
- import "./chunk-6LS2R477.js";
9
+ } from "./chunk-WVBLFG7H.js";
10
+ import "./chunk-QPOXDS43.js";
11
+ import "./chunk-RBQUGZM4.js";
12
+ import "./chunk-3NAZXITW.js";
13
+ import "./chunk-PVWGKDY6.js";
14
14
  export {
15
15
  GoogleMarketingRuntimeError,
16
16
  createGoogleMarketingCredentialStore,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  HISTORY_WINDOW_RUNS,
3
3
  IntelligenceService
4
- } from "./chunk-SPZRSKCF.js";
5
- import "./chunk-6LS2R477.js";
4
+ } from "./chunk-3NAZXITW.js";
5
+ import "./chunk-PVWGKDY6.js";
6
6
  export {
7
7
  HISTORY_WINDOW_RUNS,
8
8
  IntelligenceService
package/dist/mcp.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  autoSyncSkills
3
- } from "./chunk-O6XPXEN6.js";
3
+ } from "./chunk-2MBI5SYB.js";
4
4
  import {
5
5
  createApiClient,
6
6
  createCanonryMcpServer
7
- } from "./chunk-3ZGBSHZ2.js";
8
- import "./chunk-KDWTNI4Z.js";
7
+ } from "./chunk-WVBLFG7H.js";
8
+ import "./chunk-RBQUGZM4.js";
9
9
  import {
10
10
  isReadOnlyKey,
11
11
  updateCheckEnvOptOut
12
- } from "./chunk-6LS2R477.js";
12
+ } from "./chunk-PVWGKDY6.js";
13
13
 
14
14
  // src/mcp/cli.ts
15
15
  import { randomUUID } from "crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonry/canonry",
3
- "version": "7.16.0",
3
+ "version": "7.17.0",
4
4
  "type": "module",
5
5
  "description": "Self-hosted AI visibility (AEO) platform: track how ChatGPT, Claude, Gemini, and Perplexity cite your domain, join it with Search Console, GA4, server-side traffic, and paid media, and fix what you find through agent tools (CLI, REST, MCP). Local SQLite.",
6
6
  "keywords": [
@@ -85,34 +85,34 @@
85
85
  "@types/node-cron": "^3.0.11",
86
86
  "tsup": "^8.5.1",
87
87
  "tsx": "^4.19.0",
88
+ "@ainyc/canonry-api-client": "0.0.0",
88
89
  "@ainyc/canonry-web": "0.0.0",
89
90
  "@ainyc/canonry-api-routes": "0.0.0",
90
- "@ainyc/canonry-api-client": "0.0.0",
91
+ "@ainyc/canonry-contracts": "0.0.0",
91
92
  "@ainyc/canonry-config": "0.0.0",
92
93
  "@ainyc/canonry-db": "0.0.0",
93
- "@ainyc/canonry-contracts": "0.0.0",
94
94
  "@ainyc/canonry-integration-bing": "0.0.0",
95
- "@ainyc/canonry-integration-cloud-run": "0.0.0",
96
- "@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
97
95
  "@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
96
+ "@ainyc/canonry-integration-commoncrawl": "0.0.0",
97
+ "@ainyc/canonry-integration-cloud-run": "0.0.0",
98
98
  "@ainyc/canonry-integration-google": "0.0.0",
99
+ "@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
100
+ "@ainyc/canonry-integration-google-ads": "0.0.0",
99
101
  "@ainyc/canonry-integration-google-business-profile": "0.0.0",
100
- "@ainyc/canonry-integration-google-places": "0.0.0",
101
102
  "@ainyc/canonry-integration-google-tag-manager": "0.0.0",
102
- "@ainyc/canonry-integration-commoncrawl": "0.0.0",
103
- "@ainyc/canonry-integration-openai-ads": "0.0.0",
103
+ "@ainyc/canonry-integration-google-places": "0.0.0",
104
104
  "@ainyc/canonry-integration-traffic": "0.0.0",
105
- "@ainyc/canonry-integration-wordpress": "0.0.0",
105
+ "@ainyc/canonry-integration-openai-ads": "0.0.0",
106
106
  "@ainyc/canonry-intelligence": "0.0.0",
107
107
  "@ainyc/canonry-provider-cdp": "0.0.0",
108
- "@ainyc/canonry-provider-gemini": "0.0.0",
109
- "@ainyc/canonry-integration-google-ads": "0.0.0",
110
108
  "@ainyc/canonry-provider-claude": "0.0.0",
111
- "@ainyc/canonry-provider-muse": "0.0.0",
109
+ "@ainyc/canonry-provider-gemini": "0.0.0",
110
+ "@ainyc/canonry-integration-wordpress": "0.0.0",
112
111
  "@ainyc/canonry-provider-local": "0.0.0",
113
112
  "@ainyc/canonry-provider-openai": "0.0.0",
114
- "@ainyc/canonry-integration-typesafe": "0.0.0",
115
- "@ainyc/canonry-provider-perplexity": "0.0.0"
113
+ "@ainyc/canonry-provider-muse": "0.0.0",
114
+ "@ainyc/canonry-provider-perplexity": "0.0.0",
115
+ "@ainyc/canonry-integration-typesafe": "0.0.0"
116
116
  },
117
117
  "scripts": {
118
118
  "build": "pnpm run build:cli && pnpm run build:web",