@canonry/canonry 4.139.0 → 4.141.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 (31) hide show
  1. package/assets/agent-workspace/skills/aero/references/reporting.md +22 -1
  2. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +21 -0
  3. package/assets/agent-workspace/skills/canonry/references/indexing.md +2 -1
  4. package/assets/assets/{AuditHistoryPanel-DL9chF3F.js → AuditHistoryPanel-DlyLhzqq.js} +1 -1
  5. package/assets/assets/{BacklinksPage-sA_tgQJv.js → BacklinksPage-DNxtwQBF.js} +1 -1
  6. package/assets/assets/{ChartPrimitives-D7nLxIbe.js → ChartPrimitives-BStLR_NC.js} +1 -1
  7. package/assets/assets/{HistoryPage-CLWbcu5m.js → HistoryPage-CIcCgoWK.js} +1 -1
  8. package/assets/assets/{ProjectPage-C_oXMCNU.js → ProjectPage-BSI3Qum9.js} +8 -8
  9. package/assets/assets/{RunRow-DQ4icEiv.js → RunRow-C0mFtLlc.js} +1 -1
  10. package/assets/assets/{RunsPage-D5sizm9T.js → RunsPage-C-yo0yoj.js} +1 -1
  11. package/assets/assets/{SettingsPage-XdQjvWsg.js → SettingsPage-jg4MXOuo.js} +1 -1
  12. package/assets/assets/{TrafficPage-C12osXDa.js → TrafficPage-CnYHIg8t.js} +1 -1
  13. package/assets/assets/{TrafficSourceDetailPage-CXAiNK8Y.js → TrafficSourceDetailPage-CEdyQT2P.js} +1 -1
  14. package/assets/assets/{arrow-left-LaI5a16g.js → arrow-left-DUv0imIl.js} +1 -1
  15. package/assets/assets/{extract-error-message-CYWaTM3m.js → extract-error-message-CCOGDwlm.js} +1 -1
  16. package/assets/assets/index-BDo9nl4O.css +1 -0
  17. package/assets/assets/index-D6EP4dQs.js +213 -0
  18. package/assets/assets/{trash-2-DoH00q7m.js → trash-2-1Yg9W-vs.js} +1 -1
  19. package/assets/index.html +2 -2
  20. package/dist/{chunk-IGU67QFM.js → chunk-2LUSZFB6.js} +122 -19
  21. package/dist/{chunk-DLKUDNDA.js → chunk-HXXO2AF5.js} +51 -4
  22. package/dist/{chunk-OA2EGCUS.js → chunk-OJOA425V.js} +42 -1
  23. package/dist/{chunk-IYTHIAAE.js → chunk-ZCFQGF3V.js} +46 -4
  24. package/dist/cli.js +145 -17
  25. package/dist/index.d.ts +12 -0
  26. package/dist/index.js +4 -4
  27. package/dist/{intelligence-service-SMYVN3KN.js → intelligence-service-4HQIUC7U.js} +2 -2
  28. package/dist/mcp.js +2 -2
  29. package/package.json +8 -8
  30. package/assets/assets/index-CguwySA5.js +0 -213
  31. package/assets/assets/index-CntuM6Th.css +0 -1
package/dist/cli.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  showFirstRunNotice,
31
31
  trackCliCommandFinished,
32
32
  trackEvent
33
- } from "./chunk-DLKUDNDA.js";
33
+ } from "./chunk-HXXO2AF5.js";
34
34
  import {
35
35
  CliError,
36
36
  EXIT_SYSTEM_ERROR,
@@ -47,7 +47,7 @@ import {
47
47
  saveConfig,
48
48
  saveConfigPatch,
49
49
  usageError
50
- } from "./chunk-IYTHIAAE.js";
50
+ } from "./chunk-ZCFQGF3V.js";
51
51
  import {
52
52
  apiKeys,
53
53
  createClient,
@@ -55,7 +55,7 @@ import {
55
55
  projects,
56
56
  queries,
57
57
  renderReportHtml
58
- } from "./chunk-IGU67QFM.js";
58
+ } from "./chunk-2LUSZFB6.js";
59
59
  import {
60
60
  AdsDeliverySnapshotStatuses,
61
61
  AdsHistoricalCampaignRollupStatuses,
@@ -101,7 +101,7 @@ import {
101
101
  providerQuotaPolicySchema,
102
102
  resolveProviderInput,
103
103
  winnabilityClassSchema
104
- } from "./chunk-OA2EGCUS.js";
104
+ } from "./chunk-OJOA425V.js";
105
105
 
106
106
  // src/cli.ts
107
107
  import { pathToFileURL } from "url";
@@ -6378,10 +6378,58 @@ async function googlePerformanceDaily(project, opts) {
6378
6378
  );
6379
6379
  }
6380
6380
  }
6381
+ async function googleTopPages(project, opts) {
6382
+ const client = getClient11();
6383
+ const params = {};
6384
+ if (opts.window) params.window = opts.window;
6385
+ if (opts.startDate) params.startDate = opts.startDate;
6386
+ if (opts.endDate) params.endDate = opts.endDate;
6387
+ if (opts.limit) params.limit = String(opts.limit);
6388
+ const data = await client.gscTopPages(project, Object.keys(params).length > 0 ? params : void 0);
6389
+ if (opts.format === "json") {
6390
+ console.log(JSON.stringify(data, null, 2));
6391
+ return;
6392
+ } else if (opts.format === "jsonl") {
6393
+ emitJsonl(data.rows.map((row) => ({ project, ...row })));
6394
+ return;
6395
+ }
6396
+ if (data.rows.length === 0) {
6397
+ console.log('No GSC page data found in this window. Run "canonry google sync" first.');
6398
+ return;
6399
+ }
6400
+ console.log(`Top pages by clicks (${data.rows.length} page${data.rows.length === 1 ? "" : "s"}):
6401
+ `);
6402
+ const pageWidth = Math.min(60, Math.max(20, ...data.rows.map((row) => row.page.length)));
6403
+ console.log(` ${"PAGE".padEnd(pageWidth)}${"CLICKS".padStart(10)}${"IMPR".padStart(12)}${"CTR".padStart(10)}`);
6404
+ console.log(` ${"\u2500".repeat(pageWidth)}${"\u2500".repeat(10)}${"\u2500".repeat(12)}${"\u2500".repeat(10)}`);
6405
+ for (const row of data.rows) {
6406
+ const page = row.page.length > pageWidth ? row.page.slice(0, pageWidth - 3) + "..." : row.page;
6407
+ console.log(
6408
+ ` ${page.padEnd(pageWidth)}${row.clicks.toLocaleString().padStart(10)}${row.impressions.toLocaleString().padStart(12)}${(row.ctr * 100).toFixed(2).padStart(9)}%`
6409
+ );
6410
+ }
6411
+ console.log();
6412
+ if (data.totals) {
6413
+ const { clicks, impressions, ctr, days } = data.totals;
6414
+ console.log(`Property total (${days} day${days === 1 ? "" : "s"}, source: ${data.totalsSource}):`);
6415
+ console.log(` Clicks: ${clicks.toLocaleString()}`);
6416
+ console.log(` Impressions: ${impressions.toLocaleString()}`);
6417
+ console.log(` CTR: ${(ctr * 100).toFixed(2)}%`);
6418
+ console.log();
6419
+ console.log(" The page rows above are a ranking. They do not add up to this total:");
6420
+ console.log(" Google withholds rare queries and repeats an impression per page.");
6421
+ } else {
6422
+ console.log("Property total: not available for this window.");
6423
+ console.log(' Adding up the page rows would not give it. Run "canonry google sync" to fetch it.');
6424
+ }
6425
+ }
6381
6426
  async function googlePerformance(project, opts) {
6382
6427
  const client = getClient11();
6383
6428
  const params = {};
6384
- if (opts.days) {
6429
+ if (opts.startDate || opts.endDate) {
6430
+ if (opts.startDate) params.startDate = opts.startDate;
6431
+ if (opts.endDate) params.endDate = opts.endDate;
6432
+ } else if (opts.days) {
6385
6433
  const end = /* @__PURE__ */ new Date();
6386
6434
  const start = /* @__PURE__ */ new Date();
6387
6435
  start.setDate(start.getDate() - opts.days);
@@ -6390,19 +6438,36 @@ async function googlePerformance(project, opts) {
6390
6438
  }
6391
6439
  if (opts.keyword) params.query = opts.keyword;
6392
6440
  if (opts.page) params.page = opts.page;
6393
- const rows = await client.gscPerformance(project, Object.keys(params).length > 0 ? params : void 0);
6441
+ if (opts.limit !== void 0) params.limit = String(opts.limit);
6442
+ if (opts.offset !== void 0) params.offset = String(opts.offset);
6443
+ if (opts.orderBy) params.orderBy = opts.orderBy;
6444
+ const data = await client.gscPerformance(project, Object.keys(params).length > 0 ? params : void 0);
6445
+ const { rows, totalMatching, truncated, latestAvailableDate } = data;
6394
6446
  if (opts.format === "json") {
6395
- console.log(JSON.stringify(rows, null, 2));
6447
+ console.log(JSON.stringify(data, null, 2));
6396
6448
  return;
6397
6449
  } else if (opts.format === "jsonl") {
6398
6450
  emitJsonl(rows.map((row) => ({ project, ...row })));
6399
6451
  return;
6400
6452
  }
6401
6453
  if (rows.length === 0) {
6454
+ const requestedEnd = params.endDate;
6455
+ if (totalMatching > 0 && opts.offset !== void 0 && opts.offset >= totalMatching) {
6456
+ console.log(
6457
+ `Offset ${opts.offset} is past the end of the result set (${totalMatching.toLocaleString()} matching rows). Lower --offset to page through them.`
6458
+ );
6459
+ return;
6460
+ }
6461
+ if (latestAvailableDate && requestedEnd && requestedEnd > latestAvailableDate) {
6462
+ console.log(
6463
+ `No GSC data through ${requestedEnd}. GSC reporting lag: the latest date this project holds is ${latestAvailableDate}. Syncing again will not backfill dates Google has not reported yet.`
6464
+ );
6465
+ return;
6466
+ }
6402
6467
  console.log('No GSC data found. Run "canonry google sync" first.');
6403
6468
  return;
6404
6469
  }
6405
- console.log(`GSC performance data (${rows.length} rows):
6470
+ console.log(`GSC performance data (${rows.length} of ${totalMatching.toLocaleString()} matching rows):
6406
6471
  `);
6407
6472
  console.log(` ${"DATE".padEnd(12)}${"QUERY".padEnd(30)}${"CLICKS".padEnd(8)}${"IMPR".padEnd(8)}${"CTR".padEnd(8)}${"POS".padEnd(6)}`);
6408
6473
  console.log(` ${"\u2500".repeat(12)}${"\u2500".repeat(30)}${"\u2500".repeat(8)}${"\u2500".repeat(8)}${"\u2500".repeat(8)}${"\u2500".repeat(6)}`);
@@ -6414,7 +6479,13 @@ async function googlePerformance(project, opts) {
6414
6479
  }
6415
6480
  if (rows.length > 50) {
6416
6481
  console.log(`
6417
- ... and ${rows.length - 50} more rows (use --format json for full output)`);
6482
+ ... and ${rows.length - 50} more rows on this page (use --format json for full output)`);
6483
+ }
6484
+ if (truncated) {
6485
+ console.log("\n This is one page. Use --limit / --offset to page through the rest, --order-by to change the ranking.");
6486
+ }
6487
+ if (latestAvailableDate) {
6488
+ console.log(` Latest date held for this project: ${latestAvailableDate}`);
6418
6489
  }
6419
6490
  }
6420
6491
  async function googleInspect(project, url, format) {
@@ -6937,6 +7008,7 @@ async function googleDeindexed(project, format) {
6937
7008
  }
6938
7009
 
6939
7010
  // src/cli-commands/google.ts
7011
+ var GOOGLE_PERFORMANCE_USAGE = "canonry google performance <project> [--days <n> | --start <YYYY-MM-DD> --end <YYYY-MM-DD>] [--keyword <kw>] [--page <url>] [--limit <n>] [--offset <n>] [--order-by clicks|impressions|date] [--format json]";
6940
7012
  var GOOGLE_CLI_COMMANDS = [
6941
7013
  {
6942
7014
  path: ["google", "connect"],
@@ -7076,22 +7148,53 @@ var GOOGLE_CLI_COMMANDS = [
7076
7148
  },
7077
7149
  {
7078
7150
  path: ["google", "performance"],
7079
- usage: "canonry google performance <project> [--days <n>] [--keyword <kw>] [--page <url>] [--format json]",
7151
+ usage: GOOGLE_PERFORMANCE_USAGE,
7080
7152
  options: {
7081
7153
  days: stringOption(),
7154
+ start: stringOption(),
7155
+ end: stringOption(),
7082
7156
  keyword: stringOption(),
7083
- page: stringOption()
7157
+ page: stringOption(),
7158
+ limit: stringOption(),
7159
+ offset: stringOption(),
7160
+ "order-by": stringOption()
7084
7161
  },
7085
7162
  run: async (input) => {
7086
- const project = requireProject(input, "google.performance", "canonry google performance <project> [--days <n>] [--keyword <kw>] [--page <url>] [--format json]");
7163
+ const project = requireProject(input, "google.performance", GOOGLE_PERFORMANCE_USAGE);
7164
+ const startDate = getString(input.values, "start");
7165
+ const endDate = getString(input.values, "end");
7166
+ const days = parseIntegerOption(input, "days", {
7167
+ command: "google.performance",
7168
+ usage: GOOGLE_PERFORMANCE_USAGE,
7169
+ message: "--days must be an integer"
7170
+ });
7171
+ if (days !== void 0 && (startDate || endDate)) {
7172
+ throw usageError(
7173
+ `Error: --days cannot be combined with --start/--end. Pass one window.
7174
+ Usage: ${GOOGLE_PERFORMANCE_USAGE}`,
7175
+ {
7176
+ message: "--days cannot be combined with --start/--end",
7177
+ details: { command: "google.performance", usage: GOOGLE_PERFORMANCE_USAGE }
7178
+ }
7179
+ );
7180
+ }
7087
7181
  await googlePerformance(project, {
7088
- days: parseIntegerOption(input, "days", {
7089
- command: "google.performance",
7090
- usage: "canonry google performance <project> [--days <n>] [--keyword <kw>] [--page <url>] [--format json]",
7091
- message: "--days must be an integer"
7092
- }),
7182
+ days,
7183
+ startDate,
7184
+ endDate,
7093
7185
  keyword: getString(input.values, "keyword"),
7094
7186
  page: getString(input.values, "page"),
7187
+ limit: parseIntegerOption(input, "limit", {
7188
+ command: "google.performance",
7189
+ usage: GOOGLE_PERFORMANCE_USAGE,
7190
+ message: "--limit must be an integer"
7191
+ }),
7192
+ offset: parseIntegerOption(input, "offset", {
7193
+ command: "google.performance",
7194
+ usage: GOOGLE_PERFORMANCE_USAGE,
7195
+ message: "--offset must be an integer"
7196
+ }),
7197
+ orderBy: getString(input.values, "order-by"),
7095
7198
  format: input.format
7096
7199
  });
7097
7200
  }
@@ -7114,6 +7217,31 @@ var GOOGLE_CLI_COMMANDS = [
7114
7217
  });
7115
7218
  }
7116
7219
  },
7220
+ {
7221
+ path: ["google", "top-pages"],
7222
+ usage: "canonry google top-pages <project> [--window 7d|30d|90d|all] [--start <YYYY-MM-DD>] [--end <YYYY-MM-DD>] [--limit <n>] [--format json]",
7223
+ options: {
7224
+ window: stringOption(),
7225
+ start: stringOption(),
7226
+ end: stringOption(),
7227
+ limit: stringOption()
7228
+ },
7229
+ run: async (input) => {
7230
+ const usage = "canonry google top-pages <project> [--window 7d|30d|90d|all] [--start <YYYY-MM-DD>] [--end <YYYY-MM-DD>] [--limit <n>] [--format json]";
7231
+ const project = requireProject(input, "google.top-pages", usage);
7232
+ await googleTopPages(project, {
7233
+ window: getString(input.values, "window"),
7234
+ startDate: getString(input.values, "start"),
7235
+ endDate: getString(input.values, "end"),
7236
+ limit: parseIntegerOption(input, "limit", {
7237
+ command: "google.top-pages",
7238
+ usage,
7239
+ message: "--limit must be an integer"
7240
+ }),
7241
+ format: input.format
7242
+ });
7243
+ }
7244
+ },
7117
7245
  {
7118
7246
  path: ["google", "inspect"],
7119
7247
  usage: "canonry google inspect <project> <url> [--format json]",
package/dist/index.d.ts CHANGED
@@ -190,6 +190,18 @@ interface DashboardConfigEntry {
190
190
  * and the engine is not directly internet-reachable.
191
191
  */
192
192
  requirePassword?: boolean;
193
+ /**
194
+ * Whether the dashboard sidebar and page footer show the Canonry GitHub,
195
+ * documentation, and changelog links. Defaults to true. Disable for a
196
+ * quieter branded UI.
197
+ */
198
+ showResourceLinks?: boolean;
199
+ /**
200
+ * Whether the dashboard sidebar shows the available-version notification.
201
+ * Defaults to true. Disable without turning off the underlying update check
202
+ * or CLI update notice.
203
+ */
204
+ showUpdateNotification?: boolean;
193
205
  }
194
206
  /**
195
207
  * Google Places API config — supplemental rendered-listing data for GBP
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-DLKUDNDA.js";
3
+ } from "./chunk-HXXO2AF5.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-IYTHIAAE.js";
7
- import "./chunk-IGU67QFM.js";
8
- import "./chunk-OA2EGCUS.js";
6
+ } from "./chunk-ZCFQGF3V.js";
7
+ import "./chunk-2LUSZFB6.js";
8
+ import "./chunk-OJOA425V.js";
9
9
  export {
10
10
  createServer,
11
11
  loadConfig
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IntelligenceService
3
- } from "./chunk-IGU67QFM.js";
4
- import "./chunk-OA2EGCUS.js";
3
+ } from "./chunk-2LUSZFB6.js";
4
+ import "./chunk-OJOA425V.js";
5
5
  export {
6
6
  IntelligenceService
7
7
  };
package/dist/mcp.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  PACKAGE_VERSION,
4
4
  canonryMcpTools,
5
5
  createApiClient
6
- } from "./chunk-IYTHIAAE.js";
6
+ } from "./chunk-ZCFQGF3V.js";
7
7
  import {
8
8
  isReadOnlyKey
9
- } from "./chunk-OA2EGCUS.js";
9
+ } from "./chunk-OJOA425V.js";
10
10
 
11
11
  // src/mcp/cli.ts
12
12
  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.139.0",
3
+ "version": "4.141.0",
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",
@@ -65,26 +65,26 @@
65
65
  "@types/node-cron": "^3.0.11",
66
66
  "tsup": "^8.5.1",
67
67
  "tsx": "^4.19.0",
68
+ "@ainyc/canonry-config": "0.0.0",
68
69
  "@ainyc/canonry-api-client": "0.0.0",
69
- "@ainyc/canonry-api-routes": "0.0.0",
70
70
  "@ainyc/canonry-contracts": "0.0.0",
71
71
  "@ainyc/canonry-db": "0.0.0",
72
- "@ainyc/canonry-config": "0.0.0",
72
+ "@ainyc/canonry-api-routes": "0.0.0",
73
73
  "@ainyc/canonry-integration-bing": "0.0.0",
74
+ "@ainyc/canonry-integration-cloud-run": "0.0.0",
74
75
  "@ainyc/canonry-integration-openai-ads": "0.0.0",
76
+ "@ainyc/canonry-integration-commoncrawl": "0.0.0",
75
77
  "@ainyc/canonry-integration-google": "0.0.0",
76
78
  "@ainyc/canonry-integration-google-business-profile": "0.0.0",
77
- "@ainyc/canonry-integration-cloud-run": "0.0.0",
78
79
  "@ainyc/canonry-integration-google-places": "0.0.0",
79
80
  "@ainyc/canonry-integration-traffic": "0.0.0",
80
- "@ainyc/canonry-integration-wordpress": "0.0.0",
81
- "@ainyc/canonry-integration-commoncrawl": "0.0.0",
82
81
  "@ainyc/canonry-intelligence": "0.0.0",
83
- "@ainyc/canonry-provider-claude": "0.0.0",
84
82
  "@ainyc/canonry-provider-cdp": "0.0.0",
85
- "@ainyc/canonry-provider-local": "0.0.0",
86
83
  "@ainyc/canonry-provider-gemini": "0.0.0",
84
+ "@ainyc/canonry-provider-claude": "0.0.0",
85
+ "@ainyc/canonry-provider-local": "0.0.0",
87
86
  "@ainyc/canonry-provider-openai": "0.0.0",
87
+ "@ainyc/canonry-integration-wordpress": "0.0.0",
88
88
  "@ainyc/canonry-provider-perplexity": "0.0.0"
89
89
  },
90
90
  "scripts": {