@rnsk/toolkits 0.0.8 → 0.0.10
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 +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +29 -1
- package/dist/toolkits/bitbucket/icon.d.ts +5 -0
- package/dist/toolkits/bitbucket/icon.js +6 -0
- package/dist/toolkits/bitbucket/manifest.d.ts +3 -0
- package/dist/toolkits/bitbucket/manifest.js +56 -0
- package/dist/toolkits/bitbucket/tools/client.d.ts +38 -0
- package/dist/toolkits/bitbucket/tools/client.js +87 -0
- package/dist/toolkits/bitbucket/tools/commits.d.ts +149 -0
- package/dist/toolkits/bitbucket/tools/commits.js +444 -0
- package/dist/toolkits/bitbucket/tools/index.d.ts +1093 -0
- package/dist/toolkits/bitbucket/tools/index.js +770 -0
- package/dist/toolkits/bitbucket/tools/issues.d.ts +73 -0
- package/dist/toolkits/bitbucket/tools/issues.js +234 -0
- package/dist/toolkits/bitbucket/tools/pipelines.d.ts +124 -0
- package/dist/toolkits/bitbucket/tools/pipelines.js +446 -0
- package/dist/toolkits/bitbucket/tools/pull-requests.d.ts +174 -0
- package/dist/toolkits/bitbucket/tools/pull-requests.js +541 -0
- package/dist/toolkits/bitbucket/tools/reports.d.ts +84 -0
- package/dist/toolkits/bitbucket/tools/reports.js +213 -0
- package/dist/toolkits/bitbucket/tools/repositories.d.ts +156 -0
- package/dist/toolkits/bitbucket/tools/repositories.js +531 -0
- package/dist/toolkits/bitbucket/tools/search.d.ts +17 -0
- package/dist/toolkits/bitbucket/tools/search.js +67 -0
- package/dist/toolkits/bitbucket/tools/snippets.d.ts +34 -0
- package/dist/toolkits/bitbucket/tools/snippets.js +122 -0
- package/dist/toolkits/bitbucket/tools/users-workspaces.d.ts +65 -0
- package/dist/toolkits/bitbucket/tools/users-workspaces.js +294 -0
- package/dist/toolkits/discord/icon.d.ts +5 -0
- package/dist/toolkits/discord/icon.js +12 -0
- package/dist/toolkits/discord/manifest.d.ts +3 -0
- package/dist/toolkits/discord/manifest.js +52 -0
- package/dist/toolkits/discord/tools/applications.d.ts +79 -0
- package/dist/toolkits/discord/tools/applications.js +216 -0
- package/dist/toolkits/discord/tools/client.d.ts +22 -0
- package/dist/toolkits/discord/tools/client.js +69 -0
- package/dist/toolkits/discord/tools/guilds.d.ts +39 -0
- package/dist/toolkits/discord/tools/guilds.js +123 -0
- package/dist/toolkits/discord/tools/index.d.ts +222 -0
- package/dist/toolkits/discord/tools/index.js +170 -0
- package/dist/toolkits/discord/tools/misc.d.ts +7 -0
- package/dist/toolkits/discord/tools/misc.js +40 -0
- package/dist/toolkits/discord/tools/users.d.ts +28 -0
- package/dist/toolkits/discord/tools/users.js +128 -0
- package/dist/toolkits/figma/tools/index.d.ts +1 -1
- package/dist/toolkits/figma/tools/render-images-of-file-nodes.d.ts +1 -1
- package/dist/toolkits/gitlab/icon.d.ts +5 -0
- package/dist/toolkits/gitlab/icon.js +6 -0
- package/dist/toolkits/gitlab/manifest.d.ts +3 -0
- package/dist/toolkits/gitlab/manifest.js +36 -0
- package/dist/toolkits/gitlab/tools/client.d.ts +7 -0
- package/dist/toolkits/gitlab/tools/client.js +45 -0
- package/dist/toolkits/gitlab/tools/index.d.ts +306 -0
- package/dist/toolkits/gitlab/tools/index.js +36 -0
- package/dist/toolkits/gitlab/tools/issues.d.ts +45 -0
- package/dist/toolkits/gitlab/tools/issues.js +103 -0
- package/dist/toolkits/gitlab/tools/merge-requests.d.ts +35 -0
- package/dist/toolkits/gitlab/tools/merge-requests.js +91 -0
- package/dist/toolkits/gitlab/tools/pipelines.d.ts +30 -0
- package/dist/toolkits/gitlab/tools/pipelines.js +66 -0
- package/dist/toolkits/gitlab/tools/projects.d.ts +36 -0
- package/dist/toolkits/gitlab/tools/projects.js +94 -0
- package/dist/toolkits/gitlab/tools/repository.d.ts +21 -0
- package/dist/toolkits/gitlab/tools/repository.js +53 -0
- package/dist/toolkits/gitlab/tools/users-groups.d.ts +11 -0
- package/dist/toolkits/gitlab/tools/users-groups.js +30 -0
- package/dist/toolkits/google-ads/tools/get-rmf-report.d.ts +2 -2
- package/dist/toolkits/google-ads/tools/index.d.ts +2 -2
- package/dist/toolkits/google-analytics/icon.d.ts +5 -0
- package/dist/toolkits/google-analytics/icon.js +11 -0
- package/dist/toolkits/google-analytics/manifest.d.ts +3 -0
- package/dist/toolkits/google-analytics/manifest.js +48 -0
- package/dist/toolkits/google-analytics/tools/admin.d.ts +73 -0
- package/dist/toolkits/google-analytics/tools/admin.js +238 -0
- package/dist/toolkits/google-analytics/tools/audiences.d.ts +81 -0
- package/dist/toolkits/google-analytics/tools/audiences.js +190 -0
- package/dist/toolkits/google-analytics/tools/client.d.ts +47 -0
- package/dist/toolkits/google-analytics/tools/client.js +74 -0
- package/dist/toolkits/google-analytics/tools/custom-definitions.d.ts +62 -0
- package/dist/toolkits/google-analytics/tools/custom-definitions.js +106 -0
- package/dist/toolkits/google-analytics/tools/index.d.ts +16 -0
- package/dist/toolkits/google-analytics/tools/index.js +88 -0
- package/dist/toolkits/google-analytics/tools/links.d.ts +22 -0
- package/dist/toolkits/google-analytics/tools/links.js +56 -0
- package/dist/toolkits/google-analytics/tools/measurement.d.ts +3 -0
- package/dist/toolkits/google-analytics/tools/measurement.js +55 -0
- package/dist/toolkits/google-analytics/tools/reports.d.ts +136 -0
- package/dist/toolkits/google-analytics/tools/reports.js +200 -0
- package/dist/toolkits/google-contacts/icon.d.ts +5 -0
- package/dist/toolkits/google-contacts/icon.js +6 -0
- package/dist/toolkits/google-contacts/manifest.d.ts +3 -0
- package/dist/toolkits/google-contacts/manifest.js +48 -0
- package/dist/toolkits/google-contacts/tools/client.d.ts +19 -0
- package/dist/toolkits/google-contacts/tools/client.js +44 -0
- package/dist/toolkits/google-contacts/tools/contacts.d.ts +94 -0
- package/dist/toolkits/google-contacts/tools/contacts.js +273 -0
- package/dist/toolkits/google-contacts/tools/directory.d.ts +36 -0
- package/dist/toolkits/google-contacts/tools/directory.js +99 -0
- package/dist/toolkits/google-contacts/tools/groups.d.ts +68 -0
- package/dist/toolkits/google-contacts/tools/groups.js +169 -0
- package/dist/toolkits/google-contacts/tools/index.d.ts +347 -0
- package/dist/toolkits/google-contacts/tools/index.js +34 -0
- package/dist/toolkits/google-contacts/tools/photos.d.ts +26 -0
- package/dist/toolkits/google-contacts/tools/photos.js +52 -0
- package/dist/toolkits/google-maps/icon.d.ts +5 -0
- package/dist/toolkits/google-maps/icon.js +39 -0
- package/dist/toolkits/google-maps/manifest.d.ts +3 -0
- package/dist/toolkits/google-maps/manifest.js +55 -0
- package/dist/toolkits/google-maps/tools/client.d.ts +27 -0
- package/dist/toolkits/google-maps/tools/client.js +72 -0
- package/dist/toolkits/google-maps/tools/geocode.d.ts +49 -0
- package/dist/toolkits/google-maps/tools/geocode.js +168 -0
- package/dist/toolkits/google-maps/tools/index.d.ts +432 -0
- package/dist/toolkits/google-maps/tools/index.js +31 -0
- package/dist/toolkits/google-maps/tools/misc.d.ts +70 -0
- package/dist/toolkits/google-maps/tools/misc.js +158 -0
- package/dist/toolkits/google-maps/tools/places.d.ts +112 -0
- package/dist/toolkits/google-maps/tools/places.js +185 -0
- package/dist/toolkits/google-maps/tools/routes.d.ts +48 -0
- package/dist/toolkits/google-maps/tools/routes.js +97 -0
- package/dist/toolkits/google-maps/tools/tiles.d.ts +51 -0
- package/dist/toolkits/google-maps/tools/tiles.js +84 -0
- package/dist/toolkits/google-photos/icon.d.ts +5 -0
- package/dist/toolkits/google-photos/icon.js +6 -0
- package/dist/toolkits/google-photos/manifest.d.ts +3 -0
- package/dist/toolkits/google-photos/manifest.js +47 -0
- package/dist/toolkits/google-photos/tools/albums.d.ts +83 -0
- package/dist/toolkits/google-photos/tools/albums.js +180 -0
- package/dist/toolkits/google-photos/tools/client.d.ts +24 -0
- package/dist/toolkits/google-photos/tools/client.js +77 -0
- package/dist/toolkits/google-photos/tools/index.d.ts +261 -0
- package/dist/toolkits/google-photos/tools/index.js +22 -0
- package/dist/toolkits/google-photos/tools/media.d.ts +52 -0
- package/dist/toolkits/google-photos/tools/media.js +142 -0
- package/dist/toolkits/google-photos/tools/uploads.d.ts +58 -0
- package/dist/toolkits/google-photos/tools/uploads.js +107 -0
- package/dist/toolkits/google-tasks/tools/index.d.ts +1 -1
- package/dist/toolkits/google-tasks/tools/update-task-full.d.ts +1 -1
- package/dist/toolkits/groww/tools/index.d.ts +1 -1
- package/dist/toolkits/groww/tools/instruments.d.ts +1 -1
- package/dist/toolkits/hacker-news/icon.d.ts +5 -0
- package/dist/toolkits/hacker-news/icon.js +9 -0
- package/dist/toolkits/hacker-news/manifest.d.ts +3 -0
- package/dist/toolkits/hacker-news/manifest.js +25 -0
- package/dist/toolkits/hacker-news/tools/client.d.ts +8 -0
- package/dist/toolkits/hacker-news/tools/client.js +51 -0
- package/dist/toolkits/hacker-news/tools/index.d.ts +89 -0
- package/dist/toolkits/hacker-news/tools/index.js +22 -0
- package/dist/toolkits/hacker-news/tools/items.d.ts +42 -0
- package/dist/toolkits/hacker-news/tools/items.js +126 -0
- package/dist/toolkits/hacker-news/tools/search.d.ts +12 -0
- package/dist/toolkits/hacker-news/tools/search.js +40 -0
- package/dist/toolkits/hacker-news/tools/stories.d.ts +25 -0
- package/dist/toolkits/hacker-news/tools/stories.js +98 -0
- package/dist/toolkits/hostinger/icon.d.ts +5 -0
- package/dist/toolkits/hostinger/icon.js +6 -0
- package/dist/toolkits/hostinger/manifest.d.ts +3 -0
- package/dist/toolkits/hostinger/manifest.js +36 -0
- package/dist/toolkits/hostinger/tools/billing.d.ts +12 -0
- package/dist/toolkits/hostinger/tools/billing.js +35 -0
- package/dist/toolkits/hostinger/tools/client.d.ts +6 -0
- package/dist/toolkits/hostinger/tools/client.js +57 -0
- package/dist/toolkits/hostinger/tools/dns.d.ts +22 -0
- package/dist/toolkits/hostinger/tools/dns.js +47 -0
- package/dist/toolkits/hostinger/tools/domains.d.ts +21 -0
- package/dist/toolkits/hostinger/tools/domains.js +62 -0
- package/dist/toolkits/hostinger/tools/hosting.d.ts +17 -0
- package/dist/toolkits/hostinger/tools/hosting.js +38 -0
- package/dist/toolkits/hostinger/tools/index.d.ts +179 -0
- package/dist/toolkits/hostinger/tools/index.js +35 -0
- package/dist/toolkits/hostinger/tools/vps.d.ts +27 -0
- package/dist/toolkits/hostinger/tools/vps.js +77 -0
- package/dist/toolkits/hostinger/tools/whois.d.ts +33 -0
- package/dist/toolkits/hostinger/tools/whois.js +85 -0
- package/dist/toolkits/hugging-face/icon.d.ts +5 -0
- package/dist/toolkits/hugging-face/icon.js +6 -0
- package/dist/toolkits/hugging-face/manifest.d.ts +3 -0
- package/dist/toolkits/hugging-face/manifest.js +42 -0
- package/dist/toolkits/hugging-face/tools/client.d.ts +93 -0
- package/dist/toolkits/hugging-face/tools/client.js +192 -0
- package/dist/toolkits/hugging-face/tools/datasets-viewer.d.ts +65 -0
- package/dist/toolkits/hugging-face/tools/datasets-viewer.js +150 -0
- package/dist/toolkits/hugging-face/tools/datasets.d.ts +160 -0
- package/dist/toolkits/hugging-face/tools/datasets.js +383 -0
- package/dist/toolkits/hugging-face/tools/discussions.d.ts +68 -0
- package/dist/toolkits/hugging-face/tools/discussions.js +144 -0
- package/dist/toolkits/hugging-face/tools/index.d.ts +523 -0
- package/dist/toolkits/hugging-face/tools/index.js +163 -0
- package/dist/toolkits/hugging-face/tools/inference.d.ts +42 -0
- package/dist/toolkits/hugging-face/tools/inference.js +86 -0
- package/dist/toolkits/hugging-face/tools/models.d.ts +117 -0
- package/dist/toolkits/hugging-face/tools/models.js +273 -0
- package/dist/toolkits/hugging-face/tools/papers.d.ts +37 -0
- package/dist/toolkits/hugging-face/tools/papers.js +91 -0
- package/dist/toolkits/hugging-face/tools/repos.d.ts +96 -0
- package/dist/toolkits/hugging-face/tools/repos.js +201 -0
- package/dist/toolkits/hugging-face/tools/settings.d.ts +53 -0
- package/dist/toolkits/hugging-face/tools/settings.js +88 -0
- package/dist/toolkits/hugging-face/tools/spaces.d.ts +245 -0
- package/dist/toolkits/hugging-face/tools/spaces.js +468 -0
- package/dist/toolkits/hugging-face/tools/sql.d.ts +21 -0
- package/dist/toolkits/hugging-face/tools/sql.js +47 -0
- package/dist/toolkits/hugging-face/tools/users.d.ts +60 -0
- package/dist/toolkits/hugging-face/tools/users.js +132 -0
- package/dist/toolkits/hugging-face/tools/webhooks.d.ts +35 -0
- package/dist/toolkits/hugging-face/tools/webhooks.js +87 -0
- package/dist/toolkits/jira/icon.d.ts +5 -0
- package/dist/toolkits/jira/icon.js +6 -0
- package/dist/toolkits/jira/manifest.d.ts +3 -0
- package/dist/toolkits/jira/manifest.js +53 -0
- package/dist/toolkits/jira/tools/boards.d.ts +52 -0
- package/dist/toolkits/jira/tools/boards.js +104 -0
- package/dist/toolkits/jira/tools/client.d.ts +23 -0
- package/dist/toolkits/jira/tools/client.js +270 -0
- package/dist/toolkits/jira/tools/index.d.ts +1280 -0
- package/dist/toolkits/jira/tools/index.js +119 -0
- package/dist/toolkits/jira/tools/issue-fields.d.ts +10 -0
- package/dist/toolkits/jira/tools/issue-fields.js +111 -0
- package/dist/toolkits/jira/tools/issues.d.ts +304 -0
- package/dist/toolkits/jira/tools/issues.js +593 -0
- package/dist/toolkits/jira/tools/meta.d.ts +212 -0
- package/dist/toolkits/jira/tools/meta.js +369 -0
- package/dist/toolkits/jira/tools/projects.d.ts +130 -0
- package/dist/toolkits/jira/tools/projects.js +263 -0
- package/dist/toolkits/jira/tools/search.d.ts +90 -0
- package/dist/toolkits/jira/tools/search.js +181 -0
- package/dist/toolkits/jira/tools/users.d.ts +114 -0
- package/dist/toolkits/jira/tools/users.js +221 -0
- package/dist/toolkits/neo4j/icon.d.ts +5 -0
- package/dist/toolkits/neo4j/icon.js +6 -0
- package/dist/toolkits/neo4j/manifest.d.ts +3 -0
- package/dist/toolkits/neo4j/manifest.js +33 -0
- package/dist/toolkits/neo4j/tools/analytics.d.ts +21 -0
- package/dist/toolkits/neo4j/tools/analytics.js +91 -0
- package/dist/toolkits/neo4j/tools/client.d.ts +6 -0
- package/dist/toolkits/neo4j/tools/client.js +105 -0
- package/dist/toolkits/neo4j/tools/index.d.ts +198 -0
- package/dist/toolkits/neo4j/tools/index.js +30 -0
- package/dist/toolkits/neo4j/tools/instances.d.ts +47 -0
- package/dist/toolkits/neo4j/tools/instances.js +127 -0
- package/dist/toolkits/neo4j/tools/projects.d.ts +44 -0
- package/dist/toolkits/neo4j/tools/projects.js +110 -0
- package/dist/toolkits/neo4j/tools/snapshots.d.ts +20 -0
- package/dist/toolkits/neo4j/tools/snapshots.js +57 -0
- package/dist/toolkits/neon/icon.d.ts +5 -0
- package/dist/toolkits/neon/icon.js +8 -0
- package/dist/toolkits/neon/manifest.d.ts +3 -0
- package/dist/toolkits/neon/manifest.js +36 -0
- package/dist/toolkits/neon/tools/auth.d.ts +115 -0
- package/dist/toolkits/neon/tools/auth.js +286 -0
- package/dist/toolkits/neon/tools/branches.d.ts +189 -0
- package/dist/toolkits/neon/tools/branches.js +465 -0
- package/dist/toolkits/neon/tools/client.d.ts +10 -0
- package/dist/toolkits/neon/tools/client.js +69 -0
- package/dist/toolkits/neon/tools/dataapi.d.ts +42 -0
- package/dist/toolkits/neon/tools/dataapi.js +111 -0
- package/dist/toolkits/neon/tools/endpoints.d.ts +59 -0
- package/dist/toolkits/neon/tools/endpoints.js +163 -0
- package/dist/toolkits/neon/tools/index.d.ts +976 -0
- package/dist/toolkits/neon/tools/index.js +130 -0
- package/dist/toolkits/neon/tools/meta.d.ts +4 -0
- package/dist/toolkits/neon/tools/meta.js +16 -0
- package/dist/toolkits/neon/tools/orgs.d.ts +112 -0
- package/dist/toolkits/neon/tools/orgs.js +303 -0
- package/dist/toolkits/neon/tools/projects.d.ts +177 -0
- package/dist/toolkits/neon/tools/projects.js +468 -0
- package/dist/toolkits/neon/tools/snapshots.d.ts +24 -0
- package/dist/toolkits/neon/tools/snapshots.js +67 -0
- package/dist/toolkits/reddit/tools/index.d.ts +1 -1
- package/dist/toolkits/reddit/tools/search-across-subreddits.d.ts +1 -1
- package/dist/toolkits/slack/icon.d.ts +5 -0
- package/dist/toolkits/slack/icon.js +20 -0
- package/dist/toolkits/slack/manifest.d.ts +3 -0
- package/dist/toolkits/slack/manifest.js +93 -0
- package/dist/toolkits/slack/tools/admin-apps.d.ts +32 -0
- package/dist/toolkits/slack/tools/admin-apps.js +116 -0
- package/dist/toolkits/slack/tools/admin-conversations.d.ts +62 -0
- package/dist/toolkits/slack/tools/admin-conversations.js +246 -0
- package/dist/toolkits/slack/tools/admin-invites.d.ts +19 -0
- package/dist/toolkits/slack/tools/admin-invites.js +75 -0
- package/dist/toolkits/slack/tools/admin-users.d.ts +52 -0
- package/dist/toolkits/slack/tools/admin-users.js +182 -0
- package/dist/toolkits/slack/tools/audit.d.ts +20 -0
- package/dist/toolkits/slack/tools/audit.js +81 -0
- package/dist/toolkits/slack/tools/calls.d.ts +38 -0
- package/dist/toolkits/slack/tools/calls.js +141 -0
- package/dist/toolkits/slack/tools/canvas.d.ts +24 -0
- package/dist/toolkits/slack/tools/canvas.js +102 -0
- package/dist/toolkits/slack/tools/client.d.ts +22 -0
- package/dist/toolkits/slack/tools/client.js +73 -0
- package/dist/toolkits/slack/tools/conversations.d.ts +131 -0
- package/dist/toolkits/slack/tools/conversations.js +463 -0
- package/dist/toolkits/slack/tools/emoji.d.ts +29 -0
- package/dist/toolkits/slack/tools/emoji.js +118 -0
- package/dist/toolkits/slack/tools/files.d.ts +113 -0
- package/dist/toolkits/slack/tools/files.js +368 -0
- package/dist/toolkits/slack/tools/index.d.ts +28 -0
- package/dist/toolkits/slack/tools/index.js +187 -0
- package/dist/toolkits/slack/tools/messages.d.ts +106 -0
- package/dist/toolkits/slack/tools/messages.js +340 -0
- package/dist/toolkits/slack/tools/misc.d.ts +42 -0
- package/dist/toolkits/slack/tools/misc.js +127 -0
- package/dist/toolkits/slack/tools/reactions-stars-pins.d.ts +69 -0
- package/dist/toolkits/slack/tools/reactions-stars-pins.js +236 -0
- package/dist/toolkits/slack/tools/reminders.d.ts +22 -0
- package/dist/toolkits/slack/tools/reminders.js +83 -0
- package/dist/toolkits/slack/tools/search.d.ts +49 -0
- package/dist/toolkits/slack/tools/search.js +155 -0
- package/dist/toolkits/slack/tools/slack-lists.d.ts +65 -0
- package/dist/toolkits/slack/tools/slack-lists.js +282 -0
- package/dist/toolkits/slack/tools/teams.d.ts +75 -0
- package/dist/toolkits/slack/tools/teams.js +285 -0
- package/dist/toolkits/slack/tools/usergroups.d.ts +56 -0
- package/dist/toolkits/slack/tools/usergroups.js +194 -0
- package/dist/toolkits/slack/tools/users.d.ts +87 -0
- package/dist/toolkits/slack/tools/users.js +396 -0
- package/dist/toolkits/youtube/tools/add-video-to-playlist.d.ts +1 -1
- package/dist/toolkits/youtube/tools/delete-video.d.ts +1 -1
- package/dist/toolkits/youtube/tools/index.d.ts +10 -10
- package/dist/toolkits/youtube/tools/list-caption-track.d.ts +1 -1
- package/dist/toolkits/youtube/tools/list-playlist-items.d.ts +1 -1
- package/dist/toolkits/youtube/tools/list-video-categories.d.ts +1 -1
- package/dist/toolkits/youtube/tools/post-comment.d.ts +1 -1
- package/dist/toolkits/youtube/tools/report-video-abuse.d.ts +1 -1
- package/dist/toolkits/youtube/tools/search-youtube.d.ts +1 -1
- package/dist/toolkits/youtube/tools/update-thumbnail.d.ts +1 -1
- package/dist/toolkits/youtube/tools/update-video.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { jira, buildSearchJql } from './client.js';
|
|
5
|
+
const tokenField = z.string().optional().describe('Injected by system; do not provide');
|
|
6
|
+
export const jiraAnalyseExpression = tool({
|
|
7
|
+
description: "Analyses Jira expressions for syntax validation, type checking, and complexity analysis. Use when you need to validate Jira expression syntax before using it in automation rules, custom fields, or workflows.",
|
|
8
|
+
inputSchema: z.object({
|
|
9
|
+
jiraToken: tokenField,
|
|
10
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
11
|
+
check: z.enum(["syntax", "type", "complexity"]).optional().describe("Type of check to perform on the expression."),
|
|
12
|
+
expressions: z.array(z.string()).describe("The list of Jira expressions to analyse. Each expression will be checked according to the specified check type."),
|
|
13
|
+
contextVariables: z.record(z.any()).optional().describe("Context variables and their types. The type checker assumes that common context variables (such as 'issue' or 'project') are available in context and sets their type. Use this property to override the default types or provide details of new variables."),
|
|
14
|
+
}),
|
|
15
|
+
execute: async ({ jiraToken, jiraCloudId, check, expressions, contextVariables }) => {
|
|
16
|
+
const queryParams = undefined;
|
|
17
|
+
const body = { expressions: expressions, check: check, contextVariables: contextVariables };
|
|
18
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/expression/analyse`, method: 'POST', query: queryParams, body });
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
export const jiraCreateJqlAutocompletedata = tool({
|
|
22
|
+
description: "Retrieves JQL autocomplete reference data including reserved words, field names, and function names. Use when building JQL query editors or validating JQL syntax.",
|
|
23
|
+
inputSchema: z.object({
|
|
24
|
+
jiraToken: tokenField,
|
|
25
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
26
|
+
projectIds: z.array(z.string()).optional().describe("List of project IDs used to filter the visible field details returned. Only fields visible in these projects will be included."),
|
|
27
|
+
includeCollapsedFields: z.boolean().optional().describe("Include collapsed fields for fields that have non-unique names. Set to true to include fields with duplicate names."),
|
|
28
|
+
}),
|
|
29
|
+
execute: async ({ jiraToken, jiraCloudId, projectIds, includeCollapsedFields }) => {
|
|
30
|
+
const queryParams = undefined;
|
|
31
|
+
const body = { projectIds: projectIds, includeCollapsedFields: includeCollapsedFields };
|
|
32
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/jql/autocompletedata`, method: 'POST', query: queryParams, body });
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
export const jiraEvaluateJiraExpression = tool({
|
|
36
|
+
description: "Tool to evaluate Jira expressions using the enhanced search API. Use when you need to extract or transform data from Jira using Jira expression language. Useful for complex data queries, transformations, and building custom objects from Jira data.",
|
|
37
|
+
inputSchema: z.object({
|
|
38
|
+
jiraToken: tokenField,
|
|
39
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
40
|
+
expand: z.string().optional().describe("Use expand to include additional information in the response. This parameter accepts 'meta.complexity' that returns information about the expression complexity, such as the number of expensive operations used and how close the expression is to reaching the complexity limit. Useful when designing and debugging your expressions."),
|
|
41
|
+
context: z.record(z.any()).optional().describe("Context in which the Jira expression is evaluated."),
|
|
42
|
+
expression: z.string().describe("The Jira expression to evaluate. Jira expressions allow you to extract and transform data from Jira. For example: 'issue.key' returns the issue key, 'issue.issueType.name' returns the issue type name, or complex expressions like '{ key: issue.key, type: issue.issueType.name, links: issue.links.map(link => link.linkedIssue.id) }' to build custom objects."),
|
|
43
|
+
}),
|
|
44
|
+
execute: async ({ jiraToken, jiraCloudId, expand, context, expression }) => {
|
|
45
|
+
const queryParams = undefined;
|
|
46
|
+
const body = { expression: expression, context: context, expand: expand };
|
|
47
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/expression/evaluate`, method: 'POST', query: queryParams, body });
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
export const jiraGetJqlAutocompletedata = tool({
|
|
51
|
+
description: "Tool to retrieve JQL autocomplete reference data. Use when you need to discover available JQL fields, functions, and reserved words for building queries.",
|
|
52
|
+
inputSchema: z.object({
|
|
53
|
+
jiraToken: tokenField,
|
|
54
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
55
|
+
}),
|
|
56
|
+
execute: async ({ jiraToken, jiraCloudId }) => {
|
|
57
|
+
const queryParams = undefined;
|
|
58
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/jql/autocompletedata`, method: 'GET', query: queryParams });
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
export const jiraGetJqlAutocompletedataSuggestions = tool({
|
|
62
|
+
description: "Tool to get JQL field auto-complete suggestions. Use when building JQL queries to discover valid field values or predicate options.",
|
|
63
|
+
inputSchema: z.object({
|
|
64
|
+
jiraToken: tokenField,
|
|
65
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
66
|
+
fieldName: z.string().optional().describe("The name of the field for which to get suggestions."),
|
|
67
|
+
fieldValue: z.string().optional().describe("The partial field item name entered by the user to filter suggestions."),
|
|
68
|
+
predicateName: z.string().optional().describe("The name of the CHANGED operator predicate for which suggestions are generated. Valid values: 'by', 'from', 'to'."),
|
|
69
|
+
predicateValue: z.string().optional().describe("The partial predicate item name entered by the user to filter suggestions."),
|
|
70
|
+
}),
|
|
71
|
+
execute: async ({ jiraToken, jiraCloudId, fieldName, fieldValue, predicateName, predicateValue }) => {
|
|
72
|
+
const queryParams = { fieldName: fieldName, fieldValue: fieldValue, predicateName: predicateName, predicateValue: predicateValue };
|
|
73
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/jql/autocompletedata/suggestions`, method: 'GET', query: queryParams });
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
export const jiraParseJqlQueries = tool({
|
|
77
|
+
description: "Parse and validate JQL queries, returning their abstract syntax tree structure along with any errors or warnings. Use when you need to validate JQL syntax or understand query structure before execution.",
|
|
78
|
+
inputSchema: z.object({
|
|
79
|
+
jiraToken: tokenField,
|
|
80
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
81
|
+
queries: z.array(z.string()).min(1).describe("A list of JQL queries to parse. Each query string must be non-empty and will be validated according to the validation parameter."),
|
|
82
|
+
validation: z.enum(["strict", "warn", "none"]).optional().describe("How to validate the JQL queries and treat the validation results. 'strict': Returns all errors; if validation fails, the query structure is not returned. 'warn': Returns all errors; if validation fails but the JQL query is correctly formed, the query structure is returned. 'none': No validation is performed; if JQL query is correctly formed, the query structure is returned."),
|
|
83
|
+
}),
|
|
84
|
+
execute: async ({ jiraToken, jiraCloudId, queries, validation }) => {
|
|
85
|
+
const queryParams = undefined;
|
|
86
|
+
const body = { queries: queries, validation: validation };
|
|
87
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/jql/parse`, method: 'POST', query: queryParams, body });
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
export const jiraSearchApproximateCount = tool({
|
|
91
|
+
description: "Count issues matching a JQL query using approximate count endpoint. Use when you need a fast count of issues without retrieving full issue details. The JQL query must be bounded (include at least one search restriction).",
|
|
92
|
+
inputSchema: z.object({
|
|
93
|
+
jiraToken: tokenField,
|
|
94
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
95
|
+
jql: z.string().describe("A JQL (Jira Query Language) expression to search for issues. For performance reasons, this parameter requires a bounded query - a query with a search restriction (e.g., 'project = KAN', 'assignee = currentUser()', 'status = Done'). Unbounded queries like empty strings or queries with only 'ORDER BY' clauses are not allowed."),
|
|
96
|
+
}),
|
|
97
|
+
execute: async ({ jiraToken, jiraCloudId, jql }) => {
|
|
98
|
+
const queryParams = undefined;
|
|
99
|
+
const body = { jql: jql };
|
|
100
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/search/approximate-count`, method: 'POST', query: queryParams, body });
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
export const jiraSearchForIssuesUsingJqlGet = tool({
|
|
104
|
+
description: "This action retrieves Jira issues based on a specified JQL query. It allows for pagination as well as selection of specific fields to include in the result.",
|
|
105
|
+
inputSchema: z.object({
|
|
106
|
+
jiraToken: tokenField,
|
|
107
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
108
|
+
jql: z.string().optional().describe("Jira Query Language (JQL) string for searching issues. REQUIRED if 'next_page_token' is not provided. Provide this parameter to start a search. To continue a paginated search with a raw Jira token, provide both the original JQL and 'next_page_token'; tokens returned by this action already include that context. IMPORTANT: JQL must include at least one search restriction (filter condition such as project, status, assignee, issuetype, labels, created, updated, etc.). Unbounded queries containing only ORDER BY clauses (e.g., 'order by created DESC') are rejected by the API. Always include a filter like 'project = X' or 'status = Open'. NOTE: This action uses Jira's enhanced search API which has stricter JQL syntax requirements than the Jira UI."),
|
|
109
|
+
expand: z.string().optional().describe("Comma-separated list of entities to expand within issues (e.g., 'renderedFields', 'changelog')."),
|
|
110
|
+
fields: z.array(z.string()).optional().describe("Specific issue fields to retrieve (e.g., 'summary', 'customfield_10010', '*all', '*navigable'). Defaults if omitted."),
|
|
111
|
+
failFast: z.boolean().optional().describe("Fail early on certain errors during search."),
|
|
112
|
+
properties: z.array(z.string()).optional().describe("List of issue property keys (key-value metadata) to retrieve."),
|
|
113
|
+
maxResults: z.number().int().min(1).optional().describe("Maximum issues to retrieve per page. Must be at least 1. Note: Jira Cloud typically limits results to 100 per request for performance reasons."),
|
|
114
|
+
fieldsByKeys: z.boolean().optional().describe("Set to 'True' to identify fields by keys (e.g., 'customfield_10000') instead of IDs."),
|
|
115
|
+
nextPageToken: z.string().optional().describe("Pagination token from a previous enhanced search response. Use the token returned by this action to continue without resending JQL. If you pass a raw Jira nextPageToken, also pass the original JQL."),
|
|
116
|
+
reconcileIssues: z.array(z.number().int()).optional().describe("List of issue IDs to enable read-after-write reconciliation during search."),
|
|
117
|
+
}),
|
|
118
|
+
execute: async ({ jiraToken, jiraCloudId, jql, expand, fields, failFast, properties, maxResults, fieldsByKeys, nextPageToken, reconcileIssues }) => {
|
|
119
|
+
const queryParams = { jql: jql, expand: expand, fields: fields, properties: properties, maxResults: maxResults, fieldsByKeys: fieldsByKeys, nextPageToken: nextPageToken, reconcileIssues: reconcileIssues, failFast: failFast };
|
|
120
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/search/jql`, method: 'GET', query: queryParams });
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
export const jiraSearchForIssuesUsingJqlPost = tool({
|
|
124
|
+
description: "This action performs the enhanced JQL issue search that supports eventual consistency and token-based pagination. Use it when you need stable results immediately after creating or updating issues, or when paginating large result sets. IMPORTANT: This action only works with Jira Cloud. For Jira Server or Data Center instances, use JIRA_SEARCH_FOR_ISSUES_USING_JQL_GET instead.",
|
|
125
|
+
inputSchema: z.object({
|
|
126
|
+
jiraToken: tokenField,
|
|
127
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
128
|
+
jql: z.string().optional().describe("The JQL (Jira Query Language) query string to use for the search. Must be bounded (for example, include a restriction like 'project = KAN'); unbounded queries such as empty JQL or only 'order by ...' are not accepted. Provide either this 'jql' (for the first page) or 'nextPageToken' (to continue pagination). Use only valid JQL field names (e.g., 'project', 'assignee', 'status', 'created', 'updated', 'reporter', 'priority', 'issuetype', 'summary', 'description', 'key', 'labels', 'component', 'fixVersion', 'resolution', 'sprint', 'timespent', 'worklogDate', 'worklogAuthor', 'worklogComment'). Note that some fields like 'worklogDate' require time-tracking to be enabled in the Jira instance."),
|
|
129
|
+
expand: z.string().optional().describe("A comma-separated list of entities to expand in the response (e.g., 'names', 'schema', 'transitions', 'changelog')."),
|
|
130
|
+
fields: z.array(z.string()).optional().describe("A list of fields to return for each issue (e.g., 'summary', 'status', 'assignee', '*navigable')."),
|
|
131
|
+
maxResults: z.number().int().min(1).max(5000).optional().describe("The maximum number of issues to return per page (1-5000). In practice, values above 100 may be ignored by the API; total results per JQL query are capped at ~10,000 regardless of pagination."),
|
|
132
|
+
properties: z.array(z.string()).optional().describe("A list of issue property keys to return for each issue."),
|
|
133
|
+
fieldsByKeys: z.boolean().optional().describe("If true, treats values in 'fields' as keys (e.g., 'customfield_10000')."),
|
|
134
|
+
nextPageToken: z.string().optional().describe("Opaque token received from a previous response to continue pagination. Tokens returned by this action include the original search context and can be passed alone. Raw Jira nextPageToken values require the original JQL too. IMPORTANT: Tokens are short-lived and expire quickly. They must be used immediately within the same search session. If you receive a 'token is invalid or expired' error, restart the search from the beginning with a fresh JQL query (do not reuse old tokens)."),
|
|
135
|
+
reconcileIssues: z.array(z.number().int()).optional().describe("List of issue IDs to reconcile for read-after-write consistency (maximum 50)."),
|
|
136
|
+
}),
|
|
137
|
+
execute: async ({ jiraToken, jiraCloudId, jql, expand, fields, maxResults, properties, fieldsByKeys, nextPageToken, reconcileIssues }) => {
|
|
138
|
+
const queryParams = undefined;
|
|
139
|
+
const body = { jql: jql, expand: expand, fields: fields, maxResults: maxResults, properties: properties, fieldsByKeys: fieldsByKeys, nextPageToken: nextPageToken, reconcileIssues: reconcileIssues };
|
|
140
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/search/jql`, method: 'POST', query: queryParams, body });
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
export const jiraSearchIssues = tool({
|
|
144
|
+
description: "This action performs advanced searches for Jira issues using either structured filters or raw JQL queries. It supports various search criteria including project, assignee, status, priority, and date ranges.",
|
|
145
|
+
inputSchema: z.object({
|
|
146
|
+
jiraToken: tokenField,
|
|
147
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
148
|
+
jql: z.string().optional().describe("Raw JQL (Jira Query Language) query for advanced users. Takes precedence over filters. Can be a complete JQL query with filters and/or ORDER BY clause, or just an ORDER BY clause. CRITICAL JQL SYNTAX RULES - Every comparison needs field + operator + value: (1) WRONG: '(\"val1\" OR \"val2\")' - bare values without field reference cause 'Expecting operator' errors. (2) RIGHT: 'status = \"val1\" OR status = \"val2\"' - each value has field and operator. (3) BETTER: 'status IN (\"val1\", \"val2\", \"val3\")' - use IN for multiple values on same field. (4) Text search uses ~: 'summary ~ \"keyword\"' or 'text ~ \"keyword\"'. (5) Valid operators: =, !=, <, >, <=, >=, ~, !~, IN, NOT IN, IS, IS NOT. COMMON MISTAKE: Do NOT pass ('value1' OR 'value2') - this is invalid. Instead use: field IN ('value1', 'value2') or field = 'value1' OR field = 'value2'."),
|
|
149
|
+
fields: z.array(z.string()).optional().describe("List of fields to return for each issue (for example: summary, status, assignee). If omitted, a sensible default set is requested to populate common fields."),
|
|
150
|
+
labels: z.array(z.string()).optional().describe("Filter by labels (all labels must match)."),
|
|
151
|
+
assignee: z.string().optional().describe("Filter by assignee. Can be account ID (e.g., '712020:abc...'), email (e.g., 'john@company.com'), display name (e.g., 'John Doe'), or 'unassigned'."),
|
|
152
|
+
maxResults: z.number().int().optional().describe("Maximum number of issues to return per page. Capped at 100 per page; total results per JQL query capped at ~10,000. Use next_page_token to paginate."),
|
|
153
|
+
projectKey: z.string().optional().describe("Filter by project key (e.g., 'PROJ')."),
|
|
154
|
+
textSearch: z.string().optional().describe("Search in summary and description text."),
|
|
155
|
+
createdAfter: z.string().optional().describe("Filter issues created after this date. Supports YYYY-MM-DD format or relative dates like '-30m' (last 30 minutes), '-7d' (last 7 days), '-1w' (last week), '-1M' (last month)."),
|
|
156
|
+
updatedAfter: z.string().optional().describe("Filter issues updated after this date. Supports YYYY-MM-DD format or relative dates like '-30m' (last 30 minutes), '-7d' (last 7 days), '-1w' (last week), '-1M' (last month)."),
|
|
157
|
+
createdBefore: z.string().optional().describe("Filter issues created before this date (YYYY-MM-DD format)."),
|
|
158
|
+
updatedBefore: z.string().optional().describe("Filter issues updated before this date (YYYY-MM-DD format)."),
|
|
159
|
+
nextPageToken: z.string().optional().describe("Cursor token used to fetch the next page when using enhanced search. Tokens returned by this action include the original search context and can be passed alone. Raw Jira nextPageToken values require the same JQL or filters used for the original search."),
|
|
160
|
+
sprintIdOrName: z.string().optional().describe("Filter by sprint. Can be sprint ID (e.g., '123') or name (e.g., 'Sprint 1', 'Release Sprint')."),
|
|
161
|
+
statusIdOrName: z.string().optional().describe("Filter by status. Can be either a status ID (e.g., '10001') or name (e.g., 'To Do', 'In Progress', 'Done')."),
|
|
162
|
+
preservedOrderBy: z.string().optional().describe("Internal: preserved ORDER BY clause from ORDER-BY-only JQL input"),
|
|
163
|
+
priorityIdOrName: z.string().optional().describe("Filter by priority. Can be either a priority ID (e.g., '1', '2') or name (e.g., 'High', 'Medium', 'Low')."),
|
|
164
|
+
issueTypeIdOrName: z.string().optional().describe("Filter by issue type. Can be either an issue type ID (e.g., '10001') or name (e.g., 'Bug', 'Task', 'Story')."),
|
|
165
|
+
}),
|
|
166
|
+
execute: async ({ jiraToken, jiraCloudId, jql, fields, labels, assignee, maxResults, projectKey, textSearch, createdAfter, updatedAfter, createdBefore, updatedBefore, nextPageToken, sprintIdOrName, statusIdOrName, preservedOrderBy, priorityIdOrName, issueTypeIdOrName }) => {
|
|
167
|
+
if (nextPageToken) {
|
|
168
|
+
return jira(jiraToken, { cloudId: jiraCloudId, path: '/search/jql', method: 'POST', body: { jql, nextPageToken } });
|
|
169
|
+
}
|
|
170
|
+
const built = jql ?? buildSearchJql({ projectKey, assignee, statusIdOrName, priorityIdOrName, issueTypeIdOrName, labels, textSearch, createdAfter, updatedAfter, createdBefore, updatedBefore, sprintIdOrName, preservedOrderBy });
|
|
171
|
+
if (!built)
|
|
172
|
+
return { error: "Provide at least one filter: jql, projectKey, assignee, status, textSearch, dates, etc." };
|
|
173
|
+
const body = { jql: built };
|
|
174
|
+
if (fields)
|
|
175
|
+
body.fields = fields;
|
|
176
|
+
if (maxResults !== undefined)
|
|
177
|
+
body.maxResults = maxResults;
|
|
178
|
+
return jira(jiraToken, { cloudId: jiraCloudId, path: '/search/jql', method: 'POST', body });
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export declare const jiraAddUserToGroup: import("ai").Tool<{
|
|
2
|
+
accountId: string;
|
|
3
|
+
jiraToken?: string | undefined;
|
|
4
|
+
jiraCloudId?: string | undefined;
|
|
5
|
+
groupId?: string | undefined;
|
|
6
|
+
groupName?: string | undefined;
|
|
7
|
+
}, any>;
|
|
8
|
+
export declare const jiraCreateGroup: import("ai").Tool<{
|
|
9
|
+
name: string;
|
|
10
|
+
jiraToken?: string | undefined;
|
|
11
|
+
jiraCloudId?: string | undefined;
|
|
12
|
+
}, any>;
|
|
13
|
+
export declare const jiraFindUsers: import("ai").Tool<{
|
|
14
|
+
query?: string | undefined;
|
|
15
|
+
maxResults?: number | undefined;
|
|
16
|
+
active?: boolean | undefined;
|
|
17
|
+
accountId?: string | undefined;
|
|
18
|
+
jiraToken?: string | undefined;
|
|
19
|
+
jiraCloudId?: string | undefined;
|
|
20
|
+
startAt?: number | undefined;
|
|
21
|
+
}, any>;
|
|
22
|
+
export declare const jiraFindUsers2: import("ai").Tool<{
|
|
23
|
+
query?: string | undefined;
|
|
24
|
+
maxResults?: number | undefined;
|
|
25
|
+
username?: string | undefined;
|
|
26
|
+
property?: string | undefined;
|
|
27
|
+
accountId?: string | undefined;
|
|
28
|
+
jiraToken?: string | undefined;
|
|
29
|
+
jiraCloudId?: string | undefined;
|
|
30
|
+
startAt?: number | undefined;
|
|
31
|
+
}, any>;
|
|
32
|
+
export declare const jiraFindUsersForPicker: import("ai").Tool<{
|
|
33
|
+
query: string;
|
|
34
|
+
maxResults?: number | undefined;
|
|
35
|
+
jiraToken?: string | undefined;
|
|
36
|
+
jiraCloudId?: string | undefined;
|
|
37
|
+
avatarSize?: string | undefined;
|
|
38
|
+
showAvatar?: boolean | undefined;
|
|
39
|
+
excludeAccountIds?: string[] | undefined;
|
|
40
|
+
excludeConnectUsers?: boolean | undefined;
|
|
41
|
+
}, any>;
|
|
42
|
+
export declare const jiraGetAllGroups: import("ai").Tool<{
|
|
43
|
+
maxResults?: number | undefined;
|
|
44
|
+
jiraToken?: string | undefined;
|
|
45
|
+
jiraCloudId?: string | undefined;
|
|
46
|
+
startAt?: number | undefined;
|
|
47
|
+
}, any>;
|
|
48
|
+
export declare const jiraGetAllUsers: import("ai").Tool<{
|
|
49
|
+
maxResults?: number | undefined;
|
|
50
|
+
jiraToken?: string | undefined;
|
|
51
|
+
jiraCloudId?: string | undefined;
|
|
52
|
+
startAt?: number | undefined;
|
|
53
|
+
}, any>;
|
|
54
|
+
export declare const jiraGetCurrentUser: import("ai").Tool<{
|
|
55
|
+
expand?: string | undefined;
|
|
56
|
+
jiraToken?: string | undefined;
|
|
57
|
+
jiraCloudId?: string | undefined;
|
|
58
|
+
}, any>;
|
|
59
|
+
export declare const jiraGetGroup: import("ai").Tool<{
|
|
60
|
+
expand?: string | undefined;
|
|
61
|
+
jiraToken?: string | undefined;
|
|
62
|
+
jiraCloudId?: string | undefined;
|
|
63
|
+
groupId?: string | undefined;
|
|
64
|
+
groupName?: string | undefined;
|
|
65
|
+
}, any>;
|
|
66
|
+
export declare const jiraGetMypreferencesLocale: import("ai").Tool<{
|
|
67
|
+
jiraToken?: string | undefined;
|
|
68
|
+
jiraCloudId?: string | undefined;
|
|
69
|
+
}, any>;
|
|
70
|
+
export declare const jiraGetUserGroups: import("ai").Tool<{
|
|
71
|
+
accountId: string;
|
|
72
|
+
jiraToken?: string | undefined;
|
|
73
|
+
jiraCloudId?: string | undefined;
|
|
74
|
+
}, any>;
|
|
75
|
+
export declare const jiraListGroupsPicker: import("ai").Tool<{
|
|
76
|
+
query?: string | undefined;
|
|
77
|
+
maxResults?: number | undefined;
|
|
78
|
+
exclude?: string[] | undefined;
|
|
79
|
+
jiraToken?: string | undefined;
|
|
80
|
+
jiraCloudId?: string | undefined;
|
|
81
|
+
excludeId?: string[] | undefined;
|
|
82
|
+
caseInsensitive?: boolean | undefined;
|
|
83
|
+
}, any>;
|
|
84
|
+
export declare const jiraRemoveUserFromGroup: import("ai").Tool<{
|
|
85
|
+
accountId: string;
|
|
86
|
+
jiraToken?: string | undefined;
|
|
87
|
+
jiraCloudId?: string | undefined;
|
|
88
|
+
groupId?: string | undefined;
|
|
89
|
+
groupName?: string | undefined;
|
|
90
|
+
}, any>;
|
|
91
|
+
export declare const jiraWhoAmI: import("ai").Tool<{
|
|
92
|
+
jiraToken?: string | undefined;
|
|
93
|
+
jiraCloudId?: string | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
error: string;
|
|
96
|
+
sites?: undefined;
|
|
97
|
+
accountId?: undefined;
|
|
98
|
+
message?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
sites: {
|
|
101
|
+
id: any;
|
|
102
|
+
name: any;
|
|
103
|
+
url: any;
|
|
104
|
+
}[];
|
|
105
|
+
accountId: null;
|
|
106
|
+
error?: undefined;
|
|
107
|
+
message?: undefined;
|
|
108
|
+
} | {
|
|
109
|
+
error: string;
|
|
110
|
+
message: string;
|
|
111
|
+
sites?: undefined;
|
|
112
|
+
accountId?: undefined;
|
|
113
|
+
}>;
|
|
114
|
+
//# sourceMappingURL=users.d.ts.map
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { jira } from './client.js';
|
|
5
|
+
import { ATLASSIAN_API } from './client.js';
|
|
6
|
+
const tokenField = z.string().optional().describe('Injected by system; do not provide');
|
|
7
|
+
export const jiraAddUserToGroup = tool({
|
|
8
|
+
description: "This action adds a user to a Jira group. The user is identified by their Atlassian account ID, and the group is identified by either its name or ID.",
|
|
9
|
+
inputSchema: z.object({
|
|
10
|
+
jiraToken: tokenField,
|
|
11
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
12
|
+
groupId: z.string().optional().describe("The ID of the group to add the user to. Either group_name or group_id must be provided."),
|
|
13
|
+
accountId: z.string().describe("The Atlassian account ID of the user to add to the group."),
|
|
14
|
+
groupName: z.string().optional().describe("The name of the group to add the user to. Either group_name or group_id must be provided. Must be an exact match; prefer group_id for precision."),
|
|
15
|
+
}),
|
|
16
|
+
execute: async ({ jiraToken, jiraCloudId, groupId, accountId, groupName }) => {
|
|
17
|
+
const queryParams = { groupname: groupName, groupId: groupId };
|
|
18
|
+
const body = { accountId: accountId };
|
|
19
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/group/user`, method: 'POST', query: queryParams, body });
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
export const jiraCreateGroup = tool({
|
|
23
|
+
description: "This action creates a new group in Jira. Groups are used to organize users and manage permissions across projects and issues.",
|
|
24
|
+
inputSchema: z.object({
|
|
25
|
+
jiraToken: tokenField,
|
|
26
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
27
|
+
name: z.string().describe("The name of the group to create. Must be unique within the Jira instance."),
|
|
28
|
+
}),
|
|
29
|
+
execute: async ({ jiraToken, jiraCloudId, name }) => {
|
|
30
|
+
const queryParams = undefined;
|
|
31
|
+
const body = { name: name };
|
|
32
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/group`, method: 'POST', query: queryParams, body });
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
export const jiraFindUsers = tool({
|
|
36
|
+
description: "This action allows you to search for Jira users using various parameters like email or display name. It returns a list of users that match the search criteria for further operations.",
|
|
37
|
+
inputSchema: z.object({
|
|
38
|
+
jiraToken: tokenField,
|
|
39
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
40
|
+
query: z.string().optional().describe("A query string that is matched against user attributes. This can be used to search by display name or email address. For example, 'john@company.com' to find a user by email. At least one of 'query' or 'account_id' must be provided. Plain-text only — JQL-style functions like currentUser() are unsupported and return no results. Email fields in results may be redacted due to privacy settings; use display_name for disambiguation when email is unavailable."),
|
|
41
|
+
active: z.boolean().optional().describe("Filter users by active status. When true, only active users are returned. When false, only inactive users are returned. If not provided, the search returns active users."),
|
|
42
|
+
startAt: z.number().int().optional().describe("The 0-based index of the first item to return in the page of results. Used for pagination."),
|
|
43
|
+
accountId: z.string().optional().describe("The account ID to search for. Use this to get user details when you already have the account ID. At least one of 'query' or 'account_id' must be provided."),
|
|
44
|
+
maxResults: z.number().int().optional().describe("The maximum number of items to return per page. Defaults to 50. Maximum allowed is typically 1000."),
|
|
45
|
+
}),
|
|
46
|
+
execute: async ({ jiraToken, jiraCloudId, query, active, startAt, accountId, maxResults }) => {
|
|
47
|
+
const queryParams = { query: query, accountId: accountId, active: active, startAt: startAt, maxResults: maxResults };
|
|
48
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/user/search`, method: 'GET', query: queryParams });
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
export const jiraFindUsers2 = tool({
|
|
52
|
+
description: "Tool to find users in Jira by query string, account ID, or property search. Use when you need to search for users to assign to issues, add as watchers, or perform other user-related operations.",
|
|
53
|
+
inputSchema: z.object({
|
|
54
|
+
jiraToken: tokenField,
|
|
55
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
56
|
+
query: z.string().optional().describe("A query string that is matched against user attributes (displayName, and emailAddress) to find relevant users. The string can match the prefix of the attribute's value. For example, 'john' matches a user with a displayName of 'John Smith' and a user with an emailAddress of 'johnson@example.com'. Required, unless accountId or property is specified."),
|
|
57
|
+
startAt: z.number().int().min(0).optional().describe("The index of the first item to return in a page of filtered results (page offset)."),
|
|
58
|
+
property: z.string().optional().describe("A query string used to search properties. Property keys are specified by path, so property keys containing dot (.) or equals (=) characters cannot be used. The query string cannot be specified using a JSON object. Example: To search for the value of 'nested' from {\"something\":{\"nested\":1,\"other\":2}} use 'thepropertykey.something.nested=1'. Required, unless accountId or query is specified."),
|
|
59
|
+
username: z.string().optional().describe("This parameter is no longer available. See the deprecation notice for details."),
|
|
60
|
+
accountId: z.string().optional().describe("A query string that is matched exactly against a user accountId. Required, unless query or property is specified."),
|
|
61
|
+
maxResults: z.number().int().min(1).max(1000).optional().describe("The maximum number of items to return per page."),
|
|
62
|
+
}),
|
|
63
|
+
execute: async ({ jiraToken, jiraCloudId, query, startAt, property, username, accountId, maxResults }) => {
|
|
64
|
+
const queryParams = { query: query, accountId: accountId, startAt: startAt, maxResults: maxResults, property: property, username: username };
|
|
65
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/user/search`, method: 'GET', query: queryParams });
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
export const jiraFindUsersForPicker = tool({
|
|
69
|
+
description: "Find users for picker components by matching query against user attributes like display name and email.",
|
|
70
|
+
inputSchema: z.object({
|
|
71
|
+
jiraToken: tokenField,
|
|
72
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
73
|
+
query: z.string().describe("A query string that is matched against user attributes, such as 'displayName', and 'emailAddress', to find relevant users. The string can match the prefix of the attribute's value. For example, *query=john* matches a user with a 'displayName' of *John Smith* and a user with an 'emailAddress' of *johnson@example.com*."),
|
|
74
|
+
avatarSize: z.string().optional().describe("The size of the avatar to return. Only used when 'show_avatar' is true."),
|
|
75
|
+
maxResults: z.number().int().min(1).optional().describe("The maximum number of items to return. The total number of matched users is returned in 'total'. Defaults to 50."),
|
|
76
|
+
showAvatar: z.boolean().optional().describe("Include the URI to the user's avatar. Defaults to false."),
|
|
77
|
+
excludeAccountIds: z.array(z.string()).optional().describe("A list of account IDs to exclude from the search results. Cannot be provided with 'exclude'."),
|
|
78
|
+
excludeConnectUsers: z.boolean().optional().describe("Exclude Connect app users from the search results. Defaults to false."),
|
|
79
|
+
}),
|
|
80
|
+
execute: async ({ jiraToken, jiraCloudId, query, avatarSize, maxResults, showAvatar, excludeAccountIds, excludeConnectUsers }) => {
|
|
81
|
+
const queryParams = { query: query, maxResults: maxResults, showAvatar: showAvatar, avatarSize: avatarSize, excludeAccountIds: excludeAccountIds, excludeConnectUsers: excludeConnectUsers };
|
|
82
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/user/picker`, method: 'GET', query: queryParams });
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
export const jiraGetAllGroups = tool({
|
|
86
|
+
description: "This action retrieves a single page of groups from the Jira instance. Use 'start_at' and 'max_results' to page through results; the response includes 'has_next_page' and 'next_start_at' to drive pagination.",
|
|
87
|
+
inputSchema: z.object({
|
|
88
|
+
jiraToken: tokenField,
|
|
89
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
90
|
+
startAt: z.number().int().min(0).optional().describe("The 0-based index of the first item to return in the page of results. Defaults to 0. To paginate, use 'next_start_at' from the response (or increment 'start_at' by 'max_results'); stop when 'has_next_page' is false."),
|
|
91
|
+
maxResults: z.number().int().min(1).optional().describe("The maximum number of items to return per page. Defaults to 50. The Jira instance might have its own maximum limit for this value. A single page is returned per call; use 'has_next_page'/'next_start_at' to fetch more."),
|
|
92
|
+
}),
|
|
93
|
+
execute: async ({ jiraToken, jiraCloudId, startAt, maxResults }) => {
|
|
94
|
+
const perPage = maxResults ?? 50;
|
|
95
|
+
const start = startAt ?? 0;
|
|
96
|
+
const res = await jira(jiraToken, { cloudId: jiraCloudId, path: "/groups/picker", query: { startAt: start, maxResults: perPage } });
|
|
97
|
+
if (res?.error)
|
|
98
|
+
return res;
|
|
99
|
+
const list = Array.isArray(res?.values) ? res.values : [];
|
|
100
|
+
const isLast = res?.isLast ?? list.length < perPage;
|
|
101
|
+
return { groups: list, total: res?.total ?? list.length, startAt: start, maxResults: perPage, isLast, hasNextPage: !isLast, nextStartAt: isLast ? null : start + perPage };
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
export const jiraGetAllUsers = tool({
|
|
105
|
+
description: "This action retrieves a single page of users from the Jira instance. Use 'start_at' and 'max_results' to page through results; the response includes 'has_next_page' and 'next_start_at' to drive pagination.",
|
|
106
|
+
inputSchema: z.object({
|
|
107
|
+
jiraToken: tokenField,
|
|
108
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
109
|
+
startAt: z.number().int().min(0).optional().describe("The 0-based index of the first item to return in the page of results. Defaults to 0. To paginate, increment 'start_at' by 'max_results' each request (or use 'next_start_at' from the response); stop when 'has_next_page' is false."),
|
|
110
|
+
maxResults: z.number().int().min(1).optional().describe("The maximum number of items to return per page. Defaults to 50. The Jira instance might have its own maximum limit for this value. A single page is returned per call; use 'has_next_page'/'next_start_at' from the response to fetch subsequent pages."),
|
|
111
|
+
}),
|
|
112
|
+
execute: async ({ jiraToken, jiraCloudId, startAt, maxResults }) => {
|
|
113
|
+
const perPage = maxResults ?? 50;
|
|
114
|
+
const start = startAt ?? 0;
|
|
115
|
+
const users = await jira(jiraToken, { cloudId: jiraCloudId, path: "/users/search", query: { startAt: start, maxResults: perPage } });
|
|
116
|
+
if (users?.error)
|
|
117
|
+
return users;
|
|
118
|
+
const list = Array.isArray(users) ? users : [];
|
|
119
|
+
const isLast = list.length < perPage;
|
|
120
|
+
return { users: list, startAt: start, maxResults: perPage, isLast, hasNextPage: !isLast, nextStartAt: isLast ? null : start + perPage };
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
export const jiraGetCurrentUser = tool({
|
|
124
|
+
description: "This action retrieves detailed information about the currently authenticated Jira user. It provides data such as the user's display name, email address, groups, and application roles.",
|
|
125
|
+
inputSchema: z.object({
|
|
126
|
+
jiraToken: tokenField,
|
|
127
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
128
|
+
expand: z.string().optional().describe("Comma-separated list of user properties to expand, e.g., 'groups', 'applicationRoles'. Omitting this parameter returns only the base user profile without group membership or role data."),
|
|
129
|
+
}),
|
|
130
|
+
execute: async ({ jiraToken, jiraCloudId, expand }) => {
|
|
131
|
+
const queryParams = { expand: expand };
|
|
132
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/myself`, method: 'GET', query: queryParams });
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
export const jiraGetGroup = tool({
|
|
136
|
+
description: "This action retrieves information about a specific Jira group. You can fetch the group by its name or unique ID, and optionally expand to include the list of users in the group.",
|
|
137
|
+
inputSchema: z.object({
|
|
138
|
+
jiraToken: tokenField,
|
|
139
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
140
|
+
expand: z.string().optional().describe("Additional properties to expand in the response. Use 'users' to include group members. Useful for verifying membership state after group modification operations."),
|
|
141
|
+
groupId: z.string().optional().describe("The unique ID of the group to retrieve. Either group_name or group_id must be provided."),
|
|
142
|
+
groupName: z.string().optional().describe("The name of the group to retrieve. Either group_name or group_id must be provided."),
|
|
143
|
+
}),
|
|
144
|
+
execute: async ({ jiraToken, jiraCloudId, expand, groupId, groupName }) => {
|
|
145
|
+
const queryParams = { groupname: groupName, groupId: groupId, expand: expand };
|
|
146
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/group`, method: 'GET', query: queryParams });
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
export const jiraGetMypreferencesLocale = tool({
|
|
150
|
+
description: "Tool to retrieve the locale preference of the currently authenticated Jira user. Use when you need to know the user's language and regional settings.",
|
|
151
|
+
inputSchema: z.object({
|
|
152
|
+
jiraToken: tokenField,
|
|
153
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
154
|
+
}),
|
|
155
|
+
execute: async ({ jiraToken, jiraCloudId }) => {
|
|
156
|
+
const queryParams = undefined;
|
|
157
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/mypreferences/locale`, method: 'GET', query: queryParams });
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
export const jiraGetUserGroups = tool({
|
|
161
|
+
description: "Retrieves all groups for a specific Jira user by account ID. Use this action when you need to check group membership for a particular user, verify permissions, or audit user access. Essential for understanding which groups a user belongs to before performing group-related operations.",
|
|
162
|
+
inputSchema: z.object({
|
|
163
|
+
jiraToken: tokenField,
|
|
164
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
165
|
+
accountId: z.string().describe("The Atlassian account ID of the user whose groups you want to retrieve."),
|
|
166
|
+
}),
|
|
167
|
+
execute: async ({ jiraToken, jiraCloudId, accountId }) => {
|
|
168
|
+
const queryParams = { accountId: accountId };
|
|
169
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/user/groups`, method: 'GET', query: queryParams });
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
export const jiraListGroupsPicker = tool({
|
|
173
|
+
description: "This action searches and lists groups using Jira's picker endpoint, which is optimized for autocomplete and search scenarios. It allows filtering by name and excluding specific groups.",
|
|
174
|
+
inputSchema: z.object({
|
|
175
|
+
jiraToken: tokenField,
|
|
176
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
177
|
+
query: z.string().optional().describe("The string to find in group names. Use this to search for groups matching a specific text."),
|
|
178
|
+
exclude: z.array(z.string()).optional().describe("A list of group names to exclude from the result. As a group's name can change, use of 'exclude_id' is recommended to identify a group. This parameter cannot be used with 'exclude_id' parameter."),
|
|
179
|
+
excludeId: z.array(z.string()).optional().describe("A list of group IDs to exclude from the result. This parameter cannot be used with the 'exclude' parameter."),
|
|
180
|
+
maxResults: z.number().int().min(1).optional().describe("The maximum number of groups to return. The maximum number of groups that can be returned is limited by the system property 'jira.ajax.autocomplete.limit'."),
|
|
181
|
+
caseInsensitive: z.boolean().optional().describe("Whether the search for groups should be case insensitive. Defaults to false if not specified."),
|
|
182
|
+
}),
|
|
183
|
+
execute: async ({ jiraToken, jiraCloudId, query, exclude, excludeId, maxResults, caseInsensitive }) => {
|
|
184
|
+
const queryParams = { query: query, exclude: exclude, excludeId: excludeId, maxResults: maxResults, caseInsensitive: caseInsensitive };
|
|
185
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/groups/picker`, method: 'GET', query: queryParams });
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
export const jiraRemoveUserFromGroup = tool({
|
|
189
|
+
description: "This action removes a user from a Jira group. The user is identified by their Atlassian account ID, and the group is identified by either its name or ID.",
|
|
190
|
+
inputSchema: z.object({
|
|
191
|
+
jiraToken: tokenField,
|
|
192
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
193
|
+
groupId: z.string().optional().describe("The ID of the group to remove the user from. Either group_name or group_id must be provided."),
|
|
194
|
+
accountId: z.string().describe("The Atlassian account ID of the user to remove from the group. System and app accounts cannot be modified; attempting removal returns a 400 'User not modifiable' error."),
|
|
195
|
+
groupName: z.string().optional().describe("The name of the group to remove the user from. Either group_name or group_id must be provided."),
|
|
196
|
+
}),
|
|
197
|
+
execute: async ({ jiraToken, jiraCloudId, groupId, accountId, groupName }) => {
|
|
198
|
+
const queryParams = { groupname: groupName, groupId: groupId, accountId: accountId };
|
|
199
|
+
return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/group/user`, method: 'DELETE', query: queryParams });
|
|
200
|
+
},
|
|
201
|
+
});
|
|
202
|
+
export const jiraWhoAmI = tool({
|
|
203
|
+
description: "Return the Atlassian (Jira) sites accessible to the connection. Identity is workspace-level.",
|
|
204
|
+
inputSchema: z.object({
|
|
205
|
+
jiraToken: tokenField,
|
|
206
|
+
jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
|
|
207
|
+
}),
|
|
208
|
+
execute: async ({ jiraToken, jiraCloudId }) => {
|
|
209
|
+
try {
|
|
210
|
+
const response = await fetch(`${ATLASSIAN_API}/oauth/token/accessible-resources`, { headers: { Authorization: `Bearer ${jiraToken}`, Accept: "application/json" } });
|
|
211
|
+
if (!response.ok)
|
|
212
|
+
return { error: `Failed to list accessible sites with status ${response.status}` };
|
|
213
|
+
const sites = await response.json();
|
|
214
|
+
return { sites: (Array.isArray(sites) ? sites : []).map((s) => ({ id: s.id, name: s.name, url: s.url })), accountId: null };
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
return { error: "Error listing accessible Jira sites", message: error instanceof Error ? error.message : "Unknown error" };
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const SVG = `<svg viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M63.333 32.567c-5.2.866-9.566 3-12.833 6.266-3.867 3.867-5.833 8.5-6.5 15.367-.3 3.133-.467 15.467-.2 15.467.067 0 .7-.234 1.4-.534 1.633-.7 5.167-.7 7-.033l1.4.5.167-8.033c.166-8.567.366-9.867 1.966-13.067 1.1-2.133 3.767-4.633 6.034-5.667 2.6-1.2 6.4-1.666 9.333-1.2 6.267 1.034 10 4.434 11.567 10.5.633 2.434.666 3.7.666 17.1v14.434H93.4L93.233 67.9c-.1-14.9-.166-15.9-.866-18.567-1.9-7.4-6.5-12.766-12.934-15.2-3.433-1.3-6.7-1.8-11.2-1.766-2.233.033-4.433.133-4.9.2z" fill="#000"/><path d="M22.733 57.2c-2.866 1.433-4.4 4-4.4 7.467 0 1.1.2 2.5.467 3.133.633 1.567 2.433 3.467 4 4.3 1.9 1 5.5 1 7.367.033l1.366-.7 4.267 2.9 4.267 2.934V81.7L35.8 84.633l-4.3 2.934-1.1-.667c-1.6-.933-4.7-1.133-6.6-.4-2 .767-4.067 2.6-4.833 4.333-.834 1.767-.834 5.234 0 7 .7 1.567 2.333 3.3 3.8 4.067.6.3 2.033.6 3.233.7 2.8.2 5.167-.733 6.867-2.733 1.366-1.6 2.266-4.4 2.033-6.334l-.167-1.366 4.3-2.9 4.3-2.9 1.534.7c2.333 1 5.8.766 8-.567 2.4-1.5 3.6-3.633 3.733-6.633.1-2.1 0-2.567-.833-4.2-2.167-4.134-7-5.7-11.134-3.634l-1.233.6-4.233-2.9-4.234-2.9-.1-2.333c-.066-2.8-.866-4.6-2.833-6.233-2.5-2.134-6.233-2.567-9.267-1.067z" fill="#018BFF"/></svg>`;
|
|
2
|
+
export const NEO4J_ICON = {
|
|
3
|
+
kind: 'svg',
|
|
4
|
+
dataUri: `data:image/svg+xml;base64,${Buffer.from(SVG).toString('base64')}`,
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineToolkit, defineTool } from '../../core/define.js';
|
|
2
|
+
import { inferToolScope } from '../../core/scope.js';
|
|
3
|
+
import { NEO4J_ICON } from './icon.js';
|
|
4
|
+
import { neo4jTools } from './tools/index.js';
|
|
5
|
+
export default defineToolkit({
|
|
6
|
+
id: 'neo4j',
|
|
7
|
+
displayName: 'Neo4j',
|
|
8
|
+
shortDescription: 'Aura instances, snapshots, projects, users, IP filters, agents, and GDS sessions.',
|
|
9
|
+
category: 'Data & Analytics',
|
|
10
|
+
icon: NEO4J_ICON,
|
|
11
|
+
auth: {
|
|
12
|
+
type: 'basic_auth',
|
|
13
|
+
tokenField: 'neo4jCredentials',
|
|
14
|
+
provider: {
|
|
15
|
+
connectDescription: 'Connect Neo4j with Aura API client credentials. Create them in the Aura Console under Account Settings > Client credentials (Aura API). Paste as "clientId:clientSecret". Tools exchange them for a short-lived bearer token automatically.',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
allowedHosts: ['api.neo4j.io'],
|
|
19
|
+
tools: neo4jTools.map((entry) => defineTool({
|
|
20
|
+
name: entry.name,
|
|
21
|
+
description: entry.description,
|
|
22
|
+
tool: entry.tool,
|
|
23
|
+
requiredAuth: entry.requiredAuth,
|
|
24
|
+
scope: entry.scope ?? inferToolScope(entry.name),
|
|
25
|
+
})),
|
|
26
|
+
meta: {
|
|
27
|
+
since: '0.0.9',
|
|
28
|
+
homepage: 'https://neo4j.com',
|
|
29
|
+
docsUrl: 'https://neo4j.com/docs/aura/api/authentication/',
|
|
30
|
+
apiDocsUrl: 'https://neo4j.com/docs/aura/platform/api/specification/',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const neo4jEstimateGdsSessionSize: import("ai").Tool<{
|
|
2
|
+
nodeCount: number;
|
|
3
|
+
relationshipCount: number;
|
|
4
|
+
neo4jCredentials?: string | undefined;
|
|
5
|
+
nodeLabelCount?: number | undefined;
|
|
6
|
+
nodePropertyCount?: number | undefined;
|
|
7
|
+
relationshipPropertyCount?: number | undefined;
|
|
8
|
+
algorithmCategories?: string[] | undefined;
|
|
9
|
+
}, any>;
|
|
10
|
+
export declare const neo4jListGdsSessions: import("ai").Tool<{
|
|
11
|
+
instanceId?: string | undefined;
|
|
12
|
+
neo4jCredentials?: string | undefined;
|
|
13
|
+
tenantId?: string | undefined;
|
|
14
|
+
organizationId?: string | undefined;
|
|
15
|
+
}, any>;
|
|
16
|
+
export declare const neo4jAggregateDirectors: import("ai").Tool<{
|
|
17
|
+
instanceId: string;
|
|
18
|
+
graphQlEndpoint: string;
|
|
19
|
+
neo4jCredentials?: string | undefined;
|
|
20
|
+
}, any>;
|
|
21
|
+
//# sourceMappingURL=analytics.d.ts.map
|