@lightsage/mcp 0.4.16 → 0.4.18

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 (403) hide show
  1. package/README.md +2 -2
  2. package/api/mcp.js +30 -0
  3. package/bin/mcp-server.js +2495 -660
  4. package/bin/mcp-server.js.map +103 -55
  5. package/esm/funcs/agentAnalyticsCountriesList.d.ts +16 -0
  6. package/esm/funcs/agentAnalyticsCountriesList.d.ts.map +1 -0
  7. package/esm/funcs/agentAnalyticsCountriesList.js +95 -0
  8. package/esm/funcs/agentAnalyticsCountriesList.js.map +1 -0
  9. package/esm/funcs/agentAnalyticsErrorPagesList.d.ts +16 -0
  10. package/esm/funcs/agentAnalyticsErrorPagesList.d.ts.map +1 -0
  11. package/esm/funcs/agentAnalyticsErrorPagesList.js +97 -0
  12. package/esm/funcs/agentAnalyticsErrorPagesList.js.map +1 -0
  13. package/esm/funcs/agentAnalyticsPagesList.d.ts +16 -0
  14. package/esm/funcs/agentAnalyticsPagesList.d.ts.map +1 -0
  15. package/esm/funcs/agentAnalyticsPagesList.js +99 -0
  16. package/esm/funcs/agentAnalyticsPagesList.js.map +1 -0
  17. package/esm/funcs/agentAnalyticsSitesList.d.ts +15 -0
  18. package/esm/funcs/agentAnalyticsSitesList.d.ts.map +1 -0
  19. package/esm/funcs/agentAnalyticsSitesList.js +72 -0
  20. package/esm/funcs/agentAnalyticsSitesList.js.map +1 -0
  21. package/esm/funcs/agentAnalyticsSourcesList.d.ts +16 -0
  22. package/esm/funcs/agentAnalyticsSourcesList.d.ts.map +1 -0
  23. package/esm/funcs/agentAnalyticsSourcesList.js +94 -0
  24. package/esm/funcs/agentAnalyticsSourcesList.js.map +1 -0
  25. package/esm/funcs/agentAnalyticsSummaryRetrieve.d.ts +16 -0
  26. package/esm/funcs/agentAnalyticsSummaryRetrieve.d.ts.map +1 -0
  27. package/esm/funcs/agentAnalyticsSummaryRetrieve.js +94 -0
  28. package/esm/funcs/agentAnalyticsSummaryRetrieve.js.map +1 -0
  29. package/esm/funcs/agentsList.d.ts +1 -1
  30. package/esm/funcs/agentsList.js +1 -1
  31. package/esm/funcs/evalsCreate.d.ts +2 -0
  32. package/esm/funcs/evalsCreate.d.ts.map +1 -1
  33. package/esm/funcs/evalsCreate.js +2 -0
  34. package/esm/funcs/evalsCreate.js.map +1 -1
  35. package/esm/funcs/evalsRun.d.ts +2 -0
  36. package/esm/funcs/evalsRun.d.ts.map +1 -1
  37. package/esm/funcs/evalsRun.js +2 -0
  38. package/esm/funcs/evalsRun.js.map +1 -1
  39. package/esm/funcs/promptsRun.d.ts +7 -3
  40. package/esm/funcs/promptsRun.d.ts.map +1 -1
  41. package/esm/funcs/promptsRun.js +7 -3
  42. package/esm/funcs/promptsRun.js.map +1 -1
  43. package/esm/funcs/promptsRunCancel.d.ts +16 -0
  44. package/esm/funcs/promptsRunCancel.d.ts.map +1 -0
  45. package/esm/funcs/promptsRunCancel.js +88 -0
  46. package/esm/funcs/promptsRunCancel.js.map +1 -0
  47. package/esm/funcs/tasksCreate.d.ts +16 -0
  48. package/esm/funcs/tasksCreate.d.ts.map +1 -0
  49. package/esm/funcs/tasksCreate.js +83 -0
  50. package/esm/funcs/tasksCreate.js.map +1 -0
  51. package/esm/funcs/visibilityCitationsList.d.ts +1 -1
  52. package/esm/funcs/visibilityCitationsList.js +2 -1
  53. package/esm/funcs/visibilityCitationsList.js.map +1 -1
  54. package/esm/funcs/visibilityCitationsSummaryRetrieve.d.ts +16 -0
  55. package/esm/funcs/visibilityCitationsSummaryRetrieve.d.ts.map +1 -0
  56. package/esm/funcs/visibilityCitationsSummaryRetrieve.js +93 -0
  57. package/esm/funcs/visibilityCitationsSummaryRetrieve.js.map +1 -0
  58. package/esm/funcs/visibilityCurrentRetrieve.d.ts +1 -1
  59. package/esm/funcs/visibilityCurrentRetrieve.js +2 -1
  60. package/esm/funcs/visibilityCurrentRetrieve.js.map +1 -1
  61. package/esm/funcs/visibilityOverviewRetrieve.d.ts +1 -1
  62. package/esm/funcs/visibilityOverviewRetrieve.js +2 -1
  63. package/esm/funcs/visibilityOverviewRetrieve.js.map +1 -1
  64. package/esm/funcs/visibilityPromptsRetrieve.js +1 -0
  65. package/esm/funcs/visibilityPromptsRetrieve.js.map +1 -1
  66. package/esm/landing-page.js +1 -1
  67. package/esm/lib/config.d.ts +2 -2
  68. package/esm/lib/config.js +2 -2
  69. package/esm/mcp-server/mcp-server.js +1 -1
  70. package/esm/mcp-server/server.d.ts.map +1 -1
  71. package/esm/mcp-server/server.js +19 -1
  72. package/esm/mcp-server/server.js.map +1 -1
  73. package/esm/mcp-server/tools/agentAnalyticsCountriesList.d.ts +7 -0
  74. package/esm/mcp-server/tools/agentAnalyticsCountriesList.d.ts.map +1 -0
  75. package/esm/mcp-server/tools/agentAnalyticsCountriesList.js +35 -0
  76. package/esm/mcp-server/tools/agentAnalyticsCountriesList.js.map +1 -0
  77. package/esm/mcp-server/tools/agentAnalyticsErrorPagesList.d.ts +7 -0
  78. package/esm/mcp-server/tools/agentAnalyticsErrorPagesList.d.ts.map +1 -0
  79. package/esm/mcp-server/tools/agentAnalyticsErrorPagesList.js +35 -0
  80. package/esm/mcp-server/tools/agentAnalyticsErrorPagesList.js.map +1 -0
  81. package/esm/mcp-server/tools/agentAnalyticsPagesList.d.ts +7 -0
  82. package/esm/mcp-server/tools/agentAnalyticsPagesList.d.ts.map +1 -0
  83. package/esm/mcp-server/tools/agentAnalyticsPagesList.js +35 -0
  84. package/esm/mcp-server/tools/agentAnalyticsPagesList.js.map +1 -0
  85. package/esm/mcp-server/tools/agentAnalyticsSitesList.d.ts +3 -0
  86. package/esm/mcp-server/tools/agentAnalyticsSitesList.d.ts.map +1 -0
  87. package/esm/mcp-server/tools/agentAnalyticsSitesList.js +30 -0
  88. package/esm/mcp-server/tools/agentAnalyticsSitesList.js.map +1 -0
  89. package/esm/mcp-server/tools/agentAnalyticsSourcesList.d.ts +7 -0
  90. package/esm/mcp-server/tools/agentAnalyticsSourcesList.d.ts.map +1 -0
  91. package/esm/mcp-server/tools/agentAnalyticsSourcesList.js +35 -0
  92. package/esm/mcp-server/tools/agentAnalyticsSourcesList.js.map +1 -0
  93. package/esm/mcp-server/tools/agentAnalyticsSummaryRetrieve.d.ts +7 -0
  94. package/esm/mcp-server/tools/agentAnalyticsSummaryRetrieve.d.ts.map +1 -0
  95. package/esm/mcp-server/tools/agentAnalyticsSummaryRetrieve.js +35 -0
  96. package/esm/mcp-server/tools/agentAnalyticsSummaryRetrieve.js.map +1 -0
  97. package/esm/mcp-server/tools/agentsList.js +1 -1
  98. package/esm/mcp-server/tools/agentsList.js.map +1 -1
  99. package/esm/mcp-server/tools/evalsCreate.d.ts.map +1 -1
  100. package/esm/mcp-server/tools/evalsCreate.js +3 -1
  101. package/esm/mcp-server/tools/evalsCreate.js.map +1 -1
  102. package/esm/mcp-server/tools/evalsRun.d.ts.map +1 -1
  103. package/esm/mcp-server/tools/evalsRun.js +2 -0
  104. package/esm/mcp-server/tools/evalsRun.js.map +1 -1
  105. package/esm/mcp-server/tools/promptsRun.d.ts.map +1 -1
  106. package/esm/mcp-server/tools/promptsRun.js +7 -3
  107. package/esm/mcp-server/tools/promptsRun.js.map +1 -1
  108. package/esm/mcp-server/tools/promptsRunCancel.d.ts +7 -0
  109. package/esm/mcp-server/tools/promptsRunCancel.d.ts.map +1 -0
  110. package/esm/mcp-server/tools/promptsRunCancel.js +35 -0
  111. package/esm/mcp-server/tools/promptsRunCancel.js.map +1 -0
  112. package/esm/mcp-server/tools/tasksCreate.d.ts +7 -0
  113. package/esm/mcp-server/tools/tasksCreate.d.ts.map +1 -0
  114. package/esm/mcp-server/tools/tasksCreate.js +35 -0
  115. package/esm/mcp-server/tools/tasksCreate.js.map +1 -0
  116. package/esm/mcp-server/tools/visibilityCitationsList.js +1 -1
  117. package/esm/mcp-server/tools/visibilityCitationsList.js.map +1 -1
  118. package/esm/mcp-server/tools/visibilityCitationsSummaryRetrieve.d.ts +7 -0
  119. package/esm/mcp-server/tools/visibilityCitationsSummaryRetrieve.d.ts.map +1 -0
  120. package/esm/mcp-server/tools/visibilityCitationsSummaryRetrieve.js +35 -0
  121. package/esm/mcp-server/tools/visibilityCitationsSummaryRetrieve.js.map +1 -0
  122. package/esm/mcp-server/tools/visibilityCurrentRetrieve.js +1 -1
  123. package/esm/mcp-server/tools/visibilityCurrentRetrieve.js.map +1 -1
  124. package/esm/mcp-server/tools/visibilityOverviewRetrieve.js +1 -1
  125. package/esm/mcp-server/tools/visibilityOverviewRetrieve.js.map +1 -1
  126. package/esm/models/createtaskrequest.d.ts +65 -0
  127. package/esm/models/createtaskrequest.d.ts.map +1 -0
  128. package/esm/models/createtaskrequest.js +64 -0
  129. package/esm/models/createtaskrequest.js.map +1 -0
  130. package/esm/models/createv2promptrequest.js +1 -1
  131. package/esm/models/createv2promptrequest.js.map +1 -1
  132. package/esm/models/createv2promptrunrequest.d.ts +1 -0
  133. package/esm/models/createv2promptrunrequest.d.ts.map +1 -1
  134. package/esm/models/createv2promptrunrequest.js +2 -1
  135. package/esm/models/createv2promptrunrequest.js.map +1 -1
  136. package/esm/models/graderdefinition.d.ts +1 -0
  137. package/esm/models/graderdefinition.d.ts.map +1 -1
  138. package/esm/models/graderdefinition.js +1 -0
  139. package/esm/models/graderdefinition.js.map +1 -1
  140. package/esm/models/publicagentanalyticscountrylistresponse.d.ts +12 -0
  141. package/esm/models/publicagentanalyticscountrylistresponse.d.ts.map +1 -0
  142. package/esm/models/publicagentanalyticscountrylistresponse.js +15 -0
  143. package/esm/models/publicagentanalyticscountrylistresponse.js.map +1 -0
  144. package/esm/models/publicagentanalyticserrorpagelistresponse.d.ts +13 -0
  145. package/esm/models/publicagentanalyticserrorpagelistresponse.d.ts.map +1 -0
  146. package/esm/models/publicagentanalyticserrorpagelistresponse.js +16 -0
  147. package/esm/models/publicagentanalyticserrorpagelistresponse.js.map +1 -0
  148. package/esm/models/publicagentanalyticspagelistresponse.d.ts +13 -0
  149. package/esm/models/publicagentanalyticspagelistresponse.d.ts.map +1 -0
  150. package/esm/models/publicagentanalyticspagelistresponse.js +16 -0
  151. package/esm/models/publicagentanalyticspagelistresponse.js.map +1 -0
  152. package/esm/models/publicagentanalyticssite.d.ts +9 -0
  153. package/esm/models/publicagentanalyticssite.d.ts.map +1 -0
  154. package/esm/models/publicagentanalyticssite.js +12 -0
  155. package/esm/models/publicagentanalyticssite.js.map +1 -0
  156. package/esm/models/publicagentanalyticssitelistresponse.d.ts +7 -0
  157. package/esm/models/publicagentanalyticssitelistresponse.d.ts.map +1 -0
  158. package/esm/models/publicagentanalyticssitelistresponse.js +10 -0
  159. package/esm/models/publicagentanalyticssitelistresponse.js.map +1 -0
  160. package/esm/models/publicagentanalyticssourcelistresponse.d.ts +12 -0
  161. package/esm/models/publicagentanalyticssourcelistresponse.d.ts.map +1 -0
  162. package/esm/models/publicagentanalyticssourcelistresponse.js +15 -0
  163. package/esm/models/publicagentanalyticssourcelistresponse.js.map +1 -0
  164. package/esm/models/publicagentanalyticssummary.d.ts +13 -0
  165. package/esm/models/publicagentanalyticssummary.d.ts.map +1 -0
  166. package/esm/models/publicagentanalyticssummary.js +16 -0
  167. package/esm/models/publicagentanalyticssummary.js.map +1 -0
  168. package/esm/models/publicagentcountry.d.ts +7 -0
  169. package/esm/models/publicagentcountry.d.ts.map +1 -0
  170. package/esm/models/publicagentcountry.js +11 -0
  171. package/esm/models/publicagentcountry.js.map +1 -0
  172. package/esm/models/publicagenterrorpage.d.ts +12 -0
  173. package/esm/models/publicagenterrorpage.d.ts.map +1 -0
  174. package/esm/models/publicagenterrorpage.js +16 -0
  175. package/esm/models/publicagenterrorpage.js.map +1 -0
  176. package/esm/models/publicagenterrorsource.d.ts +40 -0
  177. package/esm/models/publicagenterrorsource.d.ts.map +1 -0
  178. package/esm/models/publicagenterrorsource.js +40 -0
  179. package/esm/models/publicagenterrorsource.js.map +1 -0
  180. package/esm/models/publicagenttrafficpage.d.ts +14 -0
  181. package/esm/models/publicagenttrafficpage.d.ts.map +1 -0
  182. package/esm/models/publicagenttrafficpage.js +17 -0
  183. package/esm/models/publicagenttrafficpage.js.map +1 -0
  184. package/esm/models/publicagenttrafficsource.d.ts +47 -0
  185. package/esm/models/publicagenttrafficsource.d.ts.map +1 -0
  186. package/esm/models/publicagenttrafficsource.js +44 -0
  187. package/esm/models/publicagenttrafficsource.js.map +1 -0
  188. package/esm/models/publicagenttraffictotals.d.ts +13 -0
  189. package/esm/models/publicagenttraffictotals.d.ts.map +1 -0
  190. package/esm/models/publicagenttraffictotals.js +16 -0
  191. package/esm/models/publicagenttraffictotals.js.map +1 -0
  192. package/esm/models/publiccitationsummarygroup.d.ts +17 -0
  193. package/esm/models/publiccitationsummarygroup.d.ts.map +1 -0
  194. package/esm/models/publiccitationsummarygroup.js +20 -0
  195. package/esm/models/publiccitationsummarygroup.js.map +1 -0
  196. package/esm/models/publiccitationsummaryresponse.d.ts +61 -0
  197. package/esm/models/publiccitationsummaryresponse.d.ts.map +1 -0
  198. package/esm/models/publiccitationsummaryresponse.js +58 -0
  199. package/esm/models/publiccitationsummaryresponse.js.map +1 -0
  200. package/esm/models/publiccitationsummarytotals.d.ts +14 -0
  201. package/esm/models/publiccitationsummarytotals.d.ts.map +1 -0
  202. package/esm/models/publiccitationsummarytotals.js +17 -0
  203. package/esm/models/publiccitationsummarytotals.js.map +1 -0
  204. package/esm/models/publiccoverage.d.ts +12 -0
  205. package/esm/models/publiccoverage.d.ts.map +1 -0
  206. package/esm/models/publiccoverage.js +15 -0
  207. package/esm/models/publiccoverage.js.map +1 -0
  208. package/esm/models/publiccoverageday.d.ts +41 -0
  209. package/esm/models/publiccoverageday.d.ts.map +1 -0
  210. package/esm/models/publiccoverageday.js +39 -0
  211. package/esm/models/publiccoverageday.js.map +1 -0
  212. package/esm/models/publiccurrentvisibilityresponse.d.ts +8 -0
  213. package/esm/models/publiccurrentvisibilityresponse.d.ts.map +1 -1
  214. package/esm/models/publiccurrentvisibilityresponse.js +8 -0
  215. package/esm/models/publiccurrentvisibilityresponse.js.map +1 -1
  216. package/esm/models/publicperiodcoverage.d.ts +13 -0
  217. package/esm/models/publicperiodcoverage.d.ts.map +1 -0
  218. package/esm/models/publicperiodcoverage.js +17 -0
  219. package/esm/models/publicperiodcoverage.js.map +1 -0
  220. package/esm/models/publicperiodrates.d.ts +10 -0
  221. package/esm/models/publicperiodrates.d.ts.map +1 -0
  222. package/esm/models/publicperiodrates.js +14 -0
  223. package/esm/models/publicperiodrates.js.map +1 -0
  224. package/esm/models/publicpreviousvisibility.d.ts +10 -0
  225. package/esm/models/publicpreviousvisibility.d.ts.map +1 -0
  226. package/esm/models/publicpreviousvisibility.js +13 -0
  227. package/esm/models/publicpreviousvisibility.js.map +1 -0
  228. package/esm/models/publicpromptvisibilityreportresponse.d.ts +6 -0
  229. package/esm/models/publicpromptvisibilityreportresponse.d.ts.map +1 -1
  230. package/esm/models/publicpromptvisibilityreportresponse.js +6 -0
  231. package/esm/models/publicpromptvisibilityreportresponse.js.map +1 -1
  232. package/esm/models/publicratechanges.d.ts +8 -0
  233. package/esm/models/publicratechanges.d.ts.map +1 -0
  234. package/esm/models/publicratechanges.js +12 -0
  235. package/esm/models/publicratechanges.js.map +1 -0
  236. package/esm/models/publicrates.d.ts +27 -0
  237. package/esm/models/publicrates.d.ts.map +1 -0
  238. package/esm/models/publicrates.js +25 -0
  239. package/esm/models/publicrates.js.map +1 -0
  240. package/esm/models/publicresolvedperiod.d.ts +14 -0
  241. package/esm/models/publicresolvedperiod.d.ts.map +1 -0
  242. package/esm/models/publicresolvedperiod.js +18 -0
  243. package/esm/models/publicresolvedperiod.js.map +1 -0
  244. package/esm/models/publictopcitedurlsresponse.d.ts +10 -4
  245. package/esm/models/publictopcitedurlsresponse.d.ts.map +1 -1
  246. package/esm/models/publictopcitedurlsresponse.js +9 -3
  247. package/esm/models/publictopcitedurlsresponse.js.map +1 -1
  248. package/esm/models/publicvisibilityoverviewresponse.d.ts +6 -0
  249. package/esm/models/publicvisibilityoverviewresponse.d.ts.map +1 -1
  250. package/esm/models/publicvisibilityoverviewresponse.js +6 -0
  251. package/esm/models/publicvisibilityoverviewresponse.js.map +1 -1
  252. package/esm/models/updatetaskrequest.d.ts +8 -8
  253. package/esm/models/updatetaskrequest.d.ts.map +1 -1
  254. package/esm/models/updatetaskrequest.js +6 -6
  255. package/esm/models/updatetaskrequest.js.map +1 -1
  256. package/esm/models/updatev2promptrequest.js +1 -1
  257. package/esm/models/updatev2promptrequest.js.map +1 -1
  258. package/esm/models/v2agentanalyticscountrieslistop.d.ts +14 -0
  259. package/esm/models/v2agentanalyticscountrieslistop.d.ts.map +1 -0
  260. package/esm/models/v2agentanalyticscountrieslistop.js +19 -0
  261. package/esm/models/v2agentanalyticscountrieslistop.js.map +1 -0
  262. package/esm/models/v2agentanalyticserrorpageslistop.d.ts +40 -0
  263. package/esm/models/v2agentanalyticserrorpageslistop.d.ts.map +1 -0
  264. package/esm/models/v2agentanalyticserrorpageslistop.js +40 -0
  265. package/esm/models/v2agentanalyticserrorpageslistop.js.map +1 -0
  266. package/esm/models/v2agentanalyticspageslistop.d.ts +69 -0
  267. package/esm/models/v2agentanalyticspageslistop.d.ts.map +1 -0
  268. package/esm/models/v2agentanalyticspageslistop.js +66 -0
  269. package/esm/models/v2agentanalyticspageslistop.js.map +1 -0
  270. package/esm/models/v2agentanalyticssourceslistop.d.ts +13 -0
  271. package/esm/models/v2agentanalyticssourceslistop.d.ts.map +1 -0
  272. package/esm/models/v2agentanalyticssourceslistop.js +18 -0
  273. package/esm/models/v2agentanalyticssourceslistop.js.map +1 -0
  274. package/esm/models/v2agentanalyticssummaryretrieveop.d.ts +13 -0
  275. package/esm/models/v2agentanalyticssummaryretrieveop.d.ts.map +1 -0
  276. package/esm/models/v2agentanalyticssummaryretrieveop.js +18 -0
  277. package/esm/models/v2agentanalyticssummaryretrieveop.js.map +1 -0
  278. package/esm/models/v2inlinemcpdefinition.js +1 -1
  279. package/esm/models/v2inlinemcpdefinition.js.map +1 -1
  280. package/esm/models/v2promptrunscancelop.d.ts +38 -0
  281. package/esm/models/v2promptrunscancelop.d.ts.map +1 -0
  282. package/esm/models/v2promptrunscancelop.js +31 -0
  283. package/esm/models/v2promptrunscancelop.js.map +1 -0
  284. package/esm/models/v2repository.d.ts +4 -4
  285. package/esm/models/v2repository.d.ts.map +1 -1
  286. package/esm/models/v2repository.js +3 -3
  287. package/esm/models/v2repository.js.map +1 -1
  288. package/esm/models/v2taskscreateop.d.ts +13 -0
  289. package/esm/models/v2taskscreateop.d.ts.map +1 -0
  290. package/esm/models/v2taskscreateop.js +16 -0
  291. package/esm/models/v2taskscreateop.js.map +1 -0
  292. package/esm/models/v2visibilitycitationslistop.d.ts +1 -0
  293. package/esm/models/v2visibilitycitationslistop.d.ts.map +1 -1
  294. package/esm/models/v2visibilitycitationslistop.js +1 -0
  295. package/esm/models/v2visibilitycitationslistop.js.map +1 -1
  296. package/esm/models/v2visibilitycitationssummaryretrieveop.d.ts +54 -0
  297. package/esm/models/v2visibilitycitationssummaryretrieveop.d.ts.map +1 -0
  298. package/esm/models/v2visibilitycitationssummaryretrieveop.js +51 -0
  299. package/esm/models/v2visibilitycitationssummaryretrieveop.js.map +1 -0
  300. package/esm/models/v2visibilitycurrentretrieveop.d.ts +1 -0
  301. package/esm/models/v2visibilitycurrentretrieveop.d.ts.map +1 -1
  302. package/esm/models/v2visibilitycurrentretrieveop.js +1 -0
  303. package/esm/models/v2visibilitycurrentretrieveop.js.map +1 -1
  304. package/esm/models/v2visibilityoverviewretrieveop.d.ts +1 -0
  305. package/esm/models/v2visibilityoverviewretrieveop.d.ts.map +1 -1
  306. package/esm/models/v2visibilityoverviewretrieveop.js +1 -0
  307. package/esm/models/v2visibilityoverviewretrieveop.js.map +1 -1
  308. package/esm/models/v2visibilitypromptsretrieveop.d.ts +1 -0
  309. package/esm/models/v2visibilitypromptsretrieveop.d.ts.map +1 -1
  310. package/esm/models/v2visibilitypromptsretrieveop.js +1 -0
  311. package/esm/models/v2visibilitypromptsretrieveop.js.map +1 -1
  312. package/esm/tool-names.d.ts.map +1 -1
  313. package/esm/tool-names.js +43 -7
  314. package/esm/tool-names.js.map +1 -1
  315. package/lib/tracker.js +219 -0
  316. package/package.json +3 -1
  317. package/src/funcs/agentAnalyticsCountriesList.ts +160 -0
  318. package/src/funcs/agentAnalyticsErrorPagesList.ts +162 -0
  319. package/src/funcs/agentAnalyticsPagesList.ts +164 -0
  320. package/src/funcs/agentAnalyticsSitesList.ts +124 -0
  321. package/src/funcs/agentAnalyticsSourcesList.ts +159 -0
  322. package/src/funcs/agentAnalyticsSummaryRetrieve.ts +159 -0
  323. package/src/funcs/agentsList.ts +1 -1
  324. package/src/funcs/evalsCreate.ts +2 -0
  325. package/src/funcs/evalsRun.ts +2 -0
  326. package/src/funcs/promptsRun.ts +7 -3
  327. package/src/funcs/promptsRunCancel.ts +153 -0
  328. package/src/funcs/tasksCreate.ts +145 -0
  329. package/src/funcs/visibilityCitationsList.ts +2 -1
  330. package/src/funcs/visibilityCitationsSummaryRetrieve.ts +158 -0
  331. package/src/funcs/visibilityCurrentRetrieve.ts +2 -1
  332. package/src/funcs/visibilityOverviewRetrieve.ts +2 -1
  333. package/src/funcs/visibilityPromptsRetrieve.ts +1 -0
  334. package/src/landing-page.ts +1 -1
  335. package/src/lib/config.ts +2 -2
  336. package/src/mcp-server/mcp-server.ts +1 -1
  337. package/src/mcp-server/server.ts +19 -1
  338. package/src/mcp-server/tools/agentAnalyticsCountriesList.ts +43 -0
  339. package/src/mcp-server/tools/agentAnalyticsErrorPagesList.ts +43 -0
  340. package/src/mcp-server/tools/agentAnalyticsPagesList.ts +43 -0
  341. package/src/mcp-server/tools/agentAnalyticsSitesList.ts +36 -0
  342. package/src/mcp-server/tools/agentAnalyticsSourcesList.ts +43 -0
  343. package/src/mcp-server/tools/agentAnalyticsSummaryRetrieve.ts +43 -0
  344. package/src/mcp-server/tools/agentsList.ts +1 -1
  345. package/src/mcp-server/tools/evalsCreate.ts +3 -1
  346. package/src/mcp-server/tools/evalsRun.ts +2 -0
  347. package/src/mcp-server/tools/promptsRun.ts +7 -3
  348. package/src/mcp-server/tools/promptsRunCancel.ts +43 -0
  349. package/src/mcp-server/tools/tasksCreate.ts +43 -0
  350. package/src/mcp-server/tools/visibilityCitationsList.ts +1 -1
  351. package/src/mcp-server/tools/visibilityCitationsSummaryRetrieve.ts +45 -0
  352. package/src/mcp-server/tools/visibilityCurrentRetrieve.ts +1 -1
  353. package/src/mcp-server/tools/visibilityOverviewRetrieve.ts +1 -1
  354. package/src/models/createtaskrequest.ts +98 -0
  355. package/src/models/createv2promptrequest.ts +1 -1
  356. package/src/models/createv2promptrunrequest.ts +5 -1
  357. package/src/models/graderdefinition.ts +2 -0
  358. package/src/models/publicagentanalyticscountrylistresponse.ts +36 -0
  359. package/src/models/publicagentanalyticserrorpagelistresponse.ts +40 -0
  360. package/src/models/publicagentanalyticspagelistresponse.ts +38 -0
  361. package/src/models/publicagentanalyticssite.ts +26 -0
  362. package/src/models/publicagentanalyticssitelistresponse.ts +20 -0
  363. package/src/models/publicagentanalyticssourcelistresponse.ts +36 -0
  364. package/src/models/publicagentanalyticssummary.ts +36 -0
  365. package/src/models/publicagentcountry.ts +16 -0
  366. package/src/models/publicagenterrorpage.ts +35 -0
  367. package/src/models/publicagenterrorsource.ts +63 -0
  368. package/src/models/publicagenttrafficpage.ts +46 -0
  369. package/src/models/publicagenttrafficsource.ts +77 -0
  370. package/src/models/publicagenttraffictotals.ts +42 -0
  371. package/src/models/publiccitationsummarygroup.ts +54 -0
  372. package/src/models/publiccitationsummaryresponse.ts +110 -0
  373. package/src/models/publiccitationsummarytotals.ts +38 -0
  374. package/src/models/publiccoverage.ts +34 -0
  375. package/src/models/publiccoverageday.ts +68 -0
  376. package/src/models/publiccurrentvisibilityresponse.ts +26 -0
  377. package/src/models/publicperiodcoverage.ts +33 -0
  378. package/src/models/publicperiodrates.ts +29 -0
  379. package/src/models/publicpreviousvisibility.ts +30 -0
  380. package/src/models/publicpromptvisibilityreportresponse.ts +18 -0
  381. package/src/models/publicratechanges.ts +25 -0
  382. package/src/models/publicrates.ts +52 -0
  383. package/src/models/publicresolvedperiod.ts +41 -0
  384. package/src/models/publictopcitedurlsresponse.ts +25 -5
  385. package/src/models/publicvisibilityoverviewresponse.ts +18 -0
  386. package/src/models/updatetaskrequest.ts +14 -10
  387. package/src/models/updatev2promptrequest.ts +1 -1
  388. package/src/models/v2agentanalyticscountrieslistop.ts +49 -0
  389. package/src/models/v2agentanalyticserrorpageslistop.ts +83 -0
  390. package/src/models/v2agentanalyticspageslistop.ts +123 -0
  391. package/src/models/v2agentanalyticssourceslistop.ts +47 -0
  392. package/src/models/v2agentanalyticssummaryretrieveop.ts +47 -0
  393. package/src/models/v2inlinemcpdefinition.ts +1 -1
  394. package/src/models/v2promptrunscancelop.ts +90 -0
  395. package/src/models/v2repository.ts +5 -5
  396. package/src/models/v2taskscreateop.ts +34 -0
  397. package/src/models/v2visibilitycitationslistop.ts +4 -0
  398. package/src/models/v2visibilitycitationssummaryretrieveop.ts +113 -0
  399. package/src/models/v2visibilitycurrentretrieveop.ts +4 -0
  400. package/src/models/v2visibilityoverviewretrieveop.ts +4 -0
  401. package/src/models/v2visibilitypromptsretrieveop.ts +4 -0
  402. package/src/tool-names.ts +43 -7
  403. package/test/tracker.test.js +323 -0
@@ -7,6 +7,7 @@ import { HTTPValidationError$zodSchema, } from "./httpvalidationerror.js";
7
7
  import { PublicCurrentVisibilityResponse$zodSchema, } from "./publiccurrentvisibilityresponse.js";
8
8
  export const V2VisibilityCurrentRetrieveRequest$zodSchema = z.object({
9
9
  end_date: z.string().date().describe("Inclusive range end; defaults to today.").optional(),
10
+ period: z.string().describe("Named period, resolved in UTC by the server: `last_7_days`, `last_14_days`, `last_30_days`, `last_90_days` (N days ending today), `this_week`, `last_week`, an ISO week such as `2026-W43` (Monday to Sunday), `this_month`, `last_month`, a month such as `2026-10`, `this_quarter`, `last_quarter`, or a quarter such as `2026Q4`. A current week, month, or quarter ends today. The response's `period` gives the resolved dates and the matching previous period. Do not combine with `start_date` or `end_date`.").optional(),
10
11
  start_date: z.string().date().describe("Inclusive range start; defaults to 30 days before the end date. The range may span at most 90 days.").optional(),
11
12
  });
12
13
  export const V2VisibilityCurrentRetrieveResponse$zodSchema = z.union([
@@ -1 +1 @@
1
- {"version":3,"file":"v2visibilitycurrentretrieveop.js","sourceRoot":"","sources":["../../src/models/v2visibilitycurrentretrieveop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,yCAAyC,GAC1C,MAAM,sCAAsC,CAAC;AAO9C,MAAM,CAAC,MAAM,4CAA4C,GAErD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAClC,yCAAyC,CAC1C,CAAC,QAAQ,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CACpC,qGAAqG,CACtG,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,6CAA6C,GAEtD,CAAC,CAAC,KAAK,CAAC;IACV,yCAAyC;IACzC,6BAA6B;CAC9B,CAAC,CAAC"}
1
+ {"version":3,"file":"v2visibilitycurrentretrieveop.js","sourceRoot":"","sources":["../../src/models/v2visibilitycurrentretrieveop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,yCAAyC,GAC1C,MAAM,sCAAsC,CAAC;AAQ9C,MAAM,CAAC,MAAM,4CAA4C,GAErD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAClC,yCAAyC,CAC1C,CAAC,QAAQ,EAAE;IACZ,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CACzB,ufAAuf,CACxf,CAAC,QAAQ,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CACpC,qGAAqG,CACtG,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,6CAA6C,GAEtD,CAAC,CAAC,KAAK,CAAC;IACV,yCAAyC;IACzC,6BAA6B;CAC9B,CAAC,CAAC"}
@@ -4,6 +4,7 @@ import { PublicVisibilityOverviewResponse } from "./publicvisibilityoverviewresp
4
4
  export type V2VisibilityOverviewRetrieveRequest = {
5
5
  start_date?: string | undefined;
6
6
  end_date?: string | undefined;
7
+ period?: string | undefined;
7
8
  };
8
9
  export declare const V2VisibilityOverviewRetrieveRequest$zodSchema: z.ZodType<V2VisibilityOverviewRetrieveRequest>;
9
10
  export type V2VisibilityOverviewRetrieveResponse = PublicVisibilityOverviewResponse | HTTPValidationError;
@@ -1 +1 @@
1
- {"version":3,"file":"v2visibilityoverviewretrieveop.d.ts","sourceRoot":"","sources":["../../src/models/v2visibilityoverviewretrieveop.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gCAAgC,EAEjC,MAAM,uCAAuC,CAAC;AAE/C,MAAM,MAAM,mCAAmC,GAAG;IAChD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAAO,CACnE,mCAAmC,CAQnC,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAC5C,gCAAgC,GAChC,mBAAmB,CAAC;AAExB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,OAAO,CACpE,oCAAoC,CAIpC,CAAC"}
1
+ {"version":3,"file":"v2visibilityoverviewretrieveop.d.ts","sourceRoot":"","sources":["../../src/models/v2visibilityoverviewretrieveop.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gCAAgC,EAEjC,MAAM,uCAAuC,CAAC;AAE/C,MAAM,MAAM,mCAAmC,GAAG;IAChD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAAO,CACnE,mCAAmC,CAWnC,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAC5C,gCAAgC,GAChC,mBAAmB,CAAC;AAExB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,OAAO,CACpE,oCAAoC,CAIpC,CAAC"}
@@ -7,6 +7,7 @@ import { HTTPValidationError$zodSchema, } from "./httpvalidationerror.js";
7
7
  import { PublicVisibilityOverviewResponse$zodSchema, } from "./publicvisibilityoverviewresponse.js";
8
8
  export const V2VisibilityOverviewRetrieveRequest$zodSchema = z.object({
9
9
  end_date: z.string().date().describe("Inclusive range end; defaults to today.").optional(),
10
+ period: z.string().describe("Named period, resolved in UTC by the server: `last_7_days`, `last_14_days`, `last_30_days`, `last_90_days` (N days ending today), `this_week`, `last_week`, an ISO week such as `2026-W43` (Monday to Sunday), `this_month`, `last_month`, a month such as `2026-10`, `this_quarter`, `last_quarter`, or a quarter such as `2026Q4`. A current week, month, or quarter ends today. The response's `period` gives the resolved dates and the matching previous period. Do not combine with `start_date` or `end_date`.").optional(),
10
11
  start_date: z.string().date().describe("Inclusive range start; defaults to 30 days before the end date. The range may span at most 90 days.").optional(),
11
12
  });
12
13
  export const V2VisibilityOverviewRetrieveResponse$zodSchema = z.union([
@@ -1 +1 @@
1
- {"version":3,"file":"v2visibilityoverviewretrieveop.js","sourceRoot":"","sources":["../../src/models/v2visibilityoverviewretrieveop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,0CAA0C,GAC3C,MAAM,uCAAuC,CAAC;AAO/C,MAAM,CAAC,MAAM,6CAA6C,GAEtD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAClC,yCAAyC,CAC1C,CAAC,QAAQ,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CACpC,qGAAqG,CACtG,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,8CAA8C,GAEvD,CAAC,CAAC,KAAK,CAAC;IACV,0CAA0C;IAC1C,6BAA6B;CAC9B,CAAC,CAAC"}
1
+ {"version":3,"file":"v2visibilityoverviewretrieveop.js","sourceRoot":"","sources":["../../src/models/v2visibilityoverviewretrieveop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,0CAA0C,GAC3C,MAAM,uCAAuC,CAAC;AAQ/C,MAAM,CAAC,MAAM,6CAA6C,GAEtD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAClC,yCAAyC,CAC1C,CAAC,QAAQ,EAAE;IACZ,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CACzB,ufAAuf,CACxf,CAAC,QAAQ,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CACpC,qGAAqG,CACtG,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,8CAA8C,GAEvD,CAAC,CAAC,KAAK,CAAC;IACV,0CAA0C;IAC1C,6BAA6B;CAC9B,CAAC,CAAC"}
@@ -4,6 +4,7 @@ import { PublicPromptVisibilityReportResponse } from "./publicpromptvisibilityre
4
4
  export type V2VisibilityPromptsRetrieveRequest = {
5
5
  start_date?: string | undefined;
6
6
  end_date?: string | undefined;
7
+ period?: string | undefined;
7
8
  };
8
9
  export declare const V2VisibilityPromptsRetrieveRequest$zodSchema: z.ZodType<V2VisibilityPromptsRetrieveRequest>;
9
10
  export type V2VisibilityPromptsRetrieveResponse = PublicPromptVisibilityReportResponse | HTTPValidationError;
@@ -1 +1 @@
1
- {"version":3,"file":"v2visibilitypromptsretrieveop.d.ts","sourceRoot":"","sources":["../../src/models/v2visibilitypromptsretrieveop.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oCAAoC,EAErC,MAAM,2CAA2C,CAAC;AAEnD,MAAM,MAAM,kCAAkC,GAAG;IAC/C,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,kCAAkC,CAQlC,CAAC;AAEH,MAAM,MAAM,mCAAmC,GAC3C,oCAAoC,GACpC,mBAAmB,CAAC;AAExB,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAAO,CACnE,mCAAmC,CAInC,CAAC"}
1
+ {"version":3,"file":"v2visibilitypromptsretrieveop.d.ts","sourceRoot":"","sources":["../../src/models/v2visibilitypromptsretrieveop.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oCAAoC,EAErC,MAAM,2CAA2C,CAAC;AAEnD,MAAM,MAAM,kCAAkC,GAAG;IAC/C,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,kCAAkC,CAWlC,CAAC;AAEH,MAAM,MAAM,mCAAmC,GAC3C,oCAAoC,GACpC,mBAAmB,CAAC;AAExB,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAAO,CACnE,mCAAmC,CAInC,CAAC"}
@@ -7,6 +7,7 @@ import { HTTPValidationError$zodSchema, } from "./httpvalidationerror.js";
7
7
  import { PublicPromptVisibilityReportResponse$zodSchema, } from "./publicpromptvisibilityreportresponse.js";
8
8
  export const V2VisibilityPromptsRetrieveRequest$zodSchema = z.object({
9
9
  end_date: z.string().date().describe("Inclusive range end; defaults to today.").optional(),
10
+ period: z.string().describe("Named period, resolved in UTC by the server: `last_7_days`, `last_14_days`, `last_30_days`, `last_90_days` (N days ending today), `this_week`, `last_week`, an ISO week such as `2026-W43` (Monday to Sunday), `this_month`, `last_month`, a month such as `2026-10`, `this_quarter`, `last_quarter`, or a quarter such as `2026Q4`. A current week, month, or quarter ends today. The response's `period` gives the resolved dates and the matching previous period. Do not combine with `start_date` or `end_date`.").optional(),
10
11
  start_date: z.string().date().describe("Inclusive range start; defaults to 30 days before the end date. The range may span at most 90 days.").optional(),
11
12
  });
12
13
  export const V2VisibilityPromptsRetrieveResponse$zodSchema = z.union([
@@ -1 +1 @@
1
- {"version":3,"file":"v2visibilitypromptsretrieveop.js","sourceRoot":"","sources":["../../src/models/v2visibilitypromptsretrieveop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,8CAA8C,GAC/C,MAAM,2CAA2C,CAAC;AAOnD,MAAM,CAAC,MAAM,4CAA4C,GAErD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAClC,yCAAyC,CAC1C,CAAC,QAAQ,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CACpC,qGAAqG,CACtG,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,6CAA6C,GAEtD,CAAC,CAAC,KAAK,CAAC;IACV,8CAA8C;IAC9C,6BAA6B;CAC9B,CAAC,CAAC"}
1
+ {"version":3,"file":"v2visibilitypromptsretrieveop.js","sourceRoot":"","sources":["../../src/models/v2visibilitypromptsretrieveop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,8CAA8C,GAC/C,MAAM,2CAA2C,CAAC;AAQnD,MAAM,CAAC,MAAM,4CAA4C,GAErD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAClC,yCAAyC,CAC1C,CAAC,QAAQ,EAAE;IACZ,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CACzB,ufAAuf,CACxf,CAAC,QAAQ,EAAE;IACZ,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CACpC,qGAAqG,CACtG,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,6CAA6C,GAEtD,CAAC,CAAC,KAAK,CAAC;IACV,8CAA8C;IAC9C,6BAA6B;CAC9B,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-names.d.ts","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAqQlE,CAAC"}
1
+ {"version":3,"file":"tool-names.d.ts","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAySlE,CAAC"}
package/esm/tool-names.js CHANGED
@@ -10,20 +10,24 @@ export const toolNames = [
10
10
  },
11
11
  {
12
12
  "name": "visibility-current-retrieve",
13
- "description": "Retrieve Current Visibility\n\nReturns recommendation score, visibility score, ranks, and date-range metadata for the configured primary company. Metrics are computed from active prompts only; when no data exists, values are `null`."
13
+ "description": "Retrieve Current Visibility\n\nReturns recommendation score, visibility score, ranks, and date-range metadata for the configured primary company, with the same metrics for the previous period, run coverage, and per-run rates. Metrics are computed from active prompts only; when no data exists, values are `null`. Pass `period` (for example `last_30_days` or `2026Q4`) instead of computing dates."
14
14
  },
15
15
  {
16
16
  "name": "visibility-overview-retrieve",
17
- "description": "Retrieve Visibility Overview\n\nReturns aggregate snapshot, daily trends, per-platform breakdowns, and competitor comparison. Calculated from active prompts only."
17
+ "description": "Retrieve Visibility Overview\n\nReturns aggregate snapshot, daily trends, per-platform breakdowns, and competitor comparison, with run coverage and per-run rates against the previous period. Calculated from active prompts only."
18
18
  },
19
19
  {
20
20
  "name": "visibility-citations-list",
21
- "description": "List Top Cited Urls\n\nReturns URL-level citation counts ranked from most to least cited. Results can be filtered by platform and to owned or external sources."
21
+ "description": "List Top Cited Urls\n\nReturns URL-level citation counts ranked from most to least cited. Results can be filtered by platform and to owned or external sources. For totals by URL prefix, domain, or day compared with the previous period, use the citations summary."
22
22
  },
23
23
  {
24
24
  "name": "visibility-prompts-retrieve",
25
25
  "description": "Retrieve Prompt Visibility Report\n\nReturns per-topic and per-prompt visibility metrics including recommendation score, rank, visibility score, average position, and citation counts."
26
26
  },
27
+ {
28
+ "name": "visibility-citations-summary-retrieve",
29
+ "description": "Retrieve Citation Summary\n\nReturns citation totals grouped by URL prefix (domain and first path segment, such as `example.com/blog`), URL, domain, or day, each compared with the previous period, with per-run rates and run coverage. Filter to one section of a site with `url_prefix`, for example `https://example.com/blog/`. Aggregated in one call; use it instead of paging the citations list."
30
+ },
27
31
  {
28
32
  "name": "prompts-list",
29
33
  "description": "List Prompts\n\nReturns active and inactive prompts by default. Set `include_archived` to include archived prompts."
@@ -70,12 +74,16 @@ export const toolNames = [
70
74
  },
71
75
  {
72
76
  "name": "prompts-run",
73
- "description": "Run Prompts\n\nQueue saved prompts using the organization's configured targets.\n\nProvide `prompt_ids` to run selected prompts, or omit them to run all active\nprompts. Saved prompt run settings apply to coding-agent targets. The\nresponse returns a run ID to poll with\n`GET /v2/prompts/runs/{run_id}/status`."
77
+ "description": "Run Prompts\n\nQueue saved prompts on answer engines and coding agents.\n\nProvide `prompt_ids` to run selected prompts, or omit them to run all active\nprompts. By default the run uses the organization's configured targets.\nProvide `agent` with IDs from `GET /v2/agents` to run the prompts on\nspecific coding-agent harnesses and models instead, for example to compare\nhow several coding tools answer the same developer question. Results\ninclude mentions and citations. Saved prompt run settings apply to\ncoding-agent targets. The response returns a run ID to poll with\n`GET /v2/prompts/runs/{run_id}/status`."
74
78
  },
75
79
  {
76
80
  "name": "prompts-run-status",
77
81
  "description": "Get Prompt Run Status\n\nReturn status and progress for a queued prompt run.\n\nPoll this endpoint until `status` is `completed`, `failed`, or `cancelled`.\nIndividual stored results are available from `GET /v2/prompts/runs`."
78
82
  },
83
+ {
84
+ "name": "prompts-run-cancel",
85
+ "description": "Cancel a prompt run\n\nMarks an active prompt run as cancelled and prevents queued prompts from starting. Running coding-agent attempts are stopped asynchronously. Requests already sent to an answer platform cannot be recalled, so prompts already in progress may still finish and store their results, but the run stays cancelled. Prompts that never start use no usage-based credits. The response has the same shape as the status operation, with cancelled prompts counted in `progress.cancelled`. Repeating this request for an already-cancelled run is safe."
86
+ },
79
87
  {
80
88
  "name": "opportunities-list",
81
89
  "description": "List Opportunities\n\nReturns ranked opportunities computed from stored prompt visibility results. Each includes an `execution_prompt` with context for an AI agent. Default window is 30 days."
@@ -88,6 +96,10 @@ export const toolNames = [
88
96
  "name": "tasks-list",
89
97
  "description": "List Tasks\n\nReturns persisted daily tasks with execution instructions. Includes per-status counts not narrowed by the `status` filter."
90
98
  },
99
+ {
100
+ "name": "tasks-create",
101
+ "description": "Create Task\n\nAdds a task to today's queue and returns it with its execution prompt. New tasks start as `new`."
102
+ },
91
103
  {
92
104
  "name": "tasks-retrieve",
93
105
  "description": "Retrieve Task\n\nReturns one persisted task and its execution prompt."
@@ -104,13 +116,37 @@ export const toolNames = [
104
116
  "name": "site-audits-retrieve",
105
117
  "description": "Retrieve Site Audit\n\nReturns one audited page with its score, priority, supporting evidence, and recommended fixes."
106
118
  },
119
+ {
120
+ "name": "agent-analytics-sites-list",
121
+ "description": "List Agent Analytics Sites\n\nReturns every site with tracked visits. Use a `site_id` from this list to read that site's agent traffic."
122
+ },
123
+ {
124
+ "name": "agent-analytics-summary-retrieve",
125
+ "description": "Retrieve Agent Analytics Summary\n\nReturns a site's visits by traffic type (coding agents, user-requested AI fetches, AI search, AI training, other bots, and people) for the date range and for the previous period (the same number of days before it, or the previous calendar week, month, or quarter for a named `period`)."
126
+ },
127
+ {
128
+ "name": "agent-analytics-sources-list",
129
+ "description": "List Agent Analytics Sources\n\nReturns every coding agent and bot that visited a site in the date range, with its traffic type and visit count, most visits first. Human visits are one `people` row."
130
+ },
131
+ {
132
+ "name": "agent-analytics-pages-list",
133
+ "description": "List Agent Analytics Pages\n\nReturns the pages AI agents and bots read on a site in the date range, with visits per traffic type. Sorted by AI visits unless `sort` is set. With `type`, returns only pages that traffic type visited. With `agent`, returns only the pages that one coding agent read."
134
+ },
135
+ {
136
+ "name": "agent-analytics-error-pages-list",
137
+ "description": "List Agent Analytics Error Pages\n\nReturns the pages on a site that returned an error status (400 and up) in the date range, most error requests first, with the agents, bots, and people that got each error. Set `status` to 404 for pages that were not found. Needs server-side tracking that records status codes; `status_codes_tracked` says whether the site has any."
138
+ },
139
+ {
140
+ "name": "agent-analytics-countries-list",
141
+ "description": "List Agent Analytics Countries\n\nReturns a site's visits from coding agents and AI assistants per country in the date range, most visits first."
142
+ },
107
143
  {
108
144
  "name": "evals-list",
109
145
  "description": "List Evals\n\nReturns all active eval definitions owned by the organization. Agent Preference evals are not included; list them with `GET /v2/agent-preference/evals`."
110
146
  },
111
147
  {
112
148
  "name": "evals-create",
113
- "description": "Create Eval\n\nCreates a reusable simulation definition with one or more task prompts and judges. Optional agents, persona, CLI installations, MCP servers, setup commands, cleanup commands, grounding policy, repeat count, and tags are saved with the eval. `search_grounding` supports `disabled`, `enabled`, and `default`; `default` preserves normal platform behavior. Creating the eval does not start a run and does not accept secret environment values."
149
+ "description": "Create Eval\n\nCreates a reusable simulation definition with one or more task prompts and judges. Optional agents, persona, CLI installations, MCP servers, setup commands, cleanup commands, grounding policy, repeat count, and tags are saved with the eval. `search_grounding` supports `disabled`, `enabled`, and `default`; `default` preserves normal platform behavior. Creating the eval does not start a run and does not accept secret environment values.\n\nEvals measure how well agents complete tasks with your product. To track how agents and answer engines answer research questions, including which brands they mention and cite, run prompts with `POST /v2/prompts/runs` instead."
114
150
  },
115
151
  {
116
152
  "name": "evals-batch-create",
@@ -150,7 +186,7 @@ export const toolNames = [
150
186
  },
151
187
  {
152
188
  "name": "evals-run",
153
- "description": "Start an eval run\n\nQueues a durable eval job and returns immediately with a polling ID. Poll `GET /v2/eval-runs/{run_id}` until its status reaches a terminal value; once finished it also returns the results and analysis. Follow a run live with the monitor operation.\n\nSend one of these flat request forms:\n\n- **Saved eval:** provide `eval_id`; optionally replace its prompts, persona, agents, CLIs, MCPs, setup commands, cleanup commands, or runs for this launch. A saved configuration can still provide repository, environment, skills, and legacy tool selections.\n- **Direct create-and-run:** provide `prompts`, `judges`, and `agent`. You may also provide a persona, tags, repository, write-only environment variables, saved or inline CLIs and MCP servers, skills, setup commands, and cleanup commands.\n\nThe run fans out across prompts × agents × runs. Persona is shared metadata and does not multiply attempts. No separate `mode` field is required. If the organization lacks the estimated credits, the request fails with `402` before dispatching work.\n\nA saved or inline environment containing an empty or placeholder credential is rejected with `400` before any evaluation is dispatched."
189
+ "description": "Start an eval run\n\nQueues a durable eval job and returns immediately with a polling ID. Poll `GET /v2/eval-runs/{run_id}` until its status reaches a terminal value; once finished it also returns the results and analysis. Follow a run live with the monitor operation.\n\nEval runs measure how well agents complete tasks with your product. To compare how coding agents and answer engines answer the same research question, with mentions and citations, use `POST /v2/prompts/runs` with `agent` instead.\n\nSend one of these flat request forms:\n\n- **Saved eval:** provide `eval_id`; optionally replace its prompts, persona, agents, CLIs, MCPs, setup commands, cleanup commands, or runs for this launch. A saved configuration can still provide repository, environment, skills, and legacy tool selections.\n- **Direct create-and-run:** provide `prompts`, `judges`, and `agent`. You may also provide a persona, tags, repository, write-only environment variables, saved or inline CLIs and MCP servers, skills, setup commands, and cleanup commands.\n\nThe run fans out across prompts × agents × runs. Persona is shared metadata and does not multiply attempts. No separate `mode` field is required. If the organization lacks the estimated credits, the request fails with `402` before dispatching work.\n\nA saved or inline environment containing an empty or placeholder credential is rejected with `400` before any evaluation is dispatched."
154
190
  },
155
191
  {
156
192
  "name": "evals-cancel",
@@ -222,7 +258,7 @@ export const toolNames = [
222
258
  },
223
259
  {
224
260
  "name": "agents-list",
225
- "description": "List Agents\n\nReturns the harness-and-model combinations your plan can run, as single agent IDs for use in eval runs."
261
+ "description": "List Agents\n\nReturns the coding-agent harness-and-model combinations your plan can run, as single agent IDs. Pass them as `agent` to `POST /v2/prompts/runs` to see how coding agents answer your prompts, with mentions and citations; to `POST /v2/agent-preference/evals` to see whether agents recommend your company over one competitor; or to `POST /v2/evals` and `POST /v2/eval-runs` to measure how well agents complete tasks with your product."
226
262
  },
227
263
  {
228
264
  "name": "repositories-list",
@@ -1 +1 @@
1
- {"version":3,"file":"tool-names.js","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAgD;IACpE;QACE,MAAM,EAAE,YAAY;QACpB,aAAa,EAAE,6GAA6G;KAC7H;IACD;QACE,MAAM,EAAE,wBAAwB;QAChC,aAAa,EAAE,0HAA0H;KAC1I;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,aAAa,EAAE,0OAA0O;KAC1P;IACD;QACE,MAAM,EAAE,8BAA8B;QACtC,aAAa,EAAE,oKAAoK;KACpL;IACD;QACE,MAAM,EAAE,2BAA2B;QACnC,aAAa,EAAE,iKAAiK;KACjL;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,aAAa,EAAE,yLAAyL;KACzM;IACD;QACE,MAAM,EAAE,cAAc;QACtB,aAAa,EAAE,qHAAqH;KACrI;IACD;QACE,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,6JAA6J;KAC7K;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,aAAa,EAAE,yEAAyE;KACzF;IACD;QACE,MAAM,EAAE,uBAAuB;Q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AAa,EAAE,uUAAuU;KACvV;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,aAAa,EAAE,oFAAoF;KACpG;IACD;QACE,MAAM,EAAE,+BAA+B;QACvC,aAAa,EAAE,qSAAqS;KACrT;IACD;QACE,MAAM,EAAE,iCAAiC;QACzC,aAAa,EAAE,qDAAqD;KACrE;IACD;QACE,MAAM,EAAE,+BAA+B;QACvC,aAAa,EAAE,sQAAsQ;KACtR;IACD;QACE,MAAM,EAAE,+BAA+B;QACvC,aAAa,EAAE,+FAA+F;KAC/G;IACD;QACE,MAAM,EAAE,qCAAqC;QAC7C,aAAa,EAAE,iKAAiK;KACjL;IACD;QACE,MAAM,EAAE,aAAa;QACrB,aAAa,EAAE,wHAAwH;KACxI;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,aAAa,EAAE,6OAA6O;KAC7P;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,aAAa,EAAE,wFAAwF;KACxG;IACD;QACE,MAAM,EAAE,uBAAuB;QAC/B,aAAa,EAAE,mEAAmE;KACnF;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,aAAa,EAAE,uFAAuF;KACvG;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,aAAa,EAAE,mGAAmG;KACnH;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,aAAa,EAAE,oFAAoF;KACpG;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,aAAa,EAAE,iGAAiG;KACjH;IACD;QACE,MAAM,EAAE,YAAY;QACpB,aAAa,EAAE,qFAAqF;KACrG;IACD;QACE,MAAM,EAAE,aAAa;QACrB,aAAa,EAAE,wFAAwF;KACxG;CACF,CAAC"}
1
+ {"version":3,"file":"tool-names.js","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAgD;IACpE;QACE,MAAM,EAAE,YAAY;QACpB,aAAa,EAAE,6GAA6G;KAC7H;IAC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B;QACvC,aAAa,EAAE,qSAAqS;KACrT;IACD;QACE,MAAM,EAAE,iCAAiC;QACzC,aAAa,EAAE,qDAAqD;KACrE;IACD;QACE,MAAM,EAAE,+BAA+B;QACvC,aAAa,EAAE,sQAAsQ;KACtR;IACD;QACE,MAAM,EAAE,+BAA+B;QACvC,aAAa,EAAE,+FAA+F;KAC/G;IACD;QACE,MAAM,EAAE,qCAAqC;QAC7C,aAAa,EAAE,iKAAiK;KACjL;IACD;QACE,MAAM,EAAE,aAAa;QACrB,aAAa,EAAE,+bAA+b;KAC/c;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,aAAa,EAAE,6OAA6O;KAC7P;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,aAAa,EAAE,wFAAwF;KACxG;IACD;QACE,MAAM,EAAE,uBAAuB;QAC/B,aAAa,EAAE,mEAAmE;KACnF;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,aAAa,EAAE,uFAAuF;KACvG;IACD;QACE,MAAM,EAAE,qBAAqB;QAC7B,aAAa,EAAE,mGAAmG;KACnH;IACD;QACE,MAAM,EAAE,mBAAmB;QAC3B,aAAa,EAAE,oFAAoF;KACpG;IACD;QACE,MAAM,EAAE,kBAAkB;QAC1B,aAAa,EAAE,iGAAiG;KACjH;IACD;QACE,MAAM,EAAE,YAAY;QACpB,aAAa,EAAE,qFAAqF;KACrG;IACD;QACE,MAAM,EAAE,aAAa;QACrB,aAAa,EAAE,wFAAwF;KACxG;CACF,CAAC"}
package/lib/tracker.js ADDED
@@ -0,0 +1,219 @@
1
+ // Lightsage MCP Analytics: records which agents call which tools.
2
+ //
3
+ // Tracking is on only when LIGHTSAGE_MCP_TRACKER_API_KEY holds an `lsmcp_` key
4
+ // from the MCP Analytics setup page. The key is passed explicitly because the
5
+ // tracker would otherwise read LIGHTSAGE_API_KEY, which this server already
6
+ // uses as a Lightsage public-API key.
7
+ //
8
+ // Hand-written (not Speakeasy-generated) so regeneration does not remove it.
9
+
10
+ import { createHash } from "node:crypto";
11
+ import { finished } from "node:stream/promises";
12
+ import { Lightsage } from "@lightsage/mcp-tracker";
13
+ import { waitUntil } from "@vercel/functions";
14
+
15
+ const apiKey = process.env.LIGHTSAGE_MCP_TRACKER_API_KEY?.trim();
16
+
17
+ // Set by this server, never by the caller (see setVerifiedCaller): who the
18
+ // request was authenticated as, e.g. "oauth:<user id>" or "key:<key hash>".
19
+ export const VERIFIED_CALLER_HEADER = "x-lightsage-verified-caller";
20
+
21
+ // Sent by the Lightsage in-app agent (backend ai_chat) to attribute its calls.
22
+ const AGENT_USER_HEADER = "x-lightsage-agent-user";
23
+ const AGENT_RUN_HEADER = "x-lightsage-agent-run";
24
+ const AGENT_INTENT_HEADER = "x-lightsage-agent-intent";
25
+
26
+ // Headers that identify the caller, in the order api/mcp.js accepts them.
27
+ const CALLER_HEADERS = [
28
+ "x-lightsage-api-key",
29
+ "lightsage-api-key-auth",
30
+ "x-sapient-api-key",
31
+ "sapient-api-key-auth",
32
+ "authorization",
33
+ ];
34
+
35
+ function sha256(value) {
36
+ return createHash("sha256").update(value).digest("hex");
37
+ }
38
+
39
+ /**
40
+ * Every request gets a fresh stateless transport, so there is no MCP session
41
+ * ID. Group a caller's requests by who they authenticated as (stable across
42
+ * OAuth token refreshes) and their client; the credential never leaves this
43
+ * server.
44
+ */
45
+ export function callerSessionId({ headers }) {
46
+ const caller = headers[VERIFIED_CALLER_HEADER]?.trim() ||
47
+ CALLER_HEADERS.map((name) => headers[name]?.trim()).find(Boolean);
48
+ if (!caller) return undefined;
49
+ const digest = sha256(`${caller}\n${headers["user-agent"] ?? ""}`);
50
+ return `mcp_caller_${digest.slice(0, 32)}`;
51
+ }
52
+
53
+ function decodeHeader(value) {
54
+ if (!value) return undefined;
55
+ try {
56
+ return decodeURIComponent(value);
57
+ } catch {
58
+ return value;
59
+ }
60
+ }
61
+
62
+ /** The end user, agent run and request behind a call, and how it authenticated. */
63
+ export function callerContext({ headers }) {
64
+ const caller = headers[VERIFIED_CALLER_HEADER] ?? "";
65
+ const oauthUser = caller.startsWith("oauth:") ? caller.slice(6) : undefined;
66
+ return {
67
+ distinctId: headers[AGENT_USER_HEADER] || oauthUser,
68
+ conversationId: headers[AGENT_RUN_HEADER],
69
+ intent: decodeHeader(headers[AGENT_INTENT_HEADER]),
70
+ properties: caller
71
+ ? {
72
+ auth: oauthUser
73
+ ? "oauth"
74
+ : caller.startsWith("key:")
75
+ ? "api_key"
76
+ : caller.split(":")[0],
77
+ }
78
+ : undefined,
79
+ };
80
+ }
81
+
82
+ // Tools that only describe this server's tool catalog.
83
+ const CATALOG_TOOLS = new Set(["list_tools", "describe_tool_input"]);
84
+
85
+ /**
86
+ * Tool results hold callers' own Lightsage data, so keep only failures, which
87
+ * are needed to debug errors. Catalog tools return tool names and schemas, not
88
+ * data, and their results are how MCP Analytics spots a search that found
89
+ * nothing.
90
+ */
91
+ export function shouldStoreResponse({ toolName, isError }) {
92
+ return isError || CATALOG_TOOLS.has(toolName);
93
+ }
94
+
95
+ // One tracker per process; each request's server is instrumented separately.
96
+ const lightsage = apiKey
97
+ ? new Lightsage({
98
+ apiKey,
99
+ sessionIdFromRequest: callerSessionId,
100
+ requestContext: callerContext,
101
+ captureResponses: shouldStoreResponse,
102
+ })
103
+ : null;
104
+
105
+ export const trackingEnabled = Boolean(lightsage);
106
+
107
+ /**
108
+ * Replace a header on the incoming request. The MCP transport rebuilds the
109
+ * request from rawHeaders, so both views are updated. Removing any value the
110
+ * caller sent is what makes VERIFIED_CALLER_HEADER trustworthy.
111
+ */
112
+ function replaceHeader(req, name, value) {
113
+ const raw = [];
114
+ for (let i = 0; i < (req.rawHeaders?.length ?? 0); i += 2) {
115
+ if (req.rawHeaders[i].toLowerCase() !== name) {
116
+ raw.push(req.rawHeaders[i], req.rawHeaders[i + 1]);
117
+ }
118
+ }
119
+ delete req.headers[name];
120
+ if (value !== undefined) {
121
+ raw.push(name, value);
122
+ req.headers[name] = value;
123
+ }
124
+ req.rawHeaders = raw;
125
+ }
126
+
127
+ /** Drop any caller-supplied verified-caller header. Call first on every request. */
128
+ export function clearVerifiedCaller(req) {
129
+ replaceHeader(req, VERIFIED_CALLER_HEADER, undefined);
130
+ }
131
+
132
+ export function setVerifiedCaller(req, caller) {
133
+ replaceHeader(req, VERIFIED_CALLER_HEADER, caller);
134
+ }
135
+
136
+ /** "key:<hash>" identity for an API key, without exposing the key. */
137
+ export function apiKeyCaller(key) {
138
+ return `key:${sha256(key).slice(0, 32)}`;
139
+ }
140
+
141
+ const KEY_CHECK_TTL_MS = 5 * 60 * 1000;
142
+ const KEY_CHECK_TIMEOUT_MS = 2000;
143
+ const MAX_CACHED_KEYS = 1000;
144
+ const keyChecks = new Map();
145
+
146
+ /**
147
+ * Whether a caller's Lightsage API key is real, so calls with made-up keys are
148
+ * not recorded. Tools that never call the API (list_tools, describe_tool_input)
149
+ * would otherwise accept any value. Results are cached per key hash; if the
150
+ * check itself fails (network, timeout), the call is still recorded rather
151
+ * than losing analytics during an API incident.
152
+ */
153
+ export async function isTrackedApiKey(key, serverURL, fetchImpl = fetch) {
154
+ const id = sha256(key);
155
+ const cached = keyChecks.get(id);
156
+ if (cached && Date.now() - cached.at < KEY_CHECK_TTL_MS) return cached.valid;
157
+
158
+ let valid;
159
+ try {
160
+ const response = await fetchImpl(
161
+ new URL("/v2/auth/status", serverURL),
162
+ {
163
+ headers: { "X-Lightsage-Api-Key": key },
164
+ signal: AbortSignal.timeout(KEY_CHECK_TIMEOUT_MS),
165
+ },
166
+ );
167
+ if (response.status === 401 || response.status === 403) valid = false;
168
+ else if (response.ok) valid = true;
169
+ } catch {
170
+ // Unknown; not cached
171
+ }
172
+ if (valid === undefined) return true;
173
+
174
+ keyChecks.delete(id);
175
+ keyChecks.set(id, { valid, at: Date.now() });
176
+ if (keyChecks.size > MAX_CACHED_KEYS) {
177
+ keyChecks.delete(keyChecks.keys().next().value);
178
+ }
179
+ return valid;
180
+ }
181
+
182
+ /** Track tool calls, tool listings and the initialize handshake on a server. */
183
+ export function instrumentServer(mcpServer) {
184
+ lightsage?.instrument(mcpServer);
185
+ }
186
+
187
+ // Upper bound on how long a request waits for analytics. The tracker aborts
188
+ // its own sends after 2.5s; this also covers a send that ignores the abort,
189
+ // which would otherwise hold the function until maxDuration.
190
+ const FLUSH_TIMEOUT_MS = 3000;
191
+
192
+ /**
193
+ * Wait for the response to finish, then send queued events. A tool call is
194
+ * recorded when its handler returns, which for streamed responses is after
195
+ * handleRequest resolves, so the send happens after the response ends. Vercel
196
+ * suspends a function once its response ends, so the send is registered with
197
+ * waitUntil to keep the invocation alive until it completes (a no-op off
198
+ * Vercel). Never throws, so analytics cannot fail a request.
199
+ */
200
+ export function flushTracking(res) {
201
+ if (!lightsage) return Promise.resolve();
202
+ let timer;
203
+ const timeout = new Promise((resolve) => {
204
+ timer = setTimeout(resolve, FLUSH_TIMEOUT_MS);
205
+ });
206
+ const flush = (async () => {
207
+ await finished(res).catch(() => {});
208
+ await lightsage.flush();
209
+ })().catch(() => {
210
+ // Tracking is best-effort.
211
+ });
212
+ const done = Promise.race([flush, timeout]).finally(() => clearTimeout(timer));
213
+ try {
214
+ waitUntil(done);
215
+ } catch {
216
+ // Not running on Vercel; awaiting the promise is enough.
217
+ }
218
+ return done;
219
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsage/mcp",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "author": "Speakeasy",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -23,8 +23,10 @@
23
23
  "dependencies": {
24
24
  "@clerk/backend": "^3.11.4",
25
25
  "@clerk/mcp-tools": "^0.5.0",
26
+ "@lightsage/mcp-tracker": "^0.2.3",
26
27
  "@modelcontextprotocol/sdk": "1.32.1",
27
28
  "@stricli/core": "^1.1.2",
29
+ "@vercel/functions": "3.9.11",
28
30
  "express": "^5.1.0",
29
31
  "zod": "^4.0.0"
30
32
  },
@@ -0,0 +1,160 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ccea98d3ab49
4
+ */
5
+
6
+ import { LightsageMcpCore } from "../core.js";
7
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import {
23
+ V2AgentAnalyticsCountriesListRequest,
24
+ V2AgentAnalyticsCountriesListRequest$zodSchema,
25
+ } from "../models/v2agentanalyticscountrieslistop.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * List Agent Analytics Countries
31
+ *
32
+ * @remarks
33
+ * Returns a site's visits from coding agents and AI assistants per country in the date range, most visits first.
34
+ */
35
+ export function agentAnalyticsCountriesList(
36
+ client$: LightsageMcpCore,
37
+ request: V2AgentAnalyticsCountriesListRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ Response,
42
+ | APIError
43
+ | SDKValidationError
44
+ | UnexpectedClientError
45
+ | InvalidRequestError
46
+ | RequestAbortedError
47
+ | RequestTimeoutError
48
+ | ConnectionError
49
+ >
50
+ > {
51
+ return new APIPromise($do(
52
+ client$,
53
+ request,
54
+ options,
55
+ ));
56
+ }
57
+
58
+ async function $do(
59
+ client$: LightsageMcpCore,
60
+ request: V2AgentAnalyticsCountriesListRequest,
61
+ options?: RequestOptions,
62
+ ): Promise<
63
+ [
64
+ Result<
65
+ Response,
66
+ | APIError
67
+ | SDKValidationError
68
+ | UnexpectedClientError
69
+ | InvalidRequestError
70
+ | RequestAbortedError
71
+ | RequestTimeoutError
72
+ | ConnectionError
73
+ >,
74
+ APICall,
75
+ ]
76
+ > {
77
+ const parsed$ = safeParse(
78
+ request,
79
+ (value$) => V2AgentAnalyticsCountriesListRequest$zodSchema.parse(value$),
80
+ "Input validation failed",
81
+ );
82
+ if (!parsed$.ok) {
83
+ return [parsed$, { status: "invalid" }];
84
+ }
85
+ const payload$ = parsed$.value;
86
+ const body$ = null;
87
+
88
+ const pathParams$ = {
89
+ site_id: encodeSimple("site_id", payload$.site_id, {
90
+ explode: false,
91
+ charEncoding: "percent",
92
+ }),
93
+ };
94
+ const path$ = pathToFunc("/v2/agent-analytics/sites/{site_id}/countries")(
95
+ pathParams$,
96
+ );
97
+ const query$ = encodeFormQuery({
98
+ "end_date": payload$.end_date,
99
+ "limit": payload$.limit,
100
+ "period": payload$.period,
101
+ "start_date": payload$.start_date,
102
+ });
103
+
104
+ const headers$ = new Headers(compactMap({
105
+ Accept: "application/json",
106
+ }));
107
+ const securityInput = await extractSecurity(client$._options.security);
108
+ const requestSecurity = resolveGlobalSecurity(securityInput);
109
+
110
+ const context = {
111
+ options: client$._options,
112
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
113
+ operationID: "v2_agent_analytics_countries_list",
114
+ oAuth2Scopes: null,
115
+ resolvedSecurity: requestSecurity,
116
+ securitySource: client$._options.security,
117
+ retryConfig: options?.retries
118
+ || client$._options.retryConfig
119
+ || { strategy: "none" },
120
+ retryCodes: options?.retryCodes || [
121
+ "429",
122
+ "500",
123
+ "502",
124
+ "503",
125
+ "504",
126
+ ],
127
+ };
128
+
129
+ const requestRes = client$._createRequest(context, {
130
+ security: requestSecurity,
131
+ method: "GET",
132
+ baseURL: options?.serverURL,
133
+ path: path$,
134
+ headers: headers$,
135
+ query: query$,
136
+ body: body$,
137
+ userAgent: client$._options.userAgent,
138
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
139
+ || -1,
140
+ }, options);
141
+ if (!requestRes.ok) {
142
+ return [requestRes, { status: "invalid" }];
143
+ }
144
+ const req$ = requestRes.value;
145
+
146
+ const doResult = await client$._do(req$, {
147
+ context,
148
+ errorCodes: [],
149
+ retryConfig: context.retryConfig,
150
+ retryCodes: context.retryCodes,
151
+ });
152
+ if (!doResult.ok) {
153
+ return [doResult, { status: "request-error", request: req$ }];
154
+ }
155
+ return [doResult, {
156
+ status: "complete",
157
+ "request": req$,
158
+ response: doResult.value,
159
+ }];
160
+ }