@rnsk/toolkits 0.0.9 → 0.0.11

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 (402) hide show
  1. package/README.md +18 -2
  2. package/dist/index.d.ts +17 -1
  3. package/dist/index.js +33 -1
  4. package/dist/toolkits/bitbucket/tools/index.d.ts +5 -5
  5. package/dist/toolkits/bitbucket/tools/reports.d.ts +5 -5
  6. package/dist/toolkits/cloudflare/tools/create-list.d.ts +1 -1
  7. package/dist/toolkits/cloudflare/tools/create-zone.d.ts +1 -1
  8. package/dist/toolkits/cloudflare/tools/index.d.ts +4 -4
  9. package/dist/toolkits/cloudflare/tools/list-pools.d.ts +1 -1
  10. package/dist/toolkits/cloudflare/tools/list-zones.d.ts +1 -1
  11. package/dist/toolkits/convex/icon.d.ts +5 -0
  12. package/dist/toolkits/convex/icon.js +10 -0
  13. package/dist/toolkits/convex/manifest.d.ts +3 -0
  14. package/dist/toolkits/convex/manifest.js +33 -0
  15. package/dist/toolkits/convex/tools/client.d.ts +28 -0
  16. package/dist/toolkits/convex/tools/client.js +85 -0
  17. package/dist/toolkits/convex/tools/deploy-keys.d.ts +10 -0
  18. package/dist/toolkits/convex/tools/deploy-keys.js +46 -0
  19. package/dist/toolkits/convex/tools/deployments.d.ts +35 -0
  20. package/dist/toolkits/convex/tools/deployments.js +126 -0
  21. package/dist/toolkits/convex/tools/domains.d.ts +7 -0
  22. package/dist/toolkits/convex/tools/domains.js +29 -0
  23. package/dist/toolkits/convex/tools/functions.d.ts +14 -0
  24. package/dist/toolkits/convex/tools/functions.js +49 -0
  25. package/dist/toolkits/convex/tools/index.d.ts +176 -0
  26. package/dist/toolkits/convex/tools/index.js +145 -0
  27. package/dist/toolkits/convex/tools/logging.d.ts +5 -0
  28. package/dist/toolkits/convex/tools/logging.js +25 -0
  29. package/dist/toolkits/convex/tools/projects.d.ts +31 -0
  30. package/dist/toolkits/convex/tools/projects.js +111 -0
  31. package/dist/toolkits/convex/tools/teams.d.ts +12 -0
  32. package/dist/toolkits/convex/tools/teams.js +62 -0
  33. package/dist/toolkits/datadog/icon.d.ts +5 -0
  34. package/dist/toolkits/datadog/icon.js +6 -0
  35. package/dist/toolkits/datadog/manifest.d.ts +3 -0
  36. package/dist/toolkits/datadog/manifest.js +44 -0
  37. package/dist/toolkits/datadog/tools/api-keys.d.ts +21 -0
  38. package/dist/toolkits/datadog/tools/api-keys.js +42 -0
  39. package/dist/toolkits/datadog/tools/apm.d.ts +51 -0
  40. package/dist/toolkits/datadog/tools/apm.js +106 -0
  41. package/dist/toolkits/datadog/tools/client.d.ts +19 -0
  42. package/dist/toolkits/datadog/tools/client.js +81 -0
  43. package/dist/toolkits/datadog/tools/dashboards.d.ts +93 -0
  44. package/dist/toolkits/datadog/tools/dashboards.js +127 -0
  45. package/dist/toolkits/datadog/tools/events.d.ts +35 -0
  46. package/dist/toolkits/datadog/tools/events.js +56 -0
  47. package/dist/toolkits/datadog/tools/hosts.d.ts +49 -0
  48. package/dist/toolkits/datadog/tools/hosts.js +87 -0
  49. package/dist/toolkits/datadog/tools/incidents.d.ts +18 -0
  50. package/dist/toolkits/datadog/tools/incidents.js +34 -0
  51. package/dist/toolkits/datadog/tools/index.d.ts +999 -0
  52. package/dist/toolkits/datadog/tools/index.js +450 -0
  53. package/dist/toolkits/datadog/tools/integrations.d.ts +32 -0
  54. package/dist/toolkits/datadog/tools/integrations.js +47 -0
  55. package/dist/toolkits/datadog/tools/logs.d.ts +39 -0
  56. package/dist/toolkits/datadog/tools/logs.js +121 -0
  57. package/dist/toolkits/datadog/tools/metrics.d.ts +27 -0
  58. package/dist/toolkits/datadog/tools/metrics.js +83 -0
  59. package/dist/toolkits/datadog/tools/monitors.d.ts +95 -0
  60. package/dist/toolkits/datadog/tools/monitors.js +190 -0
  61. package/dist/toolkits/datadog/tools/oncall-notifications.d.ts +61 -0
  62. package/dist/toolkits/datadog/tools/oncall-notifications.js +155 -0
  63. package/dist/toolkits/datadog/tools/oncall-policies.d.ts +28 -0
  64. package/dist/toolkits/datadog/tools/oncall-policies.js +72 -0
  65. package/dist/toolkits/datadog/tools/oncall-schedules.d.ts +31 -0
  66. package/dist/toolkits/datadog/tools/oncall-schedules.js +87 -0
  67. package/dist/toolkits/datadog/tools/oncall-teams.d.ts +14 -0
  68. package/dist/toolkits/datadog/tools/oncall-teams.js +54 -0
  69. package/dist/toolkits/datadog/tools/slos.d.ts +43 -0
  70. package/dist/toolkits/datadog/tools/slos.js +62 -0
  71. package/dist/toolkits/datadog/tools/synthetics.d.ts +58 -0
  72. package/dist/toolkits/datadog/tools/synthetics.js +90 -0
  73. package/dist/toolkits/datadog/tools/usage.d.ts +7 -0
  74. package/dist/toolkits/datadog/tools/usage.js +25 -0
  75. package/dist/toolkits/datadog/tools/users.d.ts +35 -0
  76. package/dist/toolkits/datadog/tools/users.js +66 -0
  77. package/dist/toolkits/dev-to/icon.d.ts +5 -0
  78. package/dist/toolkits/dev-to/icon.js +10 -0
  79. package/dist/toolkits/dev-to/manifest.d.ts +3 -0
  80. package/dist/toolkits/dev-to/manifest.js +34 -0
  81. package/dist/toolkits/dev-to/tools/articles.d.ts +78 -0
  82. package/dist/toolkits/dev-to/tools/articles.js +262 -0
  83. package/dist/toolkits/dev-to/tools/client.d.ts +25 -0
  84. package/dist/toolkits/dev-to/tools/client.js +65 -0
  85. package/dist/toolkits/dev-to/tools/community.d.ts +61 -0
  86. package/dist/toolkits/dev-to/tools/community.js +244 -0
  87. package/dist/toolkits/dev-to/tools/index.d.ts +202 -0
  88. package/dist/toolkits/dev-to/tools/index.js +37 -0
  89. package/dist/toolkits/dev-to/tools/listings.d.ts +26 -0
  90. package/dist/toolkits/dev-to/tools/listings.js +92 -0
  91. package/dist/toolkits/discord/tools/applications.d.ts +5 -5
  92. package/dist/toolkits/discord/tools/index.d.ts +5 -5
  93. package/dist/toolkits/figma/tools/create-modify-delete-variables.d.ts +1 -1
  94. package/dist/toolkits/figma/tools/get-file-nodes.d.ts +1 -1
  95. package/dist/toolkits/figma/tools/index.d.ts +3 -3
  96. package/dist/toolkits/figma/tools/render-images-of-file-nodes.d.ts +1 -1
  97. package/dist/toolkits/google-analytics/tools/reports.d.ts +9 -9
  98. package/dist/toolkits/google-classroom/tools/index.d.ts +7 -7
  99. package/dist/toolkits/google-classroom/tools/invitations.d.ts +2 -2
  100. package/dist/toolkits/google-classroom/tools/misc.d.ts +1 -1
  101. package/dist/toolkits/google-classroom/tools/roster.d.ts +5 -5
  102. package/dist/toolkits/google-search-console/tools/index.d.ts +2 -2
  103. package/dist/toolkits/google-search-console/tools/search-analytics-query.d.ts +2 -2
  104. package/dist/toolkits/hacker-news/icon.d.ts +5 -0
  105. package/dist/toolkits/hacker-news/icon.js +9 -0
  106. package/dist/toolkits/hacker-news/manifest.d.ts +3 -0
  107. package/dist/toolkits/hacker-news/manifest.js +25 -0
  108. package/dist/toolkits/hacker-news/tools/client.d.ts +8 -0
  109. package/dist/toolkits/hacker-news/tools/client.js +51 -0
  110. package/dist/toolkits/hacker-news/tools/index.d.ts +89 -0
  111. package/dist/toolkits/hacker-news/tools/index.js +22 -0
  112. package/dist/toolkits/hacker-news/tools/items.d.ts +42 -0
  113. package/dist/toolkits/hacker-news/tools/items.js +126 -0
  114. package/dist/toolkits/hacker-news/tools/search.d.ts +12 -0
  115. package/dist/toolkits/hacker-news/tools/search.js +40 -0
  116. package/dist/toolkits/hacker-news/tools/stories.d.ts +25 -0
  117. package/dist/toolkits/hacker-news/tools/stories.js +98 -0
  118. package/dist/toolkits/hostinger/icon.d.ts +5 -0
  119. package/dist/toolkits/hostinger/icon.js +6 -0
  120. package/dist/toolkits/hostinger/manifest.d.ts +3 -0
  121. package/dist/toolkits/hostinger/manifest.js +36 -0
  122. package/dist/toolkits/hostinger/tools/billing.d.ts +12 -0
  123. package/dist/toolkits/hostinger/tools/billing.js +35 -0
  124. package/dist/toolkits/hostinger/tools/client.d.ts +6 -0
  125. package/dist/toolkits/hostinger/tools/client.js +57 -0
  126. package/dist/toolkits/hostinger/tools/dns.d.ts +22 -0
  127. package/dist/toolkits/hostinger/tools/dns.js +47 -0
  128. package/dist/toolkits/hostinger/tools/domains.d.ts +21 -0
  129. package/dist/toolkits/hostinger/tools/domains.js +62 -0
  130. package/dist/toolkits/hostinger/tools/hosting.d.ts +17 -0
  131. package/dist/toolkits/hostinger/tools/hosting.js +38 -0
  132. package/dist/toolkits/hostinger/tools/index.d.ts +179 -0
  133. package/dist/toolkits/hostinger/tools/index.js +35 -0
  134. package/dist/toolkits/hostinger/tools/vps.d.ts +27 -0
  135. package/dist/toolkits/hostinger/tools/vps.js +77 -0
  136. package/dist/toolkits/hostinger/tools/whois.d.ts +33 -0
  137. package/dist/toolkits/hostinger/tools/whois.js +85 -0
  138. package/dist/toolkits/hugging-face/icon.d.ts +5 -0
  139. package/dist/toolkits/hugging-face/icon.js +6 -0
  140. package/dist/toolkits/hugging-face/manifest.d.ts +3 -0
  141. package/dist/toolkits/hugging-face/manifest.js +42 -0
  142. package/dist/toolkits/hugging-face/tools/client.d.ts +93 -0
  143. package/dist/toolkits/hugging-face/tools/client.js +192 -0
  144. package/dist/toolkits/hugging-face/tools/datasets-viewer.d.ts +65 -0
  145. package/dist/toolkits/hugging-face/tools/datasets-viewer.js +150 -0
  146. package/dist/toolkits/hugging-face/tools/datasets.d.ts +160 -0
  147. package/dist/toolkits/hugging-face/tools/datasets.js +383 -0
  148. package/dist/toolkits/hugging-face/tools/discussions.d.ts +68 -0
  149. package/dist/toolkits/hugging-face/tools/discussions.js +144 -0
  150. package/dist/toolkits/hugging-face/tools/index.d.ts +523 -0
  151. package/dist/toolkits/hugging-face/tools/index.js +163 -0
  152. package/dist/toolkits/hugging-face/tools/inference.d.ts +42 -0
  153. package/dist/toolkits/hugging-face/tools/inference.js +86 -0
  154. package/dist/toolkits/hugging-face/tools/models.d.ts +117 -0
  155. package/dist/toolkits/hugging-face/tools/models.js +273 -0
  156. package/dist/toolkits/hugging-face/tools/papers.d.ts +37 -0
  157. package/dist/toolkits/hugging-face/tools/papers.js +91 -0
  158. package/dist/toolkits/hugging-face/tools/repos.d.ts +96 -0
  159. package/dist/toolkits/hugging-face/tools/repos.js +201 -0
  160. package/dist/toolkits/hugging-face/tools/settings.d.ts +53 -0
  161. package/dist/toolkits/hugging-face/tools/settings.js +88 -0
  162. package/dist/toolkits/hugging-face/tools/spaces.d.ts +245 -0
  163. package/dist/toolkits/hugging-face/tools/spaces.js +468 -0
  164. package/dist/toolkits/hugging-face/tools/sql.d.ts +21 -0
  165. package/dist/toolkits/hugging-face/tools/sql.js +47 -0
  166. package/dist/toolkits/hugging-face/tools/users.d.ts +60 -0
  167. package/dist/toolkits/hugging-face/tools/users.js +132 -0
  168. package/dist/toolkits/hugging-face/tools/webhooks.d.ts +35 -0
  169. package/dist/toolkits/hugging-face/tools/webhooks.js +87 -0
  170. package/dist/toolkits/jira/icon.d.ts +5 -0
  171. package/dist/toolkits/jira/icon.js +6 -0
  172. package/dist/toolkits/jira/manifest.d.ts +3 -0
  173. package/dist/toolkits/jira/manifest.js +53 -0
  174. package/dist/toolkits/jira/tools/boards.d.ts +52 -0
  175. package/dist/toolkits/jira/tools/boards.js +104 -0
  176. package/dist/toolkits/jira/tools/client.d.ts +23 -0
  177. package/dist/toolkits/jira/tools/client.js +270 -0
  178. package/dist/toolkits/jira/tools/index.d.ts +1280 -0
  179. package/dist/toolkits/jira/tools/index.js +119 -0
  180. package/dist/toolkits/jira/tools/issue-fields.d.ts +10 -0
  181. package/dist/toolkits/jira/tools/issue-fields.js +111 -0
  182. package/dist/toolkits/jira/tools/issues.d.ts +304 -0
  183. package/dist/toolkits/jira/tools/issues.js +593 -0
  184. package/dist/toolkits/jira/tools/meta.d.ts +212 -0
  185. package/dist/toolkits/jira/tools/meta.js +369 -0
  186. package/dist/toolkits/jira/tools/projects.d.ts +130 -0
  187. package/dist/toolkits/jira/tools/projects.js +263 -0
  188. package/dist/toolkits/jira/tools/search.d.ts +90 -0
  189. package/dist/toolkits/jira/tools/search.js +181 -0
  190. package/dist/toolkits/jira/tools/users.d.ts +114 -0
  191. package/dist/toolkits/jira/tools/users.js +221 -0
  192. package/dist/toolkits/kaggle/icon.d.ts +5 -0
  193. package/dist/toolkits/kaggle/icon.js +6 -0
  194. package/dist/toolkits/kaggle/manifest.d.ts +3 -0
  195. package/dist/toolkits/kaggle/manifest.js +32 -0
  196. package/dist/toolkits/kaggle/tools/client.d.ts +10 -0
  197. package/dist/toolkits/kaggle/tools/client.js +94 -0
  198. package/dist/toolkits/kaggle/tools/competitions.d.ts +48 -0
  199. package/dist/toolkits/kaggle/tools/competitions.js +109 -0
  200. package/dist/toolkits/kaggle/tools/config.d.ts +110 -0
  201. package/dist/toolkits/kaggle/tools/config.js +256 -0
  202. package/dist/toolkits/kaggle/tools/datasets.d.ts +88 -0
  203. package/dist/toolkits/kaggle/tools/datasets.js +161 -0
  204. package/dist/toolkits/kaggle/tools/index.d.ts +482 -0
  205. package/dist/toolkits/kaggle/tools/index.js +53 -0
  206. package/dist/toolkits/kaggle/tools/kernels.d.ts +62 -0
  207. package/dist/toolkits/kaggle/tools/kernels.js +121 -0
  208. package/dist/toolkits/kaggle/tools/model_instance_files.d.ts +11 -0
  209. package/dist/toolkits/kaggle/tools/model_instance_files.js +23 -0
  210. package/dist/toolkits/kaggle/tools/model_instances.d.ts +8 -0
  211. package/dist/toolkits/kaggle/tools/model_instances.js +20 -0
  212. package/dist/toolkits/kaggle/tools/models.d.ts +14 -0
  213. package/dist/toolkits/kaggle/tools/models.js +33 -0
  214. package/dist/toolkits/nasa/icon.d.ts +5 -0
  215. package/dist/toolkits/nasa/icon.js +56 -0
  216. package/dist/toolkits/nasa/manifest.d.ts +3 -0
  217. package/dist/toolkits/nasa/manifest.js +49 -0
  218. package/dist/toolkits/nasa/tools/agage.d.ts +60 -0
  219. package/dist/toolkits/nasa/tools/agage.js +176 -0
  220. package/dist/toolkits/nasa/tools/client.d.ts +95 -0
  221. package/dist/toolkits/nasa/tools/client.js +337 -0
  222. package/dist/toolkits/nasa/tools/cmr.d.ts +268 -0
  223. package/dist/toolkits/nasa/tools/cmr.js +984 -0
  224. package/dist/toolkits/nasa/tools/donki.d.ts +63 -0
  225. package/dist/toolkits/nasa/tools/donki.js +301 -0
  226. package/dist/toolkits/nasa/tools/eonet.d.ts +74 -0
  227. package/dist/toolkits/nasa/tools/eonet.js +279 -0
  228. package/dist/toolkits/nasa/tools/icesat2.d.ts +25 -0
  229. package/dist/toolkits/nasa/tools/icesat2.js +97 -0
  230. package/dist/toolkits/nasa/tools/imagery.d.ts +36 -0
  231. package/dist/toolkits/nasa/tools/imagery.js +138 -0
  232. package/dist/toolkits/nasa/tools/index.d.ts +1063 -0
  233. package/dist/toolkits/nasa/tools/index.js +865 -0
  234. package/dist/toolkits/nasa/tools/neo.d.ts +15 -0
  235. package/dist/toolkits/nasa/tools/neo.js +75 -0
  236. package/dist/toolkits/nasa/tools/ntrs.d.ts +152 -0
  237. package/dist/toolkits/nasa/tools/ntrs.js +292 -0
  238. package/dist/toolkits/nasa/tools/osdr.d.ts +72 -0
  239. package/dist/toolkits/nasa/tools/osdr.js +290 -0
  240. package/dist/toolkits/nasa/tools/planetary.d.ts +58 -0
  241. package/dist/toolkits/nasa/tools/planetary.js +312 -0
  242. package/dist/toolkits/nasa/tools/power.d.ts +52 -0
  243. package/dist/toolkits/nasa/tools/power.js +213 -0
  244. package/dist/toolkits/nasa/tools/ssc.d.ts +44 -0
  245. package/dist/toolkits/nasa/tools/ssc.js +92 -0
  246. package/dist/toolkits/nasa/tools/tolnet.d.ts +84 -0
  247. package/dist/toolkits/nasa/tools/tolnet.js +254 -0
  248. package/dist/toolkits/neo4j/icon.d.ts +5 -0
  249. package/dist/toolkits/neo4j/icon.js +6 -0
  250. package/dist/toolkits/neo4j/manifest.d.ts +3 -0
  251. package/dist/toolkits/neo4j/manifest.js +33 -0
  252. package/dist/toolkits/neo4j/tools/analytics.d.ts +21 -0
  253. package/dist/toolkits/neo4j/tools/analytics.js +91 -0
  254. package/dist/toolkits/neo4j/tools/client.d.ts +6 -0
  255. package/dist/toolkits/neo4j/tools/client.js +105 -0
  256. package/dist/toolkits/neo4j/tools/index.d.ts +198 -0
  257. package/dist/toolkits/neo4j/tools/index.js +30 -0
  258. package/dist/toolkits/neo4j/tools/instances.d.ts +47 -0
  259. package/dist/toolkits/neo4j/tools/instances.js +127 -0
  260. package/dist/toolkits/neo4j/tools/projects.d.ts +44 -0
  261. package/dist/toolkits/neo4j/tools/projects.js +110 -0
  262. package/dist/toolkits/neo4j/tools/snapshots.d.ts +20 -0
  263. package/dist/toolkits/neo4j/tools/snapshots.js +57 -0
  264. package/dist/toolkits/neon/icon.d.ts +5 -0
  265. package/dist/toolkits/neon/icon.js +8 -0
  266. package/dist/toolkits/neon/manifest.d.ts +3 -0
  267. package/dist/toolkits/neon/manifest.js +36 -0
  268. package/dist/toolkits/neon/tools/auth.d.ts +115 -0
  269. package/dist/toolkits/neon/tools/auth.js +286 -0
  270. package/dist/toolkits/neon/tools/branches.d.ts +189 -0
  271. package/dist/toolkits/neon/tools/branches.js +465 -0
  272. package/dist/toolkits/neon/tools/client.d.ts +10 -0
  273. package/dist/toolkits/neon/tools/client.js +69 -0
  274. package/dist/toolkits/neon/tools/dataapi.d.ts +42 -0
  275. package/dist/toolkits/neon/tools/dataapi.js +111 -0
  276. package/dist/toolkits/neon/tools/endpoints.d.ts +59 -0
  277. package/dist/toolkits/neon/tools/endpoints.js +163 -0
  278. package/dist/toolkits/neon/tools/index.d.ts +976 -0
  279. package/dist/toolkits/neon/tools/index.js +130 -0
  280. package/dist/toolkits/neon/tools/meta.d.ts +4 -0
  281. package/dist/toolkits/neon/tools/meta.js +16 -0
  282. package/dist/toolkits/neon/tools/orgs.d.ts +112 -0
  283. package/dist/toolkits/neon/tools/orgs.js +303 -0
  284. package/dist/toolkits/neon/tools/projects.d.ts +177 -0
  285. package/dist/toolkits/neon/tools/projects.js +468 -0
  286. package/dist/toolkits/neon/tools/snapshots.d.ts +24 -0
  287. package/dist/toolkits/neon/tools/snapshots.js +67 -0
  288. package/dist/toolkits/new-relic/icon.d.ts +5 -0
  289. package/dist/toolkits/new-relic/icon.js +6 -0
  290. package/dist/toolkits/new-relic/manifest.d.ts +3 -0
  291. package/dist/toolkits/new-relic/manifest.js +41 -0
  292. package/dist/toolkits/new-relic/tools/admin.d.ts +310 -0
  293. package/dist/toolkits/new-relic/tools/admin.js +282 -0
  294. package/dist/toolkits/new-relic/tools/alert-policies.d.ts +74 -0
  295. package/dist/toolkits/new-relic/tools/alert-policies.js +136 -0
  296. package/dist/toolkits/new-relic/tools/apm.d.ts +129 -0
  297. package/dist/toolkits/new-relic/tools/apm.js +228 -0
  298. package/dist/toolkits/new-relic/tools/client.d.ts +62 -0
  299. package/dist/toolkits/new-relic/tools/client.js +167 -0
  300. package/dist/toolkits/new-relic/tools/conditions.d.ts +190 -0
  301. package/dist/toolkits/new-relic/tools/conditions.js +265 -0
  302. package/dist/toolkits/new-relic/tools/config.d.ts +73 -0
  303. package/dist/toolkits/new-relic/tools/config.js +131 -0
  304. package/dist/toolkits/new-relic/tools/dashboards.d.ts +204 -0
  305. package/dist/toolkits/new-relic/tools/dashboards.js +159 -0
  306. package/dist/toolkits/new-relic/tools/entities.d.ts +160 -0
  307. package/dist/toolkits/new-relic/tools/entities.js +218 -0
  308. package/dist/toolkits/new-relic/tools/index.d.ts +23 -0
  309. package/dist/toolkits/new-relic/tools/index.js +179 -0
  310. package/dist/toolkits/new-relic/tools/ingest.d.ts +31 -0
  311. package/dist/toolkits/new-relic/tools/ingest.js +80 -0
  312. package/dist/toolkits/new-relic/tools/notifications.d.ts +186 -0
  313. package/dist/toolkits/new-relic/tools/notifications.js +232 -0
  314. package/dist/toolkits/new-relic/tools/nrql-conditions.d.ts +105 -0
  315. package/dist/toolkits/new-relic/tools/nrql-conditions.js +136 -0
  316. package/dist/toolkits/new-relic/tools/nrql.d.ts +38 -0
  317. package/dist/toolkits/new-relic/tools/nrql.js +99 -0
  318. package/dist/toolkits/new-relic/tools/synthetics.d.ts +176 -0
  319. package/dist/toolkits/new-relic/tools/synthetics.js +246 -0
  320. package/dist/toolkits/notebook-lm/icon.d.ts +5 -0
  321. package/dist/toolkits/notebook-lm/icon.js +6 -0
  322. package/dist/toolkits/notebook-lm/manifest.d.ts +3 -0
  323. package/dist/toolkits/notebook-lm/manifest.js +44 -0
  324. package/dist/toolkits/notebook-lm/tools/add-text-sources.d.ts +36 -0
  325. package/dist/toolkits/notebook-lm/tools/add-text-sources.js +51 -0
  326. package/dist/toolkits/notebook-lm/tools/create-audio-overview.d.ts +47 -0
  327. package/dist/toolkits/notebook-lm/tools/create-audio-overview.js +55 -0
  328. package/dist/toolkits/notebook-lm/tools/create-notebook.d.ts +52 -0
  329. package/dist/toolkits/notebook-lm/tools/create-notebook.js +49 -0
  330. package/dist/toolkits/notebook-lm/tools/delete-audio-overview.d.ts +33 -0
  331. package/dist/toolkits/notebook-lm/tools/delete-audio-overview.js +46 -0
  332. package/dist/toolkits/notebook-lm/tools/delete-notebooks.d.ts +32 -0
  333. package/dist/toolkits/notebook-lm/tools/delete-notebooks.js +46 -0
  334. package/dist/toolkits/notebook-lm/tools/delete-sources.d.ts +33 -0
  335. package/dist/toolkits/notebook-lm/tools/delete-sources.js +47 -0
  336. package/dist/toolkits/notebook-lm/tools/get-notebook.d.ts +52 -0
  337. package/dist/toolkits/notebook-lm/tools/get-notebook.js +45 -0
  338. package/dist/toolkits/notebook-lm/tools/get-source.d.ts +53 -0
  339. package/dist/toolkits/notebook-lm/tools/get-source.js +47 -0
  340. package/dist/toolkits/notebook-lm/tools/index.d.ts +516 -0
  341. package/dist/toolkits/notebook-lm/tools/index.js +93 -0
  342. package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.d.ts +32 -0
  343. package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.js +41 -0
  344. package/dist/toolkits/notebook-lm/tools/share-notebook.d.ts +48 -0
  345. package/dist/toolkits/notebook-lm/tools/share-notebook.js +57 -0
  346. package/dist/toolkits/notebook-lm/tools/upload-source-file.d.ts +40 -0
  347. package/dist/toolkits/notebook-lm/tools/upload-source-file.js +62 -0
  348. package/dist/toolkits/notebook-lm/tools/utils.d.ts +15 -0
  349. package/dist/toolkits/notebook-lm/tools/utils.js +46 -0
  350. package/dist/toolkits/npm/icon.d.ts +5 -0
  351. package/dist/toolkits/npm/icon.js +11 -0
  352. package/dist/toolkits/npm/manifest.d.ts +3 -0
  353. package/dist/toolkits/npm/manifest.js +35 -0
  354. package/dist/toolkits/npm/tools/client.d.ts +19 -0
  355. package/dist/toolkits/npm/tools/client.js +64 -0
  356. package/dist/toolkits/npm/tools/downloads.d.ts +19 -0
  357. package/dist/toolkits/npm/tools/downloads.js +39 -0
  358. package/dist/toolkits/npm/tools/index.d.ts +14 -0
  359. package/dist/toolkits/npm/tools/index.js +24 -0
  360. package/dist/toolkits/npm/tools/registry.d.ts +24 -0
  361. package/dist/toolkits/npm/tools/registry.js +58 -0
  362. package/dist/toolkits/npm/tools/security.d.ts +9 -0
  363. package/dist/toolkits/npm/tools/security.js +29 -0
  364. package/dist/toolkits/slack/tools/admin-users.d.ts +1 -1
  365. package/dist/toolkits/slack/tools/slack-lists.d.ts +3 -3
  366. package/dist/toolkits/snowflake/icon.d.ts +5 -0
  367. package/dist/toolkits/snowflake/icon.js +6 -0
  368. package/dist/toolkits/snowflake/manifest.d.ts +3 -0
  369. package/dist/toolkits/snowflake/manifest.js +32 -0
  370. package/dist/toolkits/snowflake/tools/catalog.d.ts +56 -0
  371. package/dist/toolkits/snowflake/tools/catalog.js +123 -0
  372. package/dist/toolkits/snowflake/tools/client.d.ts +53 -0
  373. package/dist/toolkits/snowflake/tools/client.js +145 -0
  374. package/dist/toolkits/snowflake/tools/index.d.ts +14 -0
  375. package/dist/toolkits/snowflake/tools/index.js +28 -0
  376. package/dist/toolkits/snowflake/tools/statements.d.ts +27 -0
  377. package/dist/toolkits/snowflake/tools/statements.js +84 -0
  378. package/dist/toolkits/snowflake/tools/status.d.ts +22 -0
  379. package/dist/toolkits/snowflake/tools/status.js +54 -0
  380. package/dist/toolkits/telegram/icon.d.ts +5 -0
  381. package/dist/toolkits/telegram/icon.js +6 -0
  382. package/dist/toolkits/telegram/manifest.d.ts +3 -0
  383. package/dist/toolkits/telegram/manifest.js +34 -0
  384. package/dist/toolkits/telegram/tools/bot.d.ts +13 -0
  385. package/dist/toolkits/telegram/tools/bot.js +23 -0
  386. package/dist/toolkits/telegram/tools/chats.d.ts +22 -0
  387. package/dist/toolkits/telegram/tools/chats.js +46 -0
  388. package/dist/toolkits/telegram/tools/client.d.ts +12 -0
  389. package/dist/toolkits/telegram/tools/client.js +46 -0
  390. package/dist/toolkits/telegram/tools/index.d.ts +15 -0
  391. package/dist/toolkits/telegram/tools/index.js +31 -0
  392. package/dist/toolkits/telegram/tools/messages.d.ts +86 -0
  393. package/dist/toolkits/telegram/tools/messages.js +134 -0
  394. package/dist/toolkits/telegram/tools/updates.d.ts +23 -0
  395. package/dist/toolkits/telegram/tools/updates.js +54 -0
  396. package/dist/toolkits/youtube/tools/get-channel-activities.d.ts +1 -1
  397. package/dist/toolkits/youtube/tools/index.d.ts +5 -5
  398. package/dist/toolkits/youtube/tools/list-channel-sections.d.ts +1 -1
  399. package/dist/toolkits/youtube/tools/post-comment.d.ts +1 -1
  400. package/dist/toolkits/youtube/tools/subscribe-channel.d.ts +1 -1
  401. package/dist/toolkits/youtube/tools/unsubscribe-channel.d.ts +1 -1
  402. package/package.json +2 -3
@@ -0,0 +1,167 @@
1
+ // @ts-nocheck
2
+ import { z } from 'zod';
3
+ export const NERDGRAPH_URL = 'https://api.newrelic.com/graphql';
4
+ export const REST_V2_BASE = 'https://api.newrelic.com/v2';
5
+ export const INFRA_API_BASE = 'https://infra-api.newrelic.com/v2';
6
+ export const SYNTHETICS_API_BASE = 'https://synthetics.newrelic.com/synthetics/api/v3';
7
+ export const LOOKUPS_API_BASE = 'https://nrql-lookup.service.newrelic.com/v1';
8
+ export const EVENTS_API_BASE = 'https://insights-collector.newrelic.com/v1';
9
+ export const TRACE_API_BASE = 'https://trace-api.newrelic.com/trace/v1';
10
+ export const newRelicApiKeyField = z
11
+ .string()
12
+ .optional()
13
+ .describe('New Relic user API key (NRAK-...). Injected at runtime — find it at one.newrelic.com > API keys.');
14
+ export function missingKey() {
15
+ return { error: 'New Relic API key is required. Connect New Relic first.' };
16
+ }
17
+ async function parseBody(response) {
18
+ const text = await response.text();
19
+ if (!text)
20
+ return {};
21
+ try {
22
+ return JSON.parse(text);
23
+ }
24
+ catch {
25
+ return { raw: text };
26
+ }
27
+ }
28
+ export async function nrFetch(url, apiKey, options) {
29
+ if (!apiKey)
30
+ return { ok: false, error: missingKey() };
31
+ let full = url;
32
+ if (options?.query) {
33
+ const search = new URLSearchParams();
34
+ for (const [k, v] of Object.entries(options.query)) {
35
+ if (v !== undefined)
36
+ search.set(k, String(v));
37
+ }
38
+ const qs = search.toString();
39
+ if (qs)
40
+ full += (full.includes('?') ? '&' : '?') + qs;
41
+ }
42
+ const headers = { 'Api-Key': apiKey, ...(options?.headers ?? {}) };
43
+ if (options?.body !== undefined && !headers['Content-Type'])
44
+ headers['Content-Type'] = 'application/json';
45
+ try {
46
+ const response = await fetch(full, {
47
+ method: options?.method ?? 'GET',
48
+ headers,
49
+ body: options?.body !== undefined ? JSON.stringify(options.body) : undefined,
50
+ });
51
+ const data = await parseBody(response);
52
+ if (!response.ok)
53
+ return { ok: false, error: data };
54
+ return { ok: true, data };
55
+ }
56
+ catch (error) {
57
+ return { ok: false, error: { message: error instanceof Error ? error.message : 'Unknown error' } };
58
+ }
59
+ }
60
+ /** NerdGraph GraphQL request. Returns raw { data, errors } on success. */
61
+ export async function nerdgraph(apiKey, query, variables, action = 'call NerdGraph') {
62
+ const result = await nrFetch(NERDGRAPH_URL, apiKey, {
63
+ method: 'POST',
64
+ body: { query, variables: variables ?? {} },
65
+ });
66
+ if (!result.ok) {
67
+ if (result.error?.error)
68
+ return result.error;
69
+ return { error: `Failed to ${action}`, details: result.error };
70
+ }
71
+ return result.data;
72
+ }
73
+ /** REST API v2 request (api.newrelic.com/v2). */
74
+ export async function restV2(apiKey, method, path, options, action = 'call New Relic REST API') {
75
+ try {
76
+ const result = await nrFetch(`${REST_V2_BASE}${path}`, apiKey, { method, ...options });
77
+ if (!result.ok) {
78
+ if (result.error?.error)
79
+ return result.error;
80
+ return { error: `Failed to ${action}`, details: result.error };
81
+ }
82
+ return result.data;
83
+ }
84
+ catch (error) {
85
+ return { error: `Error while trying to ${action}`, message: error instanceof Error ? error.message : 'Unknown error' };
86
+ }
87
+ }
88
+ /** Infrastructure alerts API (infra-api.newrelic.com/v2). Bodies are wrapped in { data }. */
89
+ export async function infraApi(apiKey, method, path, options, action = 'call New Relic Infrastructure API') {
90
+ try {
91
+ const result = await nrFetch(`${INFRA_API_BASE}${path}`, apiKey, {
92
+ method,
93
+ query: options?.query,
94
+ body: options?.data !== undefined ? { data: options.data } : undefined,
95
+ });
96
+ if (!result.ok) {
97
+ if (result.error?.error)
98
+ return result.error;
99
+ return { error: `Failed to ${action}`, details: result.error };
100
+ }
101
+ return result.data;
102
+ }
103
+ catch (error) {
104
+ return { error: `Error while trying to ${action}`, message: error instanceof Error ? error.message : 'Unknown error' };
105
+ }
106
+ }
107
+ /** Synthetics REST API v3 (uses X-Api-Key with a User/Admin key). */
108
+ export async function synthApi(apiKey, method, path, options, action = 'call New Relic Synthetics API') {
109
+ try {
110
+ if (!apiKey)
111
+ return missingKey();
112
+ let full = `${SYNTHETICS_API_BASE}${path}`;
113
+ if (options?.query) {
114
+ const search = new URLSearchParams();
115
+ for (const [k, v] of Object.entries(options.query)) {
116
+ if (v !== undefined)
117
+ search.set(k, String(v));
118
+ }
119
+ const qs = search.toString();
120
+ if (qs)
121
+ full += `?${qs}`;
122
+ }
123
+ const headers = { 'X-Api-Key': apiKey };
124
+ if (options?.body !== undefined)
125
+ headers['Content-Type'] = 'application/json';
126
+ const response = await fetch(full, {
127
+ method,
128
+ headers,
129
+ body: options?.body !== undefined ? JSON.stringify(options.body) : undefined,
130
+ });
131
+ if (response.status === 204)
132
+ return { success: true };
133
+ const data = await parseBody(response);
134
+ if (!response.ok)
135
+ return { error: `Failed to ${action}`, details: data };
136
+ return data;
137
+ }
138
+ catch (error) {
139
+ return { error: `Error while trying to ${action}`, message: error instanceof Error ? error.message : 'Unknown error' };
140
+ }
141
+ }
142
+ /** NRQL Lookups API (lookup tables). */
143
+ export async function lookupsApi(apiKey, method, path, options, action = 'call New Relic Lookups API') {
144
+ try {
145
+ const result = await nrFetch(`${LOOKUPS_API_BASE}${path}`, apiKey, {
146
+ method,
147
+ ...options,
148
+ headers: { Accept: 'application/json' },
149
+ });
150
+ if (!result.ok) {
151
+ if (result.error?.error)
152
+ return result.error;
153
+ return { error: `Failed to ${action}`, details: result.error };
154
+ }
155
+ return result.data;
156
+ }
157
+ catch (error) {
158
+ return { error: `Error while trying to ${action}`, message: error instanceof Error ? error.message : 'Unknown error' };
159
+ }
160
+ }
161
+ export const accountIdField = (desc = 'New Relic account ID') => z.number().int().positive().describe(desc);
162
+ export const tagInput = z.object({
163
+ key: z.string().describe('Tag key, e.g. environment'),
164
+ values: z.array(z.string()).min(1).describe('Tag values for this key'),
165
+ });
166
+ export const RULE_RESULT_FIELDS = 'errors { message type } rule { id action enabled evalOrder matchExpression notes replacement terminateChain applicationGuid applicationName createdAt }';
167
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1,190 @@
1
+ export declare const createExternalServiceCondition: import("ai").Tool<{
2
+ type: "apm_external_service";
3
+ name: string;
4
+ policyId: number;
5
+ terms: {
6
+ priority: "warning" | "critical";
7
+ duration: string | number;
8
+ threshold: string;
9
+ operator: "above" | "below" | "equal";
10
+ timeFunction: "all" | "any";
11
+ }[];
12
+ entities: number[];
13
+ metric: "response_time_average" | "response_time_minimum" | "response_time_maximum" | "throughput";
14
+ externalServiceUrl: string;
15
+ enabled?: boolean | undefined;
16
+ newRelicApiKey?: string | undefined;
17
+ runbookUrl?: string | undefined;
18
+ }, any>;
19
+ export declare const updateExternalServiceCondition: import("ai").Tool<{
20
+ conditionId: number;
21
+ type?: "apm_external_service" | undefined;
22
+ name?: string | undefined;
23
+ enabled?: boolean | undefined;
24
+ newRelicApiKey?: string | undefined;
25
+ terms?: {
26
+ priority: "warning" | "critical";
27
+ duration: string | number;
28
+ threshold: string;
29
+ operator: "above" | "below" | "equal";
30
+ timeFunction: "all" | "any";
31
+ }[] | undefined;
32
+ runbookUrl?: string | undefined;
33
+ entities?: number[] | undefined;
34
+ metric?: "response_time_average" | "response_time_minimum" | "response_time_maximum" | "throughput" | undefined;
35
+ externalServiceUrl?: string | undefined;
36
+ }, any>;
37
+ export declare const deleteExternalServiceCondition: import("ai").Tool<{
38
+ conditionId: number;
39
+ newRelicApiKey?: string | undefined;
40
+ }, any>;
41
+ export declare const listExternalServiceConditions: import("ai").Tool<{
42
+ policyId: number;
43
+ page?: number | undefined;
44
+ newRelicApiKey?: string | undefined;
45
+ }, any>;
46
+ export declare const createSyntheticsAlertCondition: import("ai").Tool<{
47
+ policyId: number;
48
+ syntheticsCondition: {
49
+ name: string;
50
+ monitorId: string;
51
+ enabled?: boolean | undefined;
52
+ runbookUrl?: string | undefined;
53
+ };
54
+ newRelicApiKey?: string | undefined;
55
+ }, any>;
56
+ export declare const updateSyntheticsAlertCondition: import("ai").Tool<{
57
+ conditionId: number;
58
+ syntheticsCondition: {
59
+ monitorId: string;
60
+ name?: string | undefined;
61
+ enabled?: boolean | undefined;
62
+ runbookUrl?: string | undefined;
63
+ };
64
+ newRelicApiKey?: string | undefined;
65
+ }, any>;
66
+ export declare const deleteSyntheticsCondition: import("ai").Tool<{
67
+ conditionId: number;
68
+ newRelicApiKey?: string | undefined;
69
+ }, any>;
70
+ export declare const listSyntheticsConditions: import("ai").Tool<{
71
+ policyId: number;
72
+ page?: number | undefined;
73
+ newRelicApiKey?: string | undefined;
74
+ }, any>;
75
+ export declare const createLocationFailureCondition: import("ai").Tool<{
76
+ name: string;
77
+ policyId: number;
78
+ terms: {
79
+ priority: "warning" | "critical";
80
+ threshold: number;
81
+ }[];
82
+ entities: string[];
83
+ enabled?: boolean | undefined;
84
+ newRelicApiKey?: string | undefined;
85
+ violationTimeLimitSeconds?: number | undefined;
86
+ runbookUrl?: string | undefined;
87
+ }, any>;
88
+ export declare const updateLocationFailureCondition: import("ai").Tool<{
89
+ conditionId: number;
90
+ name?: string | undefined;
91
+ enabled?: boolean | undefined;
92
+ newRelicApiKey?: string | undefined;
93
+ terms?: {
94
+ priority: "warning" | "critical";
95
+ threshold: number;
96
+ }[] | undefined;
97
+ violationTimeLimitSeconds?: number | undefined;
98
+ runbookUrl?: string | undefined;
99
+ entities?: string[] | undefined;
100
+ }, any>;
101
+ export declare const deleteLocationFailureCondition: import("ai").Tool<{
102
+ conditionId: number;
103
+ newRelicApiKey?: string | undefined;
104
+ }, any>;
105
+ export declare const listLocationFailureConditions: import("ai").Tool<{
106
+ policyId: number;
107
+ page?: number | undefined;
108
+ newRelicApiKey?: string | undefined;
109
+ }, any>;
110
+ export declare const createInfraCondition: import("ai").Tool<{
111
+ type: "infra_metric" | "infra_process_running" | "infra_host_not_reporting";
112
+ name: string;
113
+ enabled: boolean;
114
+ policyId: number;
115
+ comparison?: "above" | "below" | "equal" | undefined;
116
+ eventType?: string | undefined;
117
+ newRelicApiKey?: string | undefined;
118
+ runbookUrl?: string | undefined;
119
+ selectValue?: string | undefined;
120
+ whereClause?: string | undefined;
121
+ processWhereClause?: string | undefined;
122
+ criticalThreshold?: {
123
+ durationMinutes: number;
124
+ value?: number | undefined;
125
+ timeFunction?: "all" | "any" | undefined;
126
+ } | undefined;
127
+ warningThreshold?: {
128
+ durationMinutes: number;
129
+ value?: number | undefined;
130
+ timeFunction?: "all" | "any" | undefined;
131
+ } | undefined;
132
+ violationCloseTimer?: number | undefined;
133
+ }, any>;
134
+ export declare const getInfraCondition: import("ai").Tool<{
135
+ conditionId: string;
136
+ newRelicApiKey?: string | undefined;
137
+ }, any>;
138
+ export declare const listInfraConditions: import("ai").Tool<{
139
+ policyId: number;
140
+ limit?: number | undefined;
141
+ newRelicApiKey?: string | undefined;
142
+ offset?: number | undefined;
143
+ }, any>;
144
+ export declare const updateInfraCondition: import("ai").Tool<{
145
+ conditionId: number;
146
+ type?: "infra_metric" | "infra_process_running" | "infra_host_not_reporting" | undefined;
147
+ name?: string | undefined;
148
+ enabled?: boolean | undefined;
149
+ comparison?: "above" | "below" | "equal" | undefined;
150
+ eventType?: string | undefined;
151
+ newRelicApiKey?: string | undefined;
152
+ policyId?: number | undefined;
153
+ runbookUrl?: string | undefined;
154
+ selectValue?: string | undefined;
155
+ whereClause?: string | undefined;
156
+ processWhereClause?: string | undefined;
157
+ criticalThreshold?: {
158
+ durationMinutes: number;
159
+ value?: number | undefined;
160
+ timeFunction?: "all" | "any" | undefined;
161
+ } | undefined;
162
+ warningThreshold?: {
163
+ durationMinutes: number;
164
+ value?: number | undefined;
165
+ timeFunction?: "all" | "any" | undefined;
166
+ } | undefined;
167
+ violationCloseTimer?: number | undefined;
168
+ }, any>;
169
+ export declare const deleteInfraCondition: import("ai").Tool<{
170
+ conditionId: string;
171
+ newRelicApiKey?: string | undefined;
172
+ }, any>;
173
+ export declare const getAlertConditions: import("ai").Tool<{
174
+ policyId: number;
175
+ newRelicApiKey?: string | undefined;
176
+ }, any>;
177
+ export declare const removeEntityCondition: import("ai").Tool<{
178
+ conditionId: number;
179
+ entityId: number;
180
+ entityType: string;
181
+ newRelicApiKey?: string | undefined;
182
+ }, any>;
183
+ export declare const getAlertsViolations: import("ai").Tool<{
184
+ page?: number | undefined;
185
+ newRelicApiKey?: string | undefined;
186
+ startDate?: string | undefined;
187
+ endDate?: string | undefined;
188
+ onlyOpen?: boolean | undefined;
189
+ }, any>;
190
+ //# sourceMappingURL=conditions.d.ts.map
@@ -0,0 +1,265 @@
1
+ // @ts-nocheck
2
+ import { tool } from 'ai';
3
+ import { z } from 'zod';
4
+ import { infraApi, newRelicApiKeyField, restV2 } from './client.js';
5
+ const policyIdField = z.number().int().positive().describe('Policy ID the condition belongs to');
6
+ const thresholdTerm = (durationType) => z.object({
7
+ duration: (durationType === 'string' ? z.string() : z.number().int().min(5).max(120)).describe('Minutes threshold must be breached (5-120)'),
8
+ operator: z.enum(['above', 'below', 'equal']),
9
+ priority: z.enum(['critical', 'warning']).describe('At least one term must be critical'),
10
+ threshold: z.string().describe("Numeric string >= 0, e.g. '1.0'"),
11
+ timeFunction: z.enum(['all', 'any']).describe('all: entire duration; any: at least once'),
12
+ });
13
+ // ---- External service conditions (APM/mobile external calls) ----
14
+ export const createExternalServiceCondition = tool({
15
+ description: 'Creates an external-service condition (response time/throughput of external calls from APM apps). URL without protocol.',
16
+ inputSchema: z.object({
17
+ newRelicApiKey: newRelicApiKeyField,
18
+ policyId: policyIdField,
19
+ type: z.enum(['apm_external_service']).describe("Must be 'apm_external_service'"),
20
+ name: z.string().describe('Condition name, unique within the policy'),
21
+ entities: z.array(z.number().int()).min(1).describe('Application IDs to monitor'),
22
+ metric: z.enum(['response_time_average', 'response_time_minimum', 'response_time_maximum', 'throughput']),
23
+ externalServiceUrl: z.string().describe("Monitored host, e.g. 'api.example.com' (no protocol)"),
24
+ terms: z.array(thresholdTerm('int')).min(1),
25
+ enabled: z.boolean().optional().describe('Actively monitoring (default true)'),
26
+ runbookUrl: z.string().optional(),
27
+ }),
28
+ execute: async ({ newRelicApiKey, policyId, ...condition }) => restV2(newRelicApiKey, 'POST', `/alerts_external_service_conditions/policies/${policyId}.json`, { body: { external_service_condition: { enabled: true, ...condition } } }, 'create external service condition'),
29
+ });
30
+ export const updateExternalServiceCondition = tool({
31
+ description: 'Updates an external-service condition (thresholds, entities, metric). Only provided fields change.',
32
+ inputSchema: z.object({
33
+ newRelicApiKey: newRelicApiKeyField,
34
+ conditionId: z.number().int().positive().describe('Condition ID to update'),
35
+ name: z.string().optional(),
36
+ type: z.enum(['apm_external_service']).optional(),
37
+ entities: z.array(z.number().int()).min(1).optional(),
38
+ metric: z.enum(['response_time_average', 'response_time_minimum', 'response_time_maximum', 'throughput']).optional(),
39
+ externalServiceUrl: z.string().optional(),
40
+ terms: z.array(thresholdTerm('int')).min(1).optional(),
41
+ enabled: z.boolean().optional(),
42
+ runbookUrl: z.string().optional(),
43
+ }),
44
+ execute: async ({ newRelicApiKey, conditionId, ...condition }) => restV2(newRelicApiKey, 'PUT', `/alerts_external_service_conditions/${conditionId}.json`, { body: { external_service_condition: condition } }, 'update external service condition'),
45
+ });
46
+ export const deleteExternalServiceCondition = tool({
47
+ description: 'Deletes an external-service condition after confirming the condition ID.',
48
+ inputSchema: z.object({
49
+ newRelicApiKey: newRelicApiKeyField,
50
+ conditionId: z.number().int().positive().describe('Condition ID to delete'),
51
+ }),
52
+ execute: async ({ newRelicApiKey, conditionId }) => restV2(newRelicApiKey, 'DELETE', `/alerts_external_service_conditions/${conditionId}.json`, undefined, 'delete external service condition'),
53
+ });
54
+ export const listExternalServiceConditions = tool({
55
+ description: 'Lists external-service conditions for a policy (existing monitoring configs).',
56
+ inputSchema: z.object({
57
+ newRelicApiKey: newRelicApiKeyField,
58
+ policyId: policyIdField,
59
+ page: z.number().int().min(1).optional(),
60
+ }),
61
+ execute: async ({ newRelicApiKey, policyId, page }) => restV2(newRelicApiKey, 'GET', '/alerts_external_service_conditions.json', { query: { policy_id: policyId, page } }, 'list external service conditions'),
62
+ });
63
+ // ---- Synthetics conditions ----
64
+ export const createSyntheticsAlertCondition = tool({
65
+ description: 'Creates a synthetics condition alerting on monitor failures/performance. Monitor UUID must already exist.',
66
+ inputSchema: z.object({
67
+ newRelicApiKey: newRelicApiKeyField,
68
+ policyId: policyIdField,
69
+ syntheticsCondition: z.object({
70
+ name: z.string().describe('Condition name, unique within the policy'),
71
+ monitorId: z.string().describe('Synthetics monitor UUID to watch'),
72
+ enabled: z.boolean().optional().describe('Active immediately (default true)'),
73
+ runbookUrl: z.string().optional(),
74
+ }).describe('Synthetics condition configuration'),
75
+ }),
76
+ execute: async ({ newRelicApiKey, policyId, syntheticsCondition }) => restV2(newRelicApiKey, 'POST', `/alerts_synthetics_conditions/policies/${policyId}.json`, { body: { synthetics_condition: { enabled: true, ...syntheticsCondition } } }, 'create synthetics condition'),
77
+ });
78
+ export const updateSyntheticsAlertCondition = tool({
79
+ description: 'Updates a synthetics condition (name, enabled, runbook). monitor_id is required by the API even for updates.',
80
+ inputSchema: z.object({
81
+ newRelicApiKey: newRelicApiKeyField,
82
+ conditionId: z.number().int().describe('Condition ID to update'),
83
+ syntheticsCondition: z.object({
84
+ monitorId: z.string().describe('Monitor UUID (required, resend current value)'),
85
+ name: z.string().optional(),
86
+ enabled: z.boolean().optional(),
87
+ runbookUrl: z.string().optional(),
88
+ }).describe('Fields to update'),
89
+ }),
90
+ execute: async ({ newRelicApiKey, conditionId, syntheticsCondition }) => restV2(newRelicApiKey, 'PUT', `/alerts_synthetics_conditions/${conditionId}.json`, { body: { synthetics_condition: syntheticsCondition } }, 'update synthetics condition'),
91
+ });
92
+ export const deleteSyntheticsCondition = tool({
93
+ description: 'Deletes a synthetics alert condition after confirming the condition ID.',
94
+ inputSchema: z.object({
95
+ newRelicApiKey: newRelicApiKeyField,
96
+ conditionId: z.number().int().describe('Condition ID to delete'),
97
+ }),
98
+ execute: async ({ newRelicApiKey, conditionId }) => restV2(newRelicApiKey, 'DELETE', `/alerts_synthetics_conditions/${conditionId}.json`, undefined, 'delete synthetics condition'),
99
+ });
100
+ export const listSyntheticsConditions = tool({
101
+ description: 'Lists synthetics conditions for a policy with their monitor bindings.',
102
+ inputSchema: z.object({
103
+ newRelicApiKey: newRelicApiKeyField,
104
+ policyId: policyIdField,
105
+ page: z.number().int().min(1).optional(),
106
+ }),
107
+ execute: async ({ newRelicApiKey, policyId, page }) => restV2(newRelicApiKey, 'GET', '/alerts_synthetics_conditions.json', { query: { policy_id: policyId, page } }, 'list synthetics conditions'),
108
+ });
109
+ // ---- Location failure (multi-location) conditions ----
110
+ const locationTerm = z.object({
111
+ priority: z.enum(['critical', 'warning']),
112
+ threshold: z.number().int().min(1).describe('Failing locations triggering the alert'),
113
+ });
114
+ export const createLocationFailureCondition = tool({
115
+ description: 'Creates a multi-location failure condition alerting when N locations fail simultaneously. Entities are monitor UUIDs.',
116
+ inputSchema: z.object({
117
+ newRelicApiKey: newRelicApiKeyField,
118
+ policyId: policyIdField,
119
+ name: z.string().describe('Condition name, unique within the policy'),
120
+ entities: z.array(z.string()).min(1).describe('Synthetics monitor UUIDs to watch'),
121
+ terms: z.array(locationTerm).min(1),
122
+ enabled: z.boolean().optional().describe('Actively monitoring (default true)'),
123
+ runbookUrl: z.string().optional(),
124
+ violationTimeLimitSeconds: z.number().int().min(300).max(2592000).optional().describe('Auto-close seconds (default 86400)'),
125
+ }),
126
+ execute: async ({ newRelicApiKey, policyId, ...condition }) => restV2(newRelicApiKey, 'POST', `/alerts_location_failure_conditions/policies/${policyId}.json`, { body: { location_failure_condition: { enabled: true, violation_time_limit_seconds: 86400, ...condition } } }, 'create location failure condition'),
127
+ });
128
+ export const updateLocationFailureCondition = tool({
129
+ description: 'Updates a location-failure condition (name, entities, terms, limits). Only provided fields change.',
130
+ inputSchema: z.object({
131
+ newRelicApiKey: newRelicApiKeyField,
132
+ conditionId: z.number().int().positive().describe('Condition ID to update'),
133
+ name: z.string().optional(),
134
+ entities: z.array(z.string()).min(1).optional(),
135
+ terms: z.array(locationTerm).min(1).optional(),
136
+ enabled: z.boolean().optional(),
137
+ runbookUrl: z.string().optional(),
138
+ violationTimeLimitSeconds: z.number().int().min(300).max(2592000).optional(),
139
+ }),
140
+ execute: async ({ newRelicApiKey, conditionId, ...condition }) => restV2(newRelicApiKey, 'PUT', `/alerts_location_failure_conditions/${conditionId}.json`, { body: { location_failure_condition: condition } }, 'update location failure condition'),
141
+ });
142
+ export const deleteLocationFailureCondition = tool({
143
+ description: 'Deletes a location-failure condition after confirming the condition ID.',
144
+ inputSchema: z.object({
145
+ newRelicApiKey: newRelicApiKeyField,
146
+ conditionId: z.number().int().positive().describe('Condition ID to delete'),
147
+ }),
148
+ execute: async ({ newRelicApiKey, conditionId }) => restV2(newRelicApiKey, 'DELETE', `/alerts_location_failure_conditions/${conditionId}.json`, undefined, 'delete location failure condition'),
149
+ });
150
+ export const listLocationFailureConditions = tool({
151
+ description: 'Lists multi-location failure conditions for a policy.',
152
+ inputSchema: z.object({
153
+ newRelicApiKey: newRelicApiKeyField,
154
+ policyId: policyIdField,
155
+ page: z.number().int().min(1).optional(),
156
+ }),
157
+ execute: async ({ newRelicApiKey, policyId, page }) => restV2(newRelicApiKey, 'GET', `/alerts_location_failure_conditions/policies/${policyId}.json`, { query: { page } }, 'list location failure conditions'),
158
+ });
159
+ // ---- Infrastructure conditions (infra-api host) ----
160
+ const infraThreshold = z.object({
161
+ value: z.number().optional().describe('Breach value (omit for host-not-reporting)'),
162
+ durationMinutes: z.number().int().min(1).max(120).describe('Minutes violated before alerting (1-120)'),
163
+ timeFunction: z.enum(['all', 'any']).optional().describe('Metric conditions: all vs any'),
164
+ });
165
+ const infraFields = {
166
+ name: z.string().optional().describe('Condition name, unique within the policy'),
167
+ type: z.enum(['infra_metric', 'infra_process_running', 'infra_host_not_reporting']).optional(),
168
+ enabled: z.boolean().optional(),
169
+ policyId: z.number().int().positive().optional().describe('Owning policy ID'),
170
+ comparison: z.enum(['above', 'below', 'equal']).optional(),
171
+ eventType: z.string().optional().describe("Metric conditions, e.g. 'SystemSample', 'StorageSample'"),
172
+ selectValue: z.string().optional().describe("Metric, e.g. 'cpuPercent', 'diskUsedPercent'"),
173
+ whereClause: z.string().optional().describe("Host filter, e.g. \"hostname LIKE 'prod-%'\""),
174
+ processWhereClause: z.string().optional().describe("Process filter, e.g. \"commandName = 'java'\" (required for process-running)"),
175
+ criticalThreshold: infraThreshold.optional(),
176
+ warningThreshold: infraThreshold.optional().describe('Metric conditions only'),
177
+ violationCloseTimer: z.number().int().min(0).max(720).optional().describe('Auto-close hours (0,1,2,4,8,12,24,48,72)'),
178
+ runbookUrl: z.string().optional(),
179
+ };
180
+ export const createInfraCondition = tool({
181
+ description: 'Creates an infrastructure condition (CPU/memory/disk, process-running, host-not-reporting) via the Infrastructure API.',
182
+ inputSchema: z.object({
183
+ newRelicApiKey: newRelicApiKeyField,
184
+ policyId: z.number().int().positive().describe('Policy ID to attach to'),
185
+ type: z.enum(['infra_metric', 'infra_process_running', 'infra_host_not_reporting']),
186
+ name: z.string(),
187
+ enabled: z.boolean(),
188
+ comparison: z.enum(['above', 'below', 'equal']).optional(),
189
+ eventType: z.string().optional(),
190
+ selectValue: z.string().optional(),
191
+ whereClause: z.string().optional(),
192
+ processWhereClause: z.string().optional(),
193
+ criticalThreshold: infraThreshold.optional(),
194
+ warningThreshold: infraThreshold.optional(),
195
+ violationCloseTimer: z.number().int().min(0).max(720).optional(),
196
+ runbookUrl: z.string().optional(),
197
+ }),
198
+ execute: async ({ newRelicApiKey, ...data }) => infraApi(newRelicApiKey, 'POST', '/alerts/conditions', { data }, 'create infrastructure condition'),
199
+ });
200
+ export const getInfraCondition = tool({
201
+ description: 'Gets one infrastructure condition (thresholds, filters, status) by ID.',
202
+ inputSchema: z.object({
203
+ newRelicApiKey: newRelicApiKeyField,
204
+ conditionId: z.string().describe('Infrastructure condition ID'),
205
+ }),
206
+ execute: async ({ newRelicApiKey, conditionId }) => infraApi(newRelicApiKey, 'GET', `/alerts/conditions/${conditionId}`, undefined, 'get infrastructure condition'),
207
+ });
208
+ export const listInfraConditions = tool({
209
+ description: 'Lists infrastructure conditions for a policy with limit/offset pagination (default 50 per page).',
210
+ inputSchema: z.object({
211
+ newRelicApiKey: newRelicApiKeyField,
212
+ policyId: z.number().int().positive().describe('Policy ID to list conditions for'),
213
+ limit: z.number().int().min(1).max(1000).optional().describe('Records per page'),
214
+ offset: z.number().int().min(0).optional().describe('Records to skip'),
215
+ }),
216
+ execute: async ({ newRelicApiKey, policyId, limit, offset }) => infraApi(newRelicApiKey, 'GET', '/alerts/conditions', { query: { policy_id: policyId, limit, offset } }, 'list infrastructure conditions'),
217
+ });
218
+ export const updateInfraCondition = tool({
219
+ description: 'Updates an infrastructure condition. Only provided fields change; to change type, delete and recreate.',
220
+ inputSchema: z.object({
221
+ newRelicApiKey: newRelicApiKeyField,
222
+ conditionId: z.number().int().positive().describe('Condition ID to update'),
223
+ ...infraFields,
224
+ }),
225
+ execute: async ({ newRelicApiKey, conditionId, ...data }) => infraApi(newRelicApiKey, 'PUT', `/alerts/conditions/${conditionId}`, { data }, 'update infrastructure condition'),
226
+ });
227
+ export const deleteInfraCondition = tool({
228
+ description: 'Deletes an infrastructure condition after confirming the condition ID.',
229
+ inputSchema: z.object({
230
+ newRelicApiKey: newRelicApiKeyField,
231
+ conditionId: z.string().describe('Infrastructure condition ID to delete'),
232
+ }),
233
+ execute: async ({ newRelicApiKey, conditionId }) => infraApi(newRelicApiKey, 'DELETE', `/alerts/conditions/${conditionId}`, undefined, 'delete infrastructure condition'),
234
+ });
235
+ // ---- APM/app conditions, entity membership, violations ----
236
+ export const getAlertConditions = tool({
237
+ description: 'Lists APM/browser/mobile conditions for a policy. Use after confirming the policy ID.',
238
+ inputSchema: z.object({
239
+ newRelicApiKey: newRelicApiKeyField,
240
+ policyId: z.number().int().describe('Policy ID to list conditions for'),
241
+ }),
242
+ execute: async ({ newRelicApiKey, policyId }) => restV2(newRelicApiKey, 'GET', '/alerts_conditions.json', { query: { policy_id: policyId } }, 'list alert conditions'),
243
+ });
244
+ export const removeEntityCondition = tool({
245
+ description: 'Removes an entity (app/browser/mobile) from an alert condition. A condition must keep at least one entity.',
246
+ inputSchema: z.object({
247
+ newRelicApiKey: newRelicApiKeyField,
248
+ entityId: z.number().int().positive().describe('Numeric entity ID to remove'),
249
+ entityType: z.string().describe("Entity type, e.g. 'Application', 'MobileApplication', 'BrowserApplication'"),
250
+ conditionId: z.number().int().positive().describe('Condition ID to remove the entity from'),
251
+ }),
252
+ execute: async ({ newRelicApiKey, entityId, entityType, conditionId }) => restV2(newRelicApiKey, 'DELETE', `/alerts_entity_conditions/${entityId}.json`, { query: { entity_type: entityType, condition_id: conditionId } }, 'remove entity from condition'),
253
+ });
254
+ export const getAlertsViolations = tool({
255
+ description: 'Lists alert violations (current/historical incidents) with date-range and open-only filters.',
256
+ inputSchema: z.object({
257
+ newRelicApiKey: newRelicApiKeyField,
258
+ startDate: z.string().optional().describe("Violations after this ISO-8601 time, e.g. '2024-01-01T00:00:00Z'"),
259
+ endDate: z.string().optional().describe("Violations before this ISO-8601 time, e.g. '2024-12-31T23:59:59Z'"),
260
+ onlyOpen: z.boolean().optional().describe('Only unresolved violations'),
261
+ page: z.number().int().min(1).optional().describe('Result page (1-indexed)'),
262
+ }),
263
+ execute: async ({ newRelicApiKey, startDate, endDate, onlyOpen, page }) => restV2(newRelicApiKey, 'GET', '/alerts_violations.json', { query: { start_date: startDate, end_date: endDate, only_open: onlyOpen, page } }, 'list alert violations'),
264
+ });
265
+ //# sourceMappingURL=conditions.js.map