@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,446 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { bbRequest, toBbError, requireToken, enc } from './client.js';
|
|
5
|
+
export const bitbucketListPipelines = tool({
|
|
6
|
+
description: "Tool to find pipelines in a Bitbucket repository. Returns pipeline metadata including state, trigger, and duration. Use when you need to browse pipeline history or check pipeline status.",
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
9
|
+
page: z.number().int().min(1).optional().describe("Page number for paginated results (starts from 1)."),
|
|
10
|
+
pagelen: z.number().int().min(1).max(100).optional().describe("Number of pipelines per page (1-100). Bitbucket default is typically 10 if not specified."),
|
|
11
|
+
repoSlug: z.string().describe("The repository slug (URL-friendly identifier)."),
|
|
12
|
+
workspace: z.string().describe("The workspace slug or UUID that owns the repository."),
|
|
13
|
+
}),
|
|
14
|
+
execute: async ({ bitbucketToken, workspace, repoSlug, page, pagelen }) => {
|
|
15
|
+
const missing = requireToken(bitbucketToken);
|
|
16
|
+
if (missing)
|
|
17
|
+
return missing;
|
|
18
|
+
try {
|
|
19
|
+
const query = {};
|
|
20
|
+
if (page !== undefined)
|
|
21
|
+
query["page"] = page;
|
|
22
|
+
if (pagelen !== undefined)
|
|
23
|
+
query["pagelen"] = pagelen;
|
|
24
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/pipelines`, { query });
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
return toBbError(error, "Failed to list pipelines");
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
export const bitbucketGetPipeline = tool({
|
|
32
|
+
description: "Retrieve a specified pipeline from a Bitbucket repository. Use when you need to get detailed information about a specific pipeline execution including its status, build number, and results.",
|
|
33
|
+
inputSchema: z.object({
|
|
34
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
35
|
+
repoSlug: z.string().describe("The repository slug (URL-friendly name) or UUID."),
|
|
36
|
+
workspace: z.string().describe("The workspace ID (slug) or workspace UUID that owns the repository."),
|
|
37
|
+
pipelineUuid: z.string().describe("The pipeline UUID to retrieve. Must be in UUID format, typically enclosed in curly braces."),
|
|
38
|
+
}),
|
|
39
|
+
execute: async ({ bitbucketToken, workspace, repoSlug, pipelineUuid }) => {
|
|
40
|
+
const missing = requireToken(bitbucketToken);
|
|
41
|
+
if (missing)
|
|
42
|
+
return missing;
|
|
43
|
+
try {
|
|
44
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/pipelines/${enc(pipelineUuid)}`);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
return toBbError(error, "Failed to get pipeline");
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
export const bitbucketListPipelineSteps = tool({
|
|
52
|
+
description: "Retrieves all steps for a given pipeline. Use when you need to inspect the individual steps of a pipeline execution, including their state, duration, and commands.",
|
|
53
|
+
inputSchema: z.object({
|
|
54
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
55
|
+
repoSlug: z.string().describe("The slug or UUID of the repository. This is usually the repository's name in URL-friendly format."),
|
|
56
|
+
workspace: z.string().describe("The workspace ID or slug that owns the repository. This can typically be found in the URL of your Bitbucket workspace."),
|
|
57
|
+
pipelineUuid: z.string().describe("The UUID of the pipeline. Must be enclosed in curly braces (e.g., '{f5500ca2-b74d-4e6a-84bf-5d2f73695152}')."),
|
|
58
|
+
}),
|
|
59
|
+
execute: async ({ bitbucketToken, workspace, repoSlug, pipelineUuid }) => {
|
|
60
|
+
const missing = requireToken(bitbucketToken);
|
|
61
|
+
if (missing)
|
|
62
|
+
return missing;
|
|
63
|
+
try {
|
|
64
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/pipelines/${enc(pipelineUuid)}/steps`);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
return toBbError(error, "Failed to list pipeline steps");
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
export const bitbucketStopPipeline = tool({
|
|
72
|
+
description: "Signal the stop of a pipeline and all of its steps that have not completed yet. This action is irreversible — once stopped, a pipeline cannot be restarted and must be re-triggered to run again. Use this action when you need to cancel a running pipeline execution that is no longer needed or was triggered incorrectly.",
|
|
73
|
+
inputSchema: z.object({
|
|
74
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
75
|
+
repoSlug: z.string().describe("The repository slug (URL-friendly name) or UUID."),
|
|
76
|
+
workspace: z.string().describe("The workspace ID (slug) or workspace UUID that owns the repository."),
|
|
77
|
+
pipelineUuid: z.string().describe("The pipeline UUID to stop. Must be in UUID format, typically enclosed in curly braces."),
|
|
78
|
+
}),
|
|
79
|
+
execute: async ({ bitbucketToken, workspace, repoSlug, pipelineUuid }) => {
|
|
80
|
+
const missing = requireToken(bitbucketToken);
|
|
81
|
+
if (missing)
|
|
82
|
+
return missing;
|
|
83
|
+
try {
|
|
84
|
+
return await bbRequest(bitbucketToken, 'POST', `/repositories/${enc(workspace)}/${enc(repoSlug)}/pipelines/${enc(pipelineUuid)}/stopPipeline`);
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
return toBbError(error, "Failed to stop pipeline");
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
export const bitbucketListPipelineSchedules = tool({
|
|
92
|
+
description: "Retrieves configured pipeline schedules for a Bitbucket repository. Use when you need to view scheduled pipeline runs and their cron patterns.",
|
|
93
|
+
inputSchema: z.object({
|
|
94
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
95
|
+
repoSlug: z.string().describe("The slug or identifier of the repository."),
|
|
96
|
+
workspace: z.string().describe("The workspace ID or slug that owns the repository."),
|
|
97
|
+
}),
|
|
98
|
+
execute: async ({ bitbucketToken, workspace, repoSlug }) => {
|
|
99
|
+
const missing = requireToken(bitbucketToken);
|
|
100
|
+
if (missing)
|
|
101
|
+
return missing;
|
|
102
|
+
try {
|
|
103
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/pipelines_config/schedules`);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
return toBbError(error, "Failed to list pipeline schedules");
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
export const bitbucketListPipelineCaches = tool({
|
|
111
|
+
description: "Retrieves the repository pipelines caches. Use when you need to list all caches configured for Bitbucket Pipelines in a specific repository.",
|
|
112
|
+
inputSchema: z.object({
|
|
113
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
114
|
+
repoSlug: z.string().describe("The slug or UUID of the repository. This is usually the repository's name in URL-friendly format."),
|
|
115
|
+
workspace: z.string().describe("The workspace ID or slug that owns the repository. This can typically be found in the URL of your Bitbucket workspace."),
|
|
116
|
+
}),
|
|
117
|
+
execute: async ({ bitbucketToken, workspace, repoSlug }) => {
|
|
118
|
+
const missing = requireToken(bitbucketToken);
|
|
119
|
+
if (missing)
|
|
120
|
+
return missing;
|
|
121
|
+
try {
|
|
122
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/pipelines-config/caches`);
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
return toBbError(error, "Failed to list pipeline caches");
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
export const bitbucketListPipelineRunners = tool({
|
|
130
|
+
description: "Retrieves the list of self-hosted runners configured for a repository's pipelines. Use when you need to view available runners for pipeline execution.",
|
|
131
|
+
inputSchema: z.object({
|
|
132
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
133
|
+
repoSlug: z.string().describe("The repository slug (URL-friendly identifier) for the repository."),
|
|
134
|
+
workspace: z.string().describe("The workspace slug or UUID that owns the repository. This can be the workspace slug (e.g., 'my-workspace') or its UUID enclosed in curly braces (e.g., '{workspace-uuid}')."),
|
|
135
|
+
}),
|
|
136
|
+
execute: async ({ bitbucketToken, workspace, repoSlug }) => {
|
|
137
|
+
const missing = requireToken(bitbucketToken);
|
|
138
|
+
if (missing)
|
|
139
|
+
return missing;
|
|
140
|
+
try {
|
|
141
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/pipelines-config/runners`);
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
return toBbError(error, "Failed to list pipeline runners");
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
export const bitbucketListPipelineSshKnownHosts = tool({
|
|
149
|
+
description: "Retrieves repository-level SSH known hosts configured for Bitbucket Pipelines. Use when you need to list or verify SSH known hosts that Pipelines can connect to during builds.",
|
|
150
|
+
inputSchema: z.object({
|
|
151
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
152
|
+
repoSlug: z.string().describe("The repository slug (URL-friendly identifier) for the repository."),
|
|
153
|
+
workspace: z.string().describe("The workspace slug or UUID. This identifies the Bitbucket workspace that owns the repository."),
|
|
154
|
+
}),
|
|
155
|
+
execute: async ({ bitbucketToken, workspace, repoSlug }) => {
|
|
156
|
+
const missing = requireToken(bitbucketToken);
|
|
157
|
+
if (missing)
|
|
158
|
+
return missing;
|
|
159
|
+
try {
|
|
160
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/pipelines_config/ssh/known_hosts`);
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
return toBbError(error, "Failed to list pipeline ssh known hosts");
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
export const bitbucketListRepositoryPipelineVariables = tool({
|
|
168
|
+
description: "Retrieves repository-level pipeline variables for a specific Bitbucket repository. Use when you need to view or audit pipeline configuration variables that are scoped to a repository.",
|
|
169
|
+
inputSchema: z.object({
|
|
170
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
171
|
+
q: z.string().optional().describe("Query string for filtering results using Bitbucket Query Language (BBQL)."),
|
|
172
|
+
page: z.number().int().optional().describe("Page number for pagination. Use this to retrieve subsequent pages of results."),
|
|
173
|
+
sort: z.string().optional().describe("Field to sort results by. Prefix with a hyphen (-) for descending order."),
|
|
174
|
+
pagelen: z.number().int().optional().describe("Number of items to return per page. Controls the size of the paginated response."),
|
|
175
|
+
repoSlug: z.string().describe("The slug or UUID of the repository. This is usually the repository's name in URL-friendly format."),
|
|
176
|
+
workspace: z.string().describe("The workspace ID or slug that owns the repository. This can typically be found in the URL of your Bitbucket workspace."),
|
|
177
|
+
}),
|
|
178
|
+
execute: async ({ bitbucketToken, workspace, repoSlug, q, page, sort, pagelen }) => {
|
|
179
|
+
const missing = requireToken(bitbucketToken);
|
|
180
|
+
if (missing)
|
|
181
|
+
return missing;
|
|
182
|
+
try {
|
|
183
|
+
const query = {};
|
|
184
|
+
if (q !== undefined)
|
|
185
|
+
query["q"] = q;
|
|
186
|
+
if (page !== undefined)
|
|
187
|
+
query["page"] = page;
|
|
188
|
+
if (sort !== undefined)
|
|
189
|
+
query["sort"] = sort;
|
|
190
|
+
if (pagelen !== undefined)
|
|
191
|
+
query["pagelen"] = pagelen;
|
|
192
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/pipelines_config/variables`, { query });
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
return toBbError(error, "Failed to list repository pipeline variables");
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
export const bitbucketCreateTeamPipelineVariable = tool({
|
|
200
|
+
description: "Creates a team-level pipeline configuration variable in Bitbucket. Use when you need to add environment variables or configuration values that should be available to all pipelines within a team.",
|
|
201
|
+
inputSchema: z.object({
|
|
202
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
203
|
+
key: z.string().describe("The name/key of the pipeline variable. Must be unique within the team's pipeline configuration."),
|
|
204
|
+
value: z.string().describe("The value of the pipeline variable. This will be available to all pipelines in the team."),
|
|
205
|
+
secured: z.boolean().optional().describe("Whether the variable should be secured (masked in logs). Set to `True` for sensitive values like passwords or API keys, `False` for non-sensitive values."),
|
|
206
|
+
username: z.string().describe("The team username that owns the pipeline configuration. This is the team identifier in Bitbucket."),
|
|
207
|
+
}),
|
|
208
|
+
execute: async ({ bitbucketToken, username, key, value, secured }) => {
|
|
209
|
+
const missing = requireToken(bitbucketToken);
|
|
210
|
+
if (missing)
|
|
211
|
+
return missing;
|
|
212
|
+
try {
|
|
213
|
+
const body = { key, value };
|
|
214
|
+
if (secured !== undefined)
|
|
215
|
+
body.secured = secured;
|
|
216
|
+
return await bbRequest(bitbucketToken, 'POST', `/teams/${enc(username)}/pipelines_config/variables/`, { body });
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
return toBbError(error, "Failed to create team pipeline variable");
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
export const bitbucketUpdateTeamPipelineVariable = tool({
|
|
224
|
+
description: "Updates a team-level pipeline configuration variable in Bitbucket. Use when you need to modify existing environment variables or configuration values that are available to all pipelines within a team.",
|
|
225
|
+
inputSchema: z.object({
|
|
226
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
227
|
+
key: z.string().describe("The name/key of the pipeline variable. Must be unique within the team's pipeline configuration."),
|
|
228
|
+
value: z.string().describe("The updated value of the pipeline variable. This will be available to all pipelines in the team."),
|
|
229
|
+
secured: z.boolean().optional().describe("Whether the variable should be secured (masked in logs). Set to `True` for sensitive values like passwords or API keys, `False` for non-sensitive values."),
|
|
230
|
+
username: z.string().describe("The team username that owns the pipeline configuration. This is the team identifier in Bitbucket."),
|
|
231
|
+
variableUuid: z.string().describe("The UUID of the pipeline variable to update. This must be in UUID format (e.g., 252a372b-3e5d-4869-9df5-c379d6b062e9) and can be optionally wrapped in curly braces."),
|
|
232
|
+
}),
|
|
233
|
+
execute: async ({ bitbucketToken, username, variableUuid, key, value, secured }) => {
|
|
234
|
+
const missing = requireToken(bitbucketToken);
|
|
235
|
+
if (missing)
|
|
236
|
+
return missing;
|
|
237
|
+
try {
|
|
238
|
+
const body = {};
|
|
239
|
+
if (key !== undefined)
|
|
240
|
+
body.key = key;
|
|
241
|
+
if (value !== undefined)
|
|
242
|
+
body.value = value;
|
|
243
|
+
if (secured !== undefined)
|
|
244
|
+
body.secured = secured;
|
|
245
|
+
return await bbRequest(bitbucketToken, 'PUT', `/teams/${enc(username)}/pipelines_config/variables/${enc(variableUuid)}`, { body });
|
|
246
|
+
}
|
|
247
|
+
catch (error) {
|
|
248
|
+
return toBbError(error, "Failed to update team pipeline variable");
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
});
|
|
252
|
+
export const bitbucketCreateUserPipelineVariable = tool({
|
|
253
|
+
description: "Creates a user-level pipeline variable for Bitbucket pipelines. Use when you need to create account-level configuration variables that can be used across all repositories owned by the user.",
|
|
254
|
+
inputSchema: z.object({
|
|
255
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
256
|
+
key: z.string().describe("The name/key of the pipeline variable. Must be unique for the user."),
|
|
257
|
+
value: z.string().describe("The value of the pipeline variable."),
|
|
258
|
+
secured: z.boolean().optional().describe("Whether the variable should be secured/encrypted (true) or stored as plain text (false). Defaults to false."),
|
|
259
|
+
selectedUser: z.string().describe("The username or UUID of the user. Can be a username (e.g., 'myusername') or a UUID enclosed in curly braces (e.g., '{4f3ecac3-c951-41d4-8a4c-95f40be978fc}')."),
|
|
260
|
+
}),
|
|
261
|
+
execute: async ({ bitbucketToken, selectedUser, key, value, secured }) => {
|
|
262
|
+
const missing = requireToken(bitbucketToken);
|
|
263
|
+
if (missing)
|
|
264
|
+
return missing;
|
|
265
|
+
try {
|
|
266
|
+
const body = { key, value };
|
|
267
|
+
if (secured !== undefined)
|
|
268
|
+
body.secured = secured;
|
|
269
|
+
return await bbRequest(bitbucketToken, 'POST', `/users/${enc(selectedUser)}/pipelines_config/variables/`, { body });
|
|
270
|
+
}
|
|
271
|
+
catch (error) {
|
|
272
|
+
return toBbError(error, "Failed to create user pipeline variable");
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
});
|
|
276
|
+
export const bitbucketUpdateUserPipelineVariable = tool({
|
|
277
|
+
description: "Updates a user-level pipeline variable for Bitbucket pipelines. Use when you need to modify account-level configuration variables such as changing the value, key name, or security status.",
|
|
278
|
+
inputSchema: z.object({
|
|
279
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
280
|
+
key: z.string().optional().describe("The updated name/key of the pipeline variable. If omitted, the key remains unchanged."),
|
|
281
|
+
value: z.string().optional().describe("The updated value of the pipeline variable. If omitted, the value remains unchanged."),
|
|
282
|
+
secured: z.boolean().optional().describe("Whether the variable should be secured/encrypted (true) or stored as plain text (false). If omitted, the secured status remains unchanged."),
|
|
283
|
+
selectedUser: z.string().describe("The UUID or username of the user. When using UUID format, it should be URL-encoded (e.g., %7B4f3ecac3-c951-41d4-8a4c-95f40be978fc%7D for {4f3ecac3-c951-41d4-8a4c-95f40be978fc})."),
|
|
284
|
+
variableUuid: z.string().describe("The UUID of the pipeline variable to update. This can be obtained from the list or get variable endpoints."),
|
|
285
|
+
}),
|
|
286
|
+
execute: async ({ bitbucketToken, selectedUser, variableUuid, key, value, secured }) => {
|
|
287
|
+
const missing = requireToken(bitbucketToken);
|
|
288
|
+
if (missing)
|
|
289
|
+
return missing;
|
|
290
|
+
try {
|
|
291
|
+
const body = {};
|
|
292
|
+
if (key !== undefined)
|
|
293
|
+
body.key = key;
|
|
294
|
+
if (value !== undefined)
|
|
295
|
+
body.value = value;
|
|
296
|
+
if (secured !== undefined)
|
|
297
|
+
body.secured = secured;
|
|
298
|
+
return await bbRequest(bitbucketToken, 'PUT', `/users/${enc(selectedUser)}/pipelines_config/variables/${enc(variableUuid)}`, { body });
|
|
299
|
+
}
|
|
300
|
+
catch (error) {
|
|
301
|
+
return toBbError(error, "Failed to update user pipeline variable");
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
export const bitbucketDeleteUserPipelineVariable = tool({
|
|
306
|
+
description: "Permanently deletes a user-level pipeline configuration variable identified by its UUID. Use this to remove pipeline variables that are no longer needed at the account level.",
|
|
307
|
+
inputSchema: z.object({
|
|
308
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
309
|
+
username: z.string().describe("The username of the Bitbucket account that owns the pipeline variable. This is the account identifier."),
|
|
310
|
+
variableUuid: z.string().describe("The UUID of the pipeline variable to delete. This must be in UUID format (e.g., b070fa8a-c3db-42bd-870c-dea7c980c7b8) and can be optionally wrapped in curly braces."),
|
|
311
|
+
}),
|
|
312
|
+
execute: async ({ bitbucketToken, username, variableUuid }) => {
|
|
313
|
+
const missing = requireToken(bitbucketToken);
|
|
314
|
+
if (missing)
|
|
315
|
+
return missing;
|
|
316
|
+
try {
|
|
317
|
+
return await bbRequest(bitbucketToken, 'DELETE', `/users/${enc(username)}/pipelines_config/variables/${enc(variableUuid)}`);
|
|
318
|
+
}
|
|
319
|
+
catch (error) {
|
|
320
|
+
return toBbError(error, "Failed to delete user pipeline variable");
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
});
|
|
324
|
+
export const bitbucketListDeployments = tool({
|
|
325
|
+
description: "Lists deployments for a specified Bitbucket repository. Use when you need to view deployment history and status across environments.",
|
|
326
|
+
inputSchema: z.object({
|
|
327
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
328
|
+
q: z.string().optional().describe("Query string for filtering deployment results using Bitbucket Query Language (BBQL). Use operators like '=' for exact match, '~' for contains, '!=' for not equal."),
|
|
329
|
+
page: z.number().int().min(1).optional().describe("Page number of the results to retrieve. Defaults to 1 if not specified."),
|
|
330
|
+
sort: z.string().optional().describe("Field designation for sorting results. Prefix with '-' for descending order."),
|
|
331
|
+
pagelen: z.number().int().min(1).max(100).optional().describe("Number of results per page (1-100). Defaults to the Bitbucket API's default page length if not specified."),
|
|
332
|
+
repoSlug: z.string().describe("The repository slug (URL-friendly name)."),
|
|
333
|
+
workspace: z.string().describe("The workspace ID or slug (URL-friendly name). This can be the workspace slug (e.g., 'my-workspace') or its UUID enclosed in curly braces (e.g., '{workspace-uuid}')."),
|
|
334
|
+
}),
|
|
335
|
+
execute: async ({ bitbucketToken, workspace, repoSlug, q, page, sort, pagelen }) => {
|
|
336
|
+
const missing = requireToken(bitbucketToken);
|
|
337
|
+
if (missing)
|
|
338
|
+
return missing;
|
|
339
|
+
try {
|
|
340
|
+
const query = {};
|
|
341
|
+
if (q !== undefined)
|
|
342
|
+
query["q"] = q;
|
|
343
|
+
if (page !== undefined)
|
|
344
|
+
query["page"] = page;
|
|
345
|
+
if (sort !== undefined)
|
|
346
|
+
query["sort"] = sort;
|
|
347
|
+
if (pagelen !== undefined)
|
|
348
|
+
query["pagelen"] = pagelen;
|
|
349
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/deployments`, { query });
|
|
350
|
+
}
|
|
351
|
+
catch (error) {
|
|
352
|
+
return toBbError(error, "Failed to list deployments");
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
});
|
|
356
|
+
export const bitbucketListRepositoryEnvironments = tool({
|
|
357
|
+
description: "List all deployment environments configured for a Bitbucket repository. Use when you need to view available environments for deployments, check environment configurations, or select an environment for deployment operations.",
|
|
358
|
+
inputSchema: z.object({
|
|
359
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
360
|
+
q: z.string().optional().describe("Query string for filtering environment results using Bitbucket Query Language (BBQL). Use operators like '=' for exact match, '~' for contains, '!=' for not equal."),
|
|
361
|
+
page: z.number().int().min(1).optional().describe("Page number of the results to retrieve. Defaults to 1 if not specified."),
|
|
362
|
+
sort: z.string().optional().describe("Field designation for sorting results. Prefix with '-' for descending order."),
|
|
363
|
+
pagelen: z.number().int().min(1).max(100).optional().describe("Number of results per page (1-100). Defaults to the Bitbucket API's default page length if not specified."),
|
|
364
|
+
repoSlug: z.string().describe("The repository slug (URL-friendly name) or UUID."),
|
|
365
|
+
workspace: z.string().describe("The workspace ID or slug that owns the repository. This can be the workspace slug (e.g., 'my-workspace') or its UUID enclosed in curly braces (e.g., '{workspace-uuid}')."),
|
|
366
|
+
}),
|
|
367
|
+
execute: async ({ bitbucketToken, workspace, repoSlug, q, page, sort, pagelen }) => {
|
|
368
|
+
const missing = requireToken(bitbucketToken);
|
|
369
|
+
if (missing)
|
|
370
|
+
return missing;
|
|
371
|
+
try {
|
|
372
|
+
const query = {};
|
|
373
|
+
if (q !== undefined)
|
|
374
|
+
query["q"] = q;
|
|
375
|
+
if (page !== undefined)
|
|
376
|
+
query["page"] = page;
|
|
377
|
+
if (sort !== undefined)
|
|
378
|
+
query["sort"] = sort;
|
|
379
|
+
if (pagelen !== undefined)
|
|
380
|
+
query["pagelen"] = pagelen;
|
|
381
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/environments`, { query });
|
|
382
|
+
}
|
|
383
|
+
catch (error) {
|
|
384
|
+
return toBbError(error, "Failed to list repository environments");
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
});
|
|
388
|
+
export const bitbucketGetRepositoryEnvironment = tool({
|
|
389
|
+
description: "Retrieve detailed information about a specific deployment environment in a Bitbucket repository. Use when you need to get environment configuration, deployment settings, or check environment properties like locks and restrictions.",
|
|
390
|
+
inputSchema: z.object({
|
|
391
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
392
|
+
repoSlug: z.string().describe("The slug or UUID of the repository."),
|
|
393
|
+
workspace: z.string().describe("The workspace ID or slug that owns the repository."),
|
|
394
|
+
environmentUuid: z.string().describe("The UUID of the environment to retrieve. Must include curly braces (e.g., {2e1c3c19-12f2-4e9b-9ed7-45512af9a7ce})."),
|
|
395
|
+
}),
|
|
396
|
+
execute: async ({ bitbucketToken, workspace, repoSlug, environmentUuid }) => {
|
|
397
|
+
const missing = requireToken(bitbucketToken);
|
|
398
|
+
if (missing)
|
|
399
|
+
return missing;
|
|
400
|
+
try {
|
|
401
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/environments/${enc(environmentUuid)}`);
|
|
402
|
+
}
|
|
403
|
+
catch (error) {
|
|
404
|
+
return toBbError(error, "Failed to get repository environment");
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
});
|
|
408
|
+
export const bitbucketListDeploymentEnvironmentVariables = tool({
|
|
409
|
+
description: "Retrieves deployment environment level variables for a specific Bitbucket repository environment. Use when you need to view or audit environment-specific configuration variables for deployments.",
|
|
410
|
+
inputSchema: z.object({
|
|
411
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
412
|
+
repoSlug: z.string().describe("The slug or UUID of the repository. This is usually the repository's name in URL-friendly format."),
|
|
413
|
+
workspace: z.string().describe("The workspace ID or slug that owns the repository. This can typically be found in the URL of your Bitbucket workspace."),
|
|
414
|
+
environmentUuid: z.string().describe("The UUID of the deployment environment. Must be provided with curly braces (e.g., {2e1c3c19-12f2-4e9b-9ed7-45512af9a7ce}). The API will handle URL-encoding automatically."),
|
|
415
|
+
}),
|
|
416
|
+
execute: async ({ bitbucketToken, workspace, repoSlug, environmentUuid }) => {
|
|
417
|
+
const missing = requireToken(bitbucketToken);
|
|
418
|
+
if (missing)
|
|
419
|
+
return missing;
|
|
420
|
+
try {
|
|
421
|
+
return await bbRequest(bitbucketToken, 'GET', `/repositories/${enc(workspace)}/${enc(repoSlug)}/deployments_config/environments/${enc(environmentUuid)}/variables`);
|
|
422
|
+
}
|
|
423
|
+
catch (error) {
|
|
424
|
+
return toBbError(error, "Failed to list deployment environment variables");
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
});
|
|
428
|
+
export const bitbucketGetOpenidConfiguration = tool({
|
|
429
|
+
description: "Retrieves the OpenID Connect discovery configuration for Bitbucket Pipelines OIDC. Use when integrating Bitbucket Pipelines with resource servers (AWS, GCP, Vault) using OpenID Connect authentication. Returns issuer URL, JWKS URI, and supported capabilities.",
|
|
430
|
+
inputSchema: z.object({
|
|
431
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
432
|
+
workspace: z.string().describe("The workspace identifier (workspace slug or UUID). This identifies the Bitbucket workspace for which to retrieve the OIDC configuration."),
|
|
433
|
+
}),
|
|
434
|
+
execute: async ({ bitbucketToken, workspace }) => {
|
|
435
|
+
const missing = requireToken(bitbucketToken);
|
|
436
|
+
if (missing)
|
|
437
|
+
return missing;
|
|
438
|
+
try {
|
|
439
|
+
return await bbRequest(bitbucketToken, 'GET', `/workspaces/${enc(workspace)}/pipelines-config/identity/oidc/.well-known/openid-configuration`);
|
|
440
|
+
}
|
|
441
|
+
catch (error) {
|
|
442
|
+
return toBbError(error, "Failed to get openid configuration");
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
});
|
|
446
|
+
//# sourceMappingURL=pipelines.js.map
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
export declare const bitbucketApprovePullRequest: import("ai").Tool<{
|
|
2
|
+
repoSlug: string;
|
|
3
|
+
workspace: string;
|
|
4
|
+
pullRequestId: number;
|
|
5
|
+
bitbucketToken?: string | undefined;
|
|
6
|
+
}, any>;
|
|
7
|
+
export declare const bitbucketCreatePullRequest: import("ai").Tool<{
|
|
8
|
+
title: string;
|
|
9
|
+
repoSlug: string;
|
|
10
|
+
workspace: string;
|
|
11
|
+
sourceBranch: string;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
reviewers?: {
|
|
14
|
+
uuid: string;
|
|
15
|
+
}[] | undefined;
|
|
16
|
+
bitbucketToken?: string | undefined;
|
|
17
|
+
destinationBranch?: string | undefined;
|
|
18
|
+
closeSourceBranch?: boolean | undefined;
|
|
19
|
+
}, any>;
|
|
20
|
+
export declare const bitbucketDeclinePullRequest: import("ai").Tool<{
|
|
21
|
+
repoSlug: string;
|
|
22
|
+
workspace: string;
|
|
23
|
+
pullRequestId: number;
|
|
24
|
+
bitbucketToken?: string | undefined;
|
|
25
|
+
}, any>;
|
|
26
|
+
export declare const bitbucketMergePullRequest: import("ai").Tool<{
|
|
27
|
+
repoSlug: string;
|
|
28
|
+
workspace: string;
|
|
29
|
+
pullRequestId: number;
|
|
30
|
+
message?: string | undefined;
|
|
31
|
+
bitbucketToken?: string | undefined;
|
|
32
|
+
closeSourceBranch?: boolean | undefined;
|
|
33
|
+
mergeStrategy?: string | undefined;
|
|
34
|
+
}, any>;
|
|
35
|
+
export declare const bitbucketRequestPullRequestChanges: import("ai").Tool<{
|
|
36
|
+
repoSlug: string;
|
|
37
|
+
workspace: string;
|
|
38
|
+
pullRequestId: number;
|
|
39
|
+
bitbucketToken?: string | undefined;
|
|
40
|
+
}, any>;
|
|
41
|
+
export declare const bitbucketUpdatePullRequest: import("ai").Tool<{
|
|
42
|
+
repoSlug: string;
|
|
43
|
+
workspace: string;
|
|
44
|
+
pullRequestId: number;
|
|
45
|
+
description?: string | undefined;
|
|
46
|
+
title?: string | undefined;
|
|
47
|
+
draft?: boolean | undefined;
|
|
48
|
+
reviewers?: Record<string, any>[] | undefined;
|
|
49
|
+
bitbucketToken?: string | undefined;
|
|
50
|
+
closeSourceBranch?: boolean | undefined;
|
|
51
|
+
}, any>;
|
|
52
|
+
export declare const bitbucketGetPullRequest: import("ai").Tool<{
|
|
53
|
+
repoSlug: string;
|
|
54
|
+
workspace: string;
|
|
55
|
+
pullRequestId: number;
|
|
56
|
+
bitbucketToken?: string | undefined;
|
|
57
|
+
}, any>;
|
|
58
|
+
export declare const bitbucketListPullRequests: import("ai").Tool<{
|
|
59
|
+
repoSlug: string;
|
|
60
|
+
workspace: string;
|
|
61
|
+
page?: number | undefined;
|
|
62
|
+
state?: "DECLINED" | "OPEN" | "MERGED" | undefined;
|
|
63
|
+
bitbucketToken?: string | undefined;
|
|
64
|
+
pagelen?: number | undefined;
|
|
65
|
+
}, any>;
|
|
66
|
+
export declare const bitbucketListPullRequestTasks: import("ai").Tool<{
|
|
67
|
+
repoSlug: string;
|
|
68
|
+
workspace: string;
|
|
69
|
+
pullRequestId: number;
|
|
70
|
+
page?: number | undefined;
|
|
71
|
+
bitbucketToken?: string | undefined;
|
|
72
|
+
pagelen?: number | undefined;
|
|
73
|
+
}, any>;
|
|
74
|
+
export declare const bitbucketListPullRequestCommits: import("ai").Tool<{
|
|
75
|
+
repoSlug: string;
|
|
76
|
+
workspace: string;
|
|
77
|
+
pullRequestId: number;
|
|
78
|
+
responseDetail?: "minimal" | "full" | undefined;
|
|
79
|
+
bitbucketToken?: string | undefined;
|
|
80
|
+
pagelen?: number | undefined;
|
|
81
|
+
}, any>;
|
|
82
|
+
export declare const bitbucketGetPullRequestDiff: import("ai").Tool<{
|
|
83
|
+
repoSlug: string;
|
|
84
|
+
workspace: string;
|
|
85
|
+
pullRequestId: number;
|
|
86
|
+
bitbucketToken?: string | undefined;
|
|
87
|
+
maxChars?: number | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
error: string;
|
|
90
|
+
} | {
|
|
91
|
+
diff: string;
|
|
92
|
+
truncated: boolean;
|
|
93
|
+
original_size: number;
|
|
94
|
+
} | {
|
|
95
|
+
diff: string;
|
|
96
|
+
truncated: boolean;
|
|
97
|
+
original_size?: undefined;
|
|
98
|
+
}>;
|
|
99
|
+
export declare const bitbucketGetPullRequestDiffstat: import("ai").Tool<{
|
|
100
|
+
repoSlug: string;
|
|
101
|
+
workspace: string;
|
|
102
|
+
pullRequestId: number;
|
|
103
|
+
page?: number | undefined;
|
|
104
|
+
bitbucketToken?: string | undefined;
|
|
105
|
+
pagelen?: number | undefined;
|
|
106
|
+
}, any>;
|
|
107
|
+
export declare const bitbucketListPullRequestActivity: import("ai").Tool<{
|
|
108
|
+
repoSlug: string;
|
|
109
|
+
workspace: string;
|
|
110
|
+
page?: number | undefined;
|
|
111
|
+
bitbucketToken?: string | undefined;
|
|
112
|
+
pagelen?: number | undefined;
|
|
113
|
+
}, any>;
|
|
114
|
+
export declare const bitbucketListPullRequestComments: import("ai").Tool<{
|
|
115
|
+
repoSlug: string;
|
|
116
|
+
workspace: string;
|
|
117
|
+
pullRequestId: number;
|
|
118
|
+
sort?: string | undefined;
|
|
119
|
+
page?: number | undefined;
|
|
120
|
+
bitbucketToken?: string | undefined;
|
|
121
|
+
pagelen?: number | undefined;
|
|
122
|
+
}, any>;
|
|
123
|
+
export declare const bitbucketGetPullRequestComment: import("ai").Tool<{
|
|
124
|
+
commentId: number;
|
|
125
|
+
repoSlug: string;
|
|
126
|
+
workspace: string;
|
|
127
|
+
pullRequestId: number;
|
|
128
|
+
bitbucketToken?: string | undefined;
|
|
129
|
+
}, any>;
|
|
130
|
+
export declare const bitbucketCreatePullRequestComment: import("ai").Tool<{
|
|
131
|
+
repoSlug: string;
|
|
132
|
+
workspace: string;
|
|
133
|
+
pullRequestId: number;
|
|
134
|
+
contentRaw: string;
|
|
135
|
+
bitbucketToken?: string | undefined;
|
|
136
|
+
inline?: {
|
|
137
|
+
path: string;
|
|
138
|
+
from?: number | undefined;
|
|
139
|
+
to?: number | undefined;
|
|
140
|
+
} | undefined;
|
|
141
|
+
parentCommentId?: number | undefined;
|
|
142
|
+
}, any>;
|
|
143
|
+
export declare const bitbucketDeletePullRequestComment: import("ai").Tool<{
|
|
144
|
+
commentId: number;
|
|
145
|
+
repoSlug: string;
|
|
146
|
+
workspace: string;
|
|
147
|
+
pullRequestId: number;
|
|
148
|
+
bitbucketToken?: string | undefined;
|
|
149
|
+
}, any>;
|
|
150
|
+
export declare const bitbucketResolvePullRequestComment: import("ai").Tool<{
|
|
151
|
+
commentId: number;
|
|
152
|
+
repoSlug: string;
|
|
153
|
+
workspace: string;
|
|
154
|
+
pullRequestId: number;
|
|
155
|
+
action?: "resolve" | "reopen" | undefined;
|
|
156
|
+
bitbucketToken?: string | undefined;
|
|
157
|
+
}, any>;
|
|
158
|
+
export declare const bitbucketListPullRequestStatuses: import("ai").Tool<{
|
|
159
|
+
repoSlug: string;
|
|
160
|
+
workspace: string;
|
|
161
|
+
pullRequestId: number;
|
|
162
|
+
page?: number | undefined;
|
|
163
|
+
bitbucketToken?: string | undefined;
|
|
164
|
+
pagelen?: number | undefined;
|
|
165
|
+
}, any>;
|
|
166
|
+
export declare const bitbucketGetWorkspacePullRequestsByUser: import("ai").Tool<{
|
|
167
|
+
workspace: string;
|
|
168
|
+
selectedUser: string;
|
|
169
|
+
page?: number | undefined;
|
|
170
|
+
state?: "DECLINED" | "OPEN" | "MERGED" | undefined;
|
|
171
|
+
bitbucketToken?: string | undefined;
|
|
172
|
+
pagelen?: number | undefined;
|
|
173
|
+
}, any>;
|
|
174
|
+
//# sourceMappingURL=pull-requests.d.ts.map
|