@canonry/canonry 7.58.4 → 7.59.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 (131) hide show
  1. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +30 -0
  2. package/assets/agent-workspace/skills/canonry/references/server-side-traffic.md +52 -13
  3. package/assets/assets/{AgentSetupPage-CoD9a386.js → AgentSetupPage-DH2Mi2Q7.js} +1 -1
  4. package/assets/assets/{AuditHistoryPanel-DSUKF9GC.js → AuditHistoryPanel-DVIQR5y5.js} +1 -1
  5. package/assets/assets/{BacklinksPage-DIZy0NkW.js → BacklinksPage-DFFeaSbH.js} +1 -1
  6. package/assets/assets/{HistoryPage-B2Xtxu5L.js → HistoryPage-BxDhO9rm.js} +1 -1
  7. package/assets/assets/{MeasurementPropertyPage-BZmvjMiS.js → MeasurementPropertyPage-B0AkDYxY.js} +1 -1
  8. package/assets/assets/{ProjectPage-DMIoYBCF.js → ProjectPage-6_HOcytx.js} +1 -1
  9. package/assets/assets/{RunsPage-DtvesLu2.js → RunsPage-BUK5EqC6.js} +1 -1
  10. package/assets/assets/{SettingsPage-BjE3d5Ae.js → SettingsPage-CuBUZ4TN.js} +1 -1
  11. package/assets/assets/{SiteHealthSection-D6RLbM2o.js → SiteHealthSection-CoyiSleA.js} +2 -2
  12. package/assets/assets/ToneBadge-Du4fOtJa.js +60 -0
  13. package/assets/assets/{TrafficPage-CHZlfMgd.js → TrafficPage-BE9Ay-x-.js} +1 -1
  14. package/assets/assets/{TrafficSourceDetailPage-Dp7AYvRP.js → TrafficSourceDetailPage-kW0DFcwB.js} +1 -1
  15. package/assets/assets/{account-context-DHWaWJSr.js → account-context-IN6VE8PV.js} +1 -1
  16. package/assets/assets/{card-im88-x1b.js → card-DiBSxANp.js} +1 -1
  17. package/assets/assets/{extract-error-message-Bq8oNvfF.js → extract-error-message-_H20efSf.js} +1 -1
  18. package/assets/assets/{format-helpers-DOEct2q8.js → format-helpers-DKjsmbxo.js} +1 -1
  19. package/assets/assets/{index-CgAMnZFS.js → index-B1kVq-wC.js} +4 -4
  20. package/assets/assets/{query-client-BN_-qp71.js → query-client-BXS2w17E.js} +1 -1
  21. package/assets/assets/{react-query-P6OZ-MPl.js → react-query-B8oOFCyW.js} +1 -1
  22. package/assets/assets/{react-sigma_core.esm.min-TGwpCHs4.js → react-sigma_core.esm.min-Bf_kjp11.js} +1 -1
  23. package/assets/assets/{service-CUJkePNp.js → service-D9noo7pB.js} +1 -1
  24. package/assets/index.html +7 -7
  25. package/dist/{ads-BMBXQB67.js → ads-6NAIIZGO.js} +3 -3
  26. package/dist/{agent-S6CU36RL.js → agent-LISFS4WR.js} +7 -7
  27. package/dist/{agent-ask-XG7WQBX6.js → agent-ask-JJM34LMD.js} +3 -3
  28. package/dist/{agent-conversations-C4QBZAPC.js → agent-conversations-4JNBIBVR.js} +3 -3
  29. package/dist/{agent-memory-I7UJ7MKH.js → agent-memory-I2M7TIWO.js} +3 -3
  30. package/dist/{agent-providers-YHRIYJDT.js → agent-providers-3ZX3RETW.js} +3 -3
  31. package/dist/{agent-transcript-2WICUOEW.js → agent-transcript-OYK4O5XV.js} +3 -3
  32. package/dist/{analytics-Y5AGSYWD.js → analytics-7HW2FSST.js} +3 -3
  33. package/dist/{apply-DLVLMU3O.js → apply-S2OC6S65.js} +3 -3
  34. package/dist/{backfill-JAHDHVXJ.js → backfill-EUHHN4VT.js} +9 -9
  35. package/dist/{backlinks-TEZTPNZ5.js → backlinks-AY5EMVN4.js} +3 -3
  36. package/dist/{bing-IIA5HLND.js → bing-KJW2LYAT.js} +3 -3
  37. package/dist/{bootstrap-AKGA3BJI.js → bootstrap-3R4AMSY4.js} +10 -10
  38. package/dist/{cdp-WWOFWFYU.js → cdp-URC66DX5.js} +7 -7
  39. package/dist/{chunk-ZYL3LCDZ.js → chunk-3WRDJJOY.js} +1 -1
  40. package/dist/{chunk-NMLVLFF7.js → chunk-B4N5L6NF.js} +5 -5
  41. package/dist/{chunk-N2HCXIQ3.js → chunk-EED2QEE7.js} +1 -1
  42. package/dist/{chunk-IFVTHGXG.js → chunk-EJZ4TQQR.js} +2 -2
  43. package/dist/{chunk-TVANRUBO.js → chunk-FA7RDZ43.js} +8 -1
  44. package/dist/{chunk-CFGA6OAK.js → chunk-GS6IH7CI.js} +404 -330
  45. package/dist/{chunk-6A6BD5KS.js → chunk-HKLI6ZFP.js} +23 -20
  46. package/dist/{chunk-Y7NX6EIK.js → chunk-HUO3YPKB.js} +2650 -2405
  47. package/dist/{chunk-BP5OKJIC.js → chunk-JLDTGMVQ.js} +2 -2
  48. package/dist/{chunk-3U7LL3JM.js → chunk-KCO3PGDZ.js} +1 -1
  49. package/dist/{chunk-27SGL3DF.js → chunk-KLPRF4PA.js} +1 -1
  50. package/dist/{chunk-QSPLYPVA.js → chunk-LJRXJHWJ.js} +1 -1
  51. package/dist/{chunk-YJPQBJZO.js → chunk-LWKHCQ46.js} +48 -3
  52. package/dist/{chunk-4P7NK7XM.js → chunk-MTKXD4WY.js} +2 -2
  53. package/dist/{chunk-JGRUCEL4.js → chunk-O7BPIPJB.js} +2 -2
  54. package/dist/{chunk-4UGM5YV4.js → chunk-ON7D53WE.js} +3 -3
  55. package/dist/{chunk-2DZYA62C.js → chunk-OTQFHUIH.js} +5 -5
  56. package/dist/{chunk-QFO7JHX2.js → chunk-PDS77GLS.js} +4 -4
  57. package/dist/{chunk-BNGGUL7F.js → chunk-PP7HR4II.js} +4 -4
  58. package/dist/{chunk-RXMGU7AF.js → chunk-PSRJYRAD.js} +8 -8
  59. package/dist/{chunk-F6W7FCS2.js → chunk-PTKFLEVN.js} +26 -2
  60. package/dist/{chunk-52NCZIAC.js → chunk-PZUMERGZ.js} +1 -1
  61. package/dist/{chunk-SCS7R2ND.js → chunk-QF5C3JXL.js} +128 -1
  62. package/dist/{chunk-WLIGKWVB.js → chunk-RFXO5GPB.js} +3 -3
  63. package/dist/{chunk-U65LWABS.js → chunk-SEBIXQEN.js} +7 -3
  64. package/dist/{chunk-G34BVUMF.js → chunk-SXDAIG5W.js} +1 -1
  65. package/dist/{chunk-Q4J3XSWE.js → chunk-TJ4UAO7R.js} +317 -7
  66. package/dist/{chunk-YDSY5YJE.js → chunk-TKX4G4NV.js} +4 -4
  67. package/dist/{chunk-L7TKNHEX.js → chunk-VRI3UDRA.js} +1 -1
  68. package/dist/{chunk-KWXARGCT.js → chunk-VWO4WRQM.js} +3 -3
  69. package/dist/{chunk-NWQQYLZV.js → chunk-WSFCQQ7F.js} +2717 -2111
  70. package/dist/{chunk-6IBLGQVZ.js → chunk-WUVX5HBI.js} +1 -1
  71. package/dist/{chunk-4TM4NXQR.js → chunk-X3UXPAT7.js} +2 -2
  72. package/dist/{chunk-TH3NNUJW.js → chunk-Y54KA37X.js} +5 -1
  73. package/dist/{citations-4LVBHTDX.js → citations-DAXUWNKQ.js} +3 -3
  74. package/dist/{cli-catalog-PJYR3JHX.js → cli-catalog-ORQPYKHI.js} +3 -3
  75. package/dist/{cli-commands-JBLV55EA.js → cli-commands-SDTHXYWU.js} +7 -7
  76. package/dist/cli.js +14 -14
  77. package/dist/{competitor-T7UXAW4F.js → competitor-QPL47DA6.js} +3 -3
  78. package/dist/{content-DFYYGGPI.js → content-V5NLV3AH.js} +3 -3
  79. package/dist/{dashboard-2P3TEH6S.js → dashboard-CZEO2UTG.js} +6 -6
  80. package/dist/{demo-F5TRWB6V.js → demo-JZS5DBSR.js} +1 -1
  81. package/dist/{demo-server-WIVTG6GH.js → demo-server-OAYVJVGC.js} +11 -11
  82. package/dist/{discover-QTC5OBQG.js → discover-TEEHJPLW.js} +3 -3
  83. package/dist/{discover-eval-QQZGUPR6.js → discover-eval-4I25W4VL.js} +3 -3
  84. package/dist/{doctor-VHFDL5MH.js → doctor-VR6YKJSW.js} +3 -3
  85. package/dist/{evidence-4PRFOC2I.js → evidence-SISRJ4YZ.js} +3 -3
  86. package/dist/{export-cmd-BQE7BPKZ.js → export-cmd-L5LKHKBY.js} +3 -3
  87. package/dist/{ga-ULY5XDBK.js → ga-WQQVWU5Q.js} +3 -3
  88. package/dist/{gbp-4WHNZAFY.js → gbp-XKRX7ZJY.js} +3 -3
  89. package/dist/{google-O4IVWLSG.js → google-TUEMVVGE.js} +4 -4
  90. package/dist/{google-marketing-DCQDTDDG.js → google-marketing-JWAJXNWR.js} +1 -1
  91. package/dist/{health-cmd-I2JTACS7.js → health-cmd-2OQEIQMG.js} +3 -3
  92. package/dist/{history-LUPHO3P3.js → history-33VEX442.js} +3 -3
  93. package/dist/index.d.ts +817 -63
  94. package/dist/index.js +24 -24
  95. package/dist/{init-LABWY7HI.js → init-QMLVST26.js} +11 -11
  96. package/dist/{insights-GC2W45U4.js → insights-6VIXDNVK.js} +3 -3
  97. package/dist/intelligence-service-NFBPBKI7.js +15 -0
  98. package/dist/journeys-7YJLJ34F.js +122 -0
  99. package/dist/{keys-DXQBSOBI.js → keys-I7Z5CGEQ.js} +3 -3
  100. package/dist/{keyword-2DCR2QCJ.js → keyword-OPTT3EXO.js} +3 -3
  101. package/dist/{logs-H45QFIEB.js → logs-35L2ZWRO.js} +3 -3
  102. package/dist/{mcp-NXXP6M3C.js → mcp-JWB42VTJ.js} +2 -2
  103. package/dist/mcp.js +9 -9
  104. package/dist/{measurement-plan-IG4JUKKW.js → measurement-plan-UWA2N6FO.js} +5 -5
  105. package/dist/{notify-BLLWXMBB.js → notify-FE7FSXDB.js} +3 -3
  106. package/dist/{organic-evidence-73K7W7SB.js → organic-evidence-34EKPGKI.js} +3 -3
  107. package/dist/{overview-4TAULPUG.js → overview-HPY5I6ZT.js} +4 -4
  108. package/dist/{project-ANX4JTWS.js → project-5CCX7VNR.js} +3 -3
  109. package/dist/{query-U3MFTLGR.js → query-VV4TRRDX.js} +3 -3
  110. package/dist/{research-3YZ6QI67.js → research-62VXIO2O.js} +3 -3
  111. package/dist/{results-export-72OVLKSC.js → results-export-QZQTNXMB.js} +3 -3
  112. package/dist/{run-SI6IL4FC.js → run-MYWJ2MPB.js} +4 -4
  113. package/dist/{schedule-FYEHU2VH.js → schedule-YC76OSAK.js} +3 -3
  114. package/dist/{search-MXDT3DQE.js → search-J2J7BXBL.js} +3 -3
  115. package/dist/{serve-3WJL5N2Z.js → serve-LESJD7GM.js} +56 -27
  116. package/dist/{session-VTFLD3C5.js → session-2MU6LLLC.js} +12 -12
  117. package/dist/{settings-ZGS26QOP.js → settings-QIMV3UYB.js} +3 -3
  118. package/dist/{skills-ZMMCKKSA.js → skills-3HOQ77ON.js} +2 -2
  119. package/dist/{snapshot-5AGGUQKE.js → snapshot-XL3KO4OW.js} +3 -3
  120. package/dist/{src-AIM5FPLZ.js → src-CLICUC3F.js} +8 -2
  121. package/dist/{status-HVQI4E5X.js → status-CKAJEBHG.js} +4 -4
  122. package/dist/{technical-aeo-S4OFCURE.js → technical-aeo-CW7WNDUU.js} +3 -3
  123. package/dist/{telemetry-SPSC5MUN.js → telemetry-GPP5XD7R.js} +4 -4
  124. package/dist/{tools-LRHO7QOT.js → tools-UNFFO5HO.js} +11 -11
  125. package/dist/{traffic-5AXVN37M.js → traffic-LALKHOSD.js} +5 -5
  126. package/dist/{users-WFKSUCGV.js → users-NQG7Y3GC.js} +3 -3
  127. package/dist/{visibility-stats-5S26GC27.js → visibility-stats-RJHXNYBM.js} +3 -3
  128. package/dist/{wordpress-IUPZC7II.js → wordpress-VLHQ6P47.js} +3 -3
  129. package/package.json +1 -1
  130. package/assets/assets/ToneBadge-DYEbxp5S.js +0 -60
  131. package/dist/intelligence-service-4PHEK5F4.js +0 -15
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseJsonColumn
3
- } from "./chunk-SCS7R2ND.js";
3
+ } from "./chunk-QF5C3JXL.js";
4
4
  import {
5
5
  AI_ENGINE_DOMAINS,
6
6
  AI_ENGINE_SELF_DOMAINS,
@@ -26,7 +26,7 @@ import {
26
26
  retryAfterDelayMs,
27
27
  usageCount,
28
28
  withRetry
29
- } from "./chunk-Y7NX6EIK.js";
29
+ } from "./chunk-HUO3YPKB.js";
30
30
 
31
31
  // ../provider-openai/src/normalize.ts
32
32
  import OpenAI from "openai";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  API_PROVIDER_NAMES,
3
3
  ProviderNames
4
- } from "./chunk-Y7NX6EIK.js";
4
+ } from "./chunk-HUO3YPKB.js";
5
5
 
6
6
  // src/provider-registration.ts
7
7
  function isApiProviderRegistrable(name, entry) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  USAGE_TELEMETRY_HEADERS,
3
3
  redactLogString
4
- } from "./chunk-Y7NX6EIK.js";
4
+ } from "./chunk-HUO3YPKB.js";
5
5
 
6
6
  // ../api-routes/src/request-context.ts
7
7
  import { AsyncLocalStorage } from "async_hooks";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-HGMYEDAQ.js";
5
5
  import {
6
6
  describeError
7
- } from "./chunk-Y7NX6EIK.js";
7
+ } from "./chunk-HUO3YPKB.js";
8
8
 
9
9
  // src/gsc-sitemap-submission.ts
10
10
  function dedupeGscSitemapUrls(urls) {
@@ -2,11 +2,11 @@ import {
2
2
  dedupeGscSitemapUrls,
3
3
  resolveDiscoveredGscSitemapUrls,
4
4
  submitGscSitemapBatches
5
- } from "./chunk-QSPLYPVA.js";
5
+ } from "./chunk-LJRXJHWJ.js";
6
6
  import {
7
7
  measurementDraftOperationSchema,
8
8
  runMeasurementDraftAction
9
- } from "./chunk-N2HCXIQ3.js";
9
+ } from "./chunk-EED2QEE7.js";
10
10
  import {
11
11
  CliError
12
12
  } from "./chunk-HGMYEDAQ.js";
@@ -70,6 +70,9 @@ import {
70
70
  gscPerformanceOrderBySchema,
71
71
  insightSeveritySchema,
72
72
  instanceStatusDtoSchema,
73
+ journeyDetailQuerySchema,
74
+ journeySummaryQuerySchema,
75
+ journeysQuerySchema,
73
76
  keywordBatchRequestSchema,
74
77
  keywordGenerateRequestSchema,
75
78
  logQuerySchema,
@@ -170,7 +173,7 @@ import {
170
173
  trafficSeriesGranularitySchema,
171
174
  visibilityCompareSelectionSchema,
172
175
  visibilityReportRequestSchema
173
- } from "./chunk-Y7NX6EIK.js";
176
+ } from "./chunk-HUO3YPKB.js";
174
177
 
175
178
  // src/mcp/tool-registry.ts
176
179
  import { z as z2 } from "zod";
@@ -2821,6 +2824,48 @@ var rawCanonryMcpTools = [
2821
2824
  return client.trafficListSamples(project, query);
2822
2825
  }
2823
2826
  }),
2827
+ defineTool({
2828
+ name: "canonry_journeys_summary",
2829
+ title: "Summarize AI visitor journeys",
2830
+ description: "Stored AI visitor journeys: visitors whose first AI visit started in the window (default 30 days), how many came back in a later visit, by which entry (search, direct, social, paid, referral, ai), median days to return, and counts by engine. Visitors are keyed hashes, never IPs; user-agent-only keys (sources without an IP) can merge people on the same device and browser version. No provider call or write.",
2831
+ access: "read",
2832
+ tier: "traffic",
2833
+ inputSchema: journeySummaryQuerySchema.extend({ project: projectNameSchema }),
2834
+ annotations: readAnnotations(),
2835
+ openApiOperations: ["GET /api/v1/projects/{name}/journeys/summary"],
2836
+ handler: (client, input) => {
2837
+ const { project, ...query } = input;
2838
+ return client.journeysSummary(project, query);
2839
+ }
2840
+ }),
2841
+ defineTool({
2842
+ name: "canonry_journeys_list",
2843
+ title: "List AI visitor journeys",
2844
+ description: "List stored AI visitors, newest first AI visit first, with their first 20 visits (entry class and name, landing path, page count; visitCount is the total). Filter by first AI engine or by whether they came back. Visits are 30-minute sessions; visits within 30 days after an AI visit are kept, 180-day retention. A high cappedDays means a user agent many people share; partialSources names sources whose logs miss later visits. No provider call or write.",
2845
+ access: "read",
2846
+ tier: "traffic",
2847
+ inputSchema: journeysQuerySchema.extend({ project: projectNameSchema }),
2848
+ annotations: readAnnotations(),
2849
+ openApiOperations: ["GET /api/v1/projects/{name}/journeys"],
2850
+ handler: (client, input) => {
2851
+ const { project, ...query } = input;
2852
+ return client.journeysList(project, query);
2853
+ }
2854
+ }),
2855
+ defineTool({
2856
+ name: "canonry_journey_get",
2857
+ title: "Read one AI visitor journey",
2858
+ description: "Read one AI visitor key from canonry_journeys_list: a page of its stored visits in time order (limit 1 to 500, default 100; totalVisits is the total), each with its requests (time, method, path, status, page or data). No provider call or write.",
2859
+ access: "read",
2860
+ tier: "traffic",
2861
+ inputSchema: journeyDetailQuerySchema.extend({ project: projectNameSchema, visitorKey: z2.string().min(1) }),
2862
+ annotations: readAnnotations(),
2863
+ openApiOperations: ["GET /api/v1/projects/{name}/journeys/{visitorKey}"],
2864
+ handler: (client, input) => {
2865
+ const { project, visitorKey, ...query } = input;
2866
+ return client.journeyGet(project, visitorKey, query);
2867
+ }
2868
+ }),
2824
2869
  defineTool({
2825
2870
  name: "canonry_traffic_events",
2826
2871
  title: "List traffic events",
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  trackIntegrationConnection
3
- } from "./chunk-YDSY5YJE.js";
3
+ } from "./chunk-TKX4G4NV.js";
4
4
  import {
5
5
  cliRuntimeContext
6
- } from "./chunk-IFVTHGXG.js";
6
+ } from "./chunk-EJZ4TQQR.js";
7
7
 
8
8
  // src/cli-connection-telemetry.ts
9
9
  function trackCliConnection(properties) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-F6W7FCS2.js";
3
+ } from "./chunk-PTKFLEVN.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-Y7NX6EIK.js";
22
+ } from "./chunk-HUO3YPKB.js";
23
23
 
24
24
  // src/commands/run.ts
25
25
  function getClient() {
@@ -2,18 +2,18 @@ import {
2
2
  configExists,
3
3
  loadConfigRaw,
4
4
  saveConfigPatch
5
- } from "./chunk-TVANRUBO.js";
5
+ } from "./chunk-FA7RDZ43.js";
6
6
  import {
7
7
  BUNDLED_SKILL_NAMES,
8
8
  installSkills
9
- } from "./chunk-G34BVUMF.js";
9
+ } from "./chunk-SXDAIG5W.js";
10
10
  import {
11
11
  PACKAGE_VERSION
12
12
  } from "./chunk-AOJU5LKX.js";
13
13
  import {
14
14
  SKILL_MANIFEST_FILENAME,
15
15
  SkillsClients
16
- } from "./chunk-Y7NX6EIK.js";
16
+ } from "./chunk-HUO3YPKB.js";
17
17
 
18
18
  // src/skills-autosync.ts
19
19
  import fs from "fs";
@@ -5,7 +5,7 @@ import {
5
5
  isStoredPageReadTool,
6
6
  isStoredReadTool,
7
7
  truncateToolResult
8
- } from "./chunk-QFO7JHX2.js";
8
+ } from "./chunk-PDS77GLS.js";
9
9
  import {
10
10
  CANONRY_MCP_TOOLKITS
11
11
  } from "./chunk-NCIPNVD6.js";
@@ -22,15 +22,15 @@ import {
22
22
  resolveApiKeyFor,
23
23
  resolveModelForProvider,
24
24
  validateAgentProviderRegistry
25
- } from "./chunk-TVANRUBO.js";
25
+ } from "./chunk-FA7RDZ43.js";
26
26
  import {
27
27
  CanonryMcpToolNames,
28
28
  canonryMcpTools
29
- } from "./chunk-YJPQBJZO.js";
29
+ } from "./chunk-LWKHCQ46.js";
30
30
  import {
31
31
  agentToolEvents,
32
32
  llmUsageEvents
33
- } from "./chunk-SCS7R2ND.js";
33
+ } from "./chunk-QF5C3JXL.js";
34
34
  import {
35
35
  MeasurementPortfolioLists,
36
36
  agentTurnLimitsSchema,
@@ -38,7 +38,7 @@ import {
38
38
  describeError,
39
39
  validationError,
40
40
  visibilityReportRequestSchema
41
- } from "./chunk-Y7NX6EIK.js";
41
+ } from "./chunk-HUO3YPKB.js";
42
42
 
43
43
  // src/agent/session.ts
44
44
  import fs3 from "fs";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  runWithUsageTags
3
- } from "./chunk-F6W7FCS2.js";
3
+ } from "./chunk-PTKFLEVN.js";
4
4
  import {
5
5
  CanonryMcpToolNames,
6
6
  canonryMcpTools
7
- } from "./chunk-YJPQBJZO.js";
7
+ } from "./chunk-LWKHCQ46.js";
8
8
  import {
9
9
  CliError
10
10
  } from "./chunk-HGMYEDAQ.js";
11
11
  import {
12
12
  buildOpenApiDocument
13
- } from "./chunk-NWQQYLZV.js";
13
+ } from "./chunk-WSFCQQ7F.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-Y7NX6EIK.js";
23
+ } from "./chunk-HUO3YPKB.js";
24
24
 
25
25
  // src/agent/tools.ts
26
26
  import { Type as Type2 } from "@earendil-works/pi-ai";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  registeredProviderNames
3
- } from "./chunk-3U7LL3JM.js";
3
+ } from "./chunk-KCO3PGDZ.js";
4
4
  import {
5
5
  configExists,
6
6
  loadConfigRaw
7
- } from "./chunk-TVANRUBO.js";
7
+ } from "./chunk-FA7RDZ43.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-AIM5FPLZ.js");
31
+ const { createClient, projects, queries: queriesTable } = await import("./src-CLICUC3F.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-3WJL5N2Z.js");
50
+ const { serveCommand } = await import("./serve-LESJD7GM.js");
51
51
  await serveCommand(format);
52
52
  }
53
53
 
@@ -7,27 +7,27 @@ import {
7
7
  reparseStoredResult4,
8
8
  reparseStoredResult5,
9
9
  resolveStoredApiResponse
10
- } from "./chunk-BP5OKJIC.js";
10
+ } from "./chunk-JLDTGMVQ.js";
11
11
  import {
12
12
  loadConfig
13
- } from "./chunk-TVANRUBO.js";
13
+ } from "./chunk-FA7RDZ43.js";
14
14
  import {
15
15
  isMachineFormat
16
16
  } from "./chunk-HGMYEDAQ.js";
17
17
  import {
18
18
  determineCitationState
19
- } from "./chunk-L7TKNHEX.js";
19
+ } from "./chunk-VRI3UDRA.js";
20
20
  import {
21
21
  backfillProjectAnswerMentions,
22
22
  competitorIdentityColumns,
23
23
  createRunCompetitorResolver,
24
24
  readMarketCompetitorNames,
25
25
  refreshSnapshotMentionIdentity
26
- } from "./chunk-NWQQYLZV.js";
26
+ } from "./chunk-WSFCQQ7F.js";
27
27
  import {
28
28
  classifyAiUserFetch,
29
29
  classifyCrawler
30
- } from "./chunk-Q4J3XSWE.js";
30
+ } from "./chunk-TJ4UAO7R.js";
31
31
  import {
32
32
  aiUserFetchEventsHourly,
33
33
  auditLog,
@@ -42,7 +42,7 @@ import {
42
42
  querySnapshots,
43
43
  rawEventSamples,
44
44
  runs
45
- } from "./chunk-SCS7R2ND.js";
45
+ } from "./chunk-QF5C3JXL.js";
46
46
  import {
47
47
  ProviderNames,
48
48
  RetrievalContracts,
@@ -59,7 +59,7 @@ import {
59
59
  extractRecommendedCompetitors,
60
60
  normalizeUrlPath,
61
61
  openRouterRouteModel
62
- } from "./chunk-Y7NX6EIK.js";
62
+ } from "./chunk-HUO3YPKB.js";
63
63
 
64
64
  // src/commands/backfill.ts
65
65
  import { setImmediate as yieldToEventLoop } from "timers/promises";
@@ -437,7 +437,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
437
437
  }
438
438
  }
439
439
  async function backfillInsightsCommand(project, opts) {
440
- const { IntelligenceService } = await import("./intelligence-service-4PHEK5F4.js");
440
+ const { IntelligenceService } = await import("./intelligence-service-NFBPBKI7.js");
441
441
  const config = loadConfig();
442
442
  const db = createClient(config.database);
443
443
  migrate(db);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadConfig
3
- } from "./chunk-TVANRUBO.js";
3
+ } from "./chunk-FA7RDZ43.js";
4
4
  import {
5
5
  PACKAGE_VERSION
6
6
  } from "./chunk-AOJU5LKX.js";
@@ -36,7 +36,7 @@ import {
36
36
  sentimentSettingsReadSchema,
37
37
  sentimentSummaryReadSchema,
38
38
  upgradeCommandFor
39
- } from "./chunk-Y7NX6EIK.js";
39
+ } from "./chunk-HUO3YPKB.js";
40
40
 
41
41
  // ../api-client-generated/src/generated/core/bodySerializer.gen.ts
42
42
  var jsonBodySerializer = {
@@ -3201,6 +3201,21 @@ var getApiV1ProjectsByNameTrafficSamples = (options) => (options.client ?? clien
3201
3201
  url: "/api/v1/projects/{name}/traffic/samples",
3202
3202
  ...options
3203
3203
  });
3204
+ var getApiV1ProjectsByNameJourneysSummary = (options) => (options.client ?? client).get({
3205
+ security: [{ scheme: "bearer", type: "http" }],
3206
+ url: "/api/v1/projects/{name}/journeys/summary",
3207
+ ...options
3208
+ });
3209
+ var getApiV1ProjectsByNameJourneys = (options) => (options.client ?? client).get({
3210
+ security: [{ scheme: "bearer", type: "http" }],
3211
+ url: "/api/v1/projects/{name}/journeys",
3212
+ ...options
3213
+ });
3214
+ var getApiV1ProjectsByNameJourneysByVisitorKey = (options) => (options.client ?? client).get({
3215
+ security: [{ scheme: "bearer", type: "http" }],
3216
+ url: "/api/v1/projects/{name}/journeys/{visitorKey}",
3217
+ ...options
3218
+ });
3204
3219
  var getApiV1ProjectsByNameTrafficEvents = (options) => (options.client ?? client).get({
3205
3220
  security: [{ scheme: "bearer", type: "http" }],
3206
3221
  url: "/api/v1/projects/{name}/traffic/events",
@@ -5965,6 +5980,15 @@ var ApiClient = class {
5965
5980
  async trafficListSamples(project, query) {
5966
5981
  return this.invoke(() => getApiV1ProjectsByNameTrafficSamples({ client: this.heyClient, path: { name: project }, query }));
5967
5982
  }
5983
+ async journeysSummary(project, query) {
5984
+ return this.invoke(() => getApiV1ProjectsByNameJourneysSummary({ client: this.heyClient, path: { name: project }, query }));
5985
+ }
5986
+ async journeysList(project, query) {
5987
+ return this.invoke(() => getApiV1ProjectsByNameJourneys({ client: this.heyClient, path: { name: project }, query }));
5988
+ }
5989
+ async journeyGet(project, visitorKey, query) {
5990
+ return this.invoke(() => getApiV1ProjectsByNameJourneysByVisitorKey({ client: this.heyClient, path: { name: project, visitorKey }, query }));
5991
+ }
5968
5992
  async trafficListEvents(project, params) {
5969
5993
  return this.invoke(
5970
5994
  () => getApiV1ProjectsByNameTrafficEvents({
@@ -28,7 +28,7 @@ import {
28
28
  unknownUsageObservation,
29
29
  usdToMicros,
30
30
  withRetry
31
- } from "./chunk-Y7NX6EIK.js";
31
+ } from "./chunk-HUO3YPKB.js";
32
32
 
33
33
  // ../provider-answer-services/src/core/http.ts
34
34
  var MAX_RESPONSE_BYTES = 8 * 1024 * 1024;
@@ -20,7 +20,7 @@ import {
20
20
  templateLinkRatio,
21
21
  templateLinkUbiquityAvailable,
22
22
  validationError
23
- } from "./chunk-Y7NX6EIK.js";
23
+ } from "./chunk-HUO3YPKB.js";
24
24
  import {
25
25
  __export
26
26
  } from "./chunk-MLKGABMK.js";
@@ -107,6 +107,9 @@ __export(schema_exports, {
107
107
  healthSnapshots: () => healthSnapshots,
108
108
  insightNotifyState: () => insightNotifyState,
109
109
  insights: () => insights,
110
+ journeyEvents: () => journeyEvents,
111
+ journeyVisitors: () => journeyVisitors,
112
+ journeyVisits: () => journeyVisits,
110
113
  llmUsageEvents: () => llmUsageEvents,
111
114
  marketCompetitorNames: () => marketCompetitorNames,
112
115
  measurementDiscoveryConfigs: () => measurementDiscoveryConfigs,
@@ -2555,6 +2558,64 @@ var rawEventSamples = sqliteTable2("raw_event_samples", {
2555
2558
  index2("idx_raw_event_samples_source_ts").on(table.sourceId, table.ts),
2556
2559
  index2("idx_raw_event_samples_event_type").on(table.eventType)
2557
2560
  ]);
2561
+ var journeyVisitors = sqliteTable2("journey_visitors", {
2562
+ projectId: text2("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
2563
+ visitorKey: text2("visitor_key").notNull(),
2564
+ keyBasis: text2("key_basis").notNull(),
2565
+ userAgent: text2("user_agent"),
2566
+ firstAiAt: text2("first_ai_at").notNull(),
2567
+ firstAiEngine: text2("first_ai_engine").notNull(),
2568
+ lastAiAt: text2("last_ai_at").notNull(),
2569
+ lastSeenAt: text2("last_seen_at").notNull(),
2570
+ /** UTC days (YYYY-MM-DD) on which this key reached the per-day request cap. */
2571
+ cappedDays: text2("capped_days", { mode: "json" }).$type().notNull().default([]),
2572
+ createdAt: text2("created_at").notNull(),
2573
+ updatedAt: text2("updated_at").notNull()
2574
+ }, (table) => [
2575
+ primaryKey2({ columns: [table.projectId, table.visitorKey] }),
2576
+ index2("idx_journey_visitors_project_first_ai").on(table.projectId, table.firstAiAt),
2577
+ index2("idx_journey_visitors_last_seen").on(table.lastSeenAt)
2578
+ ]);
2579
+ var journeyVisits = sqliteTable2("journey_visits", {
2580
+ id: text2("id").primaryKey(),
2581
+ projectId: text2("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
2582
+ visitorKey: text2("visitor_key").notNull(),
2583
+ sourceId: text2("source_id").notNull().references(() => trafficSources.id, { onDelete: "cascade" }),
2584
+ startedAt: text2("started_at").notNull(),
2585
+ endedAt: text2("ended_at").notNull(),
2586
+ entryClass: text2("entry_class").notNull(),
2587
+ entryName: text2("entry_name"),
2588
+ entryHost: text2("entry_host"),
2589
+ paid: integer2("paid", { mode: "boolean" }).notNull().default(false),
2590
+ landingPath: text2("landing_path").notNull(),
2591
+ requestCount: integer2("request_count").notNull(),
2592
+ pageCount: integer2("page_count").notNull(),
2593
+ createdAt: text2("created_at").notNull(),
2594
+ updatedAt: text2("updated_at").notNull()
2595
+ }, (table) => [
2596
+ index2("idx_journey_visits_visitor").on(table.projectId, table.visitorKey, table.startedAt),
2597
+ index2("idx_journey_visits_project_started").on(table.projectId, table.startedAt),
2598
+ index2("idx_journey_visits_ended").on(table.endedAt)
2599
+ ]);
2600
+ var journeyEvents = sqliteTable2("journey_events", {
2601
+ id: text2("id").primaryKey(),
2602
+ projectId: text2("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
2603
+ visitId: text2("visit_id").notNull().references(() => journeyVisits.id, { onDelete: "cascade" }),
2604
+ sourceId: text2("source_id").notNull().references(() => trafficSources.id, { onDelete: "cascade" }),
2605
+ sourceEventId: text2("source_event_id").notNull(),
2606
+ ts: text2("ts").notNull(),
2607
+ method: text2("method"),
2608
+ path: text2("path").notNull(),
2609
+ status: integer2("status"),
2610
+ kind: text2("kind").notNull(),
2611
+ /** The request was an AI touch: it starts or renews the visitor's 30-day lookback. */
2612
+ aiTouch: integer2("ai_touch", { mode: "boolean" }).notNull().default(false),
2613
+ createdAt: text2("created_at").notNull()
2614
+ }, (table) => [
2615
+ uniqueIndex2("idx_journey_events_source_event").on(table.projectId, table.sourceId, table.sourceEventId),
2616
+ index2("idx_journey_events_visit_ts").on(table.visitId, table.ts),
2617
+ index2("idx_journey_events_ts").on(table.ts)
2618
+ ]);
2558
2619
  var discoverySessions = sqliteTable2("discovery_sessions", {
2559
2620
  id: text2("id").primaryKey(),
2560
2621
  projectId: text2("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
@@ -8062,6 +8123,69 @@ var MIGRATION_VERSIONS = [
8062
8123
  statements: [
8063
8124
  `CREATE INDEX IF NOT EXISTS idx_seo_jobs_intent ON seo_jobs(project_key,request_hash)`
8064
8125
  ]
8126
+ },
8127
+ {
8128
+ // AI visitor journeys: visitors who arrived from an AI engine, their
8129
+ // visits within 30 days after an AI visit, and those visits'
8130
+ // requests. Visitor keys are keyed hashes; no IP is stored. New tables
8131
+ // only, so every existing row and query is unchanged.
8132
+ version: 192,
8133
+ name: "ai-visitor-journeys",
8134
+ statements: [
8135
+ `CREATE TABLE IF NOT EXISTS journey_visitors (
8136
+ project_id TEXT NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
8137
+ visitor_key TEXT NOT NULL,
8138
+ key_basis TEXT NOT NULL,
8139
+ user_agent TEXT,
8140
+ first_ai_at TEXT NOT NULL,
8141
+ first_ai_engine TEXT NOT NULL,
8142
+ last_ai_at TEXT NOT NULL,
8143
+ last_seen_at TEXT NOT NULL,
8144
+ capped_days TEXT NOT NULL DEFAULT '[]',
8145
+ created_at TEXT NOT NULL,
8146
+ updated_at TEXT NOT NULL,
8147
+ PRIMARY KEY (project_id, visitor_key)
8148
+ )`,
8149
+ `CREATE INDEX IF NOT EXISTS idx_journey_visitors_project_first_ai ON journey_visitors(project_id, first_ai_at)`,
8150
+ `CREATE INDEX IF NOT EXISTS idx_journey_visitors_last_seen ON journey_visitors(last_seen_at)`,
8151
+ `CREATE TABLE IF NOT EXISTS journey_visits (
8152
+ id TEXT PRIMARY KEY,
8153
+ project_id TEXT NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
8154
+ visitor_key TEXT NOT NULL,
8155
+ source_id TEXT NOT NULL REFERENCES traffic_sources(id) ON DELETE CASCADE,
8156
+ started_at TEXT NOT NULL,
8157
+ ended_at TEXT NOT NULL,
8158
+ entry_class TEXT NOT NULL,
8159
+ entry_name TEXT,
8160
+ entry_host TEXT,
8161
+ paid INTEGER NOT NULL DEFAULT 0,
8162
+ landing_path TEXT NOT NULL,
8163
+ request_count INTEGER NOT NULL,
8164
+ page_count INTEGER NOT NULL,
8165
+ created_at TEXT NOT NULL,
8166
+ updated_at TEXT NOT NULL
8167
+ )`,
8168
+ `CREATE INDEX IF NOT EXISTS idx_journey_visits_visitor ON journey_visits(project_id, visitor_key, started_at)`,
8169
+ `CREATE INDEX IF NOT EXISTS idx_journey_visits_project_started ON journey_visits(project_id, started_at)`,
8170
+ `CREATE INDEX IF NOT EXISTS idx_journey_visits_ended ON journey_visits(ended_at)`,
8171
+ `CREATE TABLE IF NOT EXISTS journey_events (
8172
+ id TEXT PRIMARY KEY,
8173
+ project_id TEXT NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
8174
+ visit_id TEXT NOT NULL REFERENCES journey_visits(id) ON DELETE CASCADE,
8175
+ source_id TEXT NOT NULL REFERENCES traffic_sources(id) ON DELETE CASCADE,
8176
+ source_event_id TEXT NOT NULL,
8177
+ ts TEXT NOT NULL,
8178
+ method TEXT,
8179
+ path TEXT NOT NULL,
8180
+ status INTEGER,
8181
+ kind TEXT NOT NULL,
8182
+ ai_touch INTEGER NOT NULL DEFAULT 0,
8183
+ created_at TEXT NOT NULL
8184
+ )`,
8185
+ `CREATE UNIQUE INDEX IF NOT EXISTS idx_journey_events_source_event ON journey_events(project_id, source_id, source_event_id)`,
8186
+ `CREATE INDEX IF NOT EXISTS idx_journey_events_visit_ts ON journey_events(visit_id, ts)`,
8187
+ `CREATE INDEX IF NOT EXISTS idx_journey_events_ts ON journey_events(ts)`
8188
+ ]
8065
8189
  }
8066
8190
  ];
8067
8191
  var AERO_LEDGER_REBUILDS = [
@@ -9528,6 +9652,9 @@ export {
9528
9652
  aiUserFetchVerificationManifestsHourly,
9529
9653
  aiReferralEventsHourly,
9530
9654
  rawEventSamples,
9655
+ journeyVisitors,
9656
+ journeyVisits,
9657
+ journeyEvents,
9531
9658
  discoverySessions,
9532
9659
  researchRuns,
9533
9660
  researchRunQueries,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createApiClient
3
- } from "./chunk-F6W7FCS2.js";
3
+ } from "./chunk-PTKFLEVN.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-N2HCXIQ3.js";
10
+ } from "./chunk-EED2QEE7.js";
11
11
  import {
12
12
  isMachineFormat,
13
13
  systemError
@@ -37,7 +37,7 @@ import {
37
37
  unattributedAnswersLabel,
38
38
  uncheckedSourcesLabel,
39
39
  visibilityReportRequestSchema
40
- } from "./chunk-Y7NX6EIK.js";
40
+ } from "./chunk-HUO3YPKB.js";
41
41
 
42
42
  // src/commands/measurement-plan.ts
43
43
  import crypto from "crypto";
@@ -3,7 +3,7 @@ import {
3
3
  resolveCliAccess,
4
4
  resolveCliAccessForInvocation,
5
5
  windowOptions
6
- } from "./chunk-TH3NNUJW.js";
6
+ } from "./chunk-Y54KA37X.js";
7
7
  import {
8
8
  emitJsonl
9
9
  } from "./chunk-Z7IUAJOF.js";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-HGMYEDAQ.js";
15
15
  import {
16
16
  OperationAccesses
17
- } from "./chunk-Y7NX6EIK.js";
17
+ } from "./chunk-HUO3YPKB.js";
18
18
 
19
19
  // src/cli-catalog.ts
20
20
  import { createRequire } from "module";
@@ -111,7 +111,7 @@ async function dispatchRegisteredCommand(args, fallbackFormat, specs) {
111
111
  const accessValue = accessFilterFromArgs(argsWithoutHelp);
112
112
  validateAccessFilter(accessValue);
113
113
  if (fallbackFormat !== "text") {
114
- const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-PJYR3JHX.js");
114
+ const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-ORQPYKHI.js");
115
115
  const group2 = argsWithoutHelp.find((arg) => !arg.startsWith("--"));
116
116
  printCliCatalog2(specs, fallbackFormat, group2, accessValue);
117
117
  return true;
@@ -330,6 +330,10 @@ var CLI_ROOT_SUMMARIES = {
330
330
  "section": "Integrations",
331
331
  "summary": "Server-side traffic ingestion (Cloud Run)"
332
332
  },
333
+ "journeys": {
334
+ "section": "Integrations",
335
+ "summary": "AI visitor journeys from server-side traffic"
336
+ },
333
337
  "schedule": {
334
338
  "section": "Automation",
335
339
  "summary": "Manage scheduled runs"
@@ -15,7 +15,7 @@ import {
15
15
  formatCanonryPluginUpdateHint,
16
16
  formatCanonryPluginVersionMismatch,
17
17
  skillsClientSchema
18
- } from "./chunk-Y7NX6EIK.js";
18
+ } from "./chunk-HUO3YPKB.js";
19
19
 
20
20
  // src/commands/skills.ts
21
21
  import crypto from "crypto";