@canonry/canonry 7.125.6 → 7.127.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 (153) hide show
  1. package/README.md +3 -3
  2. package/assets/agent-workspace/skills/aero/references/getting-started.md +2 -3
  3. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +7 -2
  4. package/assets/agent-workspace/skills/canonry/references/getting-started.md +2 -3
  5. package/assets/agent-workspace/skills/canonry/references/indexing.md +4 -1
  6. package/assets/assets/{AccessControls-CUwUDBp8.js → AccessControls-2bimiIhw.js} +2 -2
  7. package/assets/assets/{AgentSetupPage-vbEPb6yX.js → AgentSetupPage-BGAU8xzj.js} +4 -4
  8. package/assets/assets/{AuditHistoryPanel-CutYGRGi.js → AuditHistoryPanel-Br4LNvcM.js} +1 -1
  9. package/assets/assets/{BacklinksPage-Cjs8Pzjw.js → BacklinksPage-BBh43gcY.js} +1 -1
  10. package/assets/assets/{ChartPrimitives-Bb1-9BLv.js → ChartPrimitives-ChO_4pZz.js} +1 -1
  11. package/assets/assets/{HistoryPage-CMBlL0Ms.js → HistoryPage-okXPylcp.js} +1 -1
  12. package/assets/assets/{MeasurementPropertyPage-C9cLyWJo.js → MeasurementPropertyPage-C2otbn5d.js} +3 -3
  13. package/assets/assets/ProjectPage-DGrfKxfG.js +15 -0
  14. package/assets/assets/{RunsPage-QN5bBEe4.js → RunsPage-4u1VBVOW.js} +1 -1
  15. package/assets/assets/{ServerTrafficSection-BU9Kj9MT.js → ServerTrafficSection-Bl0HTTwh.js} +3 -3
  16. package/assets/assets/{SettingsPage-C2wYKFF9.js → SettingsPage-C05qxsby.js} +1 -1
  17. package/assets/assets/ToneBadge-BE2H103M.js +60 -0
  18. package/assets/assets/{TrafficPage-DEQ6eJUy.js → TrafficPage-Bd3ey_0C.js} +1 -1
  19. package/assets/assets/{TrafficSourceDetailPage-B7sygHig.js → TrafficSourceDetailPage-B6Gi-qBP.js} +1 -1
  20. package/assets/assets/{account-context-BlFU3aZm.js → account-context-y7mzU3Ko.js} +1 -1
  21. package/assets/assets/{agent-trust-copy-Dmj9Xp7o.js → agent-trust-copy-CHQ9IAa3.js} +1 -1
  22. package/assets/assets/{card-B6QRK3vg.js → card-BmJz19vt.js} +1 -1
  23. package/assets/assets/index-s7MwkxGB.js +43 -0
  24. package/assets/assets/{preload-helper-okiXXeW4.js → preload-helper-BLaGg0Jn.js} +1 -1
  25. package/assets/assets/{query-client-Dn5u8o4X.js → query-client-DmQlVZMA.js} +1 -1
  26. package/assets/assets/{react-query-CZrEo0vf.js → react-query-BnTbVX2a.js} +1 -1
  27. package/assets/assets/{react-sigma_core.esm.min-D5s2grLh.js → react-sigma_core.esm.min-DNPGgfTG.js} +1 -1
  28. package/assets/assets/{server-traffic-Coma9CV_.js → server-traffic-ALYWW6k0.js} +1 -1
  29. package/assets/assets/{service-LmTWkeKI.js → service-BKTlKu2x.js} +1 -1
  30. package/assets/index.html +9 -9
  31. package/dist/activity-2KFFWLYN.js +13 -0
  32. package/dist/{ads-6ZCVMSJ2.js → ads-PB3VFUPV.js} +4 -4
  33. package/dist/{agent-ZZJO7ET6.js → agent-VOL7SOEQ.js} +8 -8
  34. package/dist/{agent-ask-CPRHVULM.js → agent-ask-F46ERE3W.js} +4 -4
  35. package/dist/{agent-conversations-NIWKSUC2.js → agent-conversations-T5Q43627.js} +4 -4
  36. package/dist/{agent-journeys-SHNRNV5E.js → agent-journeys-GVEVJ5J2.js} +4 -4
  37. package/dist/{agent-memory-4IGCNFR5.js → agent-memory-XXN7QXNM.js} +4 -4
  38. package/dist/{agent-providers-3Q7NQS7Y.js → agent-providers-U6XIM5JI.js} +4 -4
  39. package/dist/{agent-transcript-M3NYHNNV.js → agent-transcript-ONEA6JBO.js} +4 -4
  40. package/dist/{analytics-UHBUOG4T.js → analytics-XWVTM57N.js} +4 -4
  41. package/dist/{answerability-IRXQDOBX.js → answerability-GNYSELX5.js} +4 -4
  42. package/dist/{apply-3HP75CA2.js → apply-WXW4KWUK.js} +4 -4
  43. package/dist/{backfill-TQWXGQPQ.js → backfill-SWDR5M4O.js} +11 -11
  44. package/dist/{backlinks-O5IYHDAY.js → backlinks-5LIBLUEG.js} +4 -4
  45. package/dist/{bing-2MTKNQB2.js → bing-4U4ODKGV.js} +4 -4
  46. package/dist/{bootstrap-O7FRHURI.js → bootstrap-FY72AHVW.js} +11 -11
  47. package/dist/{cdp-BTXUJFAN.js → cdp-H5WMBYIF.js} +10 -9
  48. package/dist/{chunk-46YT33GB.js → chunk-2IU7GJCX.js} +4 -4
  49. package/dist/{chunk-KIO37ZVB.js → chunk-2PLJ4QG5.js} +4 -4
  50. package/dist/{chunk-QQFTJVHT.js → chunk-2T4OGJWP.js} +1 -1
  51. package/dist/{chunk-BY2RGFQH.js → chunk-2VDYFOKB.js} +8 -8
  52. package/dist/{chunk-B3F5BMXL.js → chunk-3GE4Z4J3.js} +5 -5
  53. package/dist/{chunk-SYRMAQVM.js → chunk-3ZNDJ4OM.js} +5 -5
  54. package/dist/{chunk-YYBYRAMI.js → chunk-425BZPKK.js} +5 -5
  55. package/dist/{chunk-VTOST3CL.js → chunk-5WDU7ZML.js} +7 -7
  56. package/dist/{chunk-OL6HAMWW.js → chunk-A36PZKKS.js} +2 -2
  57. package/dist/{chunk-ML7G6NS3.js → chunk-BAO3PHQP.js} +2 -2
  58. package/dist/{chunk-XQUGLXAN.js → chunk-DY2Q3VIM.js} +2 -2
  59. package/dist/{chunk-VD6Q7ZUX.js → chunk-FIF4N7DP.js} +1 -1
  60. package/dist/{chunk-VP3F4BOG.js → chunk-FMS7CIEK.js} +2 -2
  61. package/dist/{chunk-DI5EEYDP.js → chunk-G2NIO2J3.js} +2 -2
  62. package/dist/{chunk-U2LYHQHF.js → chunk-GCBFSIKI.js} +1 -1
  63. package/dist/{chunk-3OZ5WKRH.js → chunk-GKQ4CYUM.js} +3384 -3286
  64. package/dist/{chunk-OH3HQENA.js → chunk-GPPTW3HU.js} +4 -4
  65. package/dist/{chunk-3FQMXAES.js → chunk-GRX2DION.js} +4 -4
  66. package/dist/{chunk-AVKRYSYT.js → chunk-GTX7C5Y5.js} +11 -9
  67. package/dist/{chunk-RSZ3L5FJ.js → chunk-HQEH4YRO.js} +1 -1
  68. package/dist/{chunk-PAP62URW.js → chunk-HS2HYFPX.js} +81 -6
  69. package/dist/{chunk-VUL3BACZ.js → chunk-IIL4NKRU.js} +4 -4
  70. package/dist/{chunk-TOKRH24Q.js → chunk-JRWHQVA6.js} +191 -66
  71. package/dist/{chunk-QCEXADUT.js → chunk-K3YHPTKL.js} +2 -2
  72. package/dist/{chunk-A75GIIWP.js → chunk-LWRPSAVC.js} +1 -1
  73. package/dist/{chunk-JTIFRAGE.js → chunk-M4IAXLBT.js} +3 -3
  74. package/dist/{chunk-F2TGOWIW.js → chunk-MG4COK23.js} +2 -2
  75. package/dist/{chunk-3G5FQLF7.js → chunk-NEJEHRPT.js} +2 -2
  76. package/dist/{chunk-PDSB34VB.js → chunk-OKIAF573.js} +1 -1
  77. package/dist/{chunk-SFJCLIKB.js → chunk-PUEARV37.js} +425 -372
  78. package/dist/{chunk-C5EK4TJ5.js → chunk-PWXLKW2F.js} +3 -3
  79. package/dist/{chunk-CD3XPOHP.js → chunk-QWD3ABAW.js} +1 -1
  80. package/dist/{chunk-WAVN2EIK.js → chunk-QXRI6DRE.js} +216 -72
  81. package/dist/{chunk-K7BROEPL.js → chunk-RDCEFEXP.js} +3 -3
  82. package/dist/{chunk-WVNVKP4F.js → chunk-RMLGMB5B.js} +1 -1
  83. package/dist/{chunk-QRA6GFXX.js → chunk-RPAWPX7B.js} +1 -1
  84. package/dist/{chunk-35NITZHC.js → chunk-X6DD3OIR.js} +3 -2
  85. package/dist/{chunk-2MDEKCDU.js → chunk-XONND7NT.js} +3 -3
  86. package/dist/{chunk-MB7VQPWX.js → chunk-ZKIEOEUZ.js} +2 -2
  87. package/dist/{citations-5JSLIPNI.js → citations-622BWQTR.js} +5 -5
  88. package/dist/{cli-catalog-U3DKCQC5.js → cli-catalog-ACK3FVAX.js} +4 -4
  89. package/dist/cli-commands-UH3DRBPC.js +18 -0
  90. package/dist/cli.js +14 -14
  91. package/dist/{competitor-AMA7WPH4.js → competitor-QYZIWXGC.js} +4 -4
  92. package/dist/{content-7HZ23UXM.js → content-PJASAMIV.js} +4 -4
  93. package/dist/{dashboard-XFLFU4JL.js → dashboard-FQOS3J4B.js} +7 -7
  94. package/dist/{demo-CPO4IUJL.js → demo-ZGGVSKN4.js} +3 -3
  95. package/dist/{demo-server-KBU3NECG.js → demo-server-TLXLEPOI.js} +13 -13
  96. package/dist/{discover-TJXKEHVP.js → discover-ZLDSXDRI.js} +5 -5
  97. package/dist/{discover-eval-MUS46MSL.js → discover-eval-7F5Q3RXS.js} +4 -4
  98. package/dist/{doctor-5CIMYYUA.js → doctor-3KSQZDZ3.js} +4 -4
  99. package/dist/{evidence-MY4Z6VNC.js → evidence-BJZIRJ4U.js} +4 -4
  100. package/dist/{export-cmd-VBULRDSJ.js → export-cmd-BYPGV4IU.js} +4 -4
  101. package/dist/{ga-ORQCNNJ6.js → ga-A3BAZCYH.js} +4 -4
  102. package/dist/{gbp-LWVNCHMT.js → gbp-U6VCRAFN.js} +4 -4
  103. package/dist/{google-U6LQOAQ3.js → google-UNQZBUGS.js} +5 -5
  104. package/dist/{google-marketing-6RA4AOMN.js → google-marketing-QSIRQAVH.js} +2 -2
  105. package/dist/{health-cmd-LQGRFFT3.js → health-cmd-Z5KTTJQU.js} +5 -5
  106. package/dist/{history-LYJAA6QI.js → history-IIGUZMOM.js} +4 -4
  107. package/dist/index.d.ts +44 -24
  108. package/dist/index.js +27 -27
  109. package/dist/{init-RWJPBYTI.js → init-HZANRCMW.js} +13 -13
  110. package/dist/{insights-OP7ZJLC5.js → insights-UQ234W6T.js} +4 -4
  111. package/dist/intelligence-service-S3GTOTGQ.js +15 -0
  112. package/dist/{journeys-ENN25PA5.js → journeys-2EZIRL7K.js} +4 -4
  113. package/dist/{keys-FVPHQIOM.js → keys-NIAANGXE.js} +4 -4
  114. package/dist/{keyword-ELCUWNQC.js → keyword-LHHNG3GL.js} +4 -4
  115. package/dist/{logs-SVKY3HXZ.js → logs-UFOOIKTC.js} +4 -4
  116. package/dist/{mcp-W7AMWAST.js → mcp-AZYUFL5V.js} +5 -5
  117. package/dist/mcp.js +22 -16
  118. package/dist/{measurement-plan-F3ZZ4MCG.js → measurement-plan-H2HIHJ3D.js} +6 -6
  119. package/dist/{notify-U253YRTY.js → notify-TIE2ZJ26.js} +4 -4
  120. package/dist/{organic-evidence-4GI6HG56.js → organic-evidence-BX5MGZTK.js} +4 -4
  121. package/dist/{overview-TPZI3OKL.js → overview-MGQE43GU.js} +7 -7
  122. package/dist/{project-BZPMAZAH.js → project-2JL4ZW52.js} +4 -4
  123. package/dist/{project-setup-2NSUAFXD.js → project-setup-CXOVBRLZ.js} +9 -6
  124. package/dist/{query-4AL5P6DI.js → query-Q5BF63QF.js} +4 -4
  125. package/dist/{research-3WAJ6RWX.js → research-RQBZ57W5.js} +4 -4
  126. package/dist/{results-export-VHA6BPC2.js → results-export-TVCBJNJN.js} +4 -4
  127. package/dist/{run-3EEHYWIA.js → run-L6WG5WP2.js} +6 -6
  128. package/dist/{schedule-7CXVWV75.js → schedule-3HQMG3AM.js} +4 -4
  129. package/dist/{search-EPPXH2TK.js → search-ZLQE4J66.js} +4 -4
  130. package/dist/{serve-LGXPVEMJ.js → serve-E4N2XMIC.js} +28 -28
  131. package/dist/{session-IGKCPAMH.js → session-IJLUYO4T.js} +15 -15
  132. package/dist/{settings-UKIPQVIX.js → settings-T3U7TQOF.js} +4 -4
  133. package/dist/{sitemaps-L2OOCCHX.js → sitemaps-UZPLGN4W.js} +4 -4
  134. package/dist/{skills-VJSJNLWC.js → skills-P4WSSFPF.js} +3 -3
  135. package/dist/{snapshot-SYVUVM7F.js → snapshot-ROJPISJE.js} +4 -4
  136. package/dist/{src-VYDX5USM.js → src-ZYWTGILQ.js} +2 -2
  137. package/dist/{status-ALZWCQ7W.js → status-43XNR3NS.js} +6 -6
  138. package/dist/{support-XRKYBNND.js → support-I7E4I3GG.js} +2 -2
  139. package/dist/{technical-aeo-JNYI6Q7L.js → technical-aeo-D4F2R6M3.js} +88 -31
  140. package/dist/{telemetry-ZENJ5BDE.js → telemetry-5DMVDDZI.js} +5 -5
  141. package/dist/{tools-LMDXNPS7.js → tools-M534GJMS.js} +12 -12
  142. package/dist/{traffic-JXNISEMN.js → traffic-R2UA27AZ.js} +6 -6
  143. package/dist/{trends-3755UQT3.js → trends-BXOZIWIE.js} +4 -4
  144. package/dist/{users-7XCGU7BU.js → users-X6WJV7VJ.js} +4 -4
  145. package/dist/{visibility-stats-QJBO7HFN.js → visibility-stats-MCNUXUCL.js} +5 -5
  146. package/dist/{wordpress-VC6UN5UK.js → wordpress-AMGUJUZX.js} +4 -4
  147. package/package.json +1 -1
  148. package/assets/assets/ProjectPage-CP1-aTy-.js +0 -15
  149. package/assets/assets/ToneBadge-DXhSJm1L.js +0 -60
  150. package/assets/assets/index-MwrSHGLh.js +0 -43
  151. package/dist/activity-KCUWSNHF.js +0 -13
  152. package/dist/cli-commands-6OR7VA33.js +0 -18
  153. package/dist/intelligence-service-74VHHBUU.js +0 -15
@@ -24,18 +24,18 @@ import {
24
24
  resolveConfiguredAgentProvider,
25
25
  resolveSessionProviderAndModel,
26
26
  setAeroSystemPrompt
27
- } from "./chunk-VTOST3CL.js";
27
+ } from "./chunk-5WDU7ZML.js";
28
28
  import {
29
29
  AeroToolProfiles,
30
30
  AeroToolScopes,
31
31
  buildAeroStateTools,
32
32
  isAeroToolProfile,
33
33
  truncateToolResult
34
- } from "./chunk-SYRMAQVM.js";
34
+ } from "./chunk-3ZNDJ4OM.js";
35
35
  import {
36
36
  answerServiceAdapters,
37
37
  answerServiceDescriptors
38
- } from "./chunk-CD3XPOHP.js";
38
+ } from "./chunk-QWD3ABAW.js";
39
39
  import {
40
40
  isManagedCanonryInstall
41
41
  } from "./chunk-XAJS5FH3.js";
@@ -57,7 +57,7 @@ import {
57
57
  removeCloudflareTrafficConnection,
58
58
  removeCloudflareTrafficConnectionBySourceId,
59
59
  upsertCloudflareTrafficConnection
60
- } from "./chunk-RSZ3L5FJ.js";
60
+ } from "./chunk-HQEH4YRO.js";
61
61
  import {
62
62
  claudeAdapter,
63
63
  embedQueries,
@@ -69,7 +69,7 @@ import {
69
69
  openrouterAdapter,
70
70
  perplexityAdapter,
71
71
  startTrafficReclassification
72
- } from "./chunk-AVKRYSYT.js";
72
+ } from "./chunk-GTX7C5Y5.js";
73
73
  import {
74
74
  classifyUsageSurface,
75
75
  createApiUsageTelemetry,
@@ -81,7 +81,7 @@ import {
81
81
  startOutcomeTimer,
82
82
  trackFeatureCompleted,
83
83
  trackInstallState
84
- } from "./chunk-OH3HQENA.js";
84
+ } from "./chunk-GPPTW3HU.js";
85
85
  import {
86
86
  isLoopbackBindHost
87
87
  } from "./chunk-TSENU4GG.js";
@@ -89,7 +89,7 @@ import {
89
89
  isApiProviderRegistrable,
90
90
  isCdpProviderRegistrable,
91
91
  registeredProviderNames
92
- } from "./chunk-U2LYHQHF.js";
92
+ } from "./chunk-GCBFSIKI.js";
93
93
  import {
94
94
  checkLatestVersionForServer,
95
95
  getOrCreateAnonymousId,
@@ -101,17 +101,17 @@ import {
101
101
  recordDashboardEvent,
102
102
  setTelemetryPreference,
103
103
  trackEvent
104
- } from "./chunk-XQUGLXAN.js";
104
+ } from "./chunk-DY2Q3VIM.js";
105
105
  import {
106
106
  createCanonryMcpServer
107
- } from "./chunk-YYBYRAMI.js";
107
+ } from "./chunk-425BZPKK.js";
108
108
  import {
109
109
  CANONRY_MCP_TIERS,
110
110
  CANONRY_MCP_TOOLKIT_NAMES
111
- } from "./chunk-F2TGOWIW.js";
111
+ } from "./chunk-MG4COK23.js";
112
112
  import {
113
113
  ApiClient
114
- } from "./chunk-2MDEKCDU.js";
114
+ } from "./chunk-XONND7NT.js";
115
115
  import {
116
116
  AGENT_PROVIDERS,
117
117
  PROVIDER_MODELS,
@@ -146,39 +146,39 @@ import {
146
146
  saveConfigPatch,
147
147
  sentimentInstallReadiness,
148
148
  updateSharedProviderExecutionGate
149
- } from "./chunk-VP3F4BOG.js";
149
+ } from "./chunk-FMS7CIEK.js";
150
150
  import {
151
151
  getBundledSkillSnapshots
152
- } from "./chunk-3G5FQLF7.js";
152
+ } from "./chunk-NEJEHRPT.js";
153
153
  import {
154
154
  computeFactorAverages,
155
155
  deleteSiteCrawlGraphLayout,
156
156
  persistSiteCrawlGraphLayout,
157
157
  prepareSiteCrawlGraphLayout,
158
158
  recordedSharePct
159
- } from "./chunk-QCEXADUT.js";
159
+ } from "./chunk-K3YHPTKL.js";
160
160
  import {
161
161
  CanonryMcpToolNames,
162
162
  canonryMcpTools
163
- } from "./chunk-PAP62URW.js";
163
+ } from "./chunk-HS2HYFPX.js";
164
164
  import {
165
165
  PACKAGE_VERSION
166
166
  } from "./chunk-AOJU5LKX.js";
167
167
  import {
168
168
  CliError
169
- } from "./chunk-QQFTJVHT.js";
169
+ } from "./chunk-2T4OGJWP.js";
170
170
  import {
171
171
  IntelligenceService
172
- } from "./chunk-B3F5BMXL.js";
172
+ } from "./chunk-3GE4Z4J3.js";
173
173
  import {
174
174
  computeCitedCompetitorDomains,
175
175
  determineCitationState
176
- } from "./chunk-QRA6GFXX.js";
176
+ } from "./chunk-RPAWPX7B.js";
177
177
  import {
178
178
  addLogListener,
179
179
  createFastifyLogger,
180
180
  createLogger
181
- } from "./chunk-DI5EEYDP.js";
181
+ } from "./chunk-G2NIO2J3.js";
182
182
  import {
183
183
  BING_THROTTLE_COOLDOWN_MS,
184
184
  BingApiError,
@@ -334,7 +334,7 @@ import {
334
334
  webhookTargetRefusalReason,
335
335
  webhookUserAgent,
336
336
  writeAuditLog
337
- } from "./chunk-WAVN2EIK.js";
337
+ } from "./chunk-QXRI6DRE.js";
338
338
  import {
339
339
  OperationalLogStore,
340
340
  SentimentIdempotencyConflict,
@@ -436,7 +436,7 @@ import {
436
436
  unrecognizedAgentEventsHourly,
437
437
  unrecognizedAgentNotifyState,
438
438
  usageCounters
439
- } from "./chunk-35NITZHC.js";
439
+ } from "./chunk-X6DD3OIR.js";
440
440
  import {
441
441
  AGENT_MEMORY_VALUE_MAX_BYTES,
442
442
  AI_ENGINE_DOMAINS,
@@ -533,6 +533,7 @@ import {
533
533
  SeoProviders,
534
534
  SeoRunStatuses,
535
535
  SeoTargetKinds,
536
+ SiteAuditSetupFailureReasons,
536
537
  SiteHealthLinkClassificationSources,
537
538
  SnapshotProviderModes,
538
539
  TrafficSourceStatuses,
@@ -569,6 +570,7 @@ import {
569
570
  canonicalizeGtmAccountId,
570
571
  canonicalizeGtmContainerId,
571
572
  canonicalizeGtmResourceSelection,
573
+ cdpChromeLaunchHint,
572
574
  classifyOutcomeError,
573
575
  classifyProviderErrorMessage,
574
576
  classifyProviderOutcomeError,
@@ -635,6 +637,7 @@ import {
635
637
  isCitationMeasurable,
636
638
  isCitationStateMeasured,
637
639
  isEligibleFor,
640
+ isLocationRedirectStatus,
638
641
  isNegativeReviewRating,
639
642
  isOpenRouterRoute,
640
643
  isReadOnlyKey,
@@ -719,7 +722,7 @@ import {
719
722
  winnabilityClassLabel,
720
723
  withRetry,
721
724
  withSkippedProviders
722
- } from "./chunk-3OZ5WKRH.js";
725
+ } from "./chunk-GKQ4CYUM.js";
723
726
 
724
727
  // src/google-marketing-runtime.ts
725
728
  import crypto2 from "crypto";
@@ -5647,7 +5650,7 @@ var cdpChatgptAdapter = {
5647
5650
  return {
5648
5651
  ok: false,
5649
5652
  provider: "cdp:chatgpt",
5650
- message: `Chrome not reachable at ${config.cdpEndpoint}. Ensure Chrome is running with --remote-debugging-port=${port}`
5653
+ message: `Chrome not reachable at ${config.cdpEndpoint}. ${cdpChromeLaunchHint(port)}`
5651
5654
  };
5652
5655
  }
5653
5656
  return {
@@ -6471,7 +6474,7 @@ function nonBlank(value) {
6471
6474
  return trimmed ? trimmed : void 0;
6472
6475
  }
6473
6476
  function resolveBuildCommit(env = process.env) {
6474
- const embedded = true ? "97cee05ff8586f2081bfa1b396e3c69f3d5d8584" : void 0;
6477
+ const embedded = true ? "2ae716a5772d55661182e02bd3960d83f972c373" : void 0;
6475
6478
  return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
6476
6479
  }
6477
6480
  function resolveInstanceIdentity(env = process.env) {
@@ -9352,9 +9355,11 @@ async function executeGscSync(db, runId, projectId, opts) {
9352
9355
  }).run();
9353
9356
  }
9354
9357
  const observedThrough = totalRows.map((row) => row.keys[0] ?? "").filter((date) => date !== "").reduce((max2, date) => max2 === null || date > max2 ? date : max2, null);
9358
+ let dataThroughDate = null;
9355
9359
  if (observedThrough !== null || endDate) {
9356
9360
  const existing = db.select().from(gscDataWatermarks).where(eq8(gscDataWatermarks.projectId, projectId)).get();
9357
9361
  const nextThrough = [existing?.dataThroughDate ?? null, observedThrough].filter((d) => d !== null).reduce((max2, d) => max2 === null || d > max2 ? d : max2, null);
9362
+ dataThroughDate = nextThrough;
9358
9363
  if (nextThrough !== null) {
9359
9364
  db.insert(gscDataWatermarks).values({
9360
9365
  projectId,
@@ -9387,9 +9392,11 @@ async function executeGscSync(db, runId, projectId, opts) {
9387
9392
  )
9388
9393
  ).run();
9389
9394
  const queryTotalsNow = (/* @__PURE__ */ new Date()).toISOString();
9395
+ let queryTotalsStored = 0;
9390
9396
  for (const row of queryTotalRows) {
9391
9397
  const [date, query] = row.keys;
9392
9398
  if (!date || !query) continue;
9399
+ queryTotalsStored += 1;
9393
9400
  db.insert(gscQueryDailyTotals).values({
9394
9401
  id: crypto10.randomUUID(),
9395
9402
  projectId,
@@ -9404,14 +9411,27 @@ async function executeGscSync(db, runId, projectId, opts) {
9404
9411
  }).run();
9405
9412
  }
9406
9413
  log4.info("query-totals.complete", { runId, projectId, rowCount: queryTotalRows.length });
9414
+ let sitemapsStored = null;
9407
9415
  try {
9408
9416
  const stored = await syncGscSitemaps(db, projectId, runId, accessToken, propertyId);
9417
+ sitemapsStored = stored.sitemaps;
9409
9418
  log4.info("sitemaps.complete", { runId, projectId, ...stored });
9410
9419
  } catch (err) {
9411
9420
  log4.warn("sitemaps.failed", { runId, projectId, error: describeError(err) });
9412
9421
  }
9413
9422
  const coverage = writeCoverageSnapshot(db, projectId, runId);
9414
- db.update(runs).set({ status: "completed", finishedAt: (/* @__PURE__ */ new Date()).toISOString() }).where(eq8(runs.id, runId)).run();
9423
+ const syncSummary = {
9424
+ type: "gsc",
9425
+ days,
9426
+ startDate,
9427
+ endDate,
9428
+ searchRows: rows.length,
9429
+ dailyTotals: totalRows.length,
9430
+ queryTotals: queryTotalsStored,
9431
+ sitemaps: sitemapsStored,
9432
+ dataThroughDate
9433
+ };
9434
+ db.update(runs).set({ status: "completed", finishedAt: (/* @__PURE__ */ new Date()).toISOString(), syncSummary }).where(eq8(runs.id, runId)).run();
9415
9435
  log4.info("sync.completed", { runId, projectId, searchDataRows: rows.length, indexed: coverage.indexed, notIndexed: coverage.notIndexed, unknown: coverage.unknown, verifiedByInspection: coverage.verifiedByInspection });
9416
9436
  const counts = { rows: rows.length, urls: new Set(rows.map((row) => row.keys[1] ?? "")).size };
9417
9437
  reportOutcome(rows.length === 0 ? { status: OutcomeStatuses.skipped, reasonCode: OutcomeReasonCodes.NO_DATA, counts } : { status: OutcomeStatuses.succeeded, counts });
@@ -12922,6 +12942,58 @@ import { runSiteCrawl } from "@canonry/agent-readiness";
12922
12942
  // src/site-audit-root.ts
12923
12943
  import http from "http";
12924
12944
  import https from "https";
12945
+
12946
+ // src/site-audit-setup-error.ts
12947
+ var SiteAuditSetupError = class extends Error {
12948
+ constructor(reason, message) {
12949
+ super(message);
12950
+ this.reason = reason;
12951
+ }
12952
+ reason;
12953
+ };
12954
+ var DNS_CODES = /* @__PURE__ */ new Set(["ENOTFOUND", "ENODATA", "EAI_AGAIN"]);
12955
+ var CERT_CODES = /* @__PURE__ */ new Set([
12956
+ "CERT_HAS_EXPIRED",
12957
+ "CERT_NOT_YET_VALID",
12958
+ "CERT_REVOKED",
12959
+ "CERT_UNTRUSTED",
12960
+ "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
12961
+ "UNABLE_TO_GET_ISSUER_CERT",
12962
+ "UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
12963
+ "SELF_SIGNED_CERT_IN_CHAIN",
12964
+ "DEPTH_ZERO_SELF_SIGNED_CERT"
12965
+ ]);
12966
+ var NETWORK_CODES = /* @__PURE__ */ new Set(["ECONNREFUSED", "ECONNRESET", "ECONNABORTED", "EHOSTUNREACH", "ENETUNREACH", "EPIPE"]);
12967
+ function siteAuditSetupFailureReason(error) {
12968
+ for (let depth = 0; depth < 5 && error instanceof Error; depth++, error = error.cause) {
12969
+ if (error instanceof SiteAuditSetupError) return error.reason;
12970
+ const code = "code" in error ? error.code : void 0;
12971
+ if (typeof code !== "string") continue;
12972
+ if (DNS_CODES.has(code)) return SiteAuditSetupFailureReasons.dns;
12973
+ if (code === "ETIMEDOUT" || code === "ESOCKETTIMEDOUT") return SiteAuditSetupFailureReasons.timeout;
12974
+ if (CERT_CODES.has(code) || code.startsWith("ERR_TLS_") || code.startsWith("ERR_SSL_")) return SiteAuditSetupFailureReasons.tls;
12975
+ if (NETWORK_CODES.has(code)) return SiteAuditSetupFailureReasons.network;
12976
+ }
12977
+ return SiteAuditSetupFailureReasons.unknown;
12978
+ }
12979
+ var SETUP_ACTION = {
12980
+ project_missing: "Check that the project still exists and start the audit from that project.",
12981
+ invalid_root: "Enter the public site address without credentials.",
12982
+ dns: "Check that the domain has a public DNS record and resolves from the Canonry server.",
12983
+ tls: "Check the TLS certificate\u2019s expiry date, hostname and certificate chain.",
12984
+ timeout: "The homepage request timed out. Check its response time from the Canonry server, then retry.",
12985
+ redirect: "Check that the homepage redirects to the intended public domain.",
12986
+ target_rejected: "Use the address of the intended public website. Exclude private sites from the audit.",
12987
+ sitemap_rejected: "Check the custom sitemap URL or remove it to use automatic sitemap discovery.",
12988
+ network: "Check that the site is reachable from the Canonry server, then retry.",
12989
+ unknown: "Check the Canonry server logs for this audit run before retrying."
12990
+ };
12991
+ function describeSiteAuditSetupError(error) {
12992
+ return `${describeError(error)}
12993
+ ${SETUP_ACTION[siteAuditSetupFailureReason(error)]}`;
12994
+ }
12995
+
12996
+ // src/site-audit-root.ts
12925
12997
  var DEFAULT_TIMEOUT_MS = 1e4;
12926
12998
  var MAX_REDIRECTS = 5;
12927
12999
  var USER_AGENT = "Canonry/1.0 (site-health)";
@@ -12941,10 +13013,13 @@ async function resolveSiteAuditRootUrl(rawUrl, options) {
12941
13013
  timeoutMs,
12942
13014
  options.signal
12943
13015
  );
12944
- if (!checked.ok) throw new Error(`Site audit root URL rejected: ${checked.message}`);
13016
+ if (!checked.ok) {
13017
+ const reason = checked.unresolved ? SiteAuditSetupFailureReasons.dns : checked.blocked ? SiteAuditSetupFailureReasons.target_rejected : SiteAuditSetupFailureReasons.unknown;
13018
+ throw new SiteAuditSetupError(reason, `Site audit root URL rejected: ${checked.message}`);
13019
+ }
12945
13020
  const checkedUrl = parseHttpUrl2(checked.target.url.href);
12946
13021
  if (checkedUrl.href !== current.href) {
12947
- throw new Error("Site audit root target resolver returned a different URL than it validated");
13022
+ throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.target_rejected, "Site audit root target resolver returned a different URL than it validated");
12948
13023
  }
12949
13024
  const response = await beforeDeadline(
12950
13025
  () => transport(checked.target, { timeoutMs: remainingTime(deadlineAt, timeoutMs), signal: options.signal }),
@@ -12952,19 +13027,19 @@ async function resolveSiteAuditRootUrl(rawUrl, options) {
12952
13027
  timeoutMs,
12953
13028
  options.signal
12954
13029
  );
12955
- if (!isRedirect(response.status)) {
13030
+ const location = firstHeader(response.headers.location);
13031
+ if (!isRedirect(response.status) || !location && !isLocationRedirectStatus(response.status)) {
12956
13032
  return { requestedUrl: requested.href, effectiveUrl: current.href, redirects };
12957
13033
  }
12958
13034
  if (redirects.length >= MAX_REDIRECTS) {
12959
- throw new Error(`Site audit root has more than ${MAX_REDIRECTS} redirects`);
13035
+ throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.redirect, `Site audit root has more than ${MAX_REDIRECTS} redirects`);
12960
13036
  }
12961
- const location = firstHeader(response.headers.location);
12962
- if (!location) throw new Error("Site audit root redirect response has no Location header");
13037
+ if (!location) throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.redirect, "Site audit root redirect response has no Location header");
12963
13038
  let next;
12964
13039
  try {
12965
13040
  next = parseHttpUrl2(new URL(location, current).href);
12966
13041
  } catch {
12967
- throw new Error("Site audit root redirect has an invalid Location header");
13042
+ throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.redirect, "Site audit root redirect has an invalid Location header");
12968
13043
  }
12969
13044
  assertAllowedRedirect(current, next);
12970
13045
  redirects.push({ status: response.status, from: current.href, to: next.href });
@@ -12976,12 +13051,12 @@ function parseHttpUrl2(rawUrl) {
12976
13051
  try {
12977
13052
  url = new URL(rawUrl);
12978
13053
  } catch {
12979
- throw new Error("Site audit root must be a valid URL");
13054
+ throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.invalid_root, "Site audit root must be a valid URL");
12980
13055
  }
12981
13056
  if (url.protocol !== "http:" && url.protocol !== "https:") {
12982
- throw new Error("Site audit root must use HTTP or HTTPS");
13057
+ throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.invalid_root, "Site audit root must use HTTP or HTTPS");
12983
13058
  }
12984
- if (url.username || url.password) throw new Error("Site audit root must not include credentials");
13059
+ if (url.username || url.password) throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.invalid_root, "Site audit root must not include credentials");
12985
13060
  url.hash = "";
12986
13061
  return url;
12987
13062
  }
@@ -12990,11 +13065,11 @@ function canonicalHostAlias(hostname) {
12990
13065
  }
12991
13066
  function assertAllowedRedirect(current, next) {
12992
13067
  if (current.protocol === "https:" && next.protocol === "http:") {
12993
- throw new Error("Site audit root redirect would downgrade HTTPS to HTTP");
13068
+ throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.redirect, "Site audit root redirect would downgrade HTTPS to HTTP");
12994
13069
  }
12995
- if (current.port !== next.port) throw new Error("Site audit root redirect changes port");
13070
+ if (current.port !== next.port) throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.redirect, "Site audit root redirect changes port");
12996
13071
  if (canonicalHostAlias(current.hostname) !== canonicalHostAlias(next.hostname)) {
12997
- throw new Error("Site audit root redirect points outside the approved site");
13072
+ throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.redirect, "Site audit root redirect points outside the approved site");
12998
13073
  }
12999
13074
  }
13000
13075
  function isRedirect(status) {
@@ -13005,7 +13080,7 @@ function firstHeader(value) {
13005
13080
  }
13006
13081
  function remainingTime(deadlineAt, timeoutMs) {
13007
13082
  const remaining = deadlineAt - Date.now();
13008
- if (remaining <= 0) throw new Error(`Site audit root resolution exceeded its ${timeoutMs}ms deadline`);
13083
+ if (remaining <= 0) throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.timeout, `Site audit root resolution exceeded its ${timeoutMs}ms deadline`);
13009
13084
  return remaining;
13010
13085
  }
13011
13086
  async function beforeDeadline(operation, deadlineAt, timeoutMs, signal) {
@@ -13018,7 +13093,7 @@ async function beforeDeadline(operation, deadlineAt, timeoutMs, signal) {
13018
13093
  operation(),
13019
13094
  new Promise((_resolve, reject) => {
13020
13095
  timer = setTimeout(
13021
- () => reject(new Error(`Site audit root resolution exceeded its ${timeoutMs}ms deadline`)),
13096
+ () => reject(new SiteAuditSetupError(SiteAuditSetupFailureReasons.timeout, `Site audit root resolution exceeded its ${timeoutMs}ms deadline`)),
13022
13097
  remaining
13023
13098
  );
13024
13099
  }),
@@ -13090,7 +13165,7 @@ async function requestPinnedSiteAuditRoot(target, options) {
13090
13165
  succeed({ status: response.statusCode ?? 0, headers: response.headers });
13091
13166
  });
13092
13167
  const timer = setTimeout(
13093
- () => request.destroy(new Error(`Site audit root request timed out after ${options.timeoutMs}ms`)),
13168
+ () => request.destroy(new SiteAuditSetupError(SiteAuditSetupFailureReasons.timeout, `Site audit root request timed out after ${options.timeoutMs}ms`)),
13094
13169
  options.timeoutMs
13095
13170
  );
13096
13171
  if (options.signal) {
@@ -13202,6 +13277,69 @@ function classifySiteCrawlTemplateLinks(db, scope, pagesFetched, placementRulese
13202
13277
  };
13203
13278
  }
13204
13279
 
13280
+ // src/site-audit-no-score.ts
13281
+ function httpAction(status) {
13282
+ if (status === 401 || status === 403) return "Check public access to the pages you want to audit.";
13283
+ if (status === 404 || status === 410) return "Update links or sitemap entries that point to missing pages.";
13284
+ if (status === 429) return "Wait for the site\u2019s rate limit to reset before retrying.";
13285
+ if (status >= 500) return "Check the site\u2019s server logs and retry once it responds normally.";
13286
+ return "Check the requested page addresses and the site\u2019s HTTP response.";
13287
+ }
13288
+ function pageEvidence(page) {
13289
+ if (page.state === "robots-blocked") return "robots.txt blocked a crawl request. Review the rules for pages you intend crawlers to visit.";
13290
+ if (page.state === "non-html") return "A response contained no usable HTML. Check that the homepage or sitemap leads to a public HTML page.";
13291
+ if (page.state === "html" && page.error) return "An HTML page could not be analyzed. Retry the audit. If it fails again, include the run ID when reporting the issue.";
13292
+ if (page.state !== "fetch-error") return null;
13293
+ switch (page.errorCode) {
13294
+ case "TIMEOUT":
13295
+ return "A page request timed out. Check the site\u2019s response time and retry.";
13296
+ case "BLOCKED_HOST":
13297
+ case "BLOCKED_IP":
13298
+ return "A page target was blocked by the public-address check. Verify that the intended site resolves to a public address.";
13299
+ case "REDIRECT_LIMIT":
13300
+ return "A page exceeded the redirect limit. Check its redirect chain for loops.";
13301
+ case "BODY_TOO_LARGE":
13302
+ return "A page exceeded the download size limit. Check the size of its response.";
13303
+ case "INVALID_URL":
13304
+ case "UNSUPPORTED_PROTOCOL":
13305
+ return "A page address could not be fetched. Check the site links and sitemap for valid HTTP or HTTPS addresses.";
13306
+ default:
13307
+ return page.statusCode === null ? "No HTTP status was recorded for a page request. Check that the site is reachable from the Canonry server." : null;
13308
+ }
13309
+ }
13310
+ function describeUnscoredSiteAudit(summary, pages, hasUrlVersions) {
13311
+ const evidence = /* @__PURE__ */ new Set();
13312
+ const redirect = summary.warnings.find((warning) => warning.code === "root-host-redirect");
13313
+ if (redirect || summary.terminationReason === "root-host-redirect") {
13314
+ const from = URL.parse(redirect?.from ?? summary.rootUrl);
13315
+ const destination = redirect?.to ?? summary.finalRootUrl;
13316
+ const to = destination && URL.parse(destination);
13317
+ const detail = from && to ? ` from ${from.host} to ${to.host} (${destination})` : "";
13318
+ evidence.add(`The root URL redirected off-host${detail}. Check the project domain and the homepage redirect.`);
13319
+ }
13320
+ if (hasUrlVersions) evidence.add("The crawl found alternate URLs for canonical pages. Include the canonical page addresses in the sitemap.");
13321
+ const statusesByAction = /* @__PURE__ */ new Map();
13322
+ for (const page of pages) {
13323
+ if (page.state === "fetch-error" && page.statusCode !== null && page.statusCode >= 400) {
13324
+ const action = httpAction(page.statusCode);
13325
+ const statuses = statusesByAction.get(action) ?? /* @__PURE__ */ new Set();
13326
+ statuses.add(page.statusCode);
13327
+ statusesByAction.set(action, statuses);
13328
+ } else {
13329
+ const detail = pageEvidence(page);
13330
+ if (detail) evidence.add(detail);
13331
+ }
13332
+ }
13333
+ for (const [action, statuses] of statusesByAction) {
13334
+ const observed2 = [...statuses].sort((a, b) => a - b).map((status) => `HTTP ${status}`);
13335
+ evidence.add(`The crawler received ${observed2.join(", ")}. ${action}`);
13336
+ }
13337
+ const stoppedAtLimit = !summary.complete && summary.terminationReason !== null && summary.terminationReason !== "root-host-redirect";
13338
+ if (evidence.size === 0 && !stoppedAtLimit) evidence.add("Check that the homepage and sitemap lead to public HTML pages, then retry.");
13339
+ const observed = `No pages were scored (${summary.pagesObserved} observed)`;
13340
+ return [stoppedAtLimit ? `${observed} before the scan stopped.` : `${observed}.`, ...evidence].join(" ");
13341
+ }
13342
+
13205
13343
  // src/site-audit-issues.ts
13206
13344
  import { createHash as createHash5 } from "crypto";
13207
13345
  var GROUP_IDENTITY_VERSION = "duplicate-metadata-v1";
@@ -13288,7 +13426,7 @@ function toHomepageUrl(canonicalDomain) {
13288
13426
  }
13289
13427
  async function assertSiteAuditUrlAllowed(rawUrl, field) {
13290
13428
  const check = await resolveWebhookTarget(rawUrl);
13291
- if (!check.ok) throw new Error(`${field} ${check.message.replace(/^"url" /, "")}`);
13429
+ if (!check.ok) throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.sitemap_rejected, `${field} ${check.message.replace(/^"url" /, "")}`);
13292
13430
  }
13293
13431
  function clampSiteAuditLimit(limit) {
13294
13432
  if (limit == null || !Number.isFinite(limit)) return SITE_AUDIT_DEFAULT_PAGE_LIMIT;
@@ -13406,20 +13544,6 @@ function siteRollups(input) {
13406
13544
  }
13407
13545
  return sites;
13408
13546
  }
13409
- function emptyCompleteCrawlError(rootUrl, finalRootUrl, pagesObserved) {
13410
- if (!finalRootUrl) return new Error(`Agent Readiness audit scan could not successfully audit any of ${pagesObserved} observed page(s).`);
13411
- try {
13412
- const rootHost = new URL(rootUrl).hostname;
13413
- const finalRootHost = new URL(finalRootUrl).hostname;
13414
- if (rootHost !== finalRootHost) {
13415
- return new Error(
13416
- `Agent Readiness audit scan could not successfully audit any of ${pagesObserved} observed page(s): root URL redirected off-host from ${rootHost} to ${finalRootHost} (${finalRootUrl}).`
13417
- );
13418
- }
13419
- } catch {
13420
- }
13421
- return new Error(`Agent Readiness audit scan could not successfully audit any of ${pagesObserved} observed page(s).`);
13422
- }
13423
13547
  function toLegacyIssue(summary, totalPages) {
13424
13548
  const affected = summary.pagesPartial + summary.pagesFailing;
13425
13549
  if (affected === 0 || summary.avgScore >= 70) return null;
@@ -13462,6 +13586,7 @@ function trackSiteAuditOutcome(db, input) {
13462
13586
  operationKind: OutcomeOperationKinds["site-audit"],
13463
13587
  diagnostics: buildOutcomeDiagnostics(input.error, { phase: input.phase }),
13464
13588
  ...input.observedPageCount !== void 0 ? { observedPages: input.observedPageCount, observedPageErrors: input.observedPageErrors } : {},
13589
+ ...input.status === "failed" && input.phase === OutcomePhases.setup ? { setupFailureReason: siteAuditSetupFailureReason(input.error) } : {},
13465
13590
  ...input.status === "failed" ? describeRunFailure(input.error) : {}
13466
13591
  },
13467
13592
  errorCode ? { errorCode } : void 0
@@ -13775,7 +13900,7 @@ async function executeSiteAudit(db, runId, projectId, opts = {}) {
13775
13900
  };
13776
13901
  try {
13777
13902
  const project = db.select().from(projects).where(eq22(projects.id, projectId)).get();
13778
- if (!project) throw new Error(`Project not found: ${projectId}`);
13903
+ if (!project) throw new SiteAuditSetupError(SiteAuditSetupFailureReasons.project_missing, `Project not found: ${projectId}`);
13779
13904
  canonicalDomain = project.canonicalDomain;
13780
13905
  const homepageUrl = toHomepageUrl(project.canonicalDomain);
13781
13906
  const maxPages = clampSiteAuditLimit(opts.maxPages ?? opts.limit);
@@ -13798,7 +13923,7 @@ async function executeSiteAudit(db, runId, projectId, opts = {}) {
13798
13923
  } catch (error) {
13799
13924
  if (isCancelled(error, opts.signal)) throw error;
13800
13925
  log17.warn("extra-site.unreachable", { runId, projectId, host, error: describeError(error) });
13801
- return { host, rootUrl: null, error: describeError(error) };
13926
+ return { host, rootUrl: null, error: describeSiteAuditSetupError(error) };
13802
13927
  }
13803
13928
  })
13804
13929
  );
@@ -13843,9 +13968,11 @@ async function executeSiteAudit(db, runId, projectId, opts = {}) {
13843
13968
  }
13844
13969
  });
13845
13970
  const crawlSummary = report.summary;
13846
- if (crawlSummary.complete && crawlSummary.auditRollup.auditedPages === 0) {
13847
- throw emptyCompleteCrawlError(crawlSummary.rootUrl, crawlSummary.finalRootUrl, crawlSummary.pagesObserved);
13848
- }
13971
+ const pageObservations = [...observedPages.values()].filter((page) => urlVersionOf(page) === null);
13972
+ const scoredPages = pageObservations.filter(isScoredPage);
13973
+ const pagesAudited = scoredPages.length;
13974
+ const noScoreMessage = pagesAudited === 0 ? describeUnscoredSiteAudit(crawlSummary, pageObservations, observedPages.size > pageObservations.length) : null;
13975
+ if (crawlSummary.complete && crawlSummary.auditRollup.auditedPages === 0 && noScoreMessage) throw new Error(noScoreMessage);
13849
13976
  phase = OutcomePhases.persistence;
13850
13977
  const placementRulesetVersion = crawlSummary.linkPlacementRulesetVersion ?? null;
13851
13978
  const templateLinks = classifySiteCrawlTemplateLinks(
@@ -13869,9 +13996,6 @@ async function executeSiteAudit(db, runId, projectId, opts = {}) {
13869
13996
  rootUrl: crawlSummary.finalRootUrl ?? crawlSummary.rootUrl
13870
13997
  }, { signal: opts.signal, timeoutMs: opts.graphLayoutTimeoutMs });
13871
13998
  const finishedAt = (/* @__PURE__ */ new Date()).toISOString();
13872
- const pageObservations = [...observedPages.values()].filter((page) => urlVersionOf(page) === null);
13873
- const scoredPages = pageObservations.filter(isScoredPage);
13874
- const pagesAudited = scoredPages.length;
13875
13999
  const aggregateScore = pagesAudited > 0 ? Math.round(scoredPages.reduce((total, page) => total + page.audit.overallScore, 0) / pagesAudited) : null;
13876
14000
  const factors = computeFactorAverages(pageObservations);
13877
14001
  const errorCount = observedErrorCount(observedPages.values());
@@ -13919,7 +14043,7 @@ async function executeSiteAudit(db, runId, projectId, opts = {}) {
13919
14043
  }
13920
14044
  }
13921
14045
  const published = db.transaction((tx) => {
13922
- const claim2 = tx.update(runs).set({ status: terminalStatus, finishedAt }).where(and17(eq22(runs.id, runId), eq22(runs.status, "running"))).run();
14046
+ const claim2 = tx.update(runs).set({ status: terminalStatus, error: noScoreMessage, finishedAt }).where(and17(eq22(runs.id, runId), eq22(runs.status, "running"))).run();
13923
14047
  if (claim2.changes === 0) return false;
13924
14048
  if (aggregateScore !== null) {
13925
14049
  tx.insert(siteAuditSnapshots).values({
@@ -14027,6 +14151,7 @@ async function executeSiteAudit(db, runId, projectId, opts = {}) {
14027
14151
  }
14028
14152
  tx.update(siteCrawlAttempts).set({
14029
14153
  state: terminalStatus,
14154
+ error: noScoreMessage,
14030
14155
  pagesDiscovered: crawlSummary.pagesDiscovered,
14031
14156
  pagesFetched: crawlSummary.pagesFetched,
14032
14157
  pagesEligible: [...observedPages.values()].filter(isInventoryEligible).length,
@@ -14091,7 +14216,7 @@ async function executeSiteAudit(db, runId, projectId, opts = {}) {
14091
14216
  } catch (error) {
14092
14217
  const finishedAt = (/* @__PURE__ */ new Date()).toISOString();
14093
14218
  const cancelled = isCancelled(error, opts.signal);
14094
- const message = describeError(error);
14219
+ const message = !cancelled && phase === OutcomePhases.setup ? describeSiteAuditSetupError(error) : describeError(error);
14095
14220
  db.transaction((tx) => {
14096
14221
  tx.update(siteCrawlAttempts).set({
14097
14222
  state: cancelled ? "cancelled" : "failed",
@@ -5,7 +5,7 @@ import {
5
5
  siteCrawlGraphNodes,
6
6
  siteCrawlPages,
7
7
  siteCrawlSnapshots
8
- } from "./chunk-35NITZHC.js";
8
+ } from "./chunk-X6DD3OIR.js";
9
9
  import {
10
10
  SITE_CRAWL_GRAPH_MAX_EDGES,
11
11
  SITE_CRAWL_GRAPH_MAX_NODES,
@@ -15,7 +15,7 @@ import {
15
15
  factorStatusFromDistribution,
16
16
  factorStatusFromScore,
17
17
  roundPreservingTotal
18
- } from "./chunk-3OZ5WKRH.js";
18
+ } from "./chunk-GKQ4CYUM.js";
19
19
 
20
20
  // src/site-audit-factors.ts
21
21
  function recordedSharePct(factor) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  USAGE_TELEMETRY_HEADERS,
3
3
  redactLogString
4
- } from "./chunk-3OZ5WKRH.js";
4
+ } from "./chunk-GKQ4CYUM.js";
5
5
 
6
6
  // ../api-routes/src/request-context.ts
7
7
  import { AsyncLocalStorage } from "async_hooks";
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-VJWDBFSL.js";
5
5
  import {
6
6
  createApiClient
7
- } from "./chunk-2MDEKCDU.js";
7
+ } from "./chunk-XONND7NT.js";
8
8
  import {
9
9
  CliError,
10
10
  isMachineFormat
11
- } from "./chunk-QQFTJVHT.js";
11
+ } from "./chunk-2T4OGJWP.js";
12
12
  import {
13
13
  describeError
14
- } from "./chunk-3OZ5WKRH.js";
14
+ } from "./chunk-GKQ4CYUM.js";
15
15
 
16
16
  // src/commands/mcp.ts
17
17
  import fs from "fs";
@@ -74,8 +74,8 @@ var CANONRY_MCP_TOOLKITS = [
74
74
  {
75
75
  name: "gsc",
76
76
  title: "Google Search Console",
77
- description: "Read GSC performance, per-query totals, inspections, coverage, sitemaps, and deindexed URLs.",
78
- whenToLoad: "Load to connect Search Console, select a property, or inspect indexing, coverage and sitemaps."
77
+ description: "Read GSC performance, per-query totals, inspections, coverage, sitemaps, and deindexed URLs, and run a Search Console sync when stored data is stale.",
78
+ whenToLoad: "Load to connect Search Console, select a property, inspect indexing, coverage and sitemaps, or refresh search data with a Search Console sync."
79
79
  },
80
80
  {
81
81
  name: "bing",
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  CliError,
6
6
  isMachineFormat
7
- } from "./chunk-QQFTJVHT.js";
7
+ } from "./chunk-2T4OGJWP.js";
8
8
  import {
9
9
  CodingAgents,
10
10
  SKILL_MANIFEST_FILENAME,
@@ -15,7 +15,7 @@ import {
15
15
  formatCanonryPluginUpdateHint,
16
16
  formatCanonryPluginVersionMismatch,
17
17
  skillsClientSchema
18
- } from "./chunk-3OZ5WKRH.js";
18
+ } from "./chunk-GKQ4CYUM.js";
19
19
 
20
20
  // src/commands/skills.ts
21
21
  import crypto from "crypto";
@@ -23,7 +23,7 @@ import {
23
23
  measurementDraftUpsertGroupRequestSchema,
24
24
  measurementDraftUpsertMarketRequestSchema,
25
25
  measurementDraftUpsertTargetRequestSchema
26
- } from "./chunk-3OZ5WKRH.js";
26
+ } from "./chunk-GKQ4CYUM.js";
27
27
 
28
28
  // src/measurement-draft-actions.ts
29
29
  import { z } from "zod";