@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.
- package/README.md +12 -2
- package/dist/index.d.ts +11 -1
- package/dist/index.js +21 -1
- package/dist/toolkits/bitbucket/tools/index.d.ts +5 -5
- package/dist/toolkits/bitbucket/tools/reports.d.ts +5 -5
- package/dist/toolkits/cloudflare/tools/create-list.d.ts +1 -1
- package/dist/toolkits/cloudflare/tools/create-zone.d.ts +1 -1
- package/dist/toolkits/cloudflare/tools/index.d.ts +4 -4
- package/dist/toolkits/cloudflare/tools/list-pools.d.ts +1 -1
- package/dist/toolkits/cloudflare/tools/list-zones.d.ts +1 -1
- package/dist/toolkits/convex/icon.d.ts +5 -0
- package/dist/toolkits/convex/icon.js +10 -0
- package/dist/toolkits/convex/manifest.d.ts +3 -0
- package/dist/toolkits/convex/manifest.js +33 -0
- package/dist/toolkits/convex/tools/client.d.ts +28 -0
- package/dist/toolkits/convex/tools/client.js +85 -0
- package/dist/toolkits/convex/tools/deploy-keys.d.ts +10 -0
- package/dist/toolkits/convex/tools/deploy-keys.js +46 -0
- package/dist/toolkits/convex/tools/deployments.d.ts +35 -0
- package/dist/toolkits/convex/tools/deployments.js +126 -0
- package/dist/toolkits/convex/tools/domains.d.ts +7 -0
- package/dist/toolkits/convex/tools/domains.js +29 -0
- package/dist/toolkits/convex/tools/functions.d.ts +14 -0
- package/dist/toolkits/convex/tools/functions.js +49 -0
- package/dist/toolkits/convex/tools/index.d.ts +176 -0
- package/dist/toolkits/convex/tools/index.js +145 -0
- package/dist/toolkits/convex/tools/logging.d.ts +5 -0
- package/dist/toolkits/convex/tools/logging.js +25 -0
- package/dist/toolkits/convex/tools/projects.d.ts +31 -0
- package/dist/toolkits/convex/tools/projects.js +111 -0
- package/dist/toolkits/convex/tools/teams.d.ts +12 -0
- package/dist/toolkits/convex/tools/teams.js +62 -0
- package/dist/toolkits/datadog/icon.d.ts +5 -0
- package/dist/toolkits/datadog/icon.js +6 -0
- package/dist/toolkits/datadog/manifest.d.ts +3 -0
- package/dist/toolkits/datadog/manifest.js +44 -0
- package/dist/toolkits/datadog/tools/api-keys.d.ts +21 -0
- package/dist/toolkits/datadog/tools/api-keys.js +42 -0
- package/dist/toolkits/datadog/tools/apm.d.ts +51 -0
- package/dist/toolkits/datadog/tools/apm.js +106 -0
- package/dist/toolkits/datadog/tools/client.d.ts +19 -0
- package/dist/toolkits/datadog/tools/client.js +81 -0
- package/dist/toolkits/datadog/tools/dashboards.d.ts +93 -0
- package/dist/toolkits/datadog/tools/dashboards.js +127 -0
- package/dist/toolkits/datadog/tools/events.d.ts +35 -0
- package/dist/toolkits/datadog/tools/events.js +56 -0
- package/dist/toolkits/datadog/tools/hosts.d.ts +49 -0
- package/dist/toolkits/datadog/tools/hosts.js +87 -0
- package/dist/toolkits/datadog/tools/incidents.d.ts +18 -0
- package/dist/toolkits/datadog/tools/incidents.js +34 -0
- package/dist/toolkits/datadog/tools/index.d.ts +999 -0
- package/dist/toolkits/datadog/tools/index.js +450 -0
- package/dist/toolkits/datadog/tools/integrations.d.ts +32 -0
- package/dist/toolkits/datadog/tools/integrations.js +47 -0
- package/dist/toolkits/datadog/tools/logs.d.ts +39 -0
- package/dist/toolkits/datadog/tools/logs.js +121 -0
- package/dist/toolkits/datadog/tools/metrics.d.ts +27 -0
- package/dist/toolkits/datadog/tools/metrics.js +83 -0
- package/dist/toolkits/datadog/tools/monitors.d.ts +95 -0
- package/dist/toolkits/datadog/tools/monitors.js +190 -0
- package/dist/toolkits/datadog/tools/oncall-notifications.d.ts +61 -0
- package/dist/toolkits/datadog/tools/oncall-notifications.js +155 -0
- package/dist/toolkits/datadog/tools/oncall-policies.d.ts +28 -0
- package/dist/toolkits/datadog/tools/oncall-policies.js +72 -0
- package/dist/toolkits/datadog/tools/oncall-schedules.d.ts +31 -0
- package/dist/toolkits/datadog/tools/oncall-schedules.js +87 -0
- package/dist/toolkits/datadog/tools/oncall-teams.d.ts +14 -0
- package/dist/toolkits/datadog/tools/oncall-teams.js +54 -0
- package/dist/toolkits/datadog/tools/slos.d.ts +43 -0
- package/dist/toolkits/datadog/tools/slos.js +62 -0
- package/dist/toolkits/datadog/tools/synthetics.d.ts +58 -0
- package/dist/toolkits/datadog/tools/synthetics.js +90 -0
- package/dist/toolkits/datadog/tools/usage.d.ts +7 -0
- package/dist/toolkits/datadog/tools/usage.js +25 -0
- package/dist/toolkits/datadog/tools/users.d.ts +35 -0
- package/dist/toolkits/datadog/tools/users.js +66 -0
- package/dist/toolkits/dev-to/icon.d.ts +5 -0
- package/dist/toolkits/dev-to/icon.js +10 -0
- package/dist/toolkits/dev-to/manifest.d.ts +3 -0
- package/dist/toolkits/dev-to/manifest.js +34 -0
- package/dist/toolkits/dev-to/tools/articles.d.ts +78 -0
- package/dist/toolkits/dev-to/tools/articles.js +262 -0
- package/dist/toolkits/dev-to/tools/client.d.ts +25 -0
- package/dist/toolkits/dev-to/tools/client.js +65 -0
- package/dist/toolkits/dev-to/tools/community.d.ts +61 -0
- package/dist/toolkits/dev-to/tools/community.js +244 -0
- package/dist/toolkits/dev-to/tools/index.d.ts +202 -0
- package/dist/toolkits/dev-to/tools/index.js +37 -0
- package/dist/toolkits/dev-to/tools/listings.d.ts +26 -0
- package/dist/toolkits/dev-to/tools/listings.js +92 -0
- package/dist/toolkits/discord/tools/applications.d.ts +5 -5
- package/dist/toolkits/discord/tools/index.d.ts +5 -5
- package/dist/toolkits/figma/tools/create-modify-delete-variables.d.ts +1 -1
- package/dist/toolkits/figma/tools/get-file-nodes.d.ts +1 -1
- package/dist/toolkits/figma/tools/index.d.ts +3 -3
- package/dist/toolkits/figma/tools/render-images-of-file-nodes.d.ts +1 -1
- package/dist/toolkits/google-analytics/tools/reports.d.ts +9 -9
- package/dist/toolkits/google-classroom/tools/index.d.ts +7 -7
- package/dist/toolkits/google-classroom/tools/invitations.d.ts +2 -2
- package/dist/toolkits/google-classroom/tools/misc.d.ts +1 -1
- package/dist/toolkits/google-classroom/tools/roster.d.ts +5 -5
- package/dist/toolkits/google-search-console/tools/index.d.ts +2 -2
- package/dist/toolkits/google-search-console/tools/search-analytics-query.d.ts +2 -2
- package/dist/toolkits/hostinger/tools/index.d.ts +1 -1
- package/dist/toolkits/hostinger/tools/whois.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/datasets-viewer.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/datasets.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/index.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/models.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/repos.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/spaces.d.ts +1 -1
- package/dist/toolkits/jira/tools/index.d.ts +4 -4
- package/dist/toolkits/jira/tools/meta.d.ts +2 -2
- package/dist/toolkits/jira/tools/users.d.ts +3 -3
- package/dist/toolkits/kaggle/icon.d.ts +5 -0
- package/dist/toolkits/kaggle/icon.js +6 -0
- package/dist/toolkits/kaggle/manifest.d.ts +3 -0
- package/dist/toolkits/kaggle/manifest.js +32 -0
- package/dist/toolkits/kaggle/tools/client.d.ts +10 -0
- package/dist/toolkits/kaggle/tools/client.js +94 -0
- package/dist/toolkits/kaggle/tools/competitions.d.ts +48 -0
- package/dist/toolkits/kaggle/tools/competitions.js +109 -0
- package/dist/toolkits/kaggle/tools/config.d.ts +110 -0
- package/dist/toolkits/kaggle/tools/config.js +256 -0
- package/dist/toolkits/kaggle/tools/datasets.d.ts +88 -0
- package/dist/toolkits/kaggle/tools/datasets.js +161 -0
- package/dist/toolkits/kaggle/tools/index.d.ts +482 -0
- package/dist/toolkits/kaggle/tools/index.js +53 -0
- package/dist/toolkits/kaggle/tools/kernels.d.ts +62 -0
- package/dist/toolkits/kaggle/tools/kernels.js +121 -0
- package/dist/toolkits/kaggle/tools/model_instance_files.d.ts +11 -0
- package/dist/toolkits/kaggle/tools/model_instance_files.js +23 -0
- package/dist/toolkits/kaggle/tools/model_instances.d.ts +8 -0
- package/dist/toolkits/kaggle/tools/model_instances.js +20 -0
- package/dist/toolkits/kaggle/tools/models.d.ts +14 -0
- package/dist/toolkits/kaggle/tools/models.js +33 -0
- package/dist/toolkits/nasa/icon.d.ts +5 -0
- package/dist/toolkits/nasa/icon.js +56 -0
- package/dist/toolkits/nasa/manifest.d.ts +3 -0
- package/dist/toolkits/nasa/manifest.js +49 -0
- package/dist/toolkits/nasa/tools/agage.d.ts +60 -0
- package/dist/toolkits/nasa/tools/agage.js +176 -0
- package/dist/toolkits/nasa/tools/client.d.ts +95 -0
- package/dist/toolkits/nasa/tools/client.js +337 -0
- package/dist/toolkits/nasa/tools/cmr.d.ts +268 -0
- package/dist/toolkits/nasa/tools/cmr.js +984 -0
- package/dist/toolkits/nasa/tools/donki.d.ts +63 -0
- package/dist/toolkits/nasa/tools/donki.js +301 -0
- package/dist/toolkits/nasa/tools/eonet.d.ts +74 -0
- package/dist/toolkits/nasa/tools/eonet.js +279 -0
- package/dist/toolkits/nasa/tools/icesat2.d.ts +25 -0
- package/dist/toolkits/nasa/tools/icesat2.js +97 -0
- package/dist/toolkits/nasa/tools/imagery.d.ts +36 -0
- package/dist/toolkits/nasa/tools/imagery.js +138 -0
- package/dist/toolkits/nasa/tools/index.d.ts +1063 -0
- package/dist/toolkits/nasa/tools/index.js +865 -0
- package/dist/toolkits/nasa/tools/neo.d.ts +15 -0
- package/dist/toolkits/nasa/tools/neo.js +75 -0
- package/dist/toolkits/nasa/tools/ntrs.d.ts +152 -0
- package/dist/toolkits/nasa/tools/ntrs.js +292 -0
- package/dist/toolkits/nasa/tools/osdr.d.ts +72 -0
- package/dist/toolkits/nasa/tools/osdr.js +290 -0
- package/dist/toolkits/nasa/tools/planetary.d.ts +58 -0
- package/dist/toolkits/nasa/tools/planetary.js +312 -0
- package/dist/toolkits/nasa/tools/power.d.ts +52 -0
- package/dist/toolkits/nasa/tools/power.js +213 -0
- package/dist/toolkits/nasa/tools/ssc.d.ts +44 -0
- package/dist/toolkits/nasa/tools/ssc.js +92 -0
- package/dist/toolkits/nasa/tools/tolnet.d.ts +84 -0
- package/dist/toolkits/nasa/tools/tolnet.js +254 -0
- package/dist/toolkits/neo4j/tools/analytics.d.ts +1 -1
- package/dist/toolkits/neo4j/tools/index.d.ts +3 -3
- package/dist/toolkits/neo4j/tools/instances.d.ts +2 -2
- package/dist/toolkits/neon/tools/auth.d.ts +4 -4
- package/dist/toolkits/neon/tools/dataapi.d.ts +1 -1
- package/dist/toolkits/neon/tools/index.d.ts +7 -7
- package/dist/toolkits/neon/tools/projects.d.ts +2 -2
- package/dist/toolkits/new-relic/icon.d.ts +5 -0
- package/dist/toolkits/new-relic/icon.js +6 -0
- package/dist/toolkits/new-relic/manifest.d.ts +3 -0
- package/dist/toolkits/new-relic/manifest.js +41 -0
- package/dist/toolkits/new-relic/tools/admin.d.ts +310 -0
- package/dist/toolkits/new-relic/tools/admin.js +282 -0
- package/dist/toolkits/new-relic/tools/alert-policies.d.ts +74 -0
- package/dist/toolkits/new-relic/tools/alert-policies.js +136 -0
- package/dist/toolkits/new-relic/tools/apm.d.ts +129 -0
- package/dist/toolkits/new-relic/tools/apm.js +228 -0
- package/dist/toolkits/new-relic/tools/client.d.ts +62 -0
- package/dist/toolkits/new-relic/tools/client.js +167 -0
- package/dist/toolkits/new-relic/tools/conditions.d.ts +190 -0
- package/dist/toolkits/new-relic/tools/conditions.js +265 -0
- package/dist/toolkits/new-relic/tools/config.d.ts +73 -0
- package/dist/toolkits/new-relic/tools/config.js +131 -0
- package/dist/toolkits/new-relic/tools/dashboards.d.ts +204 -0
- package/dist/toolkits/new-relic/tools/dashboards.js +159 -0
- package/dist/toolkits/new-relic/tools/entities.d.ts +160 -0
- package/dist/toolkits/new-relic/tools/entities.js +218 -0
- package/dist/toolkits/new-relic/tools/index.d.ts +23 -0
- package/dist/toolkits/new-relic/tools/index.js +179 -0
- package/dist/toolkits/new-relic/tools/ingest.d.ts +31 -0
- package/dist/toolkits/new-relic/tools/ingest.js +80 -0
- package/dist/toolkits/new-relic/tools/notifications.d.ts +186 -0
- package/dist/toolkits/new-relic/tools/notifications.js +232 -0
- package/dist/toolkits/new-relic/tools/nrql-conditions.d.ts +105 -0
- package/dist/toolkits/new-relic/tools/nrql-conditions.js +136 -0
- package/dist/toolkits/new-relic/tools/nrql.d.ts +38 -0
- package/dist/toolkits/new-relic/tools/nrql.js +99 -0
- package/dist/toolkits/new-relic/tools/synthetics.d.ts +176 -0
- package/dist/toolkits/new-relic/tools/synthetics.js +246 -0
- package/dist/toolkits/notebook-lm/icon.d.ts +5 -0
- package/dist/toolkits/notebook-lm/icon.js +6 -0
- package/dist/toolkits/notebook-lm/manifest.d.ts +3 -0
- package/dist/toolkits/notebook-lm/manifest.js +44 -0
- package/dist/toolkits/notebook-lm/tools/add-text-sources.d.ts +36 -0
- package/dist/toolkits/notebook-lm/tools/add-text-sources.js +51 -0
- package/dist/toolkits/notebook-lm/tools/create-audio-overview.d.ts +47 -0
- package/dist/toolkits/notebook-lm/tools/create-audio-overview.js +55 -0
- package/dist/toolkits/notebook-lm/tools/create-notebook.d.ts +52 -0
- package/dist/toolkits/notebook-lm/tools/create-notebook.js +49 -0
- package/dist/toolkits/notebook-lm/tools/delete-audio-overview.d.ts +33 -0
- package/dist/toolkits/notebook-lm/tools/delete-audio-overview.js +46 -0
- package/dist/toolkits/notebook-lm/tools/delete-notebooks.d.ts +32 -0
- package/dist/toolkits/notebook-lm/tools/delete-notebooks.js +46 -0
- package/dist/toolkits/notebook-lm/tools/delete-sources.d.ts +33 -0
- package/dist/toolkits/notebook-lm/tools/delete-sources.js +47 -0
- package/dist/toolkits/notebook-lm/tools/get-notebook.d.ts +52 -0
- package/dist/toolkits/notebook-lm/tools/get-notebook.js +45 -0
- package/dist/toolkits/notebook-lm/tools/get-source.d.ts +53 -0
- package/dist/toolkits/notebook-lm/tools/get-source.js +47 -0
- package/dist/toolkits/notebook-lm/tools/index.d.ts +516 -0
- package/dist/toolkits/notebook-lm/tools/index.js +93 -0
- package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.d.ts +32 -0
- package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.js +41 -0
- package/dist/toolkits/notebook-lm/tools/share-notebook.d.ts +48 -0
- package/dist/toolkits/notebook-lm/tools/share-notebook.js +57 -0
- package/dist/toolkits/notebook-lm/tools/upload-source-file.d.ts +40 -0
- package/dist/toolkits/notebook-lm/tools/upload-source-file.js +62 -0
- package/dist/toolkits/notebook-lm/tools/utils.d.ts +15 -0
- package/dist/toolkits/notebook-lm/tools/utils.js +46 -0
- package/dist/toolkits/npm/icon.d.ts +5 -0
- package/dist/toolkits/npm/icon.js +11 -0
- package/dist/toolkits/npm/manifest.d.ts +3 -0
- package/dist/toolkits/npm/manifest.js +35 -0
- package/dist/toolkits/npm/tools/client.d.ts +19 -0
- package/dist/toolkits/npm/tools/client.js +64 -0
- package/dist/toolkits/npm/tools/downloads.d.ts +19 -0
- package/dist/toolkits/npm/tools/downloads.js +39 -0
- package/dist/toolkits/npm/tools/index.d.ts +14 -0
- package/dist/toolkits/npm/tools/index.js +24 -0
- package/dist/toolkits/npm/tools/registry.d.ts +24 -0
- package/dist/toolkits/npm/tools/registry.js +58 -0
- package/dist/toolkits/npm/tools/security.d.ts +9 -0
- package/dist/toolkits/npm/tools/security.js +29 -0
- package/dist/toolkits/slack/tools/admin-users.d.ts +1 -1
- package/dist/toolkits/slack/tools/slack-lists.d.ts +3 -3
- package/dist/toolkits/snowflake/icon.d.ts +5 -0
- package/dist/toolkits/snowflake/icon.js +6 -0
- package/dist/toolkits/snowflake/manifest.d.ts +3 -0
- package/dist/toolkits/snowflake/manifest.js +32 -0
- package/dist/toolkits/snowflake/tools/catalog.d.ts +56 -0
- package/dist/toolkits/snowflake/tools/catalog.js +123 -0
- package/dist/toolkits/snowflake/tools/client.d.ts +53 -0
- package/dist/toolkits/snowflake/tools/client.js +145 -0
- package/dist/toolkits/snowflake/tools/index.d.ts +14 -0
- package/dist/toolkits/snowflake/tools/index.js +28 -0
- package/dist/toolkits/snowflake/tools/statements.d.ts +27 -0
- package/dist/toolkits/snowflake/tools/statements.js +84 -0
- package/dist/toolkits/snowflake/tools/status.d.ts +22 -0
- package/dist/toolkits/snowflake/tools/status.js +54 -0
- package/dist/toolkits/telegram/icon.d.ts +5 -0
- package/dist/toolkits/telegram/icon.js +6 -0
- package/dist/toolkits/telegram/manifest.d.ts +3 -0
- package/dist/toolkits/telegram/manifest.js +34 -0
- package/dist/toolkits/telegram/tools/bot.d.ts +13 -0
- package/dist/toolkits/telegram/tools/bot.js +23 -0
- package/dist/toolkits/telegram/tools/chats.d.ts +22 -0
- package/dist/toolkits/telegram/tools/chats.js +46 -0
- package/dist/toolkits/telegram/tools/client.d.ts +12 -0
- package/dist/toolkits/telegram/tools/client.js +46 -0
- package/dist/toolkits/telegram/tools/index.d.ts +15 -0
- package/dist/toolkits/telegram/tools/index.js +31 -0
- package/dist/toolkits/telegram/tools/messages.d.ts +86 -0
- package/dist/toolkits/telegram/tools/messages.js +134 -0
- package/dist/toolkits/telegram/tools/updates.d.ts +23 -0
- package/dist/toolkits/telegram/tools/updates.js +54 -0
- package/dist/toolkits/youtube/tools/get-channel-activities.d.ts +1 -1
- package/dist/toolkits/youtube/tools/index.d.ts +5 -5
- package/dist/toolkits/youtube/tools/list-channel-sections.d.ts +1 -1
- package/dist/toolkits/youtube/tools/post-comment.d.ts +1 -1
- package/dist/toolkits/youtube/tools/subscribe-channel.d.ts +1 -1
- package/dist/toolkits/youtube/tools/unsubscribe-channel.d.ts +1 -1
- package/package.json +2 -3
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const createMetricNormalizationRule: import("ai").Tool<{
|
|
2
|
+
rule: {
|
|
3
|
+
action: "REPLACE" | "IGNORE" | "DENY_NEW_METRICS";
|
|
4
|
+
matchExpression: string;
|
|
5
|
+
evalOrder: number;
|
|
6
|
+
enabled?: boolean | undefined;
|
|
7
|
+
notes?: string | undefined;
|
|
8
|
+
replacement?: string | undefined;
|
|
9
|
+
terminateChain?: boolean | undefined;
|
|
10
|
+
applicationGuid?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
accountId: string;
|
|
13
|
+
newRelicApiKey?: string | undefined;
|
|
14
|
+
}, any>;
|
|
15
|
+
export declare const editMetricNormalizationRule: import("ai").Tool<{
|
|
16
|
+
rule: {
|
|
17
|
+
id: number;
|
|
18
|
+
action: "REPLACE" | "IGNORE" | "DENY_NEW_METRICS";
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
notes?: string | undefined;
|
|
21
|
+
matchExpression?: string | undefined;
|
|
22
|
+
replacement?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
accountId: string;
|
|
25
|
+
newRelicApiKey?: string | undefined;
|
|
26
|
+
}, any>;
|
|
27
|
+
export declare const enableMetricNormalizationRule: import("ai").Tool<{
|
|
28
|
+
accountId: string;
|
|
29
|
+
ruleId: number;
|
|
30
|
+
newRelicApiKey?: string | undefined;
|
|
31
|
+
}, any>;
|
|
32
|
+
export declare const disableMetricNormalizationRule: import("ai").Tool<{
|
|
33
|
+
accountId: string;
|
|
34
|
+
ruleId: number;
|
|
35
|
+
newRelicApiKey?: string | undefined;
|
|
36
|
+
}, any>;
|
|
37
|
+
export declare const createLogDataPartitionRule: import("ai").Tool<{
|
|
38
|
+
description: string;
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
accountId: number;
|
|
41
|
+
nrql: string;
|
|
42
|
+
targetDataPartition: string;
|
|
43
|
+
retentionPolicy: "STANDARD" | "SECONDARY";
|
|
44
|
+
newRelicApiKey?: string | undefined;
|
|
45
|
+
}, any>;
|
|
46
|
+
export declare const updateDataPartitionRule: import("ai").Tool<{
|
|
47
|
+
rule: {
|
|
48
|
+
id: string;
|
|
49
|
+
description?: string | undefined;
|
|
50
|
+
enabled?: boolean | undefined;
|
|
51
|
+
nrql?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
accountId: number;
|
|
54
|
+
newRelicApiKey?: string | undefined;
|
|
55
|
+
}, any>;
|
|
56
|
+
export declare const deleteDataPartitionRule: import("ai").Tool<{
|
|
57
|
+
id: string;
|
|
58
|
+
accountId: number;
|
|
59
|
+
newRelicApiKey?: string | undefined;
|
|
60
|
+
}, any>;
|
|
61
|
+
export declare const fetchBrowserConfiguration: import("ai").Tool<{
|
|
62
|
+
guid: string;
|
|
63
|
+
newRelicApiKey?: string | undefined;
|
|
64
|
+
}, any>;
|
|
65
|
+
export declare const fetchBrowserJavaScriptSnippet: import("ai").Tool<{
|
|
66
|
+
guid: string;
|
|
67
|
+
newRelicApiKey?: string | undefined;
|
|
68
|
+
}, any>;
|
|
69
|
+
export declare const fetchMobileApplicationToken: import("ai").Tool<{
|
|
70
|
+
guid: string;
|
|
71
|
+
newRelicApiKey?: string | undefined;
|
|
72
|
+
}, any>;
|
|
73
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { RULE_RESULT_FIELDS, accountIdField, nerdgraph, newRelicApiKeyField } from './client.js';
|
|
5
|
+
// ---- Metric normalization rules ----
|
|
6
|
+
const normalizationRule = {
|
|
7
|
+
action: z.enum(['REPLACE', 'IGNORE', 'DENY_NEW_METRICS']).describe('REPLACE: rewrite match; IGNORE: drop; DENY_NEW_METRICS: block new names'),
|
|
8
|
+
matchExpression: z.string().describe("Full-match regex, e.g. '^WebTransaction/Uri/users/[0-9]+$'"),
|
|
9
|
+
evalOrder: z.number().int().min(0).optional().describe('Ascending eval order (use 2000 for custom rules)'),
|
|
10
|
+
replacement: z.string().optional().describe("Replacement for REPLACE (capture groups like '{id}'), e.g. 'WebTransaction/Uri/users/{id}'"),
|
|
11
|
+
notes: z.string().optional(),
|
|
12
|
+
enabled: z.boolean().optional().describe('Active when true'),
|
|
13
|
+
terminateChain: z.boolean().optional().describe('Stop further rules after match'),
|
|
14
|
+
applicationGuid: z.string().optional().describe('Scope to one app (omit for account-wide)'),
|
|
15
|
+
};
|
|
16
|
+
export const createMetricNormalizationRule = tool({
|
|
17
|
+
description: 'Creates a metric normalization rule (rename/drop/block metrics) to consolidate names and reduce cardinality. Regex must be ^...$ anchored.',
|
|
18
|
+
inputSchema: z.object({
|
|
19
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
20
|
+
accountId: z.string().describe('Account ID for the rule'),
|
|
21
|
+
rule: z.object({
|
|
22
|
+
action: normalizationRule.action,
|
|
23
|
+
matchExpression: normalizationRule.matchExpression,
|
|
24
|
+
evalOrder: z.number().int().min(0).describe('Ascending eval order (use 2000 for custom rules)'),
|
|
25
|
+
replacement: normalizationRule.replacement,
|
|
26
|
+
notes: normalizationRule.notes,
|
|
27
|
+
enabled: z.boolean().optional().describe('Active when true (default true)'),
|
|
28
|
+
terminateChain: normalizationRule.terminateChain,
|
|
29
|
+
applicationGuid: normalizationRule.applicationGuid,
|
|
30
|
+
}).describe('Rule configuration'),
|
|
31
|
+
}),
|
|
32
|
+
execute: async ({ newRelicApiKey, accountId, rule }) => nerdgraph(newRelicApiKey, `mutation($accountId: String!, $rule: MetricNormalizationRuleInput!) { metricNormalizationCreateRule(accountId: $accountId, rule: $rule) { ${RULE_RESULT_FIELDS} } }`, { accountId, rule: { enabled: true, ...rule } }, 'create metric normalization rule'),
|
|
33
|
+
});
|
|
34
|
+
export const editMetricNormalizationRule = tool({
|
|
35
|
+
description: 'Edits a normalization rule (match, action, enabled, replacement). Only provided fields change; action + enabled are required by the API — resend current values.',
|
|
36
|
+
inputSchema: z.object({
|
|
37
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
38
|
+
accountId: z.string().describe('Account ID owning the rule'),
|
|
39
|
+
rule: z.object({
|
|
40
|
+
id: z.number().int().positive().describe('Rule ID to edit'),
|
|
41
|
+
action: normalizationRule.action,
|
|
42
|
+
enabled: z.boolean(),
|
|
43
|
+
matchExpression: normalizationRule.matchExpression.optional(),
|
|
44
|
+
replacement: normalizationRule.replacement,
|
|
45
|
+
notes: normalizationRule.notes,
|
|
46
|
+
}).describe('Rule ID + fields to update'),
|
|
47
|
+
}),
|
|
48
|
+
execute: async ({ newRelicApiKey, accountId, rule }) => nerdgraph(newRelicApiKey, `mutation($accountId: String!, $rule: MetricNormalizationEditRuleInput!) { metricNormalizationEditRule(accountId: $accountId, rule: $rule) { ${RULE_RESULT_FIELDS} } }`, { accountId, rule }, 'edit metric normalization rule'),
|
|
49
|
+
});
|
|
50
|
+
export const enableMetricNormalizationRule = tool({
|
|
51
|
+
description: 'Reactivates a disabled normalization rule by ID.',
|
|
52
|
+
inputSchema: z.object({
|
|
53
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
54
|
+
accountId: z.string().describe('Account ID owning the rule'),
|
|
55
|
+
ruleId: z.number().int().positive().describe('Rule ID to enable'),
|
|
56
|
+
}),
|
|
57
|
+
execute: async ({ newRelicApiKey, accountId, ruleId }) => nerdgraph(newRelicApiKey, `mutation($accountId: String!, $ruleId: ID!) { metricNormalizationEnableRule(accountId: $accountId, ruleId: $ruleId) { ${RULE_RESULT_FIELDS} } }`, { accountId, ruleId: String(ruleId) }, 'enable metric normalization rule'),
|
|
58
|
+
});
|
|
59
|
+
export const disableMetricNormalizationRule = tool({
|
|
60
|
+
description: 'Deactivates a normalization rule without deleting it (reversible via enable).',
|
|
61
|
+
inputSchema: z.object({
|
|
62
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
63
|
+
accountId: z.string().describe('Account ID owning the rule'),
|
|
64
|
+
ruleId: z.number().int().positive().describe('Rule ID to disable'),
|
|
65
|
+
}),
|
|
66
|
+
execute: async ({ newRelicApiKey, accountId, ruleId }) => nerdgraph(newRelicApiKey, `mutation($accountId: String!, $ruleId: ID!) { metricNormalizationDisableRule(accountId: $accountId, ruleId: $ruleId) { ${RULE_RESULT_FIELDS} } }`, { accountId, ruleId: String(ruleId) }, 'disable metric normalization rule'),
|
|
67
|
+
});
|
|
68
|
+
// ---- Log data partition rules ----
|
|
69
|
+
const PARTITION_RESULT = 'rule { id targetDataPartition description enabled } errors { type message }';
|
|
70
|
+
export const createLogDataPartitionRule = tool({
|
|
71
|
+
description: 'Creates a log partition rule routing matching logs to a Log_* partition with STANDARD or SECONDARY (30-day) retention.',
|
|
72
|
+
inputSchema: z.object({
|
|
73
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
74
|
+
accountId: accountIdField('Account ID for the rule'),
|
|
75
|
+
targetDataPartition: z.string().describe("Target partition, must start with 'Log_', e.g. 'Log_ProductionLogs'"),
|
|
76
|
+
description: z.string().describe('Purpose of the rule'),
|
|
77
|
+
nrql: z.string().describe("WHERE clause without WHERE keyword, e.g. \"appName = 'prod' AND level = 'error'\""),
|
|
78
|
+
retentionPolicy: z.enum(['STANDARD', 'SECONDARY']).describe('STANDARD: account default; SECONDARY: 30-day rolling'),
|
|
79
|
+
enabled: z.boolean().describe('Route matching logs when true'),
|
|
80
|
+
}),
|
|
81
|
+
execute: async ({ newRelicApiKey, accountId, ...rule }) => nerdgraph(newRelicApiKey, `mutation($accountId: Int!, $rule: LogsDataPartitionRuleCreateInput!) { logConfigurationsDataPartitionRuleCreate(accountId: $accountId, rule: $rule) { ${PARTITION_RESULT} } }`, { accountId, rule }, 'create log data partition rule'),
|
|
82
|
+
});
|
|
83
|
+
export const updateDataPartitionRule = tool({
|
|
84
|
+
description: 'Updates a partition rule (description, NRQL criteria, enabled). All non-ID fields optional — partial updates supported.',
|
|
85
|
+
inputSchema: z.object({
|
|
86
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
87
|
+
accountId: accountIdField('Account ID owning the rule'),
|
|
88
|
+
rule: z.object({
|
|
89
|
+
id: z.string().describe('Rule ID to update'),
|
|
90
|
+
description: z.string().optional(),
|
|
91
|
+
nrql: z.string().optional().describe("New WHERE clause, e.g. \"logtype = 'apache'\""),
|
|
92
|
+
enabled: z.boolean().optional().describe('false disables without deleting'),
|
|
93
|
+
}).describe('Rule ID + fields to update'),
|
|
94
|
+
}),
|
|
95
|
+
execute: async ({ newRelicApiKey, accountId, rule }) => nerdgraph(newRelicApiKey, `mutation($accountId: Int!, $rule: LogsDataPartitionRuleUpdateInput!) { logConfigurationsDataPartitionRuleUpdate(accountId: $accountId, rule: $rule) { ${PARTITION_RESULT} } }`, { accountId, rule }, 'update data partition rule'),
|
|
96
|
+
});
|
|
97
|
+
export const deleteDataPartitionRule = tool({
|
|
98
|
+
description: 'Deletes a log partition rule. Already-partitioned data is retained per its retention policy.',
|
|
99
|
+
inputSchema: z.object({
|
|
100
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
101
|
+
accountId: accountIdField('Account ID owning the rule'),
|
|
102
|
+
id: z.string().describe('Rule ID to delete'),
|
|
103
|
+
}),
|
|
104
|
+
execute: async ({ newRelicApiKey, accountId, id }) => nerdgraph(newRelicApiKey, 'mutation($accountId: Int!, $id: ID!) { logConfigurationsDataPartitionRuleDelete(accountId: $accountId, id: $id) { errors { type message } } }', { accountId, id }, 'delete data partition rule'),
|
|
105
|
+
});
|
|
106
|
+
// ---- Browser / mobile fetchers ----
|
|
107
|
+
export const fetchBrowserConfiguration = tool({
|
|
108
|
+
description: 'Reads browser app JS config (jsConfig for source code, jsConfigScript for head-tag injection) by entity GUID.',
|
|
109
|
+
inputSchema: z.object({
|
|
110
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
111
|
+
guid: z.string().describe('Browser application entity GUID'),
|
|
112
|
+
}),
|
|
113
|
+
execute: async ({ newRelicApiKey, guid }) => nerdgraph(newRelicApiKey, `query($guid: EntityGuid!) { actor { entity(guid: $guid) { guid name ... on BrowserApplicationEntity { browserProperties { jsConfig jsConfigScript } } } } }`, { guid }, 'fetch browser configuration'),
|
|
114
|
+
});
|
|
115
|
+
export const fetchBrowserJavaScriptSnippet = tool({
|
|
116
|
+
description: 'Reads the browser loader script snippet (jsLoaderScript) to embed for browser monitoring.',
|
|
117
|
+
inputSchema: z.object({
|
|
118
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
119
|
+
guid: z.string().describe('Browser application entity GUID'),
|
|
120
|
+
}),
|
|
121
|
+
execute: async ({ newRelicApiKey, guid }) => nerdgraph(newRelicApiKey, `query($guid: EntityGuid!) { actor { entity(guid: $guid) { guid name ... on BrowserApplicationEntity { browserProperties { jsLoaderScript } } } } }`, { guid }, 'fetch browser JavaScript snippet'),
|
|
122
|
+
});
|
|
123
|
+
export const fetchMobileApplicationToken = tool({
|
|
124
|
+
description: 'Reads the mobile application token (applicationToken) for SDK authentication and setup.',
|
|
125
|
+
inputSchema: z.object({
|
|
126
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
127
|
+
guid: z.string().describe('Mobile application entity GUID'),
|
|
128
|
+
}),
|
|
129
|
+
execute: async ({ newRelicApiKey, guid }) => nerdgraph(newRelicApiKey, `query($guid: EntityGuid!) { actor { entity(guid: $guid) { guid name ... on MobileApplicationEntity { mobileProperties { applicationToken } } } } } }`, { guid }, 'fetch mobile application token'),
|
|
130
|
+
});
|
|
131
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
export declare const createDashboard: import("ai").Tool<{
|
|
2
|
+
pages: {
|
|
3
|
+
name: string;
|
|
4
|
+
widgets: {
|
|
5
|
+
title: string;
|
|
6
|
+
configuration: {
|
|
7
|
+
markdown?: {
|
|
8
|
+
text: string;
|
|
9
|
+
} | undefined;
|
|
10
|
+
line?: {
|
|
11
|
+
nrqlQueries: {
|
|
12
|
+
query: string;
|
|
13
|
+
accountId: number;
|
|
14
|
+
}[];
|
|
15
|
+
} | undefined;
|
|
16
|
+
area?: {
|
|
17
|
+
nrqlQueries: {
|
|
18
|
+
query: string;
|
|
19
|
+
accountId: number;
|
|
20
|
+
}[];
|
|
21
|
+
} | undefined;
|
|
22
|
+
bar?: {
|
|
23
|
+
nrqlQueries: {
|
|
24
|
+
query: string;
|
|
25
|
+
accountId: number;
|
|
26
|
+
}[];
|
|
27
|
+
} | undefined;
|
|
28
|
+
pie?: {
|
|
29
|
+
nrqlQueries: {
|
|
30
|
+
query: string;
|
|
31
|
+
accountId: number;
|
|
32
|
+
}[];
|
|
33
|
+
} | undefined;
|
|
34
|
+
table?: {
|
|
35
|
+
nrqlQueries: {
|
|
36
|
+
query: string;
|
|
37
|
+
accountId: number;
|
|
38
|
+
}[];
|
|
39
|
+
} | undefined;
|
|
40
|
+
billboard?: {
|
|
41
|
+
nrqlQueries: {
|
|
42
|
+
query: string;
|
|
43
|
+
accountId: number;
|
|
44
|
+
}[];
|
|
45
|
+
} | undefined;
|
|
46
|
+
};
|
|
47
|
+
layout: {
|
|
48
|
+
column: number;
|
|
49
|
+
row: number;
|
|
50
|
+
width: number;
|
|
51
|
+
height: number;
|
|
52
|
+
};
|
|
53
|
+
}[];
|
|
54
|
+
description?: string | undefined;
|
|
55
|
+
}[];
|
|
56
|
+
name: string;
|
|
57
|
+
accountId: number;
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
newRelicApiKey?: string | undefined;
|
|
60
|
+
permissions?: "PRIVATE" | "PUBLIC_READ_ONLY" | "PUBLIC_READ_WRITE" | undefined;
|
|
61
|
+
}, any>;
|
|
62
|
+
export declare const updateDashboard: import("ai").Tool<{
|
|
63
|
+
pages: {
|
|
64
|
+
name: string;
|
|
65
|
+
widgets: {
|
|
66
|
+
title: string;
|
|
67
|
+
visualization: string;
|
|
68
|
+
rawConfiguration: Record<string, any>;
|
|
69
|
+
id?: string | undefined;
|
|
70
|
+
layout?: Record<string, number> | undefined;
|
|
71
|
+
linkedEntityGuids?: string[] | undefined;
|
|
72
|
+
}[];
|
|
73
|
+
description?: string | undefined;
|
|
74
|
+
guid?: string | undefined;
|
|
75
|
+
}[];
|
|
76
|
+
name: string;
|
|
77
|
+
permissions: "PRIVATE" | "PUBLIC_READ_ONLY" | "PUBLIC_READ_WRITE";
|
|
78
|
+
guid: string;
|
|
79
|
+
description?: string | undefined;
|
|
80
|
+
newRelicApiKey?: string | undefined;
|
|
81
|
+
}, any>;
|
|
82
|
+
export declare const deleteDashboard: import("ai").Tool<{
|
|
83
|
+
guid: string;
|
|
84
|
+
newRelicApiKey?: string | undefined;
|
|
85
|
+
}, any>;
|
|
86
|
+
export declare const undeleteDashboard: import("ai").Tool<{
|
|
87
|
+
guid: string;
|
|
88
|
+
newRelicApiKey?: string | undefined;
|
|
89
|
+
}, any>;
|
|
90
|
+
export declare const createDashboardSnapshotUrl: import("ai").Tool<{
|
|
91
|
+
guid: string;
|
|
92
|
+
newRelicApiKey?: string | undefined;
|
|
93
|
+
}, any>;
|
|
94
|
+
export declare const getDashboardEntity: import("ai").Tool<{
|
|
95
|
+
guid: string;
|
|
96
|
+
newRelicApiKey?: string | undefined;
|
|
97
|
+
}, any>;
|
|
98
|
+
export declare const addWidgetsToDashboardPage: import("ai").Tool<{
|
|
99
|
+
widgets: {
|
|
100
|
+
title: string;
|
|
101
|
+
configuration: {
|
|
102
|
+
markdown?: {
|
|
103
|
+
text: string;
|
|
104
|
+
} | undefined;
|
|
105
|
+
line?: {
|
|
106
|
+
nrqlQueries: {
|
|
107
|
+
query: string;
|
|
108
|
+
accountId: number;
|
|
109
|
+
}[];
|
|
110
|
+
} | undefined;
|
|
111
|
+
area?: {
|
|
112
|
+
nrqlQueries: {
|
|
113
|
+
query: string;
|
|
114
|
+
accountId: number;
|
|
115
|
+
}[];
|
|
116
|
+
} | undefined;
|
|
117
|
+
bar?: {
|
|
118
|
+
nrqlQueries: {
|
|
119
|
+
query: string;
|
|
120
|
+
accountId: number;
|
|
121
|
+
}[];
|
|
122
|
+
} | undefined;
|
|
123
|
+
pie?: {
|
|
124
|
+
nrqlQueries: {
|
|
125
|
+
query: string;
|
|
126
|
+
accountId: number;
|
|
127
|
+
}[];
|
|
128
|
+
} | undefined;
|
|
129
|
+
table?: {
|
|
130
|
+
nrqlQueries: {
|
|
131
|
+
query: string;
|
|
132
|
+
accountId: number;
|
|
133
|
+
}[];
|
|
134
|
+
} | undefined;
|
|
135
|
+
billboard?: {
|
|
136
|
+
nrqlQueries: {
|
|
137
|
+
query: string;
|
|
138
|
+
accountId: number;
|
|
139
|
+
}[];
|
|
140
|
+
} | undefined;
|
|
141
|
+
};
|
|
142
|
+
layout: {
|
|
143
|
+
column: number;
|
|
144
|
+
row: number;
|
|
145
|
+
width: number;
|
|
146
|
+
height: number;
|
|
147
|
+
};
|
|
148
|
+
}[];
|
|
149
|
+
guid: string;
|
|
150
|
+
newRelicApiKey?: string | undefined;
|
|
151
|
+
}, any>;
|
|
152
|
+
export declare const updateDashboardPage: import("ai").Tool<{
|
|
153
|
+
page: {
|
|
154
|
+
name: string;
|
|
155
|
+
widgets: {
|
|
156
|
+
title: string;
|
|
157
|
+
id: string;
|
|
158
|
+
layout: {
|
|
159
|
+
column: number;
|
|
160
|
+
row: number;
|
|
161
|
+
width: number;
|
|
162
|
+
height: number;
|
|
163
|
+
};
|
|
164
|
+
visualization: {
|
|
165
|
+
id: string;
|
|
166
|
+
};
|
|
167
|
+
rawConfiguration: {
|
|
168
|
+
text?: string | undefined;
|
|
169
|
+
nrqlQueries?: {
|
|
170
|
+
query: string;
|
|
171
|
+
accountId: number;
|
|
172
|
+
}[] | undefined;
|
|
173
|
+
};
|
|
174
|
+
}[];
|
|
175
|
+
description?: string | undefined;
|
|
176
|
+
};
|
|
177
|
+
guid: string;
|
|
178
|
+
newRelicApiKey?: string | undefined;
|
|
179
|
+
}, any>;
|
|
180
|
+
export declare const updateDashboardWidgetsInPage: import("ai").Tool<{
|
|
181
|
+
widgets: {
|
|
182
|
+
title: string;
|
|
183
|
+
id: string;
|
|
184
|
+
configuration: Record<string, any>;
|
|
185
|
+
layout: {
|
|
186
|
+
column: number;
|
|
187
|
+
row: number;
|
|
188
|
+
width: number;
|
|
189
|
+
height: number;
|
|
190
|
+
};
|
|
191
|
+
visualization: {
|
|
192
|
+
id: string;
|
|
193
|
+
};
|
|
194
|
+
linkedEntityGuids?: string[] | undefined;
|
|
195
|
+
}[];
|
|
196
|
+
guid: string;
|
|
197
|
+
newRelicApiKey?: string | undefined;
|
|
198
|
+
}, any>;
|
|
199
|
+
export declare const updateDashboardLiveUrlCreationPolicies: import("ai").Tool<{
|
|
200
|
+
accountIds: number[];
|
|
201
|
+
liveUrlCreationAllowed: boolean;
|
|
202
|
+
newRelicApiKey?: string | undefined;
|
|
203
|
+
}, any>;
|
|
204
|
+
//# sourceMappingURL=dashboards.d.ts.map
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { accountIdField, nerdgraph, newRelicApiKeyField } from './client.js';
|
|
5
|
+
const nrqlQueryInput = z.object({
|
|
6
|
+
accountId: z.number().int().positive().describe('Account ID to query data from'),
|
|
7
|
+
query: z.string().describe("NRQL query, e.g. 'SELECT count(*) FROM Transaction TIMESERIES'"),
|
|
8
|
+
});
|
|
9
|
+
const widgetConfiguration = z.object({
|
|
10
|
+
line: z.object({ nrqlQueries: z.array(nrqlQueryInput).min(1) }).optional(),
|
|
11
|
+
area: z.object({ nrqlQueries: z.array(nrqlQueryInput).min(1) }).optional(),
|
|
12
|
+
bar: z.object({ nrqlQueries: z.array(nrqlQueryInput).min(1) }).optional(),
|
|
13
|
+
pie: z.object({ nrqlQueries: z.array(nrqlQueryInput).min(1) }).optional(),
|
|
14
|
+
table: z.object({ nrqlQueries: z.array(nrqlQueryInput).min(1) }).optional(),
|
|
15
|
+
billboard: z.object({ nrqlQueries: z.array(nrqlQueryInput).min(1) }).optional(),
|
|
16
|
+
markdown: z.object({ text: z.string().describe('Markdown content') }).optional(),
|
|
17
|
+
}).describe('Exactly one visualization key (line/area/bar/pie/table/billboard/markdown)');
|
|
18
|
+
const widgetLayout = z.object({
|
|
19
|
+
column: z.number().int().min(1).max(12).describe('Start column (1-12)'),
|
|
20
|
+
row: z.number().int().min(1).describe('Start row (1+)'),
|
|
21
|
+
width: z.number().int().min(1).max(12).describe('Width in columns (1-12)'),
|
|
22
|
+
height: z.number().int().min(1).describe('Height in rows (1+)'),
|
|
23
|
+
});
|
|
24
|
+
const createWidget = z.object({
|
|
25
|
+
title: z.string().describe('Widget title on the dashboard'),
|
|
26
|
+
configuration: widgetConfiguration,
|
|
27
|
+
layout: widgetLayout.describe('Grid position and size'),
|
|
28
|
+
});
|
|
29
|
+
const createPage = z.object({
|
|
30
|
+
name: z.string().describe('Page name'),
|
|
31
|
+
description: z.string().optional(),
|
|
32
|
+
widgets: z.array(createWidget).min(1),
|
|
33
|
+
});
|
|
34
|
+
const DASHBOARD_ERRORS = 'errors { description type }';
|
|
35
|
+
export const createDashboard = tool({
|
|
36
|
+
description: 'Creates a dashboard with pages and NRQL/markdown widgets. At least one page with one widget is required.',
|
|
37
|
+
inputSchema: z.object({
|
|
38
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
39
|
+
accountId: accountIdField('Account ID for the dashboard'),
|
|
40
|
+
name: z.string().describe('Dashboard name, unique within the account'),
|
|
41
|
+
pages: z.array(createPage).min(1),
|
|
42
|
+
description: z.string().optional(),
|
|
43
|
+
permissions: z.enum(['PRIVATE', 'PUBLIC_READ_ONLY', 'PUBLIC_READ_WRITE']).optional().describe('Access control (default PRIVATE)'),
|
|
44
|
+
}),
|
|
45
|
+
execute: async ({ newRelicApiKey, accountId, ...dashboard }) => nerdgraph(newRelicApiKey, `mutation($accountId: Int!, $dashboard: DashboardInput!) { dashboardCreate(accountId: $accountId, dashboard: $dashboard) { entityResult { guid name } ${DASHBOARD_ERRORS} } }`, { accountId, dashboard: { permissions: 'PRIVATE', ...dashboard } }, 'create dashboard'),
|
|
46
|
+
});
|
|
47
|
+
export const updateDashboard = tool({
|
|
48
|
+
description: 'Updates a dashboard (name, permissions, pages, widgets). Include page GUIDs and widget IDs to preserve them — omitted ones are removed.',
|
|
49
|
+
inputSchema: z.object({
|
|
50
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
51
|
+
guid: z.string().describe('Dashboard entity GUID to update'),
|
|
52
|
+
name: z.string().describe('Updated dashboard name'),
|
|
53
|
+
permissions: z.enum(['PRIVATE', 'PUBLIC_READ_ONLY', 'PUBLIC_READ_WRITE']).describe('Updated access control'),
|
|
54
|
+
pages: z.array(z.object({
|
|
55
|
+
guid: z.string().optional().describe('Page GUID (required to keep an existing page)'),
|
|
56
|
+
name: z.string(),
|
|
57
|
+
description: z.string().optional(),
|
|
58
|
+
widgets: z.array(z.object({
|
|
59
|
+
id: z.string().optional().describe('Widget ID (required to keep an existing widget)'),
|
|
60
|
+
title: z.string(),
|
|
61
|
+
visualization: z.string().describe("Viz ID, e.g. 'viz.line', 'viz.markdown'"),
|
|
62
|
+
rawConfiguration: z.record(z.any()).describe("Viz config: markdown {text} or NRQL {nrqlQueries:[{accountId,query}]}"),
|
|
63
|
+
layout: z.record(z.number()).optional().describe('{column,row,width,height}'),
|
|
64
|
+
linkedEntityGuids: z.array(z.string()).max(1).optional(),
|
|
65
|
+
})),
|
|
66
|
+
})).describe('Full replacement page list'),
|
|
67
|
+
description: z.string().optional().describe('Updated description (omit to retain)'),
|
|
68
|
+
}),
|
|
69
|
+
execute: async ({ newRelicApiKey, guid, ...dashboard }) => nerdgraph(newRelicApiKey, `mutation($guid: EntityGuid!, $dashboard: DashboardUpdateInput!) { dashboardUpdate(guid: $guid, dashboard: $dashboard) { entityResult { guid name } ${DASHBOARD_ERRORS} } }`, { guid, dashboard }, 'update dashboard'),
|
|
70
|
+
});
|
|
71
|
+
export const deleteDashboard = tool({
|
|
72
|
+
description: 'Permanently deletes a dashboard by entity GUID. Recoverable via undeleteDashboard (tags are not recovered).',
|
|
73
|
+
inputSchema: z.object({
|
|
74
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
75
|
+
guid: z.string().describe('Dashboard entity GUID to delete'),
|
|
76
|
+
}),
|
|
77
|
+
execute: async ({ newRelicApiKey, guid }) => nerdgraph(newRelicApiKey, `mutation($guid: EntityGuid!) { dashboardDelete(guid: $guid) { status ${DASHBOARD_ERRORS} } }`, { guid }, 'delete dashboard'),
|
|
78
|
+
});
|
|
79
|
+
export const undeleteDashboard = tool({
|
|
80
|
+
description: 'Recovers a logically deleted dashboard by GUID. Custom tags cannot be recovered.',
|
|
81
|
+
inputSchema: z.object({
|
|
82
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
83
|
+
guid: z.string().describe('Deleted dashboard entity GUID to recover'),
|
|
84
|
+
}),
|
|
85
|
+
execute: async ({ newRelicApiKey, guid }) => nerdgraph(newRelicApiKey, `mutation($guid: EntityGuid!) { dashboardUndelete(guid: $guid) { ${DASHBOARD_ERRORS} } }`, { guid }, 'undelete dashboard'),
|
|
86
|
+
});
|
|
87
|
+
export const createDashboardSnapshotUrl = tool({
|
|
88
|
+
description: 'Generates a shareable snapshot URL (PDF) of a dashboard page at its current state for distribution/archiving.',
|
|
89
|
+
inputSchema: z.object({
|
|
90
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
91
|
+
guid: z.string().describe('Dashboard page entity GUID to snapshot'),
|
|
92
|
+
}),
|
|
93
|
+
execute: async ({ newRelicApiKey, guid }) => nerdgraph(newRelicApiKey, 'mutation($guid: EntityGuid!) { dashboardCreateSnapshotUrl(guid: $guid) }', { guid }, 'create dashboard snapshot URL'),
|
|
94
|
+
});
|
|
95
|
+
export const getDashboardEntity = tool({
|
|
96
|
+
description: 'Reads full dashboard configuration (pages, widgets, owner, permissions) by entity GUID. Use before updates to capture IDs.',
|
|
97
|
+
inputSchema: z.object({
|
|
98
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
99
|
+
guid: z.string().describe('Dashboard entity GUID to query'),
|
|
100
|
+
}),
|
|
101
|
+
execute: async ({ newRelicApiKey, guid }) => nerdgraph(newRelicApiKey, `query($guid: EntityGuid!) { actor { entity(guid: $guid) { guid name ... on DashboardEntity { description permissions owner { email userId } pages { guid name description createdAt updatedAt widgets { id title visualization { id } rawConfiguration } } createdAt updatedAt } } } }`, { guid }, 'query dashboard entity'),
|
|
102
|
+
});
|
|
103
|
+
export const addWidgetsToDashboardPage = tool({
|
|
104
|
+
description: 'Adds visualization widgets (line/area/bar/pie/table/billboard/markdown) to an existing dashboard page by page GUID.',
|
|
105
|
+
inputSchema: z.object({
|
|
106
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
107
|
+
guid: z.string().describe('Dashboard page entity GUID'),
|
|
108
|
+
widgets: z.array(createWidget).min(1),
|
|
109
|
+
}),
|
|
110
|
+
execute: async ({ newRelicApiKey, guid, widgets }) => nerdgraph(newRelicApiKey, `mutation($guid: EntityGuid!, $widgets: [DashboardAddWidgetsToPageWidgetInput!]!) { dashboardAddWidgetsToPage(guid: $guid, widgets: $widgets) { ${DASHBOARD_ERRORS} } }`, { guid, widgets }, 'add widgets to dashboard page'),
|
|
111
|
+
});
|
|
112
|
+
export const updateDashboardPage = tool({
|
|
113
|
+
description: 'Updates a dashboard page (name, description, widget set). Include every widget with its ID or it is removed.',
|
|
114
|
+
inputSchema: z.object({
|
|
115
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
116
|
+
guid: z.string().describe('Dashboard page entity GUID to update'),
|
|
117
|
+
page: z.object({
|
|
118
|
+
name: z.string().describe('Page name'),
|
|
119
|
+
description: z.string().optional(),
|
|
120
|
+
widgets: z.array(z.object({
|
|
121
|
+
id: z.string().describe('Widget ID (required to preserve identity)'),
|
|
122
|
+
title: z.string(),
|
|
123
|
+
visualization: z.object({ id: z.string().describe("Viz ID, e.g. 'viz.line'") }),
|
|
124
|
+
layout: widgetLayout,
|
|
125
|
+
rawConfiguration: z.object({
|
|
126
|
+
text: z.string().optional().describe('Markdown content'),
|
|
127
|
+
nrqlQueries: z.array(nrqlQueryInput).optional(),
|
|
128
|
+
}).describe('NRQL queries and/or markdown text'),
|
|
129
|
+
})).min(1).describe('Complete widget list with IDs'),
|
|
130
|
+
}).describe('Updated page configuration'),
|
|
131
|
+
}),
|
|
132
|
+
execute: async ({ newRelicApiKey, guid, page }) => nerdgraph(newRelicApiKey, `mutation($guid: EntityGuid!, $page: DashboardUpdatePageInput!) { dashboardUpdatePage(guid: $guid, page: $page) { ${DASHBOARD_ERRORS} } }`, { guid, page }, 'update dashboard page'),
|
|
133
|
+
});
|
|
134
|
+
export const updateDashboardWidgetsInPage = tool({
|
|
135
|
+
description: 'Updates existing widgets in a page (titles, layouts, queries). Each widget needs its ID.',
|
|
136
|
+
inputSchema: z.object({
|
|
137
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
138
|
+
guid: z.string().describe('Dashboard page entity GUID'),
|
|
139
|
+
widgets: z.array(z.object({
|
|
140
|
+
id: z.string().describe('Widget ID to update'),
|
|
141
|
+
title: z.string(),
|
|
142
|
+
visualization: z.object({ id: z.string().describe("Viz ID, e.g. 'viz.markdown'") }),
|
|
143
|
+
layout: widgetLayout,
|
|
144
|
+
configuration: z.record(z.any()).describe("Content: markdown {text} and/or nrqlQueries [{accountId,query}]"),
|
|
145
|
+
linkedEntityGuids: z.array(z.string()).optional().describe('Facet-link entity GUIDs'),
|
|
146
|
+
})).min(1),
|
|
147
|
+
}),
|
|
148
|
+
execute: async ({ newRelicApiKey, guid, widgets }) => nerdgraph(newRelicApiKey, `mutation($guid: EntityGuid!, $widgets: [DashboardUpdateWidgetsInPageWidgetInput!]!) { dashboardUpdateWidgetsInPage(guid: $guid, widgets: $widgets) { ${DASHBOARD_ERRORS} } }`, { guid, widgets }, 'update dashboard widgets in page'),
|
|
149
|
+
});
|
|
150
|
+
export const updateDashboardLiveUrlCreationPolicies = tool({
|
|
151
|
+
description: 'Enables/disables public live-URL creation for dashboards in up to 100 accounts. Requires Authentication Domain Manager role.',
|
|
152
|
+
inputSchema: z.object({
|
|
153
|
+
newRelicApiKey: newRelicApiKeyField,
|
|
154
|
+
accountIds: z.array(z.number().int()).min(1).max(100).describe('Account IDs to update (max 100)'),
|
|
155
|
+
liveUrlCreationAllowed: z.boolean().describe('true to allow public live URLs, false to block'),
|
|
156
|
+
}),
|
|
157
|
+
execute: async ({ newRelicApiKey, accountIds, liveUrlCreationAllowed }) => nerdgraph(newRelicApiKey, 'mutation($accountIds: [Int!]!, $allowed: Boolean!) { dashboardUpdateLiveUrlCreationPolicies(accountIds: $accountIds, liveUrlCreationAllowed: $allowed) { liveUrlCreationPolicies { accountId liveUrlCreationAllowed } } }', { accountIds, allowed: liveUrlCreationAllowed }, 'update dashboard live URL creation policies'),
|
|
158
|
+
});
|
|
159
|
+
//# sourceMappingURL=dashboards.js.map
|