@canonry/canonry 7.128.0 → 7.129.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 (145) hide show
  1. package/assets/assets/{AccessControls-QW1RtXqK.js → AccessControls-B1v2FZPP.js} +1 -1
  2. package/assets/assets/{AgentSetupPage-BFO6Jx36.js → AgentSetupPage-DAu_QuMy.js} +1 -1
  3. package/assets/assets/{AuditHistoryPanel-Cn9Tnnxo.js → AuditHistoryPanel-D_zRZDy7.js} +1 -1
  4. package/assets/assets/{BacklinksPage-Bv12EM38.js → BacklinksPage-DMZKWIfa.js} +1 -1
  5. package/assets/assets/{ChartPrimitives-DIAAi1Eq.js → ChartPrimitives-0854i4GX.js} +1 -1
  6. package/assets/assets/{HistoryPage-Bfn3nVjo.js → HistoryPage-Ci2llyKV.js} +1 -1
  7. package/assets/assets/{MeasurementPropertyPage-Cwyl4MS5.js → MeasurementPropertyPage-Bml0yUnY.js} +1 -1
  8. package/assets/assets/{ProjectPage-JCH068IS.js → ProjectPage-DQgRsgAv.js} +3 -3
  9. package/assets/assets/{RunsPage-B56n3Xwl.js → RunsPage-BihA-xXz.js} +1 -1
  10. package/assets/assets/{ServerTrafficSection-JZ7tID1A.js → ServerTrafficSection-B4FdP2Yn.js} +3 -3
  11. package/assets/assets/{SettingsPage-C1XRb6UB.js → SettingsPage-DuheQKDg.js} +1 -1
  12. package/assets/assets/{ToneBadge-DSr49xyr.js → ToneBadge-CvjNM6Ls.js} +1 -1
  13. package/assets/assets/{TrafficPage-BIbFPquR.js → TrafficPage-DiG_i3h4.js} +1 -1
  14. package/assets/assets/{TrafficSourceDetailPage-DpJyjmCY.js → TrafficSourceDetailPage-BRlxEdMd.js} +1 -1
  15. package/assets/assets/{account-context-CRwUczVQ.js → account-context-DBJg_gVV.js} +1 -1
  16. package/assets/assets/{agent-trust-copy-DduiTpc0.js → agent-trust-copy-DELKG03R.js} +1 -1
  17. package/assets/assets/{card-DtN_FyC4.js → card-WjxG7OUP.js} +1 -1
  18. package/assets/assets/{index-CmdxqiD3.js → index-DxQlUSXe.js} +3 -3
  19. package/assets/assets/{preload-helper-CqQPtzI4.js → preload-helper-CkO9IcjS.js} +1 -1
  20. package/assets/assets/query-client-BuEx84KK.js +1 -0
  21. package/assets/assets/{react-query-Bt-PaSFW.js → react-query-DF9z4xIx.js} +1 -1
  22. package/assets/assets/{react-sigma_core.esm.min-BTRnvmn2.js → react-sigma_core.esm.min-C1O8GFwj.js} +1 -1
  23. package/assets/assets/{server-traffic-D598cM_v.js → server-traffic-s9vqPEWz.js} +1 -1
  24. package/assets/assets/{service--wSlHsiA.js → service-ZGP6b4iE.js} +1 -1
  25. package/assets/index.html +9 -9
  26. package/dist/activity-JOXDL3UF.js +13 -0
  27. package/dist/{ads-PB3VFUPV.js → ads-XOHE65YV.js} +4 -4
  28. package/dist/{agent-VOL7SOEQ.js → agent-R2KM6VDZ.js} +8 -8
  29. package/dist/{agent-ask-F46ERE3W.js → agent-ask-LK6L5U2G.js} +4 -4
  30. package/dist/{agent-conversations-T5Q43627.js → agent-conversations-SPQZA674.js} +4 -4
  31. package/dist/{agent-journeys-GVEVJ5J2.js → agent-journeys-J4PRNH37.js} +4 -4
  32. package/dist/{agent-memory-XXN7QXNM.js → agent-memory-HXK5R5H2.js} +4 -4
  33. package/dist/{agent-providers-U6XIM5JI.js → agent-providers-YXCFLOAD.js} +4 -4
  34. package/dist/{agent-transcript-ONEA6JBO.js → agent-transcript-XLBIKNTI.js} +4 -4
  35. package/dist/{analytics-XWVTM57N.js → analytics-CT6X5AIK.js} +4 -4
  36. package/dist/{answerability-GNYSELX5.js → answerability-PRGBTPYO.js} +4 -4
  37. package/dist/{apply-WXW4KWUK.js → apply-6AQBJSLU.js} +4 -4
  38. package/dist/{backfill-SWDR5M4O.js → backfill-UMVXMH2Z.js} +11 -11
  39. package/dist/{backlinks-5LIBLUEG.js → backlinks-YAQL5BCW.js} +4 -4
  40. package/dist/{bing-4U4ODKGV.js → bing-A3BZHGVS.js} +4 -4
  41. package/dist/{bootstrap-FY72AHVW.js → bootstrap-3GXCVZR6.js} +11 -11
  42. package/dist/{cdp-H5WMBYIF.js → cdp-NTHQS2VZ.js} +8 -8
  43. package/dist/{chunk-3ZNDJ4OM.js → chunk-2DTDECRE.js} +5 -5
  44. package/dist/{chunk-X6DD3OIR.js → chunk-2QHWROIF.js} +23 -3
  45. package/dist/{chunk-DWFCDUE2.js → chunk-3HQ5GREG.js} +372 -372
  46. package/dist/{chunk-DY2Q3VIM.js → chunk-3HW7EDLQ.js} +2 -2
  47. package/dist/{chunk-HQEH4YRO.js → chunk-5QRZYOHL.js} +1 -1
  48. package/dist/{chunk-GCBFSIKI.js → chunk-66ESBZBC.js} +1 -1
  49. package/dist/{chunk-3GE4Z4J3.js → chunk-6HWV3PVJ.js} +5 -5
  50. package/dist/{chunk-ZKIEOEUZ.js → chunk-6S3Z37H7.js} +2 -2
  51. package/dist/{chunk-G2NIO2J3.js → chunk-6TEMKMWL.js} +2 -2
  52. package/dist/{chunk-QWD3ABAW.js → chunk-AFKCRFVL.js} +1 -1
  53. package/dist/{chunk-M4IAXLBT.js → chunk-APM25SLF.js} +3 -3
  54. package/dist/{chunk-A36PZKKS.js → chunk-BW3SUS45.js} +2 -2
  55. package/dist/{chunk-5WDU7ZML.js → chunk-CT6J54HN.js} +6 -6
  56. package/dist/{chunk-NEJEHRPT.js → chunk-EF6I66NL.js} +2 -2
  57. package/dist/{chunk-2PLJ4QG5.js → chunk-EGTMTGBD.js} +4 -4
  58. package/dist/{chunk-PWXLKW2F.js → chunk-GBYV3WM5.js} +3 -3
  59. package/dist/{chunk-RDCEFEXP.js → chunk-GUU3LZQ2.js} +3 -3
  60. package/dist/{chunk-XONND7NT.js → chunk-H7UFYW34.js} +3 -3
  61. package/dist/{chunk-GTX7C5Y5.js → chunk-HD73OWIQ.js} +53 -25
  62. package/dist/{chunk-GW4CL5ZO.js → chunk-HEWCB5LK.js} +315 -126
  63. package/dist/{chunk-HS2HYFPX.js → chunk-JJQ5USIP.js} +5 -5
  64. package/dist/{chunk-RMLGMB5B.js → chunk-JZDOF24J.js} +1 -1
  65. package/dist/{chunk-FIF4N7DP.js → chunk-KL6LUFZG.js} +1 -1
  66. package/dist/{chunk-K3YHPTKL.js → chunk-MWZQPB26.js} +2 -2
  67. package/dist/{chunk-GKQ4CYUM.js → chunk-MYDVOMA2.js} +62 -36
  68. package/dist/{chunk-2T4OGJWP.js → chunk-NJPBDYVK.js} +1 -1
  69. package/dist/{chunk-425BZPKK.js → chunk-OFW3JZLL.js} +9 -6
  70. package/dist/{chunk-OKIAF573.js → chunk-OWT4PYRT.js} +1 -1
  71. package/dist/{chunk-6TXHNNKW.js → chunk-PQL52QOQ.js} +4 -4
  72. package/dist/{chunk-LWRPSAVC.js → chunk-RHVX66CW.js} +1 -1
  73. package/dist/{chunk-IIL4NKRU.js → chunk-RXBK4GQX.js} +4 -4
  74. package/dist/{chunk-2VDYFOKB.js → chunk-SQ7ZF5MT.js} +8 -8
  75. package/dist/{chunk-GPPTW3HU.js → chunk-T5H4KNSZ.js} +4 -4
  76. package/dist/{chunk-FMS7CIEK.js → chunk-T7EDIDHA.js} +4 -4
  77. package/dist/{chunk-RPAWPX7B.js → chunk-V5B2CFBF.js} +1 -1
  78. package/dist/{chunk-QXRI6DRE.js → chunk-WPYUTGW5.js} +2331 -1983
  79. package/dist/{chunk-GRX2DION.js → chunk-YMWRR3HT.js} +4 -4
  80. package/dist/{chunk-BAO3PHQP.js → chunk-YYMXQVGL.js} +2 -2
  81. package/dist/{citations-622BWQTR.js → citations-GNB2QFVP.js} +5 -5
  82. package/dist/{cli-catalog-ACK3FVAX.js → cli-catalog-U6DBN4VK.js} +4 -4
  83. package/dist/cli-commands-LQS3WOKR.js +18 -0
  84. package/dist/cli.js +14 -14
  85. package/dist/{competitor-QYZIWXGC.js → competitor-I7Z6SSQP.js} +4 -4
  86. package/dist/{content-PJASAMIV.js → content-QIBZSUA6.js} +4 -4
  87. package/dist/{dashboard-FQOS3J4B.js → dashboard-7FYN233W.js} +7 -7
  88. package/dist/{demo-ZGGVSKN4.js → demo-P2V5SBGO.js} +3 -3
  89. package/dist/{demo-server-TLXLEPOI.js → demo-server-YYKW42LA.js} +13 -13
  90. package/dist/{discover-ZLDSXDRI.js → discover-RBTF62HF.js} +5 -5
  91. package/dist/{discover-eval-7F5Q3RXS.js → discover-eval-NMDHNYFT.js} +4 -4
  92. package/dist/{doctor-3KSQZDZ3.js → doctor-4CJAVMAD.js} +4 -4
  93. package/dist/{evidence-BJZIRJ4U.js → evidence-7Q4ET24V.js} +4 -4
  94. package/dist/{export-cmd-BYPGV4IU.js → export-cmd-CKK77OJI.js} +4 -4
  95. package/dist/{ga-A3BAZCYH.js → ga-EZOQAH3P.js} +4 -4
  96. package/dist/{gbp-U6VCRAFN.js → gbp-UL6TC2FY.js} +4 -4
  97. package/dist/{google-UNQZBUGS.js → google-7BM3AREH.js} +5 -5
  98. package/dist/{google-marketing-QSIRQAVH.js → google-marketing-DM6R3K7R.js} +2 -2
  99. package/dist/{health-cmd-Z5KTTJQU.js → health-cmd-TDD7FB7Z.js} +5 -5
  100. package/dist/{history-IIGUZMOM.js → history-V5CQNF4Z.js} +4 -4
  101. package/dist/index.d.ts +24 -24
  102. package/dist/index.js +26 -26
  103. package/dist/{init-GGKLWNRS.js → init-KLKQCQ54.js} +13 -13
  104. package/dist/{insights-UQ234W6T.js → insights-FRBCFTVP.js} +4 -4
  105. package/dist/intelligence-service-APERYL5N.js +15 -0
  106. package/dist/{journeys-2EZIRL7K.js → journeys-J76FXGLW.js} +4 -4
  107. package/dist/{keys-NIAANGXE.js → keys-LZVHDNZH.js} +4 -4
  108. package/dist/{keyword-LHHNG3GL.js → keyword-FMDPSY7C.js} +4 -4
  109. package/dist/{logs-UFOOIKTC.js → logs-LU33LBEQ.js} +4 -4
  110. package/dist/{mcp-AZYUFL5V.js → mcp-M63QTZK5.js} +5 -5
  111. package/dist/mcp.js +10 -10
  112. package/dist/{measurement-plan-H2HIHJ3D.js → measurement-plan-C6W7PUMR.js} +6 -6
  113. package/dist/{notify-TIE2ZJ26.js → notify-Q54WJSST.js} +4 -4
  114. package/dist/{organic-evidence-BX5MGZTK.js → organic-evidence-EGM6MHVP.js} +4 -4
  115. package/dist/{overview-MGQE43GU.js → overview-EWSJQE2E.js} +7 -7
  116. package/dist/{project-2JL4ZW52.js → project-K7U4L5TA.js} +4 -4
  117. package/dist/{project-setup-CXOVBRLZ.js → project-setup-H6JIED5C.js} +4 -4
  118. package/dist/{query-Q5BF63QF.js → query-NNFM2KSB.js} +4 -4
  119. package/dist/{research-RQBZ57W5.js → research-KHDVC2MP.js} +4 -4
  120. package/dist/{results-export-TVCBJNJN.js → results-export-2HTJWA2Y.js} +4 -4
  121. package/dist/{run-L6WG5WP2.js → run-VWAT66RX.js} +6 -6
  122. package/dist/{schedule-3HQMG3AM.js → schedule-6C26Y5DP.js} +4 -4
  123. package/dist/{search-ZLQE4J66.js → search-DY4JELQM.js} +4 -4
  124. package/dist/{serve-VV4SVEJW.js → serve-W6CTWEDL.js} +36 -27
  125. package/dist/{session-IJLUYO4T.js → session-IX6YUFT4.js} +14 -14
  126. package/dist/{settings-T3U7TQOF.js → settings-IPTMUYPV.js} +4 -4
  127. package/dist/{sitemaps-UZPLGN4W.js → sitemaps-JHAE7447.js} +4 -4
  128. package/dist/{skills-P4WSSFPF.js → skills-C5KQTJZX.js} +3 -3
  129. package/dist/{snapshot-ROJPISJE.js → snapshot-KZDIFYFO.js} +4 -4
  130. package/dist/{src-ZYWTGILQ.js → src-JWSI26BC.js} +2 -2
  131. package/dist/{status-43XNR3NS.js → status-7TFB73LG.js} +6 -6
  132. package/dist/{support-I7E4I3GG.js → support-ZZ2GJP4Z.js} +2 -2
  133. package/dist/{technical-aeo-D4F2R6M3.js → technical-aeo-R6GR6JJB.js} +4 -4
  134. package/dist/{telemetry-5DMVDDZI.js → telemetry-YTUYOO3M.js} +5 -5
  135. package/dist/{tools-M534GJMS.js → tools-6N3Q7TRE.js} +12 -12
  136. package/dist/{traffic-R2UA27AZ.js → traffic-5IN455SY.js} +6 -6
  137. package/dist/{trends-BXOZIWIE.js → trends-MULZJCGC.js} +4 -4
  138. package/dist/{users-X6WJV7VJ.js → users-4R5WLGZA.js} +4 -4
  139. package/dist/{visibility-stats-MCNUXUCL.js → visibility-stats-GFDD6IYA.js} +5 -5
  140. package/dist/{wordpress-AMGUJUZX.js → wordpress-S6NFAXJ6.js} +4 -4
  141. package/package.json +1 -1
  142. package/assets/assets/query-client-BcqjBQN8.js +0 -1
  143. package/dist/activity-2KFFWLYN.js +0 -13
  144. package/dist/cli-commands-IM2ISRXZ.js +0 -18
  145. package/dist/intelligence-service-S3GTOTGQ.js +0 -15
@@ -5,14 +5,14 @@ import {
5
5
  dedupeGscSitemapUrls,
6
6
  resolveDiscoveredGscSitemapUrls,
7
7
  submitGscSitemapBatches
8
- } from "./chunk-ZKIEOEUZ.js";
8
+ } from "./chunk-6S3Z37H7.js";
9
9
  import {
10
10
  measurementDraftOperationSchema,
11
11
  runMeasurementDraftAction
12
- } from "./chunk-OKIAF573.js";
12
+ } from "./chunk-OWT4PYRT.js";
13
13
  import {
14
14
  CliError
15
- } from "./chunk-2T4OGJWP.js";
15
+ } from "./chunk-NJPBDYVK.js";
16
16
  import {
17
17
  AGENT_MEMORY_KEY_MAX_LENGTH,
18
18
  AGENT_MEMORY_VALUE_MAX_BYTES,
@@ -219,7 +219,7 @@ import {
219
219
  trendSurfaceSchema,
220
220
  visibilityCompareSelectionSchema,
221
221
  visibilityReportRequestSchema
222
- } from "./chunk-GKQ4CYUM.js";
222
+ } from "./chunk-MYDVOMA2.js";
223
223
 
224
224
  // src/mcp/tool-registry.ts
225
225
  import { z as z2 } from "zod";
@@ -1776,7 +1776,7 @@ var rawCanonryMcpTools = [
1776
1776
  name: "canonry_query_tracking_preview",
1777
1777
  title: "Preview query assignments",
1778
1778
  description: "Preview manual, template or saved research additions and assignment removals against the exact workspace version. Returns a review token, deduplicated change and next-sweep workload. Does not publish or start provider work. This POST requires write access.",
1779
- access: "write",
1779
+ access: "read",
1780
1780
  tier: "setup",
1781
1781
  inputSchema: z2.object({ project: projectNameSchema, request: queryTrackingPreviewRequestSchema }).strict(),
1782
1782
  annotations: readAnnotations(),
@@ -17,7 +17,7 @@ import {
17
17
  hostOf,
18
18
  isLocationRedirectStatus,
19
19
  pathWithoutQuery
20
- } from "./chunk-GKQ4CYUM.js";
20
+ } from "./chunk-MYDVOMA2.js";
21
21
 
22
22
  // ../integration-traffic/src/agent-trust.ts
23
23
  var AGENT_TRUST_RULES_VERSION = 3;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CitationStates
3
- } from "./chunk-GKQ4CYUM.js";
3
+ } from "./chunk-MYDVOMA2.js";
4
4
 
5
5
  // src/snapshot-cell.ts
6
6
  var SNAPSHOT_CELL_LEGEND = "(cell = [citation][mention]; C=cited c=not \xB7=not measured, M=mentioned m=not, \u2013=no data)";
@@ -5,7 +5,7 @@ import {
5
5
  siteCrawlGraphNodes,
6
6
  siteCrawlPages,
7
7
  siteCrawlSnapshots
8
- } from "./chunk-X6DD3OIR.js";
8
+ } from "./chunk-2QHWROIF.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-GKQ4CYUM.js";
18
+ } from "./chunk-MYDVOMA2.js";
19
19
 
20
20
  // src/site-audit-factors.ts
21
21
  function recordedSharePct(factor) {
@@ -10246,55 +10246,71 @@ var MIN_BRAND_ALIAS_KEY_LENGTH = 3;
10246
10246
  function usableBrandAliases(aliases) {
10247
10247
  return aliases.filter((alias) => brandKeyFromText(alias).length >= MIN_BRAND_ALIAS_KEY_LENGTH);
10248
10248
  }
10249
- function extractAnswerMentions(answerText, brandNames, domains, answerDomains) {
10250
- if (!answerText) return { mentioned: false, matchedTerms: [] };
10251
- const prose = answerProseForMentions(answerText);
10252
- const matchedTerms = [];
10253
- const matchedDomainTerms = /* @__PURE__ */ new Set();
10254
- const extractedAnswerDomains = answerDomains ?? extractDomainsFromText(prose);
10249
+ function compileAnswerMentionMatcher(brandNames, domains) {
10250
+ const normalizedDomains = [];
10255
10251
  for (const domain of domains) {
10256
10252
  const normalizedDomain = hostOf(domain);
10257
10253
  if (!normalizedDomain || !normalizedDomain.includes(".")) continue;
10258
- if (extractedAnswerDomains.some((candidate) => hostMatchesDomain(candidate, normalizedDomain))) {
10259
- matchedTerms.push(normalizedDomain);
10260
- matchedDomainTerms.add(normalizedDomain);
10261
- }
10254
+ normalizedDomains.push({
10255
+ domain: normalizedDomain,
10256
+ lower: normalizedDomain.toLowerCase(),
10257
+ brandKey: brandKeyFromText(brandLabelFromDomain(normalizedDomain))
10258
+ });
10262
10259
  }
10263
10260
  const candidates = [];
10264
10261
  for (const brandName of brandNames) {
10265
10262
  if (!brandName || !brandName.trim()) continue;
10266
10263
  const key = brandKeyFromText(brandName);
10267
- if (key) candidates.push({ term: brandName, key });
10264
+ if (key) candidates.push({ term: brandName, lower: brandName.toLowerCase(), key });
10268
10265
  }
10269
10266
  for (const domain of domains) {
10270
10267
  const brand = brandLabelFromDomain(domain);
10271
10268
  const key = brandKeyFromText(brand);
10272
- if (key.length >= MIN_DOMAIN_BRAND_KEY_LENGTH) candidates.push({ term: brand, key });
10273
- }
10274
- if (candidates.length > 0) {
10275
- const hits = matchedAliasKeys(
10276
- compileBrandAliases(candidates.map((c) => c.term)),
10277
- prose
10278
- );
10279
- for (const candidate of candidates) {
10280
- if (hits.has(candidate.key)) matchedTerms.push(candidate.term);
10269
+ if (key.length >= MIN_DOMAIN_BRAND_KEY_LENGTH) {
10270
+ candidates.push({ term: brand, lower: brand.toLowerCase(), key });
10281
10271
  }
10282
10272
  }
10283
- const seenTerms = /* @__PURE__ */ new Set();
10284
- const unique = matchedTerms.filter((term) => {
10285
- const folded = term.toLowerCase();
10286
- if (seenTerms.has(folded)) return false;
10287
- seenTerms.add(folded);
10288
- return true;
10289
- });
10290
- const domainBrandKeys = new Set(
10291
- [...matchedDomainTerms].map((domain) => brandKeyFromText(brandLabelFromDomain(domain))).filter(Boolean)
10292
- );
10293
- const dedupedFinal = unique.filter((term) => {
10294
- if (matchedDomainTerms.has(term)) return true;
10295
- return !domainBrandKeys.has(brandKeyFromText(term));
10296
- });
10297
- return { mentioned: dedupedFinal.length > 0, matchedTerms: dedupedFinal };
10273
+ const aliasMatcher = candidates.length > 0 ? compileBrandAliases(candidates.map((c) => c.term)) : null;
10274
+ return {
10275
+ match(answerText, answerDomains) {
10276
+ if (!answerText) return { mentioned: false, matchedTerms: [] };
10277
+ const prose = answerProseForMentions(answerText);
10278
+ const extractedAnswerDomains = answerDomains ?? extractDomainsFromText(prose);
10279
+ const matchedDomainTerms = /* @__PURE__ */ new Set();
10280
+ const domainBrandKeys = /* @__PURE__ */ new Set();
10281
+ const seenTerms = /* @__PURE__ */ new Set();
10282
+ const unique = [];
10283
+ for (const entry of normalizedDomains) {
10284
+ if (!extractedAnswerDomains.some((candidate) => hostMatchesDomain(candidate, entry.domain))) continue;
10285
+ matchedDomainTerms.add(entry.domain);
10286
+ if (entry.brandKey) domainBrandKeys.add(entry.brandKey);
10287
+ if (!seenTerms.has(entry.lower)) {
10288
+ seenTerms.add(entry.lower);
10289
+ unique.push({ term: entry.domain, isDomain: true, key: entry.brandKey });
10290
+ }
10291
+ }
10292
+ if (aliasMatcher !== null) {
10293
+ const hits = matchedAliasKeys(aliasMatcher, prose);
10294
+ for (const candidate of candidates) {
10295
+ if (!hits.has(candidate.key)) continue;
10296
+ if (seenTerms.has(candidate.lower)) continue;
10297
+ seenTerms.add(candidate.lower);
10298
+ unique.push({ term: candidate.term, isDomain: false, key: candidate.key });
10299
+ }
10300
+ }
10301
+ const dedupedFinal = [];
10302
+ for (const entry of unique) {
10303
+ if (entry.isDomain || matchedDomainTerms.has(entry.term) || !domainBrandKeys.has(entry.key)) {
10304
+ dedupedFinal.push(entry.term);
10305
+ }
10306
+ }
10307
+ return { mentioned: dedupedFinal.length > 0, matchedTerms: dedupedFinal };
10308
+ }
10309
+ };
10310
+ }
10311
+ function extractAnswerMentions(answerText, brandNames, domains, answerDomains) {
10312
+ if (!answerText) return { mentioned: false, matchedTerms: [] };
10313
+ return compileAnswerMentionMatcher(brandNames, domains).match(answerText, answerDomains);
10298
10314
  }
10299
10315
  function determineAnswerMentioned(answerText, brandNames, domains, answerDomains) {
10300
10316
  return extractAnswerMentions(answerText, brandNames, domains, answerDomains).mentioned;
@@ -14777,6 +14793,13 @@ var READ_SEMANTIC_OPERATIONS = /* @__PURE__ */ new Set([
14777
14793
  "POST /api/v1/projects/{name}/measurement-plan/draft/actions/compile-preview",
14778
14794
  "POST /api/v1/projects/{name}/measurement-plan/draft/actions/diff-preview"
14779
14795
  ]);
14796
+ var READ_ONLY_KEY_REFUSED_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
14797
+ function readOnlyKeyMaySend(operation) {
14798
+ const separator = operation.indexOf(" ");
14799
+ if (separator < 0) return !READ_ONLY_KEY_REFUSED_METHODS.has(operation.toUpperCase());
14800
+ const method = operation.slice(0, separator).toUpperCase();
14801
+ return !READ_ONLY_KEY_REFUSED_METHODS.has(method) || READ_SEMANTIC_OPERATIONS.has(`${method} ${operation.slice(separator + 1)}`);
14802
+ }
14780
14803
  var WRITE_OPERATIONS = /* @__PURE__ */ new Set([
14781
14804
  "GET /api/v1/session",
14782
14805
  "GET /api/v1/auth/session",
@@ -14815,6 +14838,8 @@ var STORED_READ_OPERATIONS = new Set(withLegacyAgentReadinessPaths([
14815
14838
  "GET /api/v1/projects/{name}/agent-readiness/runs/{runId}/page-health-preview",
14816
14839
  "POST /api/v1/projects/{name}/competitor-changes/preview",
14817
14840
  "POST /api/v1/projects/{name}/queries/replace-preview",
14841
+ // Builds the change and a review token from the stored workspace; only the commit writes.
14842
+ "POST /api/v1/projects/{name}/query-tracking/preview",
14818
14843
  "GET /api/v1/projects/{name}/ga/acquisition",
14819
14844
  "GET /api/v1/projects/{name}/traffic/referral-assessment",
14820
14845
  "GET /api/v1/projects/{name}/traffic/samples",
@@ -30259,7 +30284,7 @@ export {
30259
30284
  MIN_DOMAIN_BRAND_KEY_LENGTH,
30260
30285
  MIN_BRAND_ALIAS_KEY_LENGTH,
30261
30286
  usableBrandAliases,
30262
- extractAnswerMentions,
30287
+ compileAnswerMentionMatcher,
30263
30288
  determineAnswerMentioned,
30264
30289
  visibilityStateFromAnswerMentioned,
30265
30290
  mentionStateFromAnswerMentioned,
@@ -30421,6 +30446,7 @@ export {
30421
30446
  OPERATION_ACCESS_HEADER,
30422
30447
  STORED_ONLY_HEADER,
30423
30448
  READ_SEMANTIC_OPERATIONS,
30449
+ readOnlyKeyMaySend,
30424
30450
  operationAccess,
30425
30451
  maxOperationAccess,
30426
30452
  matchOperationTemplate,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CANONRY_COMMUNITY_LINKS
3
- } from "./chunk-GKQ4CYUM.js";
3
+ } from "./chunk-MYDVOMA2.js";
4
4
 
5
5
  // src/cli-error.ts
6
6
  function isMachineFormat(format) {
@@ -7,25 +7,26 @@ import {
7
7
  import {
8
8
  createApiClient,
9
9
  runWithUsageTags
10
- } from "./chunk-XONND7NT.js";
10
+ } from "./chunk-H7UFYW34.js";
11
11
  import {
12
12
  canonryMcpTools,
13
13
  mcpOutputSchema,
14
14
  toolOperationAccess
15
- } from "./chunk-HS2HYFPX.js";
15
+ } from "./chunk-JJQ5USIP.js";
16
16
  import {
17
17
  PACKAGE_VERSION
18
18
  } from "./chunk-AOJU5LKX.js";
19
19
  import {
20
20
  CliError
21
- } from "./chunk-2T4OGJWP.js";
21
+ } from "./chunk-NJPBDYVK.js";
22
22
  import {
23
23
  OperationAccesses,
24
24
  RESEARCH_RUN_SCOPE,
25
25
  isReadOnlyKey,
26
+ readOnlyKeyMaySend,
26
27
  restrictedWriteScopes,
27
28
  upgradeCaveatFor
28
- } from "./chunk-GKQ4CYUM.js";
29
+ } from "./chunk-MYDVOMA2.js";
29
30
 
30
31
  // src/mcp/server.ts
31
32
  import { randomUUID } from "crypto";
@@ -674,10 +675,12 @@ function registerMetaTools(server, catalog, opts) {
674
675
  );
675
676
  }
676
677
  function getCanonryMcpTools(scope = "all", tiers, credentialScopes, operator = false, connectionProfile = false) {
677
- const readOnly = scope === "read-only" || credentialScopes !== void 0 && isReadOnlyKey(credentialScopes);
678
+ const readOnlyCredential = credentialScopes !== void 0 && isReadOnlyKey(credentialScopes);
679
+ const readOnly = scope === "read-only" || readOnlyCredential;
678
680
  const restricted = credentialScopes && restrictedWriteScopes(credentialScopes);
679
681
  const authorized = canonryMcpTools.filter((tool) => (!tool.requiresOperator || operator) && (!tool.requiresConnectionProfile || connectionProfile));
680
- const byScope = scope === "stored-only" ? authorized.filter((tool) => toolOperationAccess(tool) === OperationAccesses.stored) : readOnly ? authorized.filter((tool) => tool.access === "read") : authorized.filter((tool) => {
682
+ const sendable = (tool) => tool.openApiOperations.every(readOnlyKeyMaySend);
683
+ const byScope = scope === "stored-only" ? authorized.filter((tool) => toolOperationAccess(tool) === OperationAccesses.stored && (!readOnlyCredential || sendable(tool))) : readOnly ? authorized.filter((tool) => tool.access === "read" && sendable(tool)) : authorized.filter((tool) => {
681
684
  if (!restricted || tool.access === "read") return true;
682
685
  if (tool.requiredScope && restricted.includes(tool.requiredScope)) return true;
683
686
  return restricted.some((grant) => grant !== RESEARCH_RUN_SCOPE) && tool.tier === "ads";
@@ -23,7 +23,7 @@ import {
23
23
  measurementDraftUpsertGroupRequestSchema,
24
24
  measurementDraftUpsertMarketRequestSchema,
25
25
  measurementDraftUpsertTargetRequestSchema
26
- } from "./chunk-GKQ4CYUM.js";
26
+ } from "./chunk-MYDVOMA2.js";
27
27
 
28
28
  // src/measurement-draft-actions.ts
29
29
  import { z } from "zod";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  registeredProviderNames
3
- } from "./chunk-GCBFSIKI.js";
3
+ } from "./chunk-66ESBZBC.js";
4
4
  import {
5
5
  configExists,
6
6
  loadConfigRaw
7
- } from "./chunk-FMS7CIEK.js";
7
+ } from "./chunk-T7EDIDHA.js";
8
8
 
9
9
  // src/setup-state.ts
10
10
  import fs from "fs";
@@ -28,7 +28,7 @@ async function buildSetupState() {
28
28
  }
29
29
  if (dbPath && fs.existsSync(dbPath)) {
30
30
  try {
31
- const { createClient, projects, queries: queriesTable } = await import("./src-ZYWTGILQ.js");
31
+ const { createClient, projects, queries: queriesTable } = await import("./src-JWSI26BC.js");
32
32
  const db = createClient(dbPath);
33
33
  project_count = db.select({ id: projects.id }).from(projects).all().length;
34
34
  const firstQuery = db.select({ id: queriesTable.id }).from(queriesTable).limit(1).all();
@@ -47,7 +47,7 @@ function queueServeHandoff() {
47
47
  async function runPendingServeHandoff(format) {
48
48
  if (!pendingServeHandoff) return;
49
49
  pendingServeHandoff = false;
50
- const { serveCommand } = await import("./serve-VV4SVEJW.js");
50
+ const { serveCommand } = await import("./serve-W6CTWEDL.js");
51
51
  await serveCommand(format);
52
52
  }
53
53
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  USAGE_TELEMETRY_HEADERS,
3
3
  redactLogString
4
- } from "./chunk-GKQ4CYUM.js";
4
+ } from "./chunk-MYDVOMA2.js";
5
5
 
6
6
  // ../api-routes/src/request-context.ts
7
7
  import { AsyncLocalStorage } from "async_hooks";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-XONND7NT.js";
3
+ } from "./chunk-H7UFYW34.js";
4
4
  import {
5
5
  emitJsonl
6
6
  } from "./chunk-Z7IUAJOF.js";
7
7
  import {
8
8
  measurementDraftOperationSchema,
9
9
  runMeasurementDraftAction
10
- } from "./chunk-OKIAF573.js";
10
+ } from "./chunk-OWT4PYRT.js";
11
11
  import {
12
12
  isMachineFormat,
13
13
  systemError
14
- } from "./chunk-2T4OGJWP.js";
14
+ } from "./chunk-NJPBDYVK.js";
15
15
  import {
16
16
  CITATION_NOT_MEASURED_REASON,
17
17
  MeasurementEvidenceShapes,
@@ -39,7 +39,7 @@ import {
39
39
  unattributedAnswersLabel,
40
40
  uncheckedSourcesLabel,
41
41
  visibilityReportRequestSchema
42
- } from "./chunk-GKQ4CYUM.js";
42
+ } from "./chunk-MYDVOMA2.js";
43
43
 
44
44
  // src/commands/measurement-plan.ts
45
45
  import crypto from "crypto";
@@ -8,24 +8,24 @@ import {
8
8
  reparseStoredResult4,
9
9
  reparseStoredResult5,
10
10
  resolveStoredApiResponse
11
- } from "./chunk-GTX7C5Y5.js";
11
+ } from "./chunk-HD73OWIQ.js";
12
12
  import {
13
13
  loadConfig
14
- } from "./chunk-FMS7CIEK.js";
14
+ } from "./chunk-T7EDIDHA.js";
15
15
  import {
16
16
  CliError,
17
17
  isMachineFormat
18
- } from "./chunk-2T4OGJWP.js";
18
+ } from "./chunk-NJPBDYVK.js";
19
19
  import {
20
20
  determineCitationState
21
- } from "./chunk-RPAWPX7B.js";
21
+ } from "./chunk-V5B2CFBF.js";
22
22
  import {
23
23
  backfillProjectAnswerMentions,
24
24
  competitorIdentityColumns,
25
25
  createRunCompetitorResolver,
26
26
  readMarketCompetitorNames,
27
27
  refreshSnapshotMentionIdentity
28
- } from "./chunk-QXRI6DRE.js";
28
+ } from "./chunk-WPYUTGW5.js";
29
29
  import {
30
30
  RawEventSampleEventTypes,
31
31
  auditLog,
@@ -39,7 +39,7 @@ import {
39
39
  querySnapshots,
40
40
  rawEventSamples,
41
41
  runs
42
- } from "./chunk-X6DD3OIR.js";
42
+ } from "./chunk-2QHWROIF.js";
43
43
  import {
44
44
  ProviderNames,
45
45
  RetrievalContracts,
@@ -52,7 +52,7 @@ import {
52
52
  extractRecommendedCompetitors,
53
53
  normalizeUrlPath,
54
54
  openRouterRouteModel
55
- } from "./chunk-GKQ4CYUM.js";
55
+ } from "./chunk-MYDVOMA2.js";
56
56
 
57
57
  // src/commands/backfill.ts
58
58
  import { setImmediate as yieldToEventLoop } from "timers/promises";
@@ -430,7 +430,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
430
430
  }
431
431
  }
432
432
  async function backfillInsightsCommand(project, opts) {
433
- const { IntelligenceService } = await import("./intelligence-service-S3GTOTGQ.js");
433
+ const { IntelligenceService } = await import("./intelligence-service-APERYL5N.js");
434
434
  const config = loadConfig();
435
435
  const db = createClient(config.database);
436
436
  migrate(db);
@@ -2,13 +2,13 @@ import {
2
2
  bucketCliCommandDuration,
3
3
  isTelemetryEnabled,
4
4
  trackEvent
5
- } from "./chunk-DY2Q3VIM.js";
5
+ } from "./chunk-3HW7EDLQ.js";
6
6
  import {
7
7
  getConfigDir
8
- } from "./chunk-FMS7CIEK.js";
8
+ } from "./chunk-T7EDIDHA.js";
9
9
  import {
10
10
  currentOutcomeAttribution
11
- } from "./chunk-LWRPSAVC.js";
11
+ } from "./chunk-RHVX66CW.js";
12
12
  import {
13
13
  AGENT_NONE,
14
14
  OutcomeSurfaces,
@@ -19,7 +19,7 @@ import {
19
19
  integrationConnectionPropertiesSchema,
20
20
  normalizeAgentSlug,
21
21
  usageSurfaceSchema
22
- } from "./chunk-GKQ4CYUM.js";
22
+ } from "./chunk-MYDVOMA2.js";
23
23
 
24
24
  // src/outcome-telemetry.ts
25
25
  import fs from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CliError
3
- } from "./chunk-2T4OGJWP.js";
3
+ } from "./chunk-NJPBDYVK.js";
4
4
  import {
5
5
  AGENT_PROVIDER_IDS,
6
6
  AgentProviderIds,
@@ -22,7 +22,7 @@ import {
22
22
  resolveProviderModel,
23
23
  schedulableRunKindSchema,
24
24
  sentimentEvaluatorProviderSchema
25
- } from "./chunk-GKQ4CYUM.js";
25
+ } from "./chunk-MYDVOMA2.js";
26
26
 
27
27
  // ../config/src/index.ts
28
28
  import { z as z5 } from "zod";
@@ -1266,7 +1266,7 @@ function writeConfigAtomically(configPath, contents) {
1266
1266
  function saveConfig(config, configPath = getConfigPath()) {
1267
1267
  const configDir = path.dirname(configPath);
1268
1268
  if (!fs.existsSync(configDir)) {
1269
- fs.mkdirSync(configDir, { recursive: true });
1269
+ fs.mkdirSync(configDir, { recursive: true, mode: 448 });
1270
1270
  }
1271
1271
  const onDisk = loadConfigRaw(configPath);
1272
1272
  const merged = onDisk ? { ...onDisk } : {};
@@ -1294,7 +1294,7 @@ function saveConfigPatch(patch, options = {}) {
1294
1294
  const configPath = options.configPath ?? getConfigPath();
1295
1295
  const configDir = path.dirname(configPath);
1296
1296
  if (!fs.existsSync(configDir)) {
1297
- fs.mkdirSync(configDir, { recursive: true });
1297
+ fs.mkdirSync(configDir, { recursive: true, mode: 448 });
1298
1298
  }
1299
1299
  let base = {};
1300
1300
  let baseRead = false;
@@ -2,7 +2,7 @@ import {
2
2
  CitationStates,
3
3
  hostMatchesDomain,
4
4
  isCitationMeasurable
5
- } from "./chunk-GKQ4CYUM.js";
5
+ } from "./chunk-MYDVOMA2.js";
6
6
 
7
7
  // src/citation-utils.ts
8
8
  function pickProjectCitedDomain(citedDomains, projectDomains) {