@canonry/canonry 7.54.0 → 7.55.1

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 (135) hide show
  1. package/README.md +18 -6
  2. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +1 -1
  3. package/assets/assets/{AgentSetupPage-Dr7UsGcq.js → AgentSetupPage-Chb7OZYo.js} +3 -3
  4. package/assets/assets/{AuditHistoryPanel-Dg9ZNNQw.js → AuditHistoryPanel-CWAAzxGL.js} +1 -1
  5. package/assets/assets/{BacklinksPage-DSgwyFCi.js → BacklinksPage-CfRqXLjw.js} +1 -1
  6. package/assets/assets/{HistoryPage-DaX20IWP.js → HistoryPage-EXS6zGfM.js} +1 -1
  7. package/assets/assets/MeasurementPropertyPage-CnMKVlyr.js +4 -0
  8. package/assets/assets/ProjectPage-D8rNNTAJ.js +7 -0
  9. package/assets/assets/{RunsPage-D06GJ47B.js → RunsPage-Ck0A8Z-B.js} +1 -1
  10. package/assets/assets/{SettingsPage-MSgC8Zrc.js → SettingsPage-DLwUxbGB.js} +1 -1
  11. package/assets/assets/SiteHealthSection-B7-1csc8.js +2 -0
  12. package/assets/assets/{ToneBadge-AoUA_EpE.js → ToneBadge-BcN0dkBF.js} +1 -1
  13. package/assets/assets/{TrafficPage-DikPWmaU.js → TrafficPage-jPUXy6qr.js} +1 -1
  14. package/assets/assets/{TrafficSourceDetailPage-C1hfimWW.js → TrafficSourceDetailPage-D1ApU8pZ.js} +1 -1
  15. package/assets/assets/{account-context-CHtJm4fz.js → account-context-W2az42JI.js} +1 -1
  16. package/assets/assets/{card-BO6dtEV9.js → card-YusVbEjF.js} +1 -1
  17. package/assets/assets/{extract-error-message-Q9pkEqUE.js → extract-error-message-XEIEg9D6.js} +1 -1
  18. package/assets/assets/{format-helpers-Gj1ekh6p.js → format-helpers-Bb7jAdHk.js} +1 -1
  19. package/assets/assets/index-Gz_0R4O6.js +56 -0
  20. package/assets/assets/{query-client-C22j0Z7h.js → query-client-Dz-pGbg8.js} +1 -1
  21. package/assets/assets/react-query-DB0ftGOM.js +1 -0
  22. package/assets/assets/{react-sigma_core.esm.min-j5DWE8Rk.js → react-sigma_core.esm.min--9Hr2IJs.js} +1 -1
  23. package/assets/assets/{service-2DEngBCR.js → service-B6yV5DWh.js} +1 -1
  24. package/assets/demo-og.png +0 -0
  25. package/assets/index.html +7 -7
  26. package/dist/{ads-A5S2NQBZ.js → ads-FZ7MIWXC.js} +3 -3
  27. package/dist/{agent-BV7G7QN7.js → agent-E6DBBS3U.js} +7 -7
  28. package/dist/{agent-ask-5ALAHZ6T.js → agent-ask-GFG646FW.js} +3 -3
  29. package/dist/{agent-conversations-MJPQCJYR.js → agent-conversations-MF3JQUBO.js} +3 -3
  30. package/dist/{agent-memory-Z3VPA5KH.js → agent-memory-AHBHISRL.js} +3 -3
  31. package/dist/{agent-providers-FP3LAZPG.js → agent-providers-GPPFRFOJ.js} +3 -3
  32. package/dist/{agent-transcript-4GXCOC73.js → agent-transcript-WAFQUNNS.js} +3 -3
  33. package/dist/{analytics-TOLSUYSN.js → analytics-JIMNYMK7.js} +3 -3
  34. package/dist/{apply-EU5JAFVZ.js → apply-VQGED53E.js} +3 -3
  35. package/dist/{backfill-3263IYJH.js → backfill-2Z5NQJH7.js} +9 -9
  36. package/dist/{backlinks-XQ5JTN6W.js → backlinks-3OWR2TKF.js} +3 -3
  37. package/dist/{bing-LYHRD7BF.js → bing-VN5M2WTQ.js} +3 -3
  38. package/dist/{bootstrap-AKWTIMMH.js → bootstrap-E27HOPUD.js} +10 -10
  39. package/dist/{cdp-N4PQJWGQ.js → cdp-DGUIUB6T.js} +7 -7
  40. package/dist/{chunk-4LVJFSPH.js → chunk-23YDBDYE.js} +5 -5
  41. package/dist/{chunk-PFPTUCMG.js → chunk-4DQFJP5E.js} +324 -324
  42. package/dist/{chunk-VCTP2RG6.js → chunk-4MTFV6L2.js} +5 -5
  43. package/dist/{chunk-YOZ35ZTT.js → chunk-5DX7N34L.js} +1 -1
  44. package/dist/{chunk-LCTYTGSE.js → chunk-5XOGLDAG.js} +3 -3
  45. package/dist/{chunk-ZILJZNMQ.js → chunk-64MEDTTQ.js} +1 -1
  46. package/dist/{chunk-K5MBEK4S.js → chunk-6HEDNOEF.js} +8 -8
  47. package/dist/{chunk-VF7XGX2I.js → chunk-6ME76HJO.js} +1 -1
  48. package/dist/{chunk-R4AFXPM4.js → chunk-7LA7MY4D.js} +1 -1
  49. package/dist/{chunk-T63KVDWY.js → chunk-BM4XREGB.js} +10 -6
  50. package/dist/{chunk-Y2YBRLSS.js → chunk-BR4RBXLD.js} +3 -3
  51. package/dist/{chunk-2SY2FYFW.js → chunk-BVWCQLRX.js} +20 -20
  52. package/dist/{chunk-VMCVLESK.js → chunk-CBJ2SBKN.js} +4 -4
  53. package/dist/{chunk-GFRIXUDK.js → chunk-DGBFU7YE.js} +1 -1
  54. package/dist/{chunk-VB47PTY7.js → chunk-E4T73OGZ.js} +3 -3
  55. package/dist/{chunk-ZA7D7CCN.js → chunk-EAE4N2VX.js} +2 -2
  56. package/dist/{chunk-QFKDFU73.js → chunk-EULFLYW5.js} +2 -2
  57. package/dist/{chunk-XJVCTI2N.js → chunk-F3KBEYKI.js} +3 -3
  58. package/dist/{chunk-SKZVEZZK.js → chunk-FZW44W5P.js} +2 -2
  59. package/dist/{chunk-RHCDUPD6.js → chunk-I7V5UIUZ.js} +2 -2
  60. package/dist/{chunk-J7VN3FZ3.js → chunk-JKXX6DQS.js} +1 -1
  61. package/dist/{chunk-H6EQMYGT.js → chunk-JYDXICGN.js} +1 -1
  62. package/dist/{chunk-OMXWBR2R.js → chunk-L23GLMDH.js} +28 -2
  63. package/dist/{chunk-5P7DSHNK.js → chunk-M5E4ANAN.js} +4 -4
  64. package/dist/{chunk-EIG2V6UI.js → chunk-MHG2AFWS.js} +1 -1
  65. package/dist/{chunk-6WTSWWP6.js → chunk-OIOHLANV.js} +2 -2
  66. package/dist/{chunk-D234NBWI.js → chunk-QUMODKMN.js} +1 -1
  67. package/dist/{chunk-75CFTTBF.js → chunk-SLMYLF4H.js} +2 -2
  68. package/dist/{chunk-PRNO5TLE.js → chunk-T5UIEVCS.js} +15 -7
  69. package/dist/{chunk-MARVEIWH.js → chunk-TBQTJRWL.js} +4 -4
  70. package/dist/{chunk-OHVXKFQI.js → chunk-TDMEFWWH.js} +1 -1
  71. package/dist/{chunk-B37SDIGU.js → chunk-UOHAWN66.js} +1 -1
  72. package/dist/{chunk-WDJMIIY2.js → chunk-Y7CK6NY4.js} +1 -1
  73. package/dist/{chunk-BQKKAPMW.js → chunk-YZP6IMCC.js} +1 -1
  74. package/dist/{citations-JK3ZMAR7.js → citations-X3ACB4BK.js} +3 -3
  75. package/dist/{cli-catalog-P2I6IYNI.js → cli-catalog-KGYSKGDJ.js} +3 -3
  76. package/dist/{cli-commands-YDRKG6OC.js → cli-commands-KN3ZROPW.js} +7 -7
  77. package/dist/cli.js +13 -13
  78. package/dist/{competitor-5CJPM36M.js → competitor-K4XKRB2A.js} +3 -3
  79. package/dist/{content-5FEDXNHR.js → content-K4ZF5PLU.js} +3 -3
  80. package/dist/{dashboard-ME7MBJTX.js → dashboard-IKLVLUF6.js} +6 -6
  81. package/dist/{demo-N7MEASQP.js → demo-S6MCF65Z.js} +1 -1
  82. package/dist/{demo-server-IGTBANDC.js → demo-server-TFPIU4E2.js} +49 -16
  83. package/dist/{discover-EAISVTA6.js → discover-PF4CWAL3.js} +3 -3
  84. package/dist/{discover-eval-JIBKK44Q.js → discover-eval-GL5EN3DK.js} +3 -3
  85. package/dist/{doctor-HSQYOZ4C.js → doctor-GGMC5LXO.js} +3 -3
  86. package/dist/{evidence-PSYAWKPP.js → evidence-KLMPJDIX.js} +3 -3
  87. package/dist/{export-cmd-MWJN6H7W.js → export-cmd-SUBBU5TK.js} +3 -3
  88. package/dist/{ga-WSQWECYY.js → ga-XTJ4272V.js} +3 -3
  89. package/dist/{gbp-OD26AEPF.js → gbp-3XIL64BL.js} +3 -3
  90. package/dist/{google-FMJ7IWAF.js → google-4ZVLOEO7.js} +4 -4
  91. package/dist/{google-marketing-66JL4V24.js → google-marketing-EKHYN6RN.js} +1 -1
  92. package/dist/{health-cmd-2RO5LAI4.js → health-cmd-AS2XVZGM.js} +3 -3
  93. package/dist/{history-X6CNPW7G.js → history-UFO6W5MK.js} +3 -3
  94. package/dist/index.d.ts +61 -61
  95. package/dist/index.js +24 -24
  96. package/dist/{init-25III66S.js → init-X6CJISQ7.js} +11 -11
  97. package/dist/{insights-6IWWA6JU.js → insights-MQUSMDKL.js} +3 -3
  98. package/dist/intelligence-service-P44IBE6G.js +15 -0
  99. package/dist/{keys-ABXAPISY.js → keys-SHGKOF7L.js} +3 -3
  100. package/dist/{keyword-LERAVMI3.js → keyword-PQHI62EQ.js} +3 -3
  101. package/dist/{logs-BTAB5SNZ.js → logs-GKZ3C6U7.js} +3 -3
  102. package/dist/{mcp-5E42RT6R.js → mcp-II46ISJK.js} +2 -2
  103. package/dist/mcp.js +9 -9
  104. package/dist/{measurement-plan-MRZRNBJG.js → measurement-plan-AMYXJNGA.js} +5 -5
  105. package/dist/{notify-YQYGC5UZ.js → notify-HBSOBXU5.js} +3 -3
  106. package/dist/{organic-evidence-6QT4YT3K.js → organic-evidence-B6FTSLSS.js} +3 -3
  107. package/dist/{overview-EHZ3FTS2.js → overview-CMSXYEFO.js} +4 -4
  108. package/dist/{project-RNLV2ARE.js → project-TPY5QLJB.js} +3 -3
  109. package/dist/{query-IM2RXI4L.js → query-GRI574XT.js} +3 -3
  110. package/dist/{research-4FALR336.js → research-XZBMLGPZ.js} +3 -3
  111. package/dist/{results-export-4ETSRUGO.js → results-export-P2R6W24Y.js} +3 -3
  112. package/dist/{run-QL7226N7.js → run-TYVYDQSF.js} +4 -4
  113. package/dist/{schedule-GJE634VO.js → schedule-GKMCGZUD.js} +3 -3
  114. package/dist/{search-7OQL67R6.js → search-IENKPV43.js} +3 -3
  115. package/dist/{serve-UN2OEK2Q.js → serve-GORRM5KD.js} +25 -25
  116. package/dist/{session-5M54TVY5.js → session-JXRG3LRH.js} +12 -12
  117. package/dist/{settings-2QOL7YBM.js → settings-RATO7LTH.js} +3 -3
  118. package/dist/{skills-GPLAAU3I.js → skills-BQRJVV3P.js} +2 -2
  119. package/dist/{snapshot-5YMJFRJS.js → snapshot-5O44JQYF.js} +3 -3
  120. package/dist/{src-YF3JLURF.js → src-5HJMZCHY.js} +2 -2
  121. package/dist/{status-WGWC6FLN.js → status-O2JPGJ27.js} +4 -4
  122. package/dist/{technical-aeo-RNMLD7OL.js → technical-aeo-7DAQZPV2.js} +3 -3
  123. package/dist/{telemetry-7U3ZICU4.js → telemetry-4YY5IP5A.js} +4 -4
  124. package/dist/{tools-CSKTZTKT.js → tools-MQZ5KQVL.js} +11 -11
  125. package/dist/{traffic-QIAXLW6J.js → traffic-RGIEOKUQ.js} +5 -5
  126. package/dist/{users-I6X5P5AO.js → users-HNRMET2A.js} +3 -3
  127. package/dist/{visibility-stats-33OUKQQL.js → visibility-stats-AOQTJIWH.js} +3 -3
  128. package/dist/{wordpress-3IO3O27D.js → wordpress-UOAWGG7N.js} +3 -3
  129. package/package.json +1 -1
  130. package/assets/assets/MeasurementPropertyPage-FGhKdZAP.js +0 -4
  131. package/assets/assets/ProjectPage-BTJYS9gc.js +0 -7
  132. package/assets/assets/SiteHealthSection-4PXTNjon.js +0 -2
  133. package/assets/assets/index-BBfEsbxI.js +0 -56
  134. package/assets/assets/react-query-BLKqSvlU.js +0 -1
  135. package/dist/intelligence-service-N334P6FH.js +0 -15
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
4
  import {
5
5
  emitJsonl
6
6
  } from "./chunk-Z7IUAJOF.js";
@@ -19,7 +19,7 @@ import {
19
19
  formatMicros,
20
20
  formatRunErrorOneLine,
21
21
  resolveProviderInput
22
- } from "./chunk-OMXWBR2R.js";
22
+ } from "./chunk-L23GLMDH.js";
23
23
 
24
24
  // src/commands/run.ts
25
25
  function getClient() {
@@ -23,7 +23,7 @@ import {
23
23
  measurementDraftUpsertGroupRequestSchema,
24
24
  measurementDraftUpsertMarketRequestSchema,
25
25
  measurementDraftUpsertTargetRequestSchema
26
- } from "./chunk-OMXWBR2R.js";
26
+ } from "./chunk-L23GLMDH.js";
27
27
 
28
28
  // src/measurement-draft-actions.ts
29
29
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  trackIntegrationConnection
3
- } from "./chunk-VMCVLESK.js";
3
+ } from "./chunk-CBJ2SBKN.js";
4
4
  import {
5
5
  cliRuntimeContext
6
- } from "./chunk-QFKDFU73.js";
6
+ } from "./chunk-EULFLYW5.js";
7
7
 
8
8
  // src/cli-connection-telemetry.ts
9
9
  function trackCliConnection(properties) {
@@ -6,14 +6,14 @@ import {
6
6
  isSelfTraffic,
7
7
  normalizeCloudflareWorkerEvent,
8
8
  verifyRequestSignature
9
- } from "./chunk-YOZ35ZTT.js";
9
+ } from "./chunk-5DX7N34L.js";
10
10
  import {
11
11
  currentOutcomeAttribution,
12
12
  getRequestContext,
13
13
  registerRequestContext,
14
14
  requestAuditIdentity,
15
15
  sanitizeRequestContext
16
- } from "./chunk-EIG2V6UI.js";
16
+ } from "./chunk-MHG2AFWS.js";
17
17
  import {
18
18
  SentimentIdempotencyConflict,
19
19
  SentimentRepository,
@@ -142,7 +142,7 @@ import {
142
142
  userSessions,
143
143
  users,
144
144
  writeNegativeReviewMaxStars
145
- } from "./chunk-GFRIXUDK.js";
145
+ } from "./chunk-DGBFU7YE.js";
146
146
  import {
147
147
  ADS_ACTIVATE_SCOPE,
148
148
  ADS_ACTIVATION_ABSOLUTE_MAX_ENTITIES,
@@ -239,6 +239,7 @@ import {
239
239
  GoogleMarketingProviders,
240
240
  GtmConnectionStates,
241
241
  GtmSnapshotKinds,
242
+ InsightActionGroups,
242
243
  LATEST_RUN_ID,
243
244
  LOCATION_REDIRECT_STATUSES,
244
245
  LOGIN_FAILED_MESSAGE,
@@ -667,6 +668,7 @@ import {
667
668
  hostOf,
668
669
  inclusiveDayCount,
669
670
  indexingRequestResponseDtoSchema,
671
+ insightActionGroupByType,
670
672
  instanceStatusDtoSchema,
671
673
  integrationSettingsSummaryDtoSchema,
672
674
  internalError,
@@ -1074,7 +1076,7 @@ import {
1074
1076
  wordpressSchemaDeployResultDtoSchema,
1075
1077
  wordpressSchemaStatusResultDtoSchema,
1076
1078
  wordpressStatusDtoSchema
1077
- } from "./chunk-OMXWBR2R.js";
1079
+ } from "./chunk-L23GLMDH.js";
1078
1080
 
1079
1081
  // ../api-routes/src/user-session.ts
1080
1082
  import crypto2 from "crypto";
@@ -27815,6 +27817,12 @@ function severitiesAtOrAbove(min2) {
27815
27817
  }
27816
27818
  return Object.keys(SEVERITY_RANK).filter((s) => SEVERITY_RANK[s] >= floor);
27817
27819
  }
27820
+ function compareInsightsForTriage(a, b) {
27821
+ return b.createdAt.localeCompare(a.createdAt) || monitorRank(a) - monitorRank(b) || SEVERITY_RANK[b.severity] - SEVERITY_RANK[a.severity];
27822
+ }
27823
+ function monitorRank(insight) {
27824
+ return insightActionGroupByType[insight.type] === InsightActionGroups.monitor ? 1 : 0;
27825
+ }
27818
27826
  function emptyHealthSnapshot(projectId) {
27819
27827
  return {
27820
27828
  id: `no-data:${projectId}`,
@@ -27948,7 +27956,7 @@ async function intelligenceRoutes(app) {
27948
27956
  }
27949
27957
  const rows = app.db.select().from(insights).where(conditions.length === 1 ? conditions[0] : and37(...conditions)).orderBy(desc19(insights.createdAt)).all();
27950
27958
  const showDismissed = request.query.dismissed === "true";
27951
- let result = rows.filter((r) => showDismissed || !r.dismissed).map(mapInsightRow);
27959
+ let result = rows.filter((r) => showDismissed || !r.dismissed).map(mapInsightRow).sort(compareInsightsForTriage);
27952
27960
  if (limit !== void 0) result = result.slice(0, limit);
27953
27961
  return reply.send(result);
27954
27962
  });
@@ -31068,7 +31076,7 @@ async function compositeRoutes(app, options) {
31068
31076
  const healthRow = app.db.select().from(healthSnapshots).where(eq55(healthSnapshots.projectId, project.id)).orderBy(desc25(healthSnapshots.createdAt)).limit(1).get();
31069
31077
  const health = healthRow ? mapHealthRow2(healthRow) : null;
31070
31078
  const insightRows = app.db.select().from(insights).where(eq55(insights.projectId, project.id)).orderBy(desc25(insights.createdAt)).all();
31071
- const topInsights = insightRows.filter((row) => !row.dismissed).slice(0, TOP_INSIGHT_LIMIT).map(mapInsightRow2);
31079
+ const topInsights = insightRows.filter((row) => !row.dismissed).map(mapInsightRow2).sort(compareInsightsForTriage).slice(0, TOP_INSIGHT_LIMIT);
31072
31080
  const sparklineRunIds = visibilityRuns.slice(0, DEFAULT_RUN_HISTORY_LIMIT).map((r) => r.id);
31073
31081
  const snapshotRunIds = new Set(sparklineRunIds);
31074
31082
  for (const run of latestVisRunGroup) snapshotRunIds.add(run.id);
@@ -39168,7 +39176,7 @@ var routeCatalog = [
39168
39176
  { name: "runId", in: "query", description: "Filter by run ID.", schema: stringSchema },
39169
39177
  { name: "type", in: "query", description: "Filter by insight type. Exact match, or a trailing `*` for a prefix (e.g. `gbp-*`).", schema: stringSchema },
39170
39178
  { name: "severity", in: "query", description: "Minimum severity (low|medium|high|critical); e.g. `high` returns high + critical.", schema: stringSchema },
39171
- { name: "limit", in: "query", description: "Cap the number of (newest-first) insights returned.", schema: stringSchema }
39179
+ { name: "limit", in: "query", description: "Keep the first N insights. Order: newest analysis first; within one analysis, insights that need action before wins, then most severe first.", schema: stringSchema }
39172
39180
  ],
39173
39181
  responses: {
39174
39182
  // TODO: Add `InsightDto` Zod schema in contracts.
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  runWithUsageTags
3
- } from "./chunk-RHCDUPD6.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
4
  import {
5
5
  CanonryMcpToolNames,
6
6
  canonryMcpTools
7
- } from "./chunk-T63KVDWY.js";
7
+ } from "./chunk-BM4XREGB.js";
8
8
  import {
9
9
  CliError
10
10
  } from "./chunk-HGMYEDAQ.js";
11
11
  import {
12
12
  buildOpenApiDocument
13
- } from "./chunk-PRNO5TLE.js";
13
+ } from "./chunk-T5UIEVCS.js";
14
14
  import {
15
15
  DEFAULT_COMPETITOR_AUTO_ALIAS_MODE,
16
16
  MeasurementPortfolioLists,
@@ -20,7 +20,7 @@ import {
20
20
  formatPercent,
21
21
  ratioUnitSchema,
22
22
  truncateUtf16
23
- } from "./chunk-OMXWBR2R.js";
23
+ } from "./chunk-L23GLMDH.js";
24
24
 
25
25
  // src/agent/tools.ts
26
26
  import { Type as Type2 } from "@earendil-works/pi-ai";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-HGMYEDAQ.js";
9
9
  import {
10
10
  describeError
11
- } from "./chunk-OMXWBR2R.js";
11
+ } from "./chunk-L23GLMDH.js";
12
12
 
13
13
  // src/commands/mcp.ts
14
14
  import fs from "fs";
@@ -15,7 +15,7 @@ import {
15
15
  formatCanonryPluginUpdateHint,
16
16
  formatCanonryPluginVersionMismatch,
17
17
  skillsClientSchema
18
- } from "./chunk-OMXWBR2R.js";
18
+ } from "./chunk-L23GLMDH.js";
19
19
 
20
20
  // src/commands/skills.ts
21
21
  import crypto from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cloudflareQueueNameSchema
3
- } from "./chunk-OMXWBR2R.js";
3
+ } from "./chunk-L23GLMDH.js";
4
4
 
5
5
  // src/cloudflare-traffic-config.ts
6
6
  function unsupportedDeliveryMode(deliveryMode) {
@@ -20,7 +20,7 @@ import {
20
20
  resolveProviderModel,
21
21
  schedulableRunKindSchema,
22
22
  sentimentEvaluatorProviderSchema
23
- } from "./chunk-OMXWBR2R.js";
23
+ } from "./chunk-L23GLMDH.js";
24
24
 
25
25
  // ../config/src/index.ts
26
26
  import { z as z3 } from "zod";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
4
- import "./chunk-BQKKAPMW.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
+ import "./chunk-YZP6IMCC.js";
5
5
  import "./chunk-AOJU5LKX.js";
6
6
  import "./chunk-HGMYEDAQ.js";
7
- import "./chunk-OMXWBR2R.js";
7
+ import "./chunk-L23GLMDH.js";
8
8
  import "./chunk-MLKGABMK.js";
9
9
 
10
10
  // src/commands/citations.ts
@@ -3,11 +3,11 @@ import {
3
3
  buildCliCatalog,
4
4
  printCliCatalog,
5
5
  renderTopLevelHelp
6
- } from "./chunk-XJVCTI2N.js";
7
- import "./chunk-H6EQMYGT.js";
6
+ } from "./chunk-F3KBEYKI.js";
7
+ import "./chunk-JYDXICGN.js";
8
8
  import "./chunk-Z7IUAJOF.js";
9
9
  import "./chunk-HGMYEDAQ.js";
10
- import "./chunk-OMXWBR2R.js";
10
+ import "./chunk-L23GLMDH.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
  export {
13
13
  CLI_ROOT_SUMMARIES,
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  REGISTERED_CLI_COMMANDS
3
- } from "./chunk-PFPTUCMG.js";
3
+ } from "./chunk-4DQFJP5E.js";
4
4
  import "./chunk-6GO5VVAC.js";
5
- import "./chunk-Y2YBRLSS.js";
5
+ import "./chunk-BR4RBXLD.js";
6
6
  import "./chunk-VJWDBFSL.js";
7
7
  import "./chunk-TSENU4GG.js";
8
- import "./chunk-RHCDUPD6.js";
9
- import "./chunk-BQKKAPMW.js";
10
- import "./chunk-H6EQMYGT.js";
8
+ import "./chunk-I7V5UIUZ.js";
9
+ import "./chunk-YZP6IMCC.js";
10
+ import "./chunk-JYDXICGN.js";
11
11
  import "./chunk-Z7IUAJOF.js";
12
- import "./chunk-D234NBWI.js";
12
+ import "./chunk-QUMODKMN.js";
13
13
  import "./chunk-AOJU5LKX.js";
14
14
  import "./chunk-HGMYEDAQ.js";
15
- import "./chunk-OMXWBR2R.js";
15
+ import "./chunk-L23GLMDH.js";
16
16
  import "./chunk-MLKGABMK.js";
17
17
  export {
18
18
  REGISTERED_CLI_COMMANDS
package/dist/cli.js CHANGED
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node --import tsx
2
2
  import {
3
3
  REGISTERED_CLI_COMMANDS
4
- } from "./chunk-PFPTUCMG.js";
4
+ } from "./chunk-4DQFJP5E.js";
5
5
  import "./chunk-6GO5VVAC.js";
6
6
  import {
7
7
  buildSetupState,
8
8
  runPendingServeHandoff
9
- } from "./chunk-5P7DSHNK.js";
10
- import "./chunk-Y2YBRLSS.js";
9
+ } from "./chunk-M5E4ANAN.js";
10
+ import "./chunk-BR4RBXLD.js";
11
11
  import "./chunk-VJWDBFSL.js";
12
12
  import "./chunk-TSENU4GG.js";
13
- import "./chunk-VF7XGX2I.js";
13
+ import "./chunk-6ME76HJO.js";
14
14
  import {
15
15
  checkLatestVersionForCli,
16
16
  cliRuntimeContext,
@@ -24,24 +24,24 @@ import {
24
24
  showFirstRunNotice,
25
25
  trackCliCommandFinished,
26
26
  trackEvent
27
- } from "./chunk-QFKDFU73.js";
27
+ } from "./chunk-EULFLYW5.js";
28
28
  import {
29
29
  autoSyncSkills,
30
30
  formatAutoSyncNotice
31
- } from "./chunk-VB47PTY7.js";
32
- import "./chunk-RHCDUPD6.js";
33
- import "./chunk-BQKKAPMW.js";
31
+ } from "./chunk-E4T73OGZ.js";
32
+ import "./chunk-I7V5UIUZ.js";
33
+ import "./chunk-YZP6IMCC.js";
34
34
  import {
35
35
  accessFilterFromArgs,
36
36
  dispatchRegisteredCommand,
37
37
  printCliCatalog
38
- } from "./chunk-XJVCTI2N.js";
38
+ } from "./chunk-F3KBEYKI.js";
39
39
  import {
40
40
  resolveCliAccess
41
- } from "./chunk-H6EQMYGT.js";
41
+ } from "./chunk-JYDXICGN.js";
42
42
  import "./chunk-Z7IUAJOF.js";
43
- import "./chunk-B37SDIGU.js";
44
- import "./chunk-D234NBWI.js";
43
+ import "./chunk-UOHAWN66.js";
44
+ import "./chunk-QUMODKMN.js";
45
45
  import "./chunk-AOJU5LKX.js";
46
46
  import {
47
47
  CliError,
@@ -52,7 +52,7 @@ import {
52
52
  } from "./chunk-HGMYEDAQ.js";
53
53
  import {
54
54
  OperationAccesses
55
- } from "./chunk-OMXWBR2R.js";
55
+ } from "./chunk-L23GLMDH.js";
56
56
  import "./chunk-MLKGABMK.js";
57
57
 
58
58
  // src/cli.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
4
- import "./chunk-BQKKAPMW.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
+ import "./chunk-YZP6IMCC.js";
5
5
  import {
6
6
  emitJsonl
7
7
  } from "./chunk-Z7IUAJOF.js";
@@ -21,7 +21,7 @@ import {
21
21
  normalizeCompetitorDomain,
22
22
  shareOfVoiceLabel,
23
23
  shareOfVoiceReason
24
- } from "./chunk-OMXWBR2R.js";
24
+ } from "./chunk-L23GLMDH.js";
25
25
  import "./chunk-MLKGABMK.js";
26
26
 
27
27
  // src/commands/competitor.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
4
- import "./chunk-BQKKAPMW.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
+ import "./chunk-YZP6IMCC.js";
5
5
  import {
6
6
  emitJsonl
7
7
  } from "./chunk-Z7IUAJOF.js";
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  contentTargetDismissRequestSchema,
16
16
  formatPercent
17
- } from "./chunk-OMXWBR2R.js";
17
+ } from "./chunk-L23GLMDH.js";
18
18
  import "./chunk-MLKGABMK.js";
19
19
 
20
20
  // src/commands/content.ts
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  clearDashboardPassword,
3
3
  loadConfigRaw
4
- } from "./chunk-BQKKAPMW.js";
4
+ } from "./chunk-YZP6IMCC.js";
5
5
  import {
6
6
  isMachineFormat
7
7
  } from "./chunk-HGMYEDAQ.js";
8
8
  import {
9
9
  anyUsersExist
10
- } from "./chunk-PRNO5TLE.js";
11
- import "./chunk-YOZ35ZTT.js";
12
- import "./chunk-EIG2V6UI.js";
10
+ } from "./chunk-T5UIEVCS.js";
11
+ import "./chunk-5DX7N34L.js";
12
+ import "./chunk-MHG2AFWS.js";
13
13
  import {
14
14
  createClient
15
- } from "./chunk-GFRIXUDK.js";
16
- import "./chunk-OMXWBR2R.js";
15
+ } from "./chunk-DGBFU7YE.js";
16
+ import "./chunk-L23GLMDH.js";
17
17
  import "./chunk-MLKGABMK.js";
18
18
 
19
19
  // src/commands/dashboard.ts
@@ -40,7 +40,7 @@ function parseDemoTrustedProxies(values) {
40
40
  async function demoCommand(options) {
41
41
  const { host, port } = parseDemoListenOptions(options);
42
42
  const trustProxy = parseDemoTrustedProxies(options.trustProxy);
43
- const { createDemoServer } = await import("./demo-server-IGTBANDC.js");
43
+ const { createDemoServer } = await import("./demo-server-TFPIU4E2.js");
44
44
  const app = await createDemoServer({ trustProxy });
45
45
  let stopping = false;
46
46
  const stop = () => {
@@ -5,12 +5,12 @@ import {
5
5
  computeFactorAverages,
6
6
  layoutSiteCrawlGraphInput,
7
7
  persistSiteCrawlGraphLayout
8
- } from "./chunk-ZA7D7CCN.js";
8
+ } from "./chunk-EAE4N2VX.js";
9
9
  import {
10
10
  canonryMcpTools
11
- } from "./chunk-T63KVDWY.js";
12
- import "./chunk-J7VN3FZ3.js";
13
- import "./chunk-D234NBWI.js";
11
+ } from "./chunk-BM4XREGB.js";
12
+ import "./chunk-JKXX6DQS.js";
13
+ import "./chunk-QUMODKMN.js";
14
14
  import {
15
15
  PACKAGE_VERSION
16
16
  } from "./chunk-AOJU5LKX.js";
@@ -18,16 +18,16 @@ import "./chunk-HGMYEDAQ.js";
18
18
  import {
19
19
  HISTORY_WINDOW_RUNS,
20
20
  IntelligenceService
21
- } from "./chunk-4LVJFSPH.js";
21
+ } from "./chunk-23YDBDYE.js";
22
22
  import {
23
23
  determineCitationState
24
- } from "./chunk-ZILJZNMQ.js";
24
+ } from "./chunk-64MEDTTQ.js";
25
25
  import {
26
26
  apiRoutes,
27
27
  assessConversionTrackingIntegrity
28
- } from "./chunk-PRNO5TLE.js";
29
- import "./chunk-YOZ35ZTT.js";
30
- import "./chunk-EIG2V6UI.js";
28
+ } from "./chunk-T5UIEVCS.js";
29
+ import "./chunk-5DX7N34L.js";
30
+ import "./chunk-MHG2AFWS.js";
31
31
  import {
32
32
  adsAdGroups,
33
33
  adsAds,
@@ -99,7 +99,7 @@ import {
99
99
  siteCrawlPages,
100
100
  siteCrawlSnapshots,
101
101
  trafficSources
102
- } from "./chunk-GFRIXUDK.js";
102
+ } from "./chunk-DGBFU7YE.js";
103
103
  import {
104
104
  AI_ENGINE_DOMAINS,
105
105
  RunKinds,
@@ -131,7 +131,7 @@ import {
131
131
  roundPreservingTotal,
132
132
  siteAuditPageFactorSchema,
133
133
  wilsonInterval
134
- } from "./chunk-OMXWBR2R.js";
134
+ } from "./chunk-L23GLMDH.js";
135
135
  import "./chunk-MLKGABMK.js";
136
136
 
137
137
  // src/demo-server.ts
@@ -1302,6 +1302,14 @@ var DEMO_CLIENT_CONFIG = {
1302
1302
  };
1303
1303
  var INLINE_SCRIPT = /<script(?<attributes>[^>]*)>(?<body>[\s\S]*?)<\/script>/gi;
1304
1304
  var DEMO_DOCUMENT_PATH = /^\/(?:projects(?:\/[^/.]+(?:\/(?:portfolio|discovery|search-console|activity|technical-aeo|conversions|local|queries|backlinks|report|history|settings|properties)(?:\/[^/.]+)*)?)?|runs|history|traffic(?:\/[^/.]+(?:\/[^/.]+)?)?)\/?$/;
1305
+ var DEMO_TITLE = "Canonry live demo";
1306
+ var DEMO_DESCRIPTION = "The open-source AEO operating platform. Sample data, no sign-in.";
1307
+ var DEMO_PREVIEW_IMAGE = "demo-og.png";
1308
+ var DEMO_PREVIEW_IMAGE_ALT = "Canonry dashboard with sample data";
1309
+ var DEMO_PREVIEW_SLOT = "<!--canonry-demo-preview-->";
1310
+ var PLAIN_HOST = /^[a-z0-9.-]+(?::\d{1,5})?$/i;
1311
+ var LINK_PREVIEW_AGENTS = ["Twitterbot", "facebookexternalhit", "LinkedInBot", "Slackbot-LinkExpanding", "Discordbot", "TelegramBot", "WhatsApp"];
1312
+ var DEMO_ROBOTS = [...LINK_PREVIEW_AGENTS.map((agent) => `User-agent: ${agent}`), "Allow: /", "", "User-agent: *", "Disallow: /", ""].join("\n");
1305
1313
  var UNDECODABLE_PATH = "/.undecodable-path";
1306
1314
  function demoContentSecurityPolicy(document) {
1307
1315
  const inlineHashes = [...document.matchAll(INLINE_SCRIPT)].filter((match) => !/\ssrc\s*=/i.test(match.groups?.attributes ?? "")).map((match) => `'sha256-${createHash("sha256").update(match.groups?.body ?? "", "utf8").digest("base64")}'`);
@@ -1319,6 +1327,31 @@ function demoContentSecurityPolicy(document) {
1319
1327
  "frame-ancestors 'self'"
1320
1328
  ].join("; ");
1321
1329
  }
1330
+ function escapeAttribute(value) {
1331
+ return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1332
+ }
1333
+ function demoPreviewTags(request) {
1334
+ const origin = PLAIN_HOST.test(request.host) ? `${request.protocol}://${request.host}` : "";
1335
+ const image = `${origin}/${DEMO_PREVIEW_IMAGE}`;
1336
+ const page = `${origin}${request.url.split("?")[0] ?? "/"}`;
1337
+ const tags = [
1338
+ ["property", "og:type", "website"],
1339
+ ["property", "og:site_name", "Canonry"],
1340
+ ["property", "og:title", DEMO_TITLE],
1341
+ ["property", "og:description", DEMO_DESCRIPTION],
1342
+ ["property", "og:url", page],
1343
+ ["property", "og:image", image],
1344
+ ["property", "og:image:width", "1200"],
1345
+ ["property", "og:image:height", "630"],
1346
+ ["property", "og:image:alt", DEMO_PREVIEW_IMAGE_ALT],
1347
+ ["name", "twitter:card", "summary_large_image"],
1348
+ ["name", "twitter:title", DEMO_TITLE],
1349
+ ["name", "twitter:description", DEMO_DESCRIPTION],
1350
+ ["name", "twitter:image", image],
1351
+ ["name", "twitter:image:alt", DEMO_PREVIEW_IMAGE_ALT]
1352
+ ];
1353
+ return tags.map(([attribute, key, value]) => `<meta ${attribute}="${key}" content="${escapeAttribute(value)}">`).join("");
1354
+ }
1322
1355
  function isDemoDocumentRequest(request) {
1323
1356
  return (request.method === "GET" || request.method === "HEAD") && DEMO_DOCUMENT_PATH.test(request.url.split("?")[0] ?? "");
1324
1357
  }
@@ -1328,7 +1361,7 @@ function isOutsideDemoApiBudget(request) {
1328
1361
  }
1329
1362
  async function createDemoHttpServer(options) {
1330
1363
  const { db, assetsDir, now } = options;
1331
- const html = readFileSync(join(assetsDir, "index.html"), "utf8").replace("<head>", '<head><base href="/">').replace("</head>", `<script>window.__CANONRY_CONFIG__=${JSON.stringify(DEMO_CLIENT_CONFIG)}</script></head>`);
1364
+ const html = readFileSync(join(assetsDir, "index.html"), "utf8").replace("<head>", '<head><base href="/">').replace(/<title>[^<]*<\/title>/, `<title>${DEMO_TITLE}</title>`).replace(/<meta\s+name="description"\s+content="[^"]*"\s*\/?>/, `<meta name="description" content="${DEMO_DESCRIPTION}" />`).replace("</head>", `${DEMO_PREVIEW_SLOT}<script>window.__CANONRY_CONFIG__=${JSON.stringify(DEMO_CLIENT_CONFIG)}</script></head>`);
1332
1365
  const contentSecurityPolicy = demoContentSecurityPolicy(html);
1333
1366
  db.insert(apiKeys).values({
1334
1367
  ...DEMO_VIEWER,
@@ -1433,10 +1466,10 @@ async function createDemoHttpServer(options) {
1433
1466
  index: false,
1434
1467
  dotfiles: "deny"
1435
1468
  });
1436
- const sendDocument = (_request, reply) => {
1437
- return reply.header("Cache-Control", "no-cache").type("text/html").send(html);
1469
+ const sendDocument = (request, reply) => {
1470
+ return reply.header("Cache-Control", "no-cache").type("text/html").send(html.replace(DEMO_PREVIEW_SLOT, demoPreviewTags(request)));
1438
1471
  };
1439
- for (const [filename, contentType] of [["favicon.svg", "image/svg+xml"], ["favicon-32.png", "image/png"], ["apple-touch-icon.png", "image/png"]]) {
1472
+ for (const [filename, contentType] of [["favicon.svg", "image/svg+xml"], ["favicon-32.png", "image/png"], ["apple-touch-icon.png", "image/png"], [DEMO_PREVIEW_IMAGE, "image/png"]]) {
1440
1473
  const path = join(assetsDir, filename);
1441
1474
  if (existsSync(path)) {
1442
1475
  const icon = readFileSync(path);
@@ -1444,7 +1477,7 @@ async function createDemoHttpServer(options) {
1444
1477
  }
1445
1478
  }
1446
1479
  app.get("/", sendDocument);
1447
- app.get("/robots.txt", async (_request, reply) => reply.type("text/plain").send("User-agent: *\nDisallow: /\n"));
1480
+ app.get("/robots.txt", async (_request, reply) => reply.type("text/plain").send(DEMO_ROBOTS));
1448
1481
  app.setNotFoundHandler(async (request, reply) => {
1449
1482
  if (undecodable.has(request.raw)) {
1450
1483
  return reply.code(400).send({ error: { code: "VALIDATION_ERROR", message: "The request path is not a valid URL." } });
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
4
- import "./chunk-BQKKAPMW.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
+ import "./chunk-YZP6IMCC.js";
5
5
  import {
6
6
  emitJsonl
7
7
  } from "./chunk-Z7IUAJOF.js";
@@ -14,7 +14,7 @@ import {
14
14
  CitationStates,
15
15
  DiscoveryPromoteCompetitorSkipReasons,
16
16
  describeError
17
- } from "./chunk-OMXWBR2R.js";
17
+ } from "./chunk-L23GLMDH.js";
18
18
  import "./chunk-MLKGABMK.js";
19
19
 
20
20
  // src/commands/discover.ts
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
4
- import "./chunk-BQKKAPMW.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
+ import "./chunk-YZP6IMCC.js";
5
5
  import "./chunk-AOJU5LKX.js";
6
6
  import {
7
7
  CliError,
8
8
  EXIT_USER_ERROR
9
9
  } from "./chunk-HGMYEDAQ.js";
10
- import "./chunk-OMXWBR2R.js";
10
+ import "./chunk-L23GLMDH.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
 
13
13
  // src/commands/discover-eval.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
4
- import "./chunk-BQKKAPMW.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
+ import "./chunk-YZP6IMCC.js";
5
5
  import {
6
6
  emitJsonl
7
7
  } from "./chunk-Z7IUAJOF.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  CheckScopes,
15
15
  CheckStatuses
16
- } from "./chunk-OMXWBR2R.js";
16
+ } from "./chunk-L23GLMDH.js";
17
17
  import "./chunk-MLKGABMK.js";
18
18
 
19
19
  // src/commands/doctor.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
4
- import "./chunk-BQKKAPMW.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
+ import "./chunk-YZP6IMCC.js";
5
5
  import {
6
6
  emitJsonl
7
7
  } from "./chunk-Z7IUAJOF.js";
@@ -9,7 +9,7 @@ import "./chunk-AOJU5LKX.js";
9
9
  import "./chunk-HGMYEDAQ.js";
10
10
  import {
11
11
  CitationStates
12
- } from "./chunk-OMXWBR2R.js";
12
+ } from "./chunk-L23GLMDH.js";
13
13
  import "./chunk-MLKGABMK.js";
14
14
 
15
15
  // src/commands/evidence.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
4
- import "./chunk-BQKKAPMW.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
+ import "./chunk-YZP6IMCC.js";
5
5
  import "./chunk-AOJU5LKX.js";
6
6
  import {
7
7
  isEndpointMissing,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-HGMYEDAQ.js";
10
10
  import {
11
11
  isRedactedNotificationUrl
12
- } from "./chunk-OMXWBR2R.js";
12
+ } from "./chunk-L23GLMDH.js";
13
13
  import "./chunk-MLKGABMK.js";
14
14
 
15
15
  // src/commands/export-cmd.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-RHCDUPD6.js";
4
- import "./chunk-BQKKAPMW.js";
3
+ } from "./chunk-I7V5UIUZ.js";
4
+ import "./chunk-YZP6IMCC.js";
5
5
  import {
6
6
  emitJsonl
7
7
  } from "./chunk-Z7IUAJOF.js";
@@ -20,7 +20,7 @@ import {
20
20
  gaAcquisitionQuerySchema,
21
21
  gaSearchLandingHasSearchData,
22
22
  gaSearchLandingPageLabel
23
- } from "./chunk-OMXWBR2R.js";
23
+ } from "./chunk-L23GLMDH.js";
24
24
  import "./chunk-MLKGABMK.js";
25
25
 
26
26
  // src/commands/ga.ts