@canonry/canonry 7.24.1 → 7.32.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 (33) hide show
  1. package/README.md +3 -2
  2. package/assets/agent-workspace/skills/canonry/references/aeo-analysis.md +1 -1
  3. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +21 -2
  4. package/assets/agent-workspace/skills/canonry/references/google-business-profile.md +1 -0
  5. package/assets/agent-workspace/skills/canonry/references/server-side-traffic.md +3 -2
  6. package/assets/assets/{AuditHistoryPanel-DK3zE9dO.js → AuditHistoryPanel-cQyVA85P.js} +1 -1
  7. package/assets/assets/{BacklinksPage-WYFDcXpX.js → BacklinksPage-UGZ_9N7F.js} +1 -1
  8. package/assets/assets/{HistoryPage-CSlndAeS.js → HistoryPage-UJVFZ5LK.js} +1 -1
  9. package/assets/assets/{MeasurementPropertyPage-CivoZOGQ.js → MeasurementPropertyPage-ChpOxQfx.js} +1 -1
  10. package/assets/assets/{ProjectPage-zidnYv65.js → ProjectPage-CvxuPSiC.js} +1 -1
  11. package/assets/assets/{RunsPage-BGMAZ_mA.js → RunsPage-C6U_YcDY.js} +1 -1
  12. package/assets/assets/{SettingsPage-ndSVVJcE.js → SettingsPage-DeKxjuTr.js} +1 -1
  13. package/assets/assets/{SiteHealthSection-C7-RrsKk.js → SiteHealthSection-COeVsgop.js} +3 -3
  14. package/assets/assets/{TrafficPage-2ANBE9Lc.js → TrafficPage-DmMmeJKK.js} +1 -1
  15. package/assets/assets/{TrafficSourceDetailPage-CLYVB4Uq.js → TrafficSourceDetailPage-CUehseZe.js} +1 -1
  16. package/assets/assets/{extract-error-message-BzPoRYiA.js → extract-error-message-BsxdS7Po.js} +1 -1
  17. package/assets/assets/{index-CjowCLs3.js → index-ahEr6Oc-.js} +19 -19
  18. package/assets/assets/{react-sigma_core.esm.min-BmKqjMGN.js → react-sigma_core.esm.min--MbbBWzJ.js} +1 -1
  19. package/assets/assets/{v2-overview-adapter-C7eI2iBf.js → v2-overview-adapter-D-IScpdp.js} +1 -1
  20. package/assets/index.html +1 -1
  21. package/dist/{chunk-43FZZFOK.js → chunk-2C6NWFN4.js} +2 -2
  22. package/dist/{chunk-656KW4RB.js → chunk-42XUY243.js} +28 -5
  23. package/dist/{chunk-OAWFZAAJ.js → chunk-FW4GX2LO.js} +3 -3
  24. package/dist/{chunk-35IRQYDW.js → chunk-K5EGSSXC.js} +145 -25
  25. package/dist/{chunk-5ITYNLS3.js → chunk-QFXD7GR5.js} +4 -3
  26. package/dist/{chunk-H7UNFLYH.js → chunk-WRHA54BN.js} +794 -619
  27. package/dist/{chunk-332IBSJJ.js → chunk-ZIETXJYU.js} +6 -4
  28. package/dist/cli.js +40 -17
  29. package/dist/{demo-server-NLD6B4WH.js → demo-server-G5OK7SWE.js} +4 -4
  30. package/dist/index.js +6 -6
  31. package/dist/{intelligence-service-JFHM2EAY.js → intelligence-service-3ZUVTIO7.js} +2 -2
  32. package/dist/mcp.js +4 -4
  33. package/package.json +10 -10
@@ -109,6 +109,7 @@ import {
109
109
  queryTrackingPreviewRequestSchema,
110
110
  referralAssessmentQuerySchema,
111
111
  reportMonthSchema,
112
+ reportedQueryClasses,
112
113
  researchBatchCreateSchema,
113
114
  researchRunCreateSchema,
114
115
  resultsClearRequestSchema,
@@ -144,7 +145,7 @@ import {
144
145
  trafficSeriesGranularitySchema,
145
146
  visibilityCompareSelectionSchema,
146
147
  visibilityReportRequestSchema
147
- } from "./chunk-656KW4RB.js";
148
+ } from "./chunk-42XUY243.js";
148
149
 
149
150
  // src/support-links.ts
150
151
  var CANONRY_DISCORD_URL = "https://discord.gg/jnJ2H2z5Xh";
@@ -1969,7 +1970,7 @@ var canonryMcpTools = [
1969
1970
  defineTool({
1970
1971
  name: "canonry_queries_list",
1971
1972
  title: "List queries",
1972
- description: "List tracked queries for a Canonry project.",
1973
+ description: "List tracked queries for a Canonry project. Each row carries queryClass as the server classes it: branded, non-brand, or null when no single class exists (no usable brand name, or the active measurement plan holds no single class for the query). A row with no queryClass comes from a server older than the field: the class is unknown, not null. Never infer a class from the query text.",
1973
1974
  access: "read",
1974
1975
  tier: "setup",
1975
1976
  inputSchema: projectInputSchema,
@@ -3275,14 +3276,15 @@ var canonryMcpTools = [
3275
3276
  defineTool({
3276
3277
  name: "canonry_queries_add",
3277
3278
  title: "Add queries",
3278
- description: "Append tracked queries to a Canonry project; existing queries are skipped by the API.",
3279
+ description: "Append tracked queries to a Canonry project; existing queries are skipped by the API. Returns queryClasses: each requested query with the class the server gave it (branded, non-brand, or null when no single class exists). An entry with no queryClass means the server did not report one.",
3279
3280
  access: "write",
3280
3281
  tier: "setup",
3281
3282
  inputSchema: queriesInputSchema,
3282
3283
  annotations: writeAnnotations({ idempotentHint: true }),
3283
3284
  openApiOperations: ["POST /api/v1/projects/{name}/queries"],
3284
3285
  handler: async (client, input) => {
3285
- await client.appendQueries(input.project, uniqueStrings(input.request.queries));
3286
+ const queries = uniqueStrings(input.request.queries);
3287
+ return { ok: true, queryClasses: reportedQueryClasses(queries, await client.appendQueries(input.project, queries)) };
3286
3288
  }
3287
3289
  }),
3288
3290
  defineTool({
package/dist/cli.js CHANGED
@@ -40,11 +40,11 @@ import {
40
40
  trackFeatureCompleted,
41
41
  trackIntegrationConnection,
42
42
  waitForServerRuntimeStartup
43
- } from "./chunk-35IRQYDW.js";
43
+ } from "./chunk-K5EGSSXC.js";
44
44
  import {
45
45
  autoSyncSkills,
46
46
  formatAutoSyncNotice
47
- } from "./chunk-OAWFZAAJ.js";
47
+ } from "./chunk-FW4GX2LO.js";
48
48
  import {
49
49
  clearDashboardPassword,
50
50
  configExists,
@@ -63,13 +63,13 @@ import {
63
63
  saveConfigPatch,
64
64
  shouldPrintServeSkillsNudge,
65
65
  withBootstrapProviderDefaults
66
- } from "./chunk-5ITYNLS3.js";
66
+ } from "./chunk-QFXD7GR5.js";
67
67
  import {
68
68
  DEFAULT_DEMO_TRUSTED_PROXIES,
69
69
  trustedProxiesProblem,
70
70
  trustedProxyProblem
71
71
  } from "./chunk-RB2F4D3Z.js";
72
- import "./chunk-43FZZFOK.js";
72
+ import "./chunk-2C6NWFN4.js";
73
73
  import {
74
74
  CANONRY_DISCORD_URL,
75
75
  CANONRY_ISSUES_URL,
@@ -83,7 +83,7 @@ import {
83
83
  runMeasurementDraftAction,
84
84
  systemError,
85
85
  usageError
86
- } from "./chunk-332IBSJJ.js";
86
+ } from "./chunk-ZIETXJYU.js";
87
87
  import {
88
88
  CLOUDFLARE_WORKER_BINDINGS,
89
89
  CLOUDFLARE_WORKER_GENERATED_MARKER,
@@ -116,7 +116,7 @@ import {
116
116
  rawEventSamples,
117
117
  readMarketCompetitorNames,
118
118
  runs
119
- } from "./chunk-H7UNFLYH.js";
119
+ } from "./chunk-WRHA54BN.js";
120
120
  import {
121
121
  AdsDeliverySnapshotStatuses,
122
122
  AdsHistoricalCampaignRollupStatuses,
@@ -232,6 +232,7 @@ import {
232
232
  queryTrackingCommitRequestSchema,
233
233
  queryTrackingPreviewRequestSchema,
234
234
  referralAssessmentQuerySchema,
235
+ reportedQueryClasses,
235
236
  researchBatchCreateSchema,
236
237
  resolveNegativeReviewMaxStars,
237
238
  resolveProjectQualifiedAliases,
@@ -253,7 +254,7 @@ import {
253
254
  visibilityCompareSelectionSchema,
254
255
  visibilityReportRequestSchema,
255
256
  winnabilityClassSchema
256
- } from "./chunk-656KW4RB.js";
257
+ } from "./chunk-42XUY243.js";
257
258
 
258
259
  // src/cli.ts
259
260
  import { pathToFileURL } from "url";
@@ -799,7 +800,7 @@ function parseDemoTrustedProxies(values) {
799
800
  async function demoCommand(options) {
800
801
  const { host, port } = parseDemoListenOptions(options);
801
802
  const trustProxy = parseDemoTrustedProxies(options.trustProxy);
802
- const { createDemoServer } = await import("./demo-server-NLD6B4WH.js");
803
+ const { createDemoServer } = await import("./demo-server-G5OK7SWE.js");
803
804
  const app = await createDemoServer({ trustProxy });
804
805
  let stopping = false;
805
806
  const stop = () => {
@@ -1213,7 +1214,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
1213
1214
  }
1214
1215
  }
1215
1216
  async function backfillInsightsCommand(project2, opts) {
1216
- const { IntelligenceService } = await import("./intelligence-service-JFHM2EAY.js");
1217
+ const { IntelligenceService } = await import("./intelligence-service-3ZUVTIO7.js");
1217
1218
  const config = loadConfig();
1218
1219
  const db = createClient(config.database);
1219
1220
  migrate(db);
@@ -2066,7 +2067,7 @@ async function backlinksList(opts) {
2066
2067
  }
2067
2068
  console.log(formatSummaryAndDomains(opts.project, response));
2068
2069
  }
2069
- function formatSourceAvailability(res) {
2070
+ function formatSourceAvailability(project2, res) {
2070
2071
  const lines = [];
2071
2072
  lines.push(`Project: ${res.projectId} Target: ${res.targetDomain}`);
2072
2073
  lines.push("");
@@ -2078,8 +2079,8 @@ function formatSourceAvailability(res) {
2078
2079
  }
2079
2080
  if (!res.anyConnected) {
2080
2081
  lines.push("");
2081
- lines.push("No active backlink source is set up. Enable Common Crawl on the project,");
2082
- lines.push("then run `canonry backlinks sync`.");
2082
+ lines.push("No active backlink source is set up. Run `canonry backlinks sync` to download a");
2083
+ lines.push(`Common Crawl release, or \`canonry backlinks extract ${project2}\` when one is already synced.`);
2083
2084
  }
2084
2085
  return lines.join("\n");
2085
2086
  }
@@ -2092,7 +2093,7 @@ async function backlinksSources(opts) {
2092
2093
  emitJsonl(res.sources.map((s) => ({ project: opts.project, targetDomain: res.targetDomain, ...s })));
2093
2094
  return;
2094
2095
  }
2095
- console.log(formatSourceAvailability(res));
2096
+ console.log(formatSourceAvailability(opts.project, res));
2096
2097
  }
2097
2098
  async function backlinksReleases(opts = {}) {
2098
2099
  const rows = await getClient().backlinksCachedReleases();
@@ -11885,18 +11886,36 @@ import fs9 from "fs";
11885
11886
  function getClient15() {
11886
11887
  return createApiClient();
11887
11888
  }
11889
+ var NO_CLASS = "-";
11890
+ var CLASS_COLUMN_WIDTH = "non-brand".length;
11891
+ var NO_CLASS_NOTE = `${NO_CLASS} = no class: the project has no usable brand name, or its measurement plan holds no single class for that query (canonry query workspace shows the class per Property).`;
11892
+ var CLASS_NOT_REPORTED_NOTE = `${NO_CLASS} = class not reported: this server version does not send a query class. Upgrade the server to see it.`;
11893
+ function classCell(queryClass) {
11894
+ return (queryClass ?? NO_CLASS).padEnd(CLASS_COLUMN_WIDTH);
11895
+ }
11896
+ function dashNotes(rows) {
11897
+ return [
11898
+ ...rows.some((row) => row.queryClass === null) ? [NO_CLASS_NOTE] : [],
11899
+ ...rows.some((row) => row.queryClass === void 0) ? [CLASS_NOT_REPORTED_NOTE] : []
11900
+ ];
11901
+ }
11888
11902
  async function addQueries(project2, queries2, format) {
11889
11903
  const client = getClient15();
11890
- await client.appendQueries(project2, queries2);
11904
+ const queryClasses = reportedQueryClasses(queries2, await client.appendQueries(project2, queries2));
11891
11905
  if (isMachineFormat(format)) {
11892
11906
  console.log(JSON.stringify({
11893
11907
  project: project2,
11894
11908
  queries: queries2,
11895
- addedCount: queries2.length
11909
+ addedCount: queries2.length,
11910
+ queryClasses
11896
11911
  }, null, 2));
11897
11912
  return;
11898
11913
  }
11899
11914
  console.log(`Added ${queries2.length} ${queries2.length === 1 ? "query" : "queries"} to "${project2}".`);
11915
+ for (const entry of queryClasses) {
11916
+ console.log(` ${classCell(entry.queryClass)} ${entry.query}`);
11917
+ }
11918
+ for (const note of dashNotes(queryClasses)) console.log(` ${note}`);
11900
11919
  }
11901
11920
  async function replaceQueries(project2, queries2, opts) {
11902
11921
  const client = getClient15();
@@ -11967,9 +11986,13 @@ async function listQueries(project2, format) {
11967
11986
  }
11968
11987
  console.log(`Queries for "${project2}" (${qs.length}):
11969
11988
  `);
11989
+ console.log(` ${"CLASS".padEnd(CLASS_COLUMN_WIDTH)} QUERY`);
11970
11990
  for (const q of qs) {
11971
- console.log(` ${q.query}`);
11991
+ console.log(` ${classCell(q.queryClass)} ${q.query}`);
11972
11992
  }
11993
+ const notes = dashNotes(qs);
11994
+ if (notes.length > 0) console.log(`
11995
+ ${notes.map((note) => ` ${note}`).join("\n")}`);
11973
11996
  }
11974
11997
  async function importQueries(project2, filePath, format) {
11975
11998
  if (!fs9.existsSync(filePath)) {
@@ -13048,7 +13071,7 @@ var EVENT_DESCRIPTIONS = {
13048
13071
  "run.failed": "An AEO sweep failed",
13049
13072
  "insight.critical": "A critical-severity insight was generated",
13050
13073
  "insight.high": "A high-severity insight was generated",
13051
- "health.degraded": "A scheduled health check found the measurement degraded, daily data stopped arriving, or the website stopped answering (sent on change, not every pass)",
13074
+ "health.degraded": "A scheduled health check found the measurement degraded, daily data stopped arriving, or the website stopped answering (sent when a check starts failing or gets worse, not every pass)",
13052
13075
  "health.recovered": "A degraded health check is passing again, or a website that was paged as down answers again",
13053
13076
  "review.negative": "A new or edited Google review at or below the project's negative-review threshold, 3 stars by default (Business Profile reviews, or the public listing when Google has not enabled review access)",
13054
13077
  "review.rating-dropped": "A location's public Google rating fell (sent for locations without Business Profile review access)"
@@ -5,11 +5,11 @@ import {
5
5
  computeFactorAverages,
6
6
  layoutSiteCrawlGraphInput,
7
7
  persistSiteCrawlGraphLayout
8
- } from "./chunk-43FZZFOK.js";
8
+ } from "./chunk-2C6NWFN4.js";
9
9
  import {
10
10
  PACKAGE_VERSION,
11
11
  canonryMcpTools
12
- } from "./chunk-332IBSJJ.js";
12
+ } from "./chunk-ZIETXJYU.js";
13
13
  import {
14
14
  HISTORY_WINDOW_RUNS,
15
15
  IntelligenceService,
@@ -85,7 +85,7 @@ import {
85
85
  siteCrawlPages,
86
86
  siteCrawlSnapshots,
87
87
  trafficSources
88
- } from "./chunk-H7UNFLYH.js";
88
+ } from "./chunk-WRHA54BN.js";
89
89
  import {
90
90
  RunKinds,
91
91
  SiteCrawlFetchStates,
@@ -115,7 +115,7 @@ import {
115
115
  roundPreservingTotal,
116
116
  siteAuditPageFactorSchema,
117
117
  wilsonInterval
118
- } from "./chunk-656KW4RB.js";
118
+ } from "./chunk-42XUY243.js";
119
119
 
120
120
  // src/demo-server.ts
121
121
  import { dirname, join as join2 } from "path";
package/dist/index.js CHANGED
@@ -3,14 +3,14 @@ import {
3
3
  createGoogleMarketingCredentialStore,
4
4
  createGoogleMarketingRuntime,
5
5
  createServer
6
- } from "./chunk-35IRQYDW.js";
6
+ } from "./chunk-K5EGSSXC.js";
7
7
  import {
8
8
  loadConfig
9
- } from "./chunk-5ITYNLS3.js";
10
- import "./chunk-43FZZFOK.js";
11
- import "./chunk-332IBSJJ.js";
12
- import "./chunk-H7UNFLYH.js";
13
- import "./chunk-656KW4RB.js";
9
+ } from "./chunk-QFXD7GR5.js";
10
+ import "./chunk-2C6NWFN4.js";
11
+ import "./chunk-ZIETXJYU.js";
12
+ import "./chunk-WRHA54BN.js";
13
+ import "./chunk-42XUY243.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-H7UNFLYH.js";
5
- import "./chunk-656KW4RB.js";
4
+ } from "./chunk-WRHA54BN.js";
5
+ import "./chunk-42XUY243.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-OAWFZAAJ.js";
3
+ } from "./chunk-FW4GX2LO.js";
4
4
  import {
5
5
  createApiClient,
6
6
  createCanonryMcpServer
7
- } from "./chunk-5ITYNLS3.js";
8
- import "./chunk-332IBSJJ.js";
7
+ } from "./chunk-QFXD7GR5.js";
8
+ import "./chunk-ZIETXJYU.js";
9
9
  import {
10
10
  isReadOnlyKey,
11
11
  updateCheckEnvOptOut
12
- } from "./chunk-656KW4RB.js";
12
+ } from "./chunk-42XUY243.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.24.1",
3
+ "version": "7.32.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": [
@@ -86,33 +86,33 @@
86
86
  "tsup": "^8.5.1",
87
87
  "tsx": "^4.19.0",
88
88
  "@ainyc/canonry-web": "0.0.0",
89
- "@ainyc/canonry-api-client": "0.0.0",
90
89
  "@ainyc/canonry-api-routes": "0.0.0",
91
90
  "@ainyc/canonry-config": "0.0.0",
91
+ "@ainyc/canonry-api-client": "0.0.0",
92
92
  "@ainyc/canonry-db": "0.0.0",
93
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",
95
96
  "@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
96
- "@ainyc/canonry-integration-commoncrawl": "0.0.0",
97
97
  "@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
98
- "@ainyc/canonry-integration-google-ads": "0.0.0",
99
- "@ainyc/canonry-integration-google-business-profile": "0.0.0",
98
+ "@ainyc/canonry-integration-commoncrawl": "0.0.0",
100
99
  "@ainyc/canonry-integration-google": "0.0.0",
101
- "@ainyc/canonry-integration-cloud-run": "0.0.0",
102
- "@ainyc/canonry-integration-google-tag-manager": "0.0.0",
100
+ "@ainyc/canonry-integration-google-business-profile": "0.0.0",
103
101
  "@ainyc/canonry-integration-google-places": "0.0.0",
102
+ "@ainyc/canonry-integration-google-ads": "0.0.0",
103
+ "@ainyc/canonry-integration-google-tag-manager": "0.0.0",
104
104
  "@ainyc/canonry-integration-openai-ads": "0.0.0",
105
105
  "@ainyc/canonry-integration-wordpress": "0.0.0",
106
106
  "@ainyc/canonry-intelligence": "0.0.0",
107
- "@ainyc/canonry-provider-cdp": "0.0.0",
108
107
  "@ainyc/canonry-integration-traffic": "0.0.0",
108
+ "@ainyc/canonry-provider-cdp": "0.0.0",
109
109
  "@ainyc/canonry-provider-claude": "0.0.0",
110
110
  "@ainyc/canonry-provider-gemini": "0.0.0",
111
111
  "@ainyc/canonry-provider-local": "0.0.0",
112
112
  "@ainyc/canonry-provider-muse": "0.0.0",
113
113
  "@ainyc/canonry-provider-openai": "0.0.0",
114
- "@ainyc/canonry-integration-typesafe": "0.0.0",
115
- "@ainyc/canonry-provider-perplexity": "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",