@rnsk/toolkits 0.0.10 → 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 (292) hide show
  1. package/README.md +12 -2
  2. package/dist/index.d.ts +11 -1
  3. package/dist/index.js +21 -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/hostinger/tools/index.d.ts +1 -1
  105. package/dist/toolkits/hostinger/tools/whois.d.ts +1 -1
  106. package/dist/toolkits/hugging-face/tools/datasets-viewer.d.ts +1 -1
  107. package/dist/toolkits/hugging-face/tools/datasets.d.ts +1 -1
  108. package/dist/toolkits/hugging-face/tools/index.d.ts +1 -1
  109. package/dist/toolkits/hugging-face/tools/models.d.ts +1 -1
  110. package/dist/toolkits/hugging-face/tools/repos.d.ts +1 -1
  111. package/dist/toolkits/hugging-face/tools/spaces.d.ts +1 -1
  112. package/dist/toolkits/jira/tools/index.d.ts +4 -4
  113. package/dist/toolkits/jira/tools/meta.d.ts +2 -2
  114. package/dist/toolkits/jira/tools/users.d.ts +3 -3
  115. package/dist/toolkits/kaggle/icon.d.ts +5 -0
  116. package/dist/toolkits/kaggle/icon.js +6 -0
  117. package/dist/toolkits/kaggle/manifest.d.ts +3 -0
  118. package/dist/toolkits/kaggle/manifest.js +32 -0
  119. package/dist/toolkits/kaggle/tools/client.d.ts +10 -0
  120. package/dist/toolkits/kaggle/tools/client.js +94 -0
  121. package/dist/toolkits/kaggle/tools/competitions.d.ts +48 -0
  122. package/dist/toolkits/kaggle/tools/competitions.js +109 -0
  123. package/dist/toolkits/kaggle/tools/config.d.ts +110 -0
  124. package/dist/toolkits/kaggle/tools/config.js +256 -0
  125. package/dist/toolkits/kaggle/tools/datasets.d.ts +88 -0
  126. package/dist/toolkits/kaggle/tools/datasets.js +161 -0
  127. package/dist/toolkits/kaggle/tools/index.d.ts +482 -0
  128. package/dist/toolkits/kaggle/tools/index.js +53 -0
  129. package/dist/toolkits/kaggle/tools/kernels.d.ts +62 -0
  130. package/dist/toolkits/kaggle/tools/kernels.js +121 -0
  131. package/dist/toolkits/kaggle/tools/model_instance_files.d.ts +11 -0
  132. package/dist/toolkits/kaggle/tools/model_instance_files.js +23 -0
  133. package/dist/toolkits/kaggle/tools/model_instances.d.ts +8 -0
  134. package/dist/toolkits/kaggle/tools/model_instances.js +20 -0
  135. package/dist/toolkits/kaggle/tools/models.d.ts +14 -0
  136. package/dist/toolkits/kaggle/tools/models.js +33 -0
  137. package/dist/toolkits/nasa/icon.d.ts +5 -0
  138. package/dist/toolkits/nasa/icon.js +56 -0
  139. package/dist/toolkits/nasa/manifest.d.ts +3 -0
  140. package/dist/toolkits/nasa/manifest.js +49 -0
  141. package/dist/toolkits/nasa/tools/agage.d.ts +60 -0
  142. package/dist/toolkits/nasa/tools/agage.js +176 -0
  143. package/dist/toolkits/nasa/tools/client.d.ts +95 -0
  144. package/dist/toolkits/nasa/tools/client.js +337 -0
  145. package/dist/toolkits/nasa/tools/cmr.d.ts +268 -0
  146. package/dist/toolkits/nasa/tools/cmr.js +984 -0
  147. package/dist/toolkits/nasa/tools/donki.d.ts +63 -0
  148. package/dist/toolkits/nasa/tools/donki.js +301 -0
  149. package/dist/toolkits/nasa/tools/eonet.d.ts +74 -0
  150. package/dist/toolkits/nasa/tools/eonet.js +279 -0
  151. package/dist/toolkits/nasa/tools/icesat2.d.ts +25 -0
  152. package/dist/toolkits/nasa/tools/icesat2.js +97 -0
  153. package/dist/toolkits/nasa/tools/imagery.d.ts +36 -0
  154. package/dist/toolkits/nasa/tools/imagery.js +138 -0
  155. package/dist/toolkits/nasa/tools/index.d.ts +1063 -0
  156. package/dist/toolkits/nasa/tools/index.js +865 -0
  157. package/dist/toolkits/nasa/tools/neo.d.ts +15 -0
  158. package/dist/toolkits/nasa/tools/neo.js +75 -0
  159. package/dist/toolkits/nasa/tools/ntrs.d.ts +152 -0
  160. package/dist/toolkits/nasa/tools/ntrs.js +292 -0
  161. package/dist/toolkits/nasa/tools/osdr.d.ts +72 -0
  162. package/dist/toolkits/nasa/tools/osdr.js +290 -0
  163. package/dist/toolkits/nasa/tools/planetary.d.ts +58 -0
  164. package/dist/toolkits/nasa/tools/planetary.js +312 -0
  165. package/dist/toolkits/nasa/tools/power.d.ts +52 -0
  166. package/dist/toolkits/nasa/tools/power.js +213 -0
  167. package/dist/toolkits/nasa/tools/ssc.d.ts +44 -0
  168. package/dist/toolkits/nasa/tools/ssc.js +92 -0
  169. package/dist/toolkits/nasa/tools/tolnet.d.ts +84 -0
  170. package/dist/toolkits/nasa/tools/tolnet.js +254 -0
  171. package/dist/toolkits/neo4j/tools/analytics.d.ts +1 -1
  172. package/dist/toolkits/neo4j/tools/index.d.ts +3 -3
  173. package/dist/toolkits/neo4j/tools/instances.d.ts +2 -2
  174. package/dist/toolkits/neon/tools/auth.d.ts +4 -4
  175. package/dist/toolkits/neon/tools/dataapi.d.ts +1 -1
  176. package/dist/toolkits/neon/tools/index.d.ts +7 -7
  177. package/dist/toolkits/neon/tools/projects.d.ts +2 -2
  178. package/dist/toolkits/new-relic/icon.d.ts +5 -0
  179. package/dist/toolkits/new-relic/icon.js +6 -0
  180. package/dist/toolkits/new-relic/manifest.d.ts +3 -0
  181. package/dist/toolkits/new-relic/manifest.js +41 -0
  182. package/dist/toolkits/new-relic/tools/admin.d.ts +310 -0
  183. package/dist/toolkits/new-relic/tools/admin.js +282 -0
  184. package/dist/toolkits/new-relic/tools/alert-policies.d.ts +74 -0
  185. package/dist/toolkits/new-relic/tools/alert-policies.js +136 -0
  186. package/dist/toolkits/new-relic/tools/apm.d.ts +129 -0
  187. package/dist/toolkits/new-relic/tools/apm.js +228 -0
  188. package/dist/toolkits/new-relic/tools/client.d.ts +62 -0
  189. package/dist/toolkits/new-relic/tools/client.js +167 -0
  190. package/dist/toolkits/new-relic/tools/conditions.d.ts +190 -0
  191. package/dist/toolkits/new-relic/tools/conditions.js +265 -0
  192. package/dist/toolkits/new-relic/tools/config.d.ts +73 -0
  193. package/dist/toolkits/new-relic/tools/config.js +131 -0
  194. package/dist/toolkits/new-relic/tools/dashboards.d.ts +204 -0
  195. package/dist/toolkits/new-relic/tools/dashboards.js +159 -0
  196. package/dist/toolkits/new-relic/tools/entities.d.ts +160 -0
  197. package/dist/toolkits/new-relic/tools/entities.js +218 -0
  198. package/dist/toolkits/new-relic/tools/index.d.ts +23 -0
  199. package/dist/toolkits/new-relic/tools/index.js +179 -0
  200. package/dist/toolkits/new-relic/tools/ingest.d.ts +31 -0
  201. package/dist/toolkits/new-relic/tools/ingest.js +80 -0
  202. package/dist/toolkits/new-relic/tools/notifications.d.ts +186 -0
  203. package/dist/toolkits/new-relic/tools/notifications.js +232 -0
  204. package/dist/toolkits/new-relic/tools/nrql-conditions.d.ts +105 -0
  205. package/dist/toolkits/new-relic/tools/nrql-conditions.js +136 -0
  206. package/dist/toolkits/new-relic/tools/nrql.d.ts +38 -0
  207. package/dist/toolkits/new-relic/tools/nrql.js +99 -0
  208. package/dist/toolkits/new-relic/tools/synthetics.d.ts +176 -0
  209. package/dist/toolkits/new-relic/tools/synthetics.js +246 -0
  210. package/dist/toolkits/notebook-lm/icon.d.ts +5 -0
  211. package/dist/toolkits/notebook-lm/icon.js +6 -0
  212. package/dist/toolkits/notebook-lm/manifest.d.ts +3 -0
  213. package/dist/toolkits/notebook-lm/manifest.js +44 -0
  214. package/dist/toolkits/notebook-lm/tools/add-text-sources.d.ts +36 -0
  215. package/dist/toolkits/notebook-lm/tools/add-text-sources.js +51 -0
  216. package/dist/toolkits/notebook-lm/tools/create-audio-overview.d.ts +47 -0
  217. package/dist/toolkits/notebook-lm/tools/create-audio-overview.js +55 -0
  218. package/dist/toolkits/notebook-lm/tools/create-notebook.d.ts +52 -0
  219. package/dist/toolkits/notebook-lm/tools/create-notebook.js +49 -0
  220. package/dist/toolkits/notebook-lm/tools/delete-audio-overview.d.ts +33 -0
  221. package/dist/toolkits/notebook-lm/tools/delete-audio-overview.js +46 -0
  222. package/dist/toolkits/notebook-lm/tools/delete-notebooks.d.ts +32 -0
  223. package/dist/toolkits/notebook-lm/tools/delete-notebooks.js +46 -0
  224. package/dist/toolkits/notebook-lm/tools/delete-sources.d.ts +33 -0
  225. package/dist/toolkits/notebook-lm/tools/delete-sources.js +47 -0
  226. package/dist/toolkits/notebook-lm/tools/get-notebook.d.ts +52 -0
  227. package/dist/toolkits/notebook-lm/tools/get-notebook.js +45 -0
  228. package/dist/toolkits/notebook-lm/tools/get-source.d.ts +53 -0
  229. package/dist/toolkits/notebook-lm/tools/get-source.js +47 -0
  230. package/dist/toolkits/notebook-lm/tools/index.d.ts +516 -0
  231. package/dist/toolkits/notebook-lm/tools/index.js +93 -0
  232. package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.d.ts +32 -0
  233. package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.js +41 -0
  234. package/dist/toolkits/notebook-lm/tools/share-notebook.d.ts +48 -0
  235. package/dist/toolkits/notebook-lm/tools/share-notebook.js +57 -0
  236. package/dist/toolkits/notebook-lm/tools/upload-source-file.d.ts +40 -0
  237. package/dist/toolkits/notebook-lm/tools/upload-source-file.js +62 -0
  238. package/dist/toolkits/notebook-lm/tools/utils.d.ts +15 -0
  239. package/dist/toolkits/notebook-lm/tools/utils.js +46 -0
  240. package/dist/toolkits/npm/icon.d.ts +5 -0
  241. package/dist/toolkits/npm/icon.js +11 -0
  242. package/dist/toolkits/npm/manifest.d.ts +3 -0
  243. package/dist/toolkits/npm/manifest.js +35 -0
  244. package/dist/toolkits/npm/tools/client.d.ts +19 -0
  245. package/dist/toolkits/npm/tools/client.js +64 -0
  246. package/dist/toolkits/npm/tools/downloads.d.ts +19 -0
  247. package/dist/toolkits/npm/tools/downloads.js +39 -0
  248. package/dist/toolkits/npm/tools/index.d.ts +14 -0
  249. package/dist/toolkits/npm/tools/index.js +24 -0
  250. package/dist/toolkits/npm/tools/registry.d.ts +24 -0
  251. package/dist/toolkits/npm/tools/registry.js +58 -0
  252. package/dist/toolkits/npm/tools/security.d.ts +9 -0
  253. package/dist/toolkits/npm/tools/security.js +29 -0
  254. package/dist/toolkits/slack/tools/admin-users.d.ts +1 -1
  255. package/dist/toolkits/slack/tools/slack-lists.d.ts +3 -3
  256. package/dist/toolkits/snowflake/icon.d.ts +5 -0
  257. package/dist/toolkits/snowflake/icon.js +6 -0
  258. package/dist/toolkits/snowflake/manifest.d.ts +3 -0
  259. package/dist/toolkits/snowflake/manifest.js +32 -0
  260. package/dist/toolkits/snowflake/tools/catalog.d.ts +56 -0
  261. package/dist/toolkits/snowflake/tools/catalog.js +123 -0
  262. package/dist/toolkits/snowflake/tools/client.d.ts +53 -0
  263. package/dist/toolkits/snowflake/tools/client.js +145 -0
  264. package/dist/toolkits/snowflake/tools/index.d.ts +14 -0
  265. package/dist/toolkits/snowflake/tools/index.js +28 -0
  266. package/dist/toolkits/snowflake/tools/statements.d.ts +27 -0
  267. package/dist/toolkits/snowflake/tools/statements.js +84 -0
  268. package/dist/toolkits/snowflake/tools/status.d.ts +22 -0
  269. package/dist/toolkits/snowflake/tools/status.js +54 -0
  270. package/dist/toolkits/telegram/icon.d.ts +5 -0
  271. package/dist/toolkits/telegram/icon.js +6 -0
  272. package/dist/toolkits/telegram/manifest.d.ts +3 -0
  273. package/dist/toolkits/telegram/manifest.js +34 -0
  274. package/dist/toolkits/telegram/tools/bot.d.ts +13 -0
  275. package/dist/toolkits/telegram/tools/bot.js +23 -0
  276. package/dist/toolkits/telegram/tools/chats.d.ts +22 -0
  277. package/dist/toolkits/telegram/tools/chats.js +46 -0
  278. package/dist/toolkits/telegram/tools/client.d.ts +12 -0
  279. package/dist/toolkits/telegram/tools/client.js +46 -0
  280. package/dist/toolkits/telegram/tools/index.d.ts +15 -0
  281. package/dist/toolkits/telegram/tools/index.js +31 -0
  282. package/dist/toolkits/telegram/tools/messages.d.ts +86 -0
  283. package/dist/toolkits/telegram/tools/messages.js +134 -0
  284. package/dist/toolkits/telegram/tools/updates.d.ts +23 -0
  285. package/dist/toolkits/telegram/tools/updates.js +54 -0
  286. package/dist/toolkits/youtube/tools/get-channel-activities.d.ts +1 -1
  287. package/dist/toolkits/youtube/tools/index.d.ts +5 -5
  288. package/dist/toolkits/youtube/tools/list-channel-sections.d.ts +1 -1
  289. package/dist/toolkits/youtube/tools/post-comment.d.ts +1 -1
  290. package/dist/toolkits/youtube/tools/subscribe-channel.d.ts +1 -1
  291. package/dist/toolkits/youtube/tools/unsubscribe-channel.d.ts +1 -1
  292. package/package.json +2 -3
@@ -0,0 +1,310 @@
1
+ export declare const createUser: import("ai").Tool<{
2
+ name: string;
3
+ email: string;
4
+ authenticationDomainId: string;
5
+ userType: "BASIC_USER_TIER" | "CORE_USER_TIER" | "FULL_USER_TIER";
6
+ newRelicApiKey?: string | undefined;
7
+ }, any>;
8
+ export declare const updateUser: import("ai").Tool<{
9
+ id: string;
10
+ email?: string | undefined;
11
+ newRelicApiKey?: string | undefined;
12
+ userType?: "BASIC_USER_TIER" | "CORE_USER_TIER" | "FULL_USER_TIER" | undefined;
13
+ }, any>;
14
+ export declare const deleteUserManagementUser: import("ai").Tool<{
15
+ userId: string;
16
+ newRelicApiKey?: string | undefined;
17
+ }, any>;
18
+ export declare const updateAccount: import("ai").Tool<{
19
+ managedAccount: {
20
+ id: number;
21
+ name: string;
22
+ };
23
+ newRelicApiKey?: string | undefined;
24
+ }, any>;
25
+ export declare const revokeAuthorizationAccess: import("ai").Tool<{
26
+ revokeAccessOptions: {
27
+ groupId: string;
28
+ accountAccessGrants: {
29
+ accountId: number;
30
+ roleId: string;
31
+ }[];
32
+ };
33
+ newRelicApiKey?: string | undefined;
34
+ }, any>;
35
+ export declare const createApiAccessKeys: import("ai").Tool<{
36
+ user?: {
37
+ accountId: number;
38
+ userId: number;
39
+ name?: string | undefined;
40
+ notes?: string | undefined;
41
+ } | undefined;
42
+ newRelicApiKey?: string | undefined;
43
+ ingest?: {
44
+ accountId: number;
45
+ ingestType: "BROWSER" | "LICENSE";
46
+ name?: string | undefined;
47
+ notes?: string | undefined;
48
+ } | undefined;
49
+ }, any>;
50
+ export declare const updateApiAccessKeys: import("ai").Tool<{
51
+ keys: {
52
+ user?: {
53
+ keyId: string;
54
+ name?: string | undefined;
55
+ notes?: string | undefined;
56
+ }[] | undefined;
57
+ ingest?: {
58
+ keyId: string;
59
+ name?: string | undefined;
60
+ notes?: string | undefined;
61
+ }[] | undefined;
62
+ };
63
+ newRelicApiKey?: string | undefined;
64
+ }, any>;
65
+ export declare const deleteApiAccessKeys: import("ai").Tool<{
66
+ keys: {
67
+ ingestKeyIds?: string[] | undefined;
68
+ userKeyIds?: string[] | undefined;
69
+ };
70
+ newRelicApiKey?: string | undefined;
71
+ }, any>;
72
+ export declare const linkCloudAccount: import("ai").Tool<{
73
+ accountId: number;
74
+ accounts: {
75
+ aws?: {
76
+ name: string;
77
+ arn: string;
78
+ metricCollectionMode?: string | undefined;
79
+ }[] | undefined;
80
+ gcp?: {
81
+ projectId: string;
82
+ name: string;
83
+ }[] | undefined;
84
+ azure?: {
85
+ name: string;
86
+ clientSecret: string;
87
+ applicationId: string;
88
+ subscriptionId: string;
89
+ tenantId: string;
90
+ }[] | undefined;
91
+ };
92
+ newRelicApiKey?: string | undefined;
93
+ }, any>;
94
+ export declare const renameCloudAccount: import("ai").Tool<{
95
+ accountId: number;
96
+ accounts: {
97
+ name: string;
98
+ linkedAccountId: number;
99
+ }[];
100
+ newRelicApiKey?: string | undefined;
101
+ }, any>;
102
+ export declare const configureCloudIntegration: import("ai").Tool<{
103
+ accountId: number;
104
+ integrations: {
105
+ aws?: {
106
+ s3?: {
107
+ linkedAccountId: number;
108
+ awsRegions?: unknown;
109
+ metricsPollingInterval?: number | undefined;
110
+ }[] | undefined;
111
+ alb?: {
112
+ linkedAccountId: number;
113
+ awsRegions?: unknown;
114
+ metricsPollingInterval?: number | undefined;
115
+ }[] | undefined;
116
+ ec2?: {
117
+ linkedAccountId: number;
118
+ awsRegions?: unknown;
119
+ metricsPollingInterval?: number | undefined;
120
+ }[] | undefined;
121
+ ecs?: {
122
+ linkedAccountId: number;
123
+ awsRegions?: unknown;
124
+ metricsPollingInterval?: number | undefined;
125
+ }[] | undefined;
126
+ eks?: {
127
+ linkedAccountId: number;
128
+ awsRegions?: unknown;
129
+ metricsPollingInterval?: number | undefined;
130
+ }[] | undefined;
131
+ rds?: {
132
+ linkedAccountId: number;
133
+ awsRegions?: unknown;
134
+ metricsPollingInterval?: number | undefined;
135
+ }[] | undefined;
136
+ sqs?: {
137
+ linkedAccountId: number;
138
+ awsRegions?: unknown;
139
+ metricsPollingInterval?: number | undefined;
140
+ }[] | undefined;
141
+ lambda?: {
142
+ linkedAccountId: number;
143
+ awsRegions?: unknown;
144
+ metricsPollingInterval?: number | undefined;
145
+ }[] | undefined;
146
+ dynamodb?: {
147
+ linkedAccountId: number;
148
+ awsRegions?: unknown;
149
+ metricsPollingInterval?: number | undefined;
150
+ }[] | undefined;
151
+ elasticache?: {
152
+ linkedAccountId: number;
153
+ awsRegions?: unknown;
154
+ metricsPollingInterval?: number | undefined;
155
+ }[] | undefined;
156
+ } | undefined;
157
+ gcp?: {
158
+ gke?: {
159
+ linkedAccountId: number;
160
+ awsRegions?: unknown;
161
+ metricsPollingInterval?: number | undefined;
162
+ }[] | undefined;
163
+ cloudSql?: {
164
+ linkedAccountId: number;
165
+ awsRegions?: unknown;
166
+ metricsPollingInterval?: number | undefined;
167
+ }[] | undefined;
168
+ cloudStorage?: {
169
+ linkedAccountId: number;
170
+ awsRegions?: unknown;
171
+ metricsPollingInterval?: number | undefined;
172
+ }[] | undefined;
173
+ computeEngine?: {
174
+ linkedAccountId: number;
175
+ awsRegions?: unknown;
176
+ metricsPollingInterval?: number | undefined;
177
+ }[] | undefined;
178
+ } | undefined;
179
+ azure?: {
180
+ appServices?: {
181
+ linkedAccountId: number;
182
+ awsRegions?: unknown;
183
+ metricsPollingInterval?: number | undefined;
184
+ }[] | undefined;
185
+ sqlDatabases?: {
186
+ linkedAccountId: number;
187
+ awsRegions?: unknown;
188
+ metricsPollingInterval?: number | undefined;
189
+ }[] | undefined;
190
+ storageAccounts?: {
191
+ linkedAccountId: number;
192
+ awsRegions?: unknown;
193
+ metricsPollingInterval?: number | undefined;
194
+ }[] | undefined;
195
+ virtualMachines?: {
196
+ linkedAccountId: number;
197
+ awsRegions?: unknown;
198
+ metricsPollingInterval?: number | undefined;
199
+ }[] | undefined;
200
+ } | undefined;
201
+ };
202
+ newRelicApiKey?: string | undefined;
203
+ }, any>;
204
+ export declare const disableCloudIntegration: import("ai").Tool<{
205
+ accountId: number;
206
+ linkedAccountId: number;
207
+ providerSlug: string;
208
+ integrationSlug: string;
209
+ newRelicApiKey?: string | undefined;
210
+ }, any>;
211
+ export declare const createServiceLevel: import("ai").Tool<{
212
+ entityGuid: string;
213
+ indicator: {
214
+ name: string;
215
+ events: {
216
+ accountId: number;
217
+ validEvents: {
218
+ from: string;
219
+ where?: string | undefined;
220
+ select?: {
221
+ function?: "SUM" | "COUNT" | undefined;
222
+ attribute?: string | undefined;
223
+ } | undefined;
224
+ };
225
+ goodEvents?: {
226
+ from: string;
227
+ where?: string | undefined;
228
+ select?: {
229
+ function?: "SUM" | "COUNT" | undefined;
230
+ attribute?: string | undefined;
231
+ } | undefined;
232
+ } | undefined;
233
+ badEvents?: {
234
+ from: string;
235
+ where?: string | undefined;
236
+ select?: {
237
+ function?: "SUM" | "COUNT" | undefined;
238
+ attribute?: string | undefined;
239
+ } | undefined;
240
+ } | undefined;
241
+ };
242
+ description?: string | undefined;
243
+ objectives?: {
244
+ target: number;
245
+ timeWindow: {
246
+ rolling: {
247
+ count: number;
248
+ unit?: "DAY" | "WEEK" | undefined;
249
+ };
250
+ };
251
+ }[] | undefined;
252
+ };
253
+ newRelicApiKey?: string | undefined;
254
+ }, any>;
255
+ export declare const updateServiceLevel: import("ai").Tool<{
256
+ id: string;
257
+ indicator: {
258
+ description?: string | undefined;
259
+ name?: string | undefined;
260
+ events?: {
261
+ validEvents?: {
262
+ query: string;
263
+ } | undefined;
264
+ goodEvents?: {
265
+ query: string;
266
+ } | undefined;
267
+ badEvents?: {
268
+ query: string;
269
+ } | undefined;
270
+ } | undefined;
271
+ objectives?: {
272
+ target: number;
273
+ timeWindow: {
274
+ rolling: {
275
+ count: number;
276
+ unit?: "DAY" | "WEEK" | undefined;
277
+ };
278
+ };
279
+ }[] | undefined;
280
+ };
281
+ newRelicApiKey?: string | undefined;
282
+ }, any>;
283
+ export declare const updateWorkload: import("ai").Tool<{
284
+ guid: string;
285
+ workload: {
286
+ name?: string | undefined;
287
+ entityGuids?: string[] | undefined;
288
+ entitySearchQueries?: {
289
+ query: string;
290
+ id?: number | undefined;
291
+ }[] | undefined;
292
+ scopeAccounts?: {
293
+ accountIds: number[];
294
+ } | undefined;
295
+ };
296
+ newRelicApiKey?: string | undefined;
297
+ }, any>;
298
+ export declare const duplicateWorkload: import("ai").Tool<{
299
+ accountId: number;
300
+ sourceGuid: string;
301
+ newRelicApiKey?: string | undefined;
302
+ workload?: {
303
+ name?: string | undefined;
304
+ } | undefined;
305
+ }, any>;
306
+ export declare const deleteWorkload: import("ai").Tool<{
307
+ guid: string;
308
+ newRelicApiKey?: string | undefined;
309
+ }, any>;
310
+ //# sourceMappingURL=admin.d.ts.map
@@ -0,0 +1,282 @@
1
+ // @ts-nocheck
2
+ import { tool } from 'ai';
3
+ import { z } from 'zod';
4
+ import { accountIdField, nerdgraph, newRelicApiKeyField } from './client.js';
5
+ const userTier = z.enum(['BASIC_USER_TIER', 'CORE_USER_TIER', 'FULL_USER_TIER']).describe('BASIC: view-only; CORE: query + dashboards; FULL: full platform');
6
+ // ---- User management ----
7
+ export const createUser = tool({
8
+ description: 'Adds a user to an authentication domain with an access tier. Needs the domain ID and a unique email.',
9
+ inputSchema: z.object({
10
+ newRelicApiKey: newRelicApiKeyField,
11
+ authenticationDomainId: z.string().describe('Auth domain UUID for the new user'),
12
+ email: z.string().describe('Unique valid email for the user'),
13
+ name: z.string().describe('Full name'),
14
+ userType: userTier,
15
+ }),
16
+ execute: async ({ newRelicApiKey, authenticationDomainId, email, name, userType }) => nerdgraph(newRelicApiKey, 'mutation($authenticationDomainId: ID!, $user: UserManagementCreateUserInput!) { userManagementCreateUser(authenticationDomainId: $authenticationDomainId, user: $user) { createdUser { id email name type { id displayName } authenticationDomainId } } }', { authenticationDomainId, user: { email, name, userType } }, 'create user'),
17
+ });
18
+ export const updateUser = tool({
19
+ description: "Updates a user's email and/or access tier. ID required; include at least one field to change.",
20
+ inputSchema: z.object({
21
+ newRelicApiKey: newRelicApiKeyField,
22
+ id: z.string().describe('User ID to update'),
23
+ email: z.string().optional().describe('New email address'),
24
+ userType: z.enum(['BASIC_USER_TIER', 'CORE_USER_TIER', 'FULL_USER_TIER']).optional().describe('New access tier'),
25
+ }),
26
+ execute: async ({ newRelicApiKey, id, email, userType }) => nerdgraph(newRelicApiKey, 'mutation($id: ID!, $user: UserManagementUpdateUserInput!) { userManagementUpdateUser(id: $id, user: $user) { user { id email name type { id displayName } } } }', { id, user: { email, userType } }, 'update user'),
27
+ });
28
+ export const deleteUserManagementUser = tool({
29
+ description: 'Removes a user from New Relic after confirming the user ID.',
30
+ inputSchema: z.object({
31
+ newRelicApiKey: newRelicApiKeyField,
32
+ userId: z.string().describe('User ID to delete'),
33
+ }),
34
+ execute: async ({ newRelicApiKey, userId }) => nerdgraph(newRelicApiKey, 'mutation($id: ID!) { userManagementDeleteUser(id: $id) { deletedUser { id } } }', { id: userId }, 'delete user'),
35
+ });
36
+ export const updateAccount = tool({
37
+ description: 'Renames a managed account in the organization.',
38
+ inputSchema: z.object({
39
+ newRelicApiKey: newRelicApiKeyField,
40
+ managedAccount: z.object({
41
+ id: z.number().int().describe('Account ID to rename'),
42
+ name: z.string().describe('New account name'),
43
+ }).describe('Account ID + new name'),
44
+ }),
45
+ execute: async ({ newRelicApiKey, managedAccount }) => nerdgraph(newRelicApiKey, 'mutation($managedAccount: AccountManagementUpdateAccountInput!) { accountManagementUpdateAccount(managedAccount: $managedAccount) { managedAccount { id name regionCode } } }', { managedAccount }, 'update account'),
46
+ });
47
+ export const revokeAuthorizationAccess = tool({
48
+ description: 'Revokes role grants (account + role pairs) from a group. Use to remove access without deleting the group.',
49
+ inputSchema: z.object({
50
+ newRelicApiKey: newRelicApiKeyField,
51
+ revokeAccessOptions: z.object({
52
+ groupId: z.string().describe('Group ID losing access'),
53
+ accountAccessGrants: z.array(z.object({
54
+ accountId: z.number().int().describe('Account losing the grant'),
55
+ roleId: z.string().describe('Role ID to revoke'),
56
+ })).min(1),
57
+ }).describe('Group + grants to revoke'),
58
+ }),
59
+ execute: async ({ newRelicApiKey, revokeAccessOptions }) => nerdgraph(newRelicApiKey, 'mutation($revokeAccessOptions: AuthorizationManagementRevokeAccessInput!) { authorizationManagementRevokeAccess(revokeAccessOptions: $revokeAccessOptions) { roles { accountId displayName } } }', { revokeAccessOptions }, 'revoke authorization access'),
60
+ });
61
+ // ---- API access keys ----
62
+ const KEY_RESULT = 'errors { message type }';
63
+ export const createApiAccessKeys = tool({
64
+ description: 'Generates user keys or ingest keys (BROWSER/LICENSE, max 1000 per type). Store returned key values securely. Provide user and/or ingest.',
65
+ inputSchema: z.object({
66
+ newRelicApiKey: newRelicApiKeyField,
67
+ user: z.object({
68
+ accountId: z.number().int().describe('Account for the user key'),
69
+ userId: z.number().int().describe('User receiving the key'),
70
+ name: z.string().optional(),
71
+ notes: z.string().optional(),
72
+ }).optional(),
73
+ ingest: z.object({
74
+ accountId: z.number().int().describe('Account for the ingest key'),
75
+ ingestType: z.enum(['BROWSER', 'LICENSE']).describe('BROWSER: browser monitoring; LICENSE: license key'),
76
+ name: z.string().optional(),
77
+ notes: z.string().optional(),
78
+ }).optional(),
79
+ }),
80
+ execute: async ({ newRelicApiKey, ...keys }) => nerdgraph(newRelicApiKey, `mutation($keys: ApiAccessCreateKeysInput!) { apiAccessCreateKeys(keys: $keys) { createdKeys { id key name type notes createdAt } ${KEY_RESULT} } }`, { keys }, 'create API access keys'),
81
+ });
82
+ export const updateApiAccessKeys = tool({
83
+ description: 'Renames or re-notes existing keys by key ID (not the key value). Provide ingest and/or user lists.',
84
+ inputSchema: z.object({
85
+ newRelicApiKey: newRelicApiKeyField,
86
+ keys: z.object({
87
+ ingest: z.array(z.object({
88
+ keyId: z.string().describe('Ingest key ID (64-hex, not the key value)'),
89
+ name: z.string().optional(),
90
+ notes: z.string().optional(),
91
+ })).optional(),
92
+ user: z.array(z.object({
93
+ keyId: z.string().describe('User key ID (40-char, not the key value)'),
94
+ name: z.string().optional(),
95
+ notes: z.string().optional(),
96
+ })).optional(),
97
+ }).describe("Keys to update ('ingest' and/or 'user' lists)"),
98
+ }),
99
+ execute: async ({ newRelicApiKey, keys }) => nerdgraph(newRelicApiKey, `mutation($keys: ApiAccessUpdateKeysInput!) { apiAccessUpdateKeys(keys: $keys) { updatedKeys { id key name type notes } ${KEY_RESULT} } }`, { keys }, 'update API access keys'),
100
+ });
101
+ export const deleteApiAccessKeys = tool({
102
+ description: 'Permanently deletes keys by key ID (ingest and/or user IDs). Deleted keys lose all access immediately.',
103
+ inputSchema: z.object({
104
+ newRelicApiKey: newRelicApiKeyField,
105
+ keys: z.object({
106
+ ingestKeyIds: z.array(z.string()).optional().describe('Ingest key IDs (64-hex each)'),
107
+ userKeyIds: z.array(z.string()).optional().describe('User key IDs (40-char each)'),
108
+ }).describe("IDs to delete ('ingestKeyIds' and/or 'userKeyIds')"),
109
+ }),
110
+ execute: async ({ newRelicApiKey, keys }) => nerdgraph(newRelicApiKey, `mutation($keys: ApiAccessDeleteKeysInput!) { apiAccessDeleteKeys(keys: $keys) { deletedKeys { id } ${KEY_RESULT} } }`, { keys }, 'delete API access keys'),
111
+ });
112
+ // ---- Cloud integrations ----
113
+ const cloudServiceConfig = (regions) => z.array(z.object({
114
+ linkedAccountId: z.number().int().describe('Linked cloud account ID (link first)'),
115
+ ...(regions ? { awsRegions: z.array(z.string()).optional().describe("Regions, e.g. ['us-east-1'] (default all)") } : {}),
116
+ metricsPollingInterval: z.number().int().min(300).optional().describe('Poll seconds (min 300, default per service)'),
117
+ })).optional();
118
+ export const linkCloudAccount = tool({
119
+ description: 'Links AWS/Azure/GCP accounts to New Relic for monitoring. Needs cloud-side IAM roles/permissions first. Returns linked account IDs for integrations.',
120
+ inputSchema: z.object({
121
+ newRelicApiKey: newRelicApiKeyField,
122
+ accountId: accountIdField('New Relic account ID to link under'),
123
+ accounts: z.object({
124
+ aws: z.array(z.object({
125
+ name: z.string().describe('Unique display name'),
126
+ arn: z.string().describe("IAM role ARN, e.g. 'arn:aws:iam::123:role/NewRelicInfrastructure-Integrations'"),
127
+ metricCollectionMode: z.string().optional().describe("PULL (polling) or PUSH (Metric Streams)"),
128
+ })).optional(),
129
+ gcp: z.array(z.object({
130
+ name: z.string(),
131
+ projectId: z.string().describe('GCP project ID to monitor'),
132
+ })).optional(),
133
+ azure: z.array(z.object({
134
+ name: z.string(),
135
+ applicationId: z.string().describe('Entra application (client) ID'),
136
+ clientSecret: z.string().describe('Entra client secret'),
137
+ subscriptionId: z.string().describe('Subscription to monitor'),
138
+ tenantId: z.string().describe('Entra tenant (directory) ID'),
139
+ })).optional(),
140
+ }).describe('Provider accounts to link (aws and/or gcp and/or azure)'),
141
+ }),
142
+ execute: async ({ newRelicApiKey, accountId, accounts }) => nerdgraph(newRelicApiKey, 'mutation($accountId: Int!, $accounts: CloudLinkAccountInput!) { cloudLinkAccount(accountId: $accountId, accounts: $accounts) { linkedAccounts { id name authLabel createdAt updatedAt } errors { type message } } }', { accountId, accounts }, 'link cloud account'),
143
+ });
144
+ export const renameCloudAccount = tool({
145
+ description: 'Renames linked cloud accounts (new names must be unique and non-empty).',
146
+ inputSchema: z.object({
147
+ newRelicApiKey: newRelicApiKeyField,
148
+ accountId: accountIdField('New Relic account ID holding the links'),
149
+ accounts: z.array(z.object({
150
+ linkedAccountId: z.number().int().describe('Linked account ID from linking'),
151
+ name: z.string().describe('New unique display name'),
152
+ })).min(1),
153
+ }),
154
+ execute: async ({ newRelicApiKey, accountId, accounts }) => nerdgraph(newRelicApiKey, 'mutation($accountId: Int!, $accounts: [CloudRenameAccountInput!]!) { cloudRenameAccount(accountId: $accountId, accounts: $accounts) { linkedAccounts { id name } } }', { accountId, accounts }, 'rename cloud account'),
155
+ });
156
+ export const configureCloudIntegration = tool({
157
+ description: 'Enables service monitoring (EC2, S3, Lambda, GKE, VMs, etc.) on linked cloud accounts. Link accounts first.',
158
+ inputSchema: z.object({
159
+ newRelicApiKey: newRelicApiKeyField,
160
+ accountId: accountIdField('New Relic account ID to configure under'),
161
+ integrations: z.object({
162
+ aws: z.object({
163
+ s3: cloudServiceConfig(true), alb: cloudServiceConfig(true), ec2: cloudServiceConfig(true),
164
+ ecs: cloudServiceConfig(true), eks: cloudServiceConfig(true), rds: cloudServiceConfig(true),
165
+ sqs: cloudServiceConfig(true), lambda: cloudServiceConfig(true), dynamodb: cloudServiceConfig(true),
166
+ elasticache: cloudServiceConfig(true),
167
+ }).optional().describe('AWS services (any subset)'),
168
+ gcp: z.object({
169
+ gke: cloudServiceConfig(false), cloudSql: cloudServiceConfig(false),
170
+ cloudStorage: cloudServiceConfig(false), computeEngine: cloudServiceConfig(false),
171
+ }).optional().describe('GCP services (any subset)'),
172
+ azure: z.object({
173
+ appServices: cloudServiceConfig(false), sqlDatabases: cloudServiceConfig(false),
174
+ storageAccounts: cloudServiceConfig(false), virtualMachines: cloudServiceConfig(false),
175
+ }).optional().describe('Azure services (any subset)'),
176
+ }).describe('Provider integrations (at least one provider + service)'),
177
+ }),
178
+ execute: async ({ newRelicApiKey, accountId, integrations }) => nerdgraph(newRelicApiKey, 'mutation($accountId: Int!, $integrations: CloudConfigureIntegrationsInput!) { cloudConfigureIntegration(accountId: $accountId, integrations: $integrations) { integrations { id name service { slug } } errors { type message } } }', { accountId, integrations }, 'configure cloud integration'),
179
+ });
180
+ export const disableCloudIntegration = tool({
181
+ description: 'Stops monitoring one cloud-service integration on a linked account.',
182
+ inputSchema: z.object({
183
+ newRelicApiKey: newRelicApiKeyField,
184
+ accountId: accountIdField('New Relic account ID'),
185
+ providerSlug: z.string().describe("Provider, e.g. 'aws', 'azure', 'gcp'"),
186
+ integrationSlug: z.string().describe("Service, e.g. 'sqs', 'ec2', 'lambda'"),
187
+ linkedAccountId: z.number().int().describe('Linked cloud account ID to disable'),
188
+ }),
189
+ execute: async ({ newRelicApiKey, accountId, providerSlug, integrationSlug, linkedAccountId }) => nerdgraph(newRelicApiKey, 'mutation($accountId: Int!, $providerSlug: String!, $integrationSlug: String!, $linkedAccountId: Int!) { cloudDisableIntegration(accountId: $accountId, providerSlug: $providerSlug, integrationSlug: $integrationSlug, linkedAccountId: $linkedAccountId) { disabledIntegrations { id name } errors { type message } } }', { accountId, providerSlug, integrationSlug, linkedAccountId }, 'disable cloud integration'),
190
+ });
191
+ // ---- Service levels ----
192
+ const sliEventQuery = z.object({
193
+ from: z.string().describe("Event/metric source, e.g. 'Transaction', 'Metric', 'PageView'"),
194
+ where: z.string().optional().describe("NRQL WHERE clause (single quotes), e.g. \"entityGuid = '...'\""),
195
+ select: z.object({
196
+ function: z.enum(['COUNT', 'SUM']).optional().describe('Aggregation (default COUNT)'),
197
+ attribute: z.string().optional().describe("Attribute for SUM, e.g. 'duration'"),
198
+ }).optional(),
199
+ });
200
+ const sloObjective = z.object({
201
+ target: z.number().min(0).max(100).describe('Target percent, e.g. 99.9'),
202
+ timeWindow: z.object({
203
+ rolling: z.object({
204
+ count: z.number().int().describe('Window length (1,7,14,28,30 days; weeks for updates)'),
205
+ unit: z.enum(['DAY', 'WEEK']).optional().describe("Unit (create: DAY only)"),
206
+ }),
207
+ }),
208
+ });
209
+ export const createServiceLevel = tool({
210
+ description: 'Creates an SLI (valid vs good/bad events) with optional SLO targets on an entity. Use for latency, error-rate, or availability tracking.',
211
+ inputSchema: z.object({
212
+ newRelicApiKey: newRelicApiKeyField,
213
+ entityGuid: z.string().describe('Entity GUID (APM service, browser app, etc.) for the SLI'),
214
+ indicator: z.object({
215
+ name: z.string().describe('SLI name, unique on the entity'),
216
+ description: z.string().optional().describe('What good means + threshold context'),
217
+ events: z.object({
218
+ accountId: accountIdField('Account holding the NRDB data'),
219
+ validEvents: sliEventQuery.describe('100% baseline query (required)'),
220
+ goodEvents: sliEventQuery.optional().describe('Good subset (or badEvents, not both)'),
221
+ badEvents: sliEventQuery.optional().describe('Bad subset (or goodEvents, not both)'),
222
+ }),
223
+ objectives: z.array(sloObjective).optional().describe('SLO targets (omit for SLI-only)'),
224
+ }).describe('SLI configuration'),
225
+ }),
226
+ execute: async ({ newRelicApiKey, entityGuid, indicator }) => nerdgraph(newRelicApiKey, 'mutation($entityGuid: EntityGuid!, $indicator: ServiceLevelIndicatorInput!) { serviceLevelCreate(entityGuid: $entityGuid, indicator: $indicator) { id description } }', { entityGuid, indicator }, 'create service level'),
227
+ });
228
+ export const updateServiceLevel = tool({
229
+ description: 'Updates an SLI (targets, windows, event definitions, metadata). Only provided fields change.',
230
+ inputSchema: z.object({
231
+ newRelicApiKey: newRelicApiKeyField,
232
+ id: z.string().describe('SLI ID to update'),
233
+ indicator: z.object({
234
+ name: z.string().optional(),
235
+ description: z.string().optional(),
236
+ events: z.object({
237
+ validEvents: z.object({ query: z.string().describe('NRQL query string') }).optional(),
238
+ goodEvents: z.object({ query: z.string() }).optional(),
239
+ badEvents: z.object({ query: z.string() }).optional(),
240
+ }).optional().describe('Event queries (good or bad, not both)'),
241
+ objectives: z.array(sloObjective).optional().describe('Replacement SLO list'),
242
+ }).describe('SLI fields to update'),
243
+ }),
244
+ execute: async ({ newRelicApiKey, id, indicator }) => nerdgraph(newRelicApiKey, 'mutation($id: ID!, $indicator: ServiceLevelIndicatorUpdateInput!) { serviceLevelUpdate(id: $id, indicator: $indicator) { id name description } }', { id, indicator }, 'update service level'),
245
+ });
246
+ // ---- Workloads ----
247
+ export const updateWorkload = tool({
248
+ description: 'Updates a workload (name, entity GUIDs, search queries, scope accounts). Query list is a full replacement — resend all queries to keep.',
249
+ inputSchema: z.object({
250
+ newRelicApiKey: newRelicApiKeyField,
251
+ guid: z.string().describe('Workload GUID to update'),
252
+ workload: z.object({
253
+ name: z.string().optional().describe('New unique name'),
254
+ entityGuids: z.array(z.string()).optional().describe('Explicit member entity GUIDs'),
255
+ entitySearchQueries: z.array(z.object({
256
+ id: z.number().int().optional().describe('Existing query ID (omit to add new)'),
257
+ query: z.string().describe("Search query, e.g. \"(domain = 'INFRA' and type = 'HOST')\""),
258
+ })).optional().describe('Full dynamic-membership list'),
259
+ scopeAccounts: z.object({ accountIds: z.array(z.number().int()).min(1) }).optional().describe('Accounts to fetch entity data from'),
260
+ }).describe('Fields to update (at least one)'),
261
+ }),
262
+ execute: async ({ newRelicApiKey, guid, workload }) => nerdgraph(newRelicApiKey, 'mutation($guid: EntityGuid!, $workload: WorkloadUpdateInput!) { workloadUpdate(guid: $guid, workload: $workload) { guid name } }', { guid, workload }, 'update workload'),
263
+ });
264
+ export const duplicateWorkload = tool({
265
+ description: 'Clones a workload with all configuration into the same or another account. Optionally rename the copy.',
266
+ inputSchema: z.object({
267
+ newRelicApiKey: newRelicApiKeyField,
268
+ accountId: accountIdField('Account ID for the duplicate'),
269
+ sourceGuid: z.string().describe('Workload GUID to copy'),
270
+ workload: z.object({ name: z.string().optional().describe('Name for the copy (default generated)') }).optional(),
271
+ }),
272
+ execute: async ({ newRelicApiKey, accountId, sourceGuid, workload }) => nerdgraph(newRelicApiKey, 'mutation($accountId: Int!, $sourceGuid: EntityGuid!, $workload: WorkloadDuplicateInput) { workloadDuplicate(accountId: $accountId, sourceGuid: $sourceGuid, workload: $workload) { guid name } }', { accountId, sourceGuid, workload: workload ?? {} }, 'duplicate workload'),
273
+ });
274
+ export const deleteWorkload = tool({
275
+ description: 'Permanently deletes a workload by GUID. Cannot be recovered.',
276
+ inputSchema: z.object({
277
+ newRelicApiKey: newRelicApiKeyField,
278
+ guid: z.string().describe('Workload GUID to delete'),
279
+ }),
280
+ execute: async ({ newRelicApiKey, guid }) => nerdgraph(newRelicApiKey, 'mutation($guid: EntityGuid!) { workloadDelete(guid: $guid) { guid } }', { guid }, 'delete workload'),
281
+ });
282
+ //# sourceMappingURL=admin.js.map
@@ -0,0 +1,74 @@
1
+ export declare const createAlertPolicy: import("ai").Tool<{
2
+ name: string;
3
+ newRelicApiKey?: string | undefined;
4
+ incidentPreference?: "PER_POLICY" | "PER_CONDITION" | "PER_CONDITION_AND_TARGET" | undefined;
5
+ }, any>;
6
+ export declare const getAlertPolicies: import("ai").Tool<{
7
+ page?: number | undefined;
8
+ name?: string | undefined;
9
+ newRelicApiKey?: string | undefined;
10
+ incidentPreference?: "PER_POLICY" | "PER_CONDITION" | "PER_CONDITION_AND_TARGET" | undefined;
11
+ }, any>;
12
+ export declare const updateAlertPolicyRest: import("ai").Tool<{
13
+ policyId: number;
14
+ name?: string | undefined;
15
+ newRelicApiKey?: string | undefined;
16
+ incidentPreference?: "PER_POLICY" | "PER_CONDITION" | "PER_CONDITION_AND_TARGET" | undefined;
17
+ }, any>;
18
+ export declare const deleteAlertPolicy: import("ai").Tool<{
19
+ policyId: string;
20
+ newRelicApiKey?: string | undefined;
21
+ }, any>;
22
+ export declare const createAlertPolicyGraphql: import("ai").Tool<{
23
+ name: string;
24
+ accountId: number;
25
+ newRelicApiKey?: string | undefined;
26
+ incidentPreference?: "PER_POLICY" | "PER_CONDITION" | "PER_CONDITION_AND_TARGET" | undefined;
27
+ }, any>;
28
+ export declare const updateAlertPolicy: import("ai").Tool<{
29
+ accountId: number;
30
+ policyId: string;
31
+ policy: {
32
+ name?: string | undefined;
33
+ incidentPreference?: "PER_POLICY" | "PER_CONDITION" | "PER_CONDITION_AND_TARGET" | undefined;
34
+ };
35
+ newRelicApiKey?: string | undefined;
36
+ }, any>;
37
+ export declare const deleteAlertPolicyGraphql: import("ai").Tool<{
38
+ accountId: number;
39
+ policyId: string;
40
+ newRelicApiKey?: string | undefined;
41
+ }, any>;
42
+ export declare const deleteAlertsCondition: import("ai").Tool<{
43
+ id: number;
44
+ accountId: number;
45
+ newRelicApiKey?: string | undefined;
46
+ }, any>;
47
+ export declare const updateCrossAccountElections: import("ai").Tool<{
48
+ accountIds: number[];
49
+ electionStatus: boolean;
50
+ newRelicApiKey?: string | undefined;
51
+ }, any>;
52
+ export declare const addNotificationChannelsToPolicy: import("ai").Tool<{
53
+ accountId: number;
54
+ policyId: string;
55
+ notificationChannelIds: string;
56
+ newRelicApiKey?: string | undefined;
57
+ }, any>;
58
+ export declare const removeNotificationChannelsFromPolicy: import("ai").Tool<{
59
+ accountId: number;
60
+ policyId: number;
61
+ notificationChannelIds: number[];
62
+ newRelicApiKey?: string | undefined;
63
+ }, any>;
64
+ export declare const updatePolicyChannels: import("ai").Tool<{
65
+ policyId: number;
66
+ channelIds: number[];
67
+ newRelicApiKey?: string | undefined;
68
+ }, any>;
69
+ export declare const deletePolicyChannel: import("ai").Tool<{
70
+ policyId: number;
71
+ channelId: number;
72
+ newRelicApiKey?: string | undefined;
73
+ }, any>;
74
+ //# sourceMappingURL=alert-policies.d.ts.map