@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,34 @@
|
|
|
1
|
+
export declare const bitbucketGetSnippet: import("ai").Tool<{
|
|
2
|
+
workspace: string;
|
|
3
|
+
encodedId: string;
|
|
4
|
+
bitbucketToken?: string | undefined;
|
|
5
|
+
acceptFormat?: string | undefined;
|
|
6
|
+
}, any>;
|
|
7
|
+
export declare const bitbucketListSnippets: import("ai").Tool<{
|
|
8
|
+
page?: number | undefined;
|
|
9
|
+
role?: "owner" | "contributor" | "member" | undefined;
|
|
10
|
+
bitbucketToken?: string | undefined;
|
|
11
|
+
pagelen?: number | undefined;
|
|
12
|
+
}, any>;
|
|
13
|
+
export declare const bitbucketCreateSnippetComment: import("ai").Tool<{
|
|
14
|
+
content: string;
|
|
15
|
+
workspace: string;
|
|
16
|
+
encodedId: string;
|
|
17
|
+
parentId?: number | undefined;
|
|
18
|
+
bitbucketToken?: string | undefined;
|
|
19
|
+
}, any>;
|
|
20
|
+
export declare const bitbucketGetSnippetWatchStatus: import("ai").Tool<{
|
|
21
|
+
workspace: string;
|
|
22
|
+
encodedId: string;
|
|
23
|
+
bitbucketToken?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
error: string;
|
|
26
|
+
} | {
|
|
27
|
+
is_watching: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const bitbucketDeleteSnippetWatch: import("ai").Tool<{
|
|
30
|
+
workspace: string;
|
|
31
|
+
encodedId: string;
|
|
32
|
+
bitbucketToken?: string | undefined;
|
|
33
|
+
}, any>;
|
|
34
|
+
//# sourceMappingURL=snippets.d.ts.map
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { bbRequest, toBbError, requireToken, enc, BitbucketApiError } from './client.js';
|
|
5
|
+
export const bitbucketGetSnippet = tool({
|
|
6
|
+
description: "Retrieves a specific Bitbucket snippet by its encoded ID from an existing workspace, returning its metadata and file structure.",
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
9
|
+
workspace: z.string().describe("The workspace ID (slug) or the workspace UUID surrounded by curly braces, identifying the Bitbucket workspace."),
|
|
10
|
+
encodedId: z.string().describe("The unique identifier (encoded ID) of the snippet to be retrieved."),
|
|
11
|
+
acceptFormat: z.string().optional().describe("The desired format for the response. Valid options are 'application/json', 'multipart/related', or 'multipart/form-data'. This may affect how snippet content or file data is presented."),
|
|
12
|
+
}),
|
|
13
|
+
execute: async ({ bitbucketToken, workspace, encodedId, acceptFormat }) => {
|
|
14
|
+
const missing = requireToken(bitbucketToken);
|
|
15
|
+
if (missing)
|
|
16
|
+
return missing;
|
|
17
|
+
try {
|
|
18
|
+
return await bbRequest(bitbucketToken, 'GET', `/snippets/${enc(workspace)}/${enc(encodedId)}`, { accept: acceptFormat ?? 'application/json' });
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return toBbError(error, "Failed to get snippet");
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
export const bitbucketListSnippets = tool({
|
|
26
|
+
description: "Returns all snippets accessible to the authenticated user. Use when you need to discover or list snippets, optionally filtered by role (owner, contributor, or member).",
|
|
27
|
+
inputSchema: z.object({
|
|
28
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
29
|
+
page: z.number().int().min(1).optional().describe("Page number of the results to retrieve. Defaults to 1 if not specified."),
|
|
30
|
+
role: z.enum(["owner", "contributor", "member"]).optional().describe("Enum for snippet role filter values."),
|
|
31
|
+
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."),
|
|
32
|
+
}),
|
|
33
|
+
execute: async ({ bitbucketToken, page, role, pagelen }) => {
|
|
34
|
+
const missing = requireToken(bitbucketToken);
|
|
35
|
+
if (missing)
|
|
36
|
+
return missing;
|
|
37
|
+
try {
|
|
38
|
+
const query = {};
|
|
39
|
+
if (role !== undefined)
|
|
40
|
+
query["role"] = role;
|
|
41
|
+
if (page !== undefined)
|
|
42
|
+
query["page"] = page;
|
|
43
|
+
if (pagelen !== undefined)
|
|
44
|
+
query["pagelen"] = pagelen;
|
|
45
|
+
return await bbRequest(bitbucketToken, 'GET', `/snippets`, { query });
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
return toBbError(error, "Failed to list snippets");
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
export const bitbucketCreateSnippetComment = tool({
|
|
53
|
+
description: "Posts a new top-level comment or a threaded reply to an existing comment on a specified Bitbucket snippet.",
|
|
54
|
+
inputSchema: z.object({
|
|
55
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
56
|
+
content: z.string().describe("Raw text content of the comment; Bitbucket will render any included markup (like Markdown)."),
|
|
57
|
+
parentId: z.number().int().optional().describe("ID of an existing comment to reply to, creating a threaded comment; if omitted, a top-level comment is created."),
|
|
58
|
+
workspace: z.string().describe("Workspace ID or slug (e.g., 'my_workspace_slug' or a UUID) for the Bitbucket workspace containing the snippet."),
|
|
59
|
+
encodedId: z.string().describe("Unique, encoded ID of the Bitbucket snippet to comment on (typically part of the snippet's URL)."),
|
|
60
|
+
}),
|
|
61
|
+
execute: async ({ bitbucketToken, workspace, encodedId, content, parentId }) => {
|
|
62
|
+
const missing = requireToken(bitbucketToken);
|
|
63
|
+
if (missing)
|
|
64
|
+
return missing;
|
|
65
|
+
try {
|
|
66
|
+
const body = { content: { raw: content } };
|
|
67
|
+
if (parentId !== undefined)
|
|
68
|
+
body.parent = { id: parentId };
|
|
69
|
+
return await bbRequest(bitbucketToken, 'POST', `/snippets/${enc(workspace)}/${enc(encodedId)}/comments`, { body });
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
return toBbError(error, "Failed to create snippet comment");
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
export const bitbucketGetSnippetWatchStatus = tool({
|
|
77
|
+
description: "Checks if the current user is watching a specific snippet. Use when you need to verify watch status for a snippet.",
|
|
78
|
+
inputSchema: z.object({
|
|
79
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
80
|
+
workspace: z.string().describe("The workspace ID (slug) or the workspace UUID surrounded by curly braces, identifying the Bitbucket workspace."),
|
|
81
|
+
encodedId: z.string().describe("The unique identifier (encoded ID) of the snippet to check watch status for."),
|
|
82
|
+
}),
|
|
83
|
+
execute: async ({ bitbucketToken, workspace, encodedId }) => {
|
|
84
|
+
const missing = requireToken(bitbucketToken);
|
|
85
|
+
if (missing)
|
|
86
|
+
return missing;
|
|
87
|
+
try {
|
|
88
|
+
try {
|
|
89
|
+
await bbRequest(bitbucketToken, 'GET', `/snippets/${enc(workspace)}/${enc(encodedId)}/watch`);
|
|
90
|
+
return { is_watching: true };
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (error instanceof BitbucketApiError && error.status === 404)
|
|
94
|
+
return { is_watching: false };
|
|
95
|
+
return toBbError(error, 'Failed to get snippet watch status');
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
return toBbError(error, "Failed to get snippet watch status");
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
export const bitbucketDeleteSnippetWatch = tool({
|
|
104
|
+
description: "Stops watching a specific snippet. Use when you want to unsubscribe from notifications for a snippet.",
|
|
105
|
+
inputSchema: z.object({
|
|
106
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
107
|
+
workspace: z.string().describe("The workspace ID (slug) or the workspace UUID surrounded by curly braces, identifying the Bitbucket workspace."),
|
|
108
|
+
encodedId: z.string().describe("The unique identifier (encoded ID) of the snippet to stop watching."),
|
|
109
|
+
}),
|
|
110
|
+
execute: async ({ bitbucketToken, workspace, encodedId }) => {
|
|
111
|
+
const missing = requireToken(bitbucketToken);
|
|
112
|
+
if (missing)
|
|
113
|
+
return missing;
|
|
114
|
+
try {
|
|
115
|
+
return await bbRequest(bitbucketToken, 'DELETE', `/snippets/${enc(workspace)}/${enc(encodedId)}/watch`);
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
return toBbError(error, "Failed to delete snippet watch");
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
//# sourceMappingURL=snippets.js.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const bitbucketGetCurrentUser: import("ai").Tool<{
|
|
2
|
+
bitbucketToken?: string | undefined;
|
|
3
|
+
}, any>;
|
|
4
|
+
export declare const bitbucketGetUser: import("ai").Tool<{
|
|
5
|
+
selectedUser: string;
|
|
6
|
+
bitbucketToken?: string | undefined;
|
|
7
|
+
}, any>;
|
|
8
|
+
export declare const bitbucketGetUserEmails: import("ai").Tool<{
|
|
9
|
+
bitbucketToken?: string | undefined;
|
|
10
|
+
}, any>;
|
|
11
|
+
export declare const bitbucketGetUserEmailDetails: import("ai").Tool<{
|
|
12
|
+
email: string;
|
|
13
|
+
bitbucketToken?: string | undefined;
|
|
14
|
+
}, any>;
|
|
15
|
+
export declare const bitbucketListUserSshKeys: import("ai").Tool<{
|
|
16
|
+
username: string;
|
|
17
|
+
page?: number | undefined;
|
|
18
|
+
bitbucketToken?: string | undefined;
|
|
19
|
+
pagelen?: number | undefined;
|
|
20
|
+
}, any>;
|
|
21
|
+
export declare const bitbucketListUserRepositoryPermissions: import("ai").Tool<{
|
|
22
|
+
page?: number | undefined;
|
|
23
|
+
bitbucketToken?: string | undefined;
|
|
24
|
+
pagelen?: number | undefined;
|
|
25
|
+
}, any>;
|
|
26
|
+
export declare const bitbucketListUserWorkspacePermissions: import("ai").Tool<{
|
|
27
|
+
q?: string | undefined;
|
|
28
|
+
page?: number | undefined;
|
|
29
|
+
bitbucketToken?: string | undefined;
|
|
30
|
+
pagelen?: number | undefined;
|
|
31
|
+
}, any>;
|
|
32
|
+
export declare const bitbucketListUserWorkspaces: import("ai").Tool<{
|
|
33
|
+
q?: string | undefined;
|
|
34
|
+
bitbucketToken?: string | undefined;
|
|
35
|
+
}, any>;
|
|
36
|
+
export declare const bitbucketListWorkspaceMembers: import("ai").Tool<{
|
|
37
|
+
workspace: string;
|
|
38
|
+
page?: number | undefined;
|
|
39
|
+
bitbucketToken?: string | undefined;
|
|
40
|
+
pagelen?: number | undefined;
|
|
41
|
+
}, any>;
|
|
42
|
+
export declare const bitbucketListWorkspaceProjects: import("ai").Tool<{
|
|
43
|
+
workspace: string;
|
|
44
|
+
sort?: string | undefined;
|
|
45
|
+
q?: string | undefined;
|
|
46
|
+
page?: number | undefined;
|
|
47
|
+
bitbucketToken?: string | undefined;
|
|
48
|
+
pagelen?: number | undefined;
|
|
49
|
+
}, any>;
|
|
50
|
+
export declare const bitbucketGetWorkspace: import("ai").Tool<{
|
|
51
|
+
workspace: string;
|
|
52
|
+
bitbucketToken?: string | undefined;
|
|
53
|
+
}, any>;
|
|
54
|
+
export declare const bitbucketListWorkspaces: import("ai").Tool<{
|
|
55
|
+
sort?: string | undefined;
|
|
56
|
+
q?: string | undefined;
|
|
57
|
+
page?: number | undefined;
|
|
58
|
+
bitbucketToken?: string | undefined;
|
|
59
|
+
pagelen?: number | undefined;
|
|
60
|
+
}, any>;
|
|
61
|
+
export declare const bitbucketListHookEvents: import("ai").Tool<{
|
|
62
|
+
subjectType: "repository" | "workspace";
|
|
63
|
+
bitbucketToken?: string | undefined;
|
|
64
|
+
}, any>;
|
|
65
|
+
//# sourceMappingURL=users-workspaces.d.ts.map
|
|
@@ -0,0 +1,294 @@
|
|
|
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 bitbucketGetCurrentUser = tool({
|
|
6
|
+
description: "Tool to retrieve complete profile information for the currently authenticated Bitbucket user. Use when you need comprehensive user details including account_id, username, nickname, and other profile fields.",
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
9
|
+
}),
|
|
10
|
+
execute: async ({ bitbucketToken }) => {
|
|
11
|
+
const missing = requireToken(bitbucketToken);
|
|
12
|
+
if (missing)
|
|
13
|
+
return missing;
|
|
14
|
+
try {
|
|
15
|
+
return await bbRequest(bitbucketToken, 'GET', `/user`);
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
return toBbError(error, "Failed to get current user");
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
export const bitbucketGetUser = tool({
|
|
23
|
+
description: "Retrieves public profile information for a specific Bitbucket user by username or UUID. Use when you need to get user details like display name, avatar, creation date, and links to related resources.",
|
|
24
|
+
inputSchema: z.object({
|
|
25
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
26
|
+
selectedUser: z.string().describe("The username or UUID of the user to retrieve. Can be a username (e.g., 'john_doe') or a UUID enclosed in curly braces (e.g., '{4f3ecac3-c951-41d4-8a4c-95f40be978fc}')."),
|
|
27
|
+
}),
|
|
28
|
+
execute: async ({ bitbucketToken, selectedUser }) => {
|
|
29
|
+
const missing = requireToken(bitbucketToken);
|
|
30
|
+
if (missing)
|
|
31
|
+
return missing;
|
|
32
|
+
try {
|
|
33
|
+
return await bbRequest(bitbucketToken, 'GET', `/users/${enc(selectedUser)}`);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
return toBbError(error, "Failed to get user");
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
export const bitbucketGetUserEmails = tool({
|
|
41
|
+
description: "Returns all the authenticated user's email addresses, both confirmed and unconfirmed. Use when you need to retrieve all email addresses associated with the current user's account.",
|
|
42
|
+
inputSchema: z.object({
|
|
43
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
44
|
+
}),
|
|
45
|
+
execute: async ({ bitbucketToken }) => {
|
|
46
|
+
const missing = requireToken(bitbucketToken);
|
|
47
|
+
if (missing)
|
|
48
|
+
return missing;
|
|
49
|
+
try {
|
|
50
|
+
return await bbRequest(bitbucketToken, 'GET', `/user/emails`);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
return toBbError(error, "Failed to get user emails");
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
export const bitbucketGetUserEmailDetails = tool({
|
|
58
|
+
description: "Retrieves details about a specific email address for the authenticated user. Use when you need to check if an email is primary, confirmed, or verify email ownership.",
|
|
59
|
+
inputSchema: z.object({
|
|
60
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
61
|
+
email: z.string().describe("The email address to retrieve details for. Must be one of the authenticated user's email addresses."),
|
|
62
|
+
}),
|
|
63
|
+
execute: async ({ bitbucketToken, email }) => {
|
|
64
|
+
const missing = requireToken(bitbucketToken);
|
|
65
|
+
if (missing)
|
|
66
|
+
return missing;
|
|
67
|
+
try {
|
|
68
|
+
return await bbRequest(bitbucketToken, 'GET', `/user/emails/${enc(email)}`);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
return toBbError(error, "Failed to get user email details");
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
export const bitbucketListUserSshKeys = tool({
|
|
76
|
+
description: "Retrieves a paginated list of SSH keys for a specified Bitbucket user. Use when you need to view or audit SSH keys configured for a user account.",
|
|
77
|
+
inputSchema: z.object({
|
|
78
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
79
|
+
page: z.number().int().min(1).optional().describe("The page number for pagination. Starts at 1."),
|
|
80
|
+
pagelen: z.number().int().min(1).max(100).optional().describe("Number of SSH keys to return per page. Default is typically 10."),
|
|
81
|
+
username: z.string().describe("The username of the Bitbucket user to retrieve SSH keys for. This is the account username (slug), not the display name or UUID."),
|
|
82
|
+
}),
|
|
83
|
+
execute: async ({ bitbucketToken, username, page, pagelen }) => {
|
|
84
|
+
const missing = requireToken(bitbucketToken);
|
|
85
|
+
if (missing)
|
|
86
|
+
return missing;
|
|
87
|
+
try {
|
|
88
|
+
const query = {};
|
|
89
|
+
if (page !== undefined)
|
|
90
|
+
query["page"] = page;
|
|
91
|
+
if (pagelen !== undefined)
|
|
92
|
+
query["pagelen"] = pagelen;
|
|
93
|
+
return await bbRequest(bitbucketToken, 'GET', `/users/${enc(username)}/ssh-keys`, { query });
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
return toBbError(error, "Failed to list user ssh keys");
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
export const bitbucketListUserRepositoryPermissions = tool({
|
|
101
|
+
description: "Returns an object for each repository the caller has explicit access to, including their permission level. Use when you need to discover which repositories the authenticated user can access and their specific permissions.",
|
|
102
|
+
inputSchema: z.object({
|
|
103
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
104
|
+
page: z.number().int().min(1).optional().describe("Page number for paginated results. Used to retrieve a specific page in a multi-page result set. Page numbers start at 1."),
|
|
105
|
+
pagelen: z.number().int().min(1).optional().describe("Number of items to return per page for pagination. Controls the size of the paginated result set. Default is typically 10 if not specified."),
|
|
106
|
+
}),
|
|
107
|
+
execute: async ({ bitbucketToken, page, pagelen }) => {
|
|
108
|
+
const missing = requireToken(bitbucketToken);
|
|
109
|
+
if (missing)
|
|
110
|
+
return missing;
|
|
111
|
+
try {
|
|
112
|
+
const query = {};
|
|
113
|
+
if (page !== undefined)
|
|
114
|
+
query["page"] = page;
|
|
115
|
+
if (pagelen !== undefined)
|
|
116
|
+
query["pagelen"] = pagelen;
|
|
117
|
+
return await bbRequest(bitbucketToken, 'GET', `/user/permissions/repositories`, { query });
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
return toBbError(error, "Failed to list user repository permissions");
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
export const bitbucketListUserWorkspacePermissions = tool({
|
|
125
|
+
description: "Retrieves workspace memberships and permission levels for the authenticated user. Returns an object for each workspace the caller is a member of, along with their effective role (highest privilege level). Use when you need to determine which workspaces a user can access and their permission level in each.",
|
|
126
|
+
inputSchema: z.object({
|
|
127
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
128
|
+
q: z.string().optional().describe("Query string to filter results by workspace slug or permission level using Bitbucket's filtering syntax. Examples: q=workspace.slug=\"workspace1\" or q=permission=\"owner\". Supported fields: workspace.slug (workspace identifier), permission (permission level). Use exact match with = operator. String values must be enclosed in double quotes."),
|
|
129
|
+
page: z.number().int().optional().describe("Page number for pagination. Use this to navigate through multiple pages of results."),
|
|
130
|
+
pagelen: z.number().int().optional().describe("Number of items per page for pagination. Controls how many workspace permission objects are returned in a single response."),
|
|
131
|
+
}),
|
|
132
|
+
execute: async ({ bitbucketToken, q, page, pagelen }) => {
|
|
133
|
+
const missing = requireToken(bitbucketToken);
|
|
134
|
+
if (missing)
|
|
135
|
+
return missing;
|
|
136
|
+
try {
|
|
137
|
+
const query = {};
|
|
138
|
+
if (q !== undefined)
|
|
139
|
+
query["q"] = q;
|
|
140
|
+
if (page !== undefined)
|
|
141
|
+
query["page"] = page;
|
|
142
|
+
if (pagelen !== undefined)
|
|
143
|
+
query["pagelen"] = pagelen;
|
|
144
|
+
return await bbRequest(bitbucketToken, 'GET', `/user/permissions/workspaces`, { query });
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
return toBbError(error, "Failed to list user workspace permissions");
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
export const bitbucketListUserWorkspaces = tool({
|
|
152
|
+
description: "Tool to retrieve all workspaces accessible to the authenticated user. Use when you need to list workspaces the current user can access, optionally filtered by workspace slug or permission level.",
|
|
153
|
+
inputSchema: z.object({
|
|
154
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
155
|
+
q: z.string().optional().describe("Query string to filter workspaces by attributes such as workspace slug or permission level. Examples: 'workspace.slug=\"my-workspace\"' or 'permission=\"owner\"'. Follow Bitbucket's filtering syntax for complex queries."),
|
|
156
|
+
}),
|
|
157
|
+
execute: async ({ bitbucketToken, q }) => {
|
|
158
|
+
const missing = requireToken(bitbucketToken);
|
|
159
|
+
if (missing)
|
|
160
|
+
return missing;
|
|
161
|
+
try {
|
|
162
|
+
const query = {};
|
|
163
|
+
if (q !== undefined)
|
|
164
|
+
query["q"] = q;
|
|
165
|
+
return await bbRequest(bitbucketToken, 'GET', `/user/permissions/workspaces`, { query });
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
return toBbError(error, "Failed to list user workspaces");
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
export const bitbucketListWorkspaceMembers = tool({
|
|
173
|
+
description: "Lists all members of a specified Bitbucket workspace; the workspace must exist.",
|
|
174
|
+
inputSchema: z.object({
|
|
175
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
176
|
+
page: z.number().int().min(1).optional().describe("Page number of the results to retrieve. Defaults to 1 if not specified."),
|
|
177
|
+
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."),
|
|
178
|
+
workspace: z.string().describe("The workspace ID (UUID) or slug from which to list members. The slug is the user-friendly, URL-safe identifier for the workspace."),
|
|
179
|
+
}),
|
|
180
|
+
execute: async ({ bitbucketToken, workspace, page, pagelen }) => {
|
|
181
|
+
const missing = requireToken(bitbucketToken);
|
|
182
|
+
if (missing)
|
|
183
|
+
return missing;
|
|
184
|
+
try {
|
|
185
|
+
const query = {};
|
|
186
|
+
if (page !== undefined)
|
|
187
|
+
query["page"] = page;
|
|
188
|
+
if (pagelen !== undefined)
|
|
189
|
+
query["pagelen"] = pagelen;
|
|
190
|
+
return await bbRequest(bitbucketToken, 'GET', `/workspaces/${enc(workspace)}/members`, { query });
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
return toBbError(error, "Failed to list workspace members");
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
export const bitbucketListWorkspaceProjects = tool({
|
|
198
|
+
description: "Lists projects in a specified Bitbucket workspace. Use when you need to retrieve all projects belonging to a workspace.",
|
|
199
|
+
inputSchema: z.object({
|
|
200
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
201
|
+
q: z.string().optional().describe("Query string to filter projects by attributes, following Bitbucket's filtering syntax. Syntax: 'field operator value'. Operators: '=' (exact match), '~' (contains substring), '!=' (not equal). String values MUST be enclosed in double quotes. Valid project fields: 'name', 'key', 'is_private'. Combine multiple conditions with AND/OR (e.g., 'name~\"api\" AND is_private=true')."),
|
|
202
|
+
page: z.number().int().optional().describe("Specifies which page of results to return. Page numbering starts at 1."),
|
|
203
|
+
sort: z.string().optional().describe("Field to sort returned projects by; prefix with a hyphen (-) for descending order. Common sortable fields: 'name', 'key', 'created_on', 'updated_on'."),
|
|
204
|
+
pagelen: z.number().int().min(1).max(100).optional().describe("Controls the number of items per page. Must be between 1 and 100."),
|
|
205
|
+
workspace: z.string().describe("The identifier of the Bitbucket workspace. This can be the workspace slug (e.g., 'my-workspace') or its UUID enclosed in curly braces (e.g., '{workspace-uuid}')."),
|
|
206
|
+
}),
|
|
207
|
+
execute: async ({ bitbucketToken, workspace, q, page, sort, pagelen }) => {
|
|
208
|
+
const missing = requireToken(bitbucketToken);
|
|
209
|
+
if (missing)
|
|
210
|
+
return missing;
|
|
211
|
+
try {
|
|
212
|
+
const query = {};
|
|
213
|
+
if (q !== undefined)
|
|
214
|
+
query["q"] = q;
|
|
215
|
+
if (page !== undefined)
|
|
216
|
+
query["page"] = page;
|
|
217
|
+
if (sort !== undefined)
|
|
218
|
+
query["sort"] = sort;
|
|
219
|
+
if (pagelen !== undefined)
|
|
220
|
+
query["pagelen"] = pagelen;
|
|
221
|
+
return await bbRequest(bitbucketToken, 'GET', `/workspaces/${enc(workspace)}/projects`, { query });
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
return toBbError(error, "Failed to list workspace projects");
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
export const bitbucketGetWorkspace = tool({
|
|
229
|
+
description: "Retrieves detailed information about a specific Bitbucket workspace. Use when you need to get workspace metadata, settings, or details.",
|
|
230
|
+
inputSchema: z.object({
|
|
231
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
232
|
+
workspace: z.string().describe("The workspace ID (slug) or workspace UUID surrounded by curly-braces. Example: 'my-workspace' or '{workspace-uuid}'."),
|
|
233
|
+
}),
|
|
234
|
+
execute: async ({ bitbucketToken, workspace }) => {
|
|
235
|
+
const missing = requireToken(bitbucketToken);
|
|
236
|
+
if (missing)
|
|
237
|
+
return missing;
|
|
238
|
+
try {
|
|
239
|
+
return await bbRequest(bitbucketToken, 'GET', `/workspaces/${enc(workspace)}`);
|
|
240
|
+
}
|
|
241
|
+
catch (error) {
|
|
242
|
+
return toBbError(error, "Failed to get workspace");
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
export const bitbucketListWorkspaces = tool({
|
|
247
|
+
description: "Lists Bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted. Results are paginated; follow the `next` field in each response to retrieve subsequent pages until `next` is absent. When multiple workspaces are returned, verify the correct `slug` or UUID before passing to downstream tools.",
|
|
248
|
+
inputSchema: z.object({
|
|
249
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
250
|
+
q: z.string().optional().describe("Query string to filter workspaces by attributes, following Bitbucket's filtering syntax."),
|
|
251
|
+
page: z.number().int().min(1).optional().describe("Page number of the results to retrieve. Defaults to 1 if not specified."),
|
|
252
|
+
sort: z.string().optional().describe("Field to sort returned workspaces by; prefix with a hyphen (-) for descending order."),
|
|
253
|
+
pagelen: z.number().int().min(1).max(100).optional().describe("Number of results per page (1-100). Defaults to 10 if not specified."),
|
|
254
|
+
}),
|
|
255
|
+
execute: async ({ bitbucketToken, q, page, sort, pagelen }) => {
|
|
256
|
+
const missing = requireToken(bitbucketToken);
|
|
257
|
+
if (missing)
|
|
258
|
+
return missing;
|
|
259
|
+
try {
|
|
260
|
+
const query = {};
|
|
261
|
+
if (q !== undefined)
|
|
262
|
+
query["q"] = q;
|
|
263
|
+
if (page !== undefined)
|
|
264
|
+
query["page"] = page;
|
|
265
|
+
if (sort !== undefined)
|
|
266
|
+
query["sort"] = sort;
|
|
267
|
+
if (pagelen !== undefined)
|
|
268
|
+
query["pagelen"] = pagelen;
|
|
269
|
+
return await bbRequest(bitbucketToken, 'GET', `/workspaces`, { query });
|
|
270
|
+
}
|
|
271
|
+
catch (error) {
|
|
272
|
+
return toBbError(error, "Failed to list workspaces");
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
});
|
|
276
|
+
export const bitbucketListHookEvents = tool({
|
|
277
|
+
description: "Retrieves a paginated list of all valid webhook events for a specified entity type (repository or workspace). Use when you need to discover available webhook event types for subscription or webhook configuration.",
|
|
278
|
+
inputSchema: z.object({
|
|
279
|
+
bitbucketToken: z.string().optional().describe("Injected by system; do not provide"),
|
|
280
|
+
subjectType: z.enum(["repository", "workspace"]).describe("The type of entity for which to retrieve available webhook events. Use 'repository' for repository-level events or 'workspace' for workspace-level events. Note: team and user webhooks are deprecated; use workspace instead."),
|
|
281
|
+
}),
|
|
282
|
+
execute: async ({ bitbucketToken, subjectType }) => {
|
|
283
|
+
const missing = requireToken(bitbucketToken);
|
|
284
|
+
if (missing)
|
|
285
|
+
return missing;
|
|
286
|
+
try {
|
|
287
|
+
return await bbRequest(bitbucketToken, 'GET', `/hook_events/${enc(subjectType)}`);
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
return toBbError(error, "Failed to list hook events");
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
});
|
|
294
|
+
//# sourceMappingURL=users-workspaces.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const SVG = `<svg width="800px" height="800px" viewBox="0 -28.5 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
|
|
2
|
+
<g>
|
|
3
|
+
<path d="M216.856339,16.5966031 C200.285002,8.84328665 182.566144,3.2084988 164.041564,0 C161.766523,4.11318106 159.108624,9.64549908 157.276099,14.0464379 C137.583995,11.0849896 118.072967,11.0849896 98.7430163,14.0464379 C96.9108417,9.64549908 94.1925838,4.11318106 91.8971895,0 C73.3526068,3.2084988 55.6133949,8.86399117 39.0420583,16.6376612 C5.61752293,67.146514 -3.4433191,116.400813 1.08711069,164.955721 C23.2560196,181.510915 44.7403634,191.567697 65.8621325,198.148576 C71.0772151,190.971126 75.7283628,183.341335 79.7352139,175.300261 C72.104019,172.400575 64.7949724,168.822202 57.8887866,164.667963 C59.7209612,163.310589 61.5131304,161.891452 63.2445898,160.431257 C105.36741,180.133187 151.134928,180.133187 192.754523,160.431257 C194.506336,161.891452 196.298154,163.310589 198.110326,164.667963 C191.183787,168.842556 183.854737,172.420929 176.223542,175.320965 C180.230393,183.341335 184.861538,190.991831 190.096624,198.16893 C211.238746,191.588051 232.743023,181.531619 254.911949,164.955721 C260.227747,108.668201 245.831087,59.8662432 216.856339,16.5966031 Z M85.4738752,135.09489 C72.8290281,135.09489 62.4592217,123.290155 62.4592217,108.914901 C62.4592217,94.5396472 72.607595,82.7145587 85.4738752,82.7145587 C98.3405064,82.7145587 108.709962,94.5189427 108.488529,108.914901 C108.508531,123.290155 98.3405064,135.09489 85.4738752,135.09489 Z M170.525237,135.09489 C157.88039,135.09489 147.510584,123.290155 147.510584,108.914901 C147.510584,94.5396472 157.658606,82.7145587 170.525237,82.7145587 C183.391518,82.7145587 193.761324,94.5189427 193.539891,108.914901 C193.539891,123.290155 183.391518,135.09489 170.525237,135.09489 Z" fill="#5865F2" fill-rule="nonzero">
|
|
4
|
+
|
|
5
|
+
</path>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>`;
|
|
8
|
+
export const DISCORD_ICON = {
|
|
9
|
+
kind: 'svg',
|
|
10
|
+
dataUri: `data:image/svg+xml;base64,${Buffer.from(SVG).toString('base64')}`,
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineToolkit, defineTool } from '../../core/define.js';
|
|
2
|
+
import { inferToolScope } from '../../core/scope.js';
|
|
3
|
+
import { DISCORD_ICON } from './icon.js';
|
|
4
|
+
import { discordTools } from './tools/index.js';
|
|
5
|
+
export default defineToolkit({
|
|
6
|
+
id: 'discord',
|
|
7
|
+
displayName: 'Discord',
|
|
8
|
+
shortDescription: 'User identity, guilds, invites, apps, and entitlements.',
|
|
9
|
+
category: 'Collaboration & Communication',
|
|
10
|
+
icon: DISCORD_ICON,
|
|
11
|
+
auth: {
|
|
12
|
+
type: 'oauth2',
|
|
13
|
+
tokenField: 'discordToken',
|
|
14
|
+
provider: {
|
|
15
|
+
slug: 'discord',
|
|
16
|
+
env: { clientId: 'DISCORD_CLIENT_ID', clientSecret: 'DISCORD_CLIENT_SECRET' },
|
|
17
|
+
authorizeUrl: 'https://discord.com/oauth2/authorize',
|
|
18
|
+
tokenUrl: 'https://discord.com/api/oauth2/token',
|
|
19
|
+
scopes: [
|
|
20
|
+
'identify',
|
|
21
|
+
'email',
|
|
22
|
+
'openid',
|
|
23
|
+
'connections',
|
|
24
|
+
'guilds',
|
|
25
|
+
'guilds.members.read',
|
|
26
|
+
'applications.commands.permissions.update',
|
|
27
|
+
'role_connections.write',
|
|
28
|
+
'applications.entitlements',
|
|
29
|
+
],
|
|
30
|
+
scopeSeparator: ' ',
|
|
31
|
+
exchangeStyle: 'basic',
|
|
32
|
+
connectDescription: 'Connect Discord to read user identity, guilds, invites, and entitlements, and to manage application command permissions and role connections.',
|
|
33
|
+
callbackPath: '/api/auth/discord/callback',
|
|
34
|
+
stateCookie: 'discord_oauth_state',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
allowedHosts: ['discord.com', 'cdn.discord.com'],
|
|
38
|
+
tools: discordTools.map((entry) => defineTool({
|
|
39
|
+
name: entry.name,
|
|
40
|
+
description: entry.description,
|
|
41
|
+
tool: entry.tool,
|
|
42
|
+
requiredAuth: entry.requiredAuth,
|
|
43
|
+
scope: entry.scope ?? inferToolScope(entry.name),
|
|
44
|
+
})),
|
|
45
|
+
meta: {
|
|
46
|
+
since: '0.0.9',
|
|
47
|
+
homepage: 'https://discord.com',
|
|
48
|
+
docsUrl: 'https://docs.discord.com/developers/',
|
|
49
|
+
apiDocsUrl: 'https://docs.discord.com/developers/api-reference',
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=manifest.js.map
|