@opentabs-dev/opentabs-plugin-bitbucket 0.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/dist/adapter.iife.js +15383 -0
  2. package/dist/adapter.iife.js.map +7 -0
  3. package/dist/bitbucket-api.d.ts +12 -0
  4. package/dist/bitbucket-api.d.ts.map +1 -0
  5. package/dist/bitbucket-api.js +106 -0
  6. package/dist/bitbucket-api.js.map +1 -0
  7. package/dist/index.d.ts +14 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +88 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/tools/approve-pull-request.d.ts +9 -0
  12. package/dist/tools/approve-pull-request.d.ts.map +1 -0
  13. package/dist/tools/approve-pull-request.js +24 -0
  14. package/dist/tools/approve-pull-request.js.map +1 -0
  15. package/dist/tools/create-branch.d.ts +14 -0
  16. package/dist/tools/create-branch.d.ts.map +1 -0
  17. package/dist/tools/create-branch.js +27 -0
  18. package/dist/tools/create-branch.js.map +1 -0
  19. package/dist/tools/create-pr-comment.d.ts +14 -0
  20. package/dist/tools/create-pr-comment.d.ts.map +1 -0
  21. package/dist/tools/create-pr-comment.js +24 -0
  22. package/dist/tools/create-pr-comment.js.map +1 -0
  23. package/dist/tools/create-pull-request.d.ts +25 -0
  24. package/dist/tools/create-pull-request.d.ts.map +1 -0
  25. package/dist/tools/create-pull-request.js +48 -0
  26. package/dist/tools/create-pull-request.js.map +1 -0
  27. package/dist/tools/create-repository.d.ts +24 -0
  28. package/dist/tools/create-repository.d.ts.map +1 -0
  29. package/dist/tools/create-repository.js +40 -0
  30. package/dist/tools/create-repository.js.map +1 -0
  31. package/dist/tools/decline-pull-request.d.ts +20 -0
  32. package/dist/tools/decline-pull-request.d.ts.map +1 -0
  33. package/dist/tools/decline-pull-request.js +23 -0
  34. package/dist/tools/decline-pull-request.js.map +1 -0
  35. package/dist/tools/delete-branch.d.ts +9 -0
  36. package/dist/tools/delete-branch.d.ts.map +1 -0
  37. package/dist/tools/delete-branch.js +26 -0
  38. package/dist/tools/delete-branch.js.map +1 -0
  39. package/dist/tools/get-commit.d.ts +13 -0
  40. package/dist/tools/get-commit.d.ts.map +1 -0
  41. package/dist/tools/get-commit.js +23 -0
  42. package/dist/tools/get-commit.js.map +1 -0
  43. package/dist/tools/get-file-content.d.ts +11 -0
  44. package/dist/tools/get-file-content.d.ts.map +1 -0
  45. package/dist/tools/get-file-content.js +30 -0
  46. package/dist/tools/get-file-content.js.map +1 -0
  47. package/dist/tools/get-pipeline.d.ts +18 -0
  48. package/dist/tools/get-pipeline.d.ts.map +1 -0
  49. package/dist/tools/get-pipeline.js +23 -0
  50. package/dist/tools/get-pipeline.js.map +1 -0
  51. package/dist/tools/get-pull-request-diff.d.ts +9 -0
  52. package/dist/tools/get-pull-request-diff.d.ts.map +1 -0
  53. package/dist/tools/get-pull-request-diff.js +24 -0
  54. package/dist/tools/get-pull-request-diff.js.map +1 -0
  55. package/dist/tools/get-pull-request.d.ts +20 -0
  56. package/dist/tools/get-pull-request.d.ts.map +1 -0
  57. package/dist/tools/get-pull-request.js +23 -0
  58. package/dist/tools/get-pull-request.js.map +1 -0
  59. package/dist/tools/get-repository.d.ts +19 -0
  60. package/dist/tools/get-repository.d.ts.map +1 -0
  61. package/dist/tools/get-repository.js +22 -0
  62. package/dist/tools/get-repository.js.map +1 -0
  63. package/dist/tools/get-user-profile.d.ts +9 -0
  64. package/dist/tools/get-user-profile.d.ts.map +1 -0
  65. package/dist/tools/get-user-profile.js +19 -0
  66. package/dist/tools/get-user-profile.js.map +1 -0
  67. package/dist/tools/list-branches.d.ts +17 -0
  68. package/dist/tools/list-branches.d.ts.map +1 -0
  69. package/dist/tools/list-branches.js +32 -0
  70. package/dist/tools/list-branches.js.map +1 -0
  71. package/dist/tools/list-commits.d.ts +17 -0
  72. package/dist/tools/list-commits.d.ts.map +1 -0
  73. package/dist/tools/list-commits.js +34 -0
  74. package/dist/tools/list-commits.js.map +1 -0
  75. package/dist/tools/list-pipeline-steps.d.ts +19 -0
  76. package/dist/tools/list-pipeline-steps.d.ts.map +1 -0
  77. package/dist/tools/list-pipeline-steps.js +31 -0
  78. package/dist/tools/list-pipeline-steps.js.map +1 -0
  79. package/dist/tools/list-pipelines.d.ts +22 -0
  80. package/dist/tools/list-pipelines.d.ts.map +1 -0
  81. package/dist/tools/list-pipelines.js +32 -0
  82. package/dist/tools/list-pipelines.js.map +1 -0
  83. package/dist/tools/list-pr-comments.d.ts +17 -0
  84. package/dist/tools/list-pr-comments.d.ts.map +1 -0
  85. package/dist/tools/list-pr-comments.js +31 -0
  86. package/dist/tools/list-pr-comments.js.map +1 -0
  87. package/dist/tools/list-pull-requests.d.ts +29 -0
  88. package/dist/tools/list-pull-requests.d.ts.map +1 -0
  89. package/dist/tools/list-pull-requests.js +37 -0
  90. package/dist/tools/list-pull-requests.js.map +1 -0
  91. package/dist/tools/list-repositories.d.ts +23 -0
  92. package/dist/tools/list-repositories.d.ts.map +1 -0
  93. package/dist/tools/list-repositories.js +31 -0
  94. package/dist/tools/list-repositories.js.map +1 -0
  95. package/dist/tools/list-tags.d.ts +15 -0
  96. package/dist/tools/list-tags.d.ts.map +1 -0
  97. package/dist/tools/list-tags.js +32 -0
  98. package/dist/tools/list-tags.js.map +1 -0
  99. package/dist/tools/list-workspace-members.d.ts +14 -0
  100. package/dist/tools/list-workspace-members.d.ts.map +1 -0
  101. package/dist/tools/list-workspace-members.js +29 -0
  102. package/dist/tools/list-workspace-members.js.map +1 -0
  103. package/dist/tools/list-workspaces.d.ts +13 -0
  104. package/dist/tools/list-workspaces.d.ts.map +1 -0
  105. package/dist/tools/list-workspaces.js +28 -0
  106. package/dist/tools/list-workspaces.js.map +1 -0
  107. package/dist/tools/merge-pull-request.d.ts +27 -0
  108. package/dist/tools/merge-pull-request.d.ts.map +1 -0
  109. package/dist/tools/merge-pull-request.js +36 -0
  110. package/dist/tools/merge-pull-request.js.map +1 -0
  111. package/dist/tools/schemas.d.ts +343 -0
  112. package/dist/tools/schemas.d.ts.map +1 -0
  113. package/dist/tools/schemas.js +193 -0
  114. package/dist/tools/schemas.js.map +1 -0
  115. package/dist/tools/search-code.d.ts +16 -0
  116. package/dist/tools/search-code.d.ts.map +1 -0
  117. package/dist/tools/search-code.js +55 -0
  118. package/dist/tools/search-code.js.map +1 -0
  119. package/dist/tools/update-pull-request.d.ts +25 -0
  120. package/dist/tools/update-pull-request.d.ts.map +1 -0
  121. package/dist/tools/update-pull-request.js +41 -0
  122. package/dist/tools/update-pull-request.js.map +1 -0
  123. package/dist/tools.json +2383 -0
  124. package/package.json +55 -0
@@ -0,0 +1,26 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ export const deleteBranch = defineTool({
5
+ name: 'delete_branch',
6
+ displayName: 'Delete Branch',
7
+ description: 'Delete a branch from a Bitbucket repository. This action cannot be undone.',
8
+ summary: 'Delete a branch',
9
+ icon: 'trash',
10
+ group: 'Branches & Tags',
11
+ input: z.object({
12
+ workspace: z.string().describe('Workspace slug or UUID'),
13
+ repo_slug: z.string().describe('Repository slug'),
14
+ name: z.string().describe('Branch name to delete'),
15
+ }),
16
+ output: z.object({
17
+ deleted: z.boolean().describe('Whether the branch was deleted'),
18
+ }),
19
+ handle: async (params) => {
20
+ await api(`/repositories/${params.workspace}/${params.repo_slug}/refs/branches/${params.name}`, {
21
+ method: 'DELETE',
22
+ });
23
+ return { deleted: true };
24
+ },
25
+ });
26
+ //# sourceMappingURL=delete-branch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-branch.js","sourceRoot":"","sources":["../../src/tools/delete-branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAE1C,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,4EAA4E;IACzF,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;KACnD,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;KAChE,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,GAAG,CAAC,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,kBAAkB,MAAM,CAAC,IAAI,EAAE,EAAE;YAC9F,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const getCommit: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ commit_hash: z.ZodString;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ hash: z.ZodString;
8
+ message: z.ZodString;
9
+ author_raw: z.ZodString;
10
+ date: z.ZodString;
11
+ web_url: z.ZodString;
12
+ }, z.core.$strip>>;
13
+ //# sourceMappingURL=get-commit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-commit.d.ts","sourceRoot":"","sources":["../../src/tools/get-commit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,SAAS;;;;;;;;;;kBAmBpB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ import { commitSchema, mapCommit } from './schemas.js';
5
+ export const getCommit = defineTool({
6
+ name: 'get_commit',
7
+ displayName: 'Get Commit',
8
+ description: 'Get detailed information about a specific commit.',
9
+ summary: 'Get commit details',
10
+ icon: 'git-commit',
11
+ group: 'Commits',
12
+ input: z.object({
13
+ workspace: z.string().describe('Workspace slug or UUID'),
14
+ repo_slug: z.string().describe('Repository slug'),
15
+ commit_hash: z.string().describe('Full or short commit SHA'),
16
+ }),
17
+ output: commitSchema,
18
+ handle: async (params) => {
19
+ const data = await api(`/repositories/${params.workspace}/${params.repo_slug}/commit/${params.commit_hash}`);
20
+ return mapCommit(data);
21
+ },
22
+ });
23
+ //# sourceMappingURL=get-commit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-commit.js","sourceRoot":"","sources":["../../src/tools/get-commit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;IAClC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,mDAAmD;IAChE,OAAO,EAAE,oBAAoB;IAC7B,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;KAC7D,CAAC;IACF,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,GAAG,CACpB,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,WAAW,MAAM,CAAC,WAAW,EAAE,CACrF,CAAC;QACF,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const getFileContent: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ path: z.ZodString;
6
+ ref: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>, z.ZodObject<{
8
+ content: z.ZodString;
9
+ path: z.ZodString;
10
+ }, z.core.$strip>>;
11
+ //# sourceMappingURL=get-file-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-file-content.d.ts","sourceRoot":"","sources":["../../src/tools/get-file-content.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc;;;;;;;;kBAyBzB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { apiRaw } from '../bitbucket-api.js';
4
+ export const getFileContent = defineTool({
5
+ name: 'get_file_content',
6
+ displayName: 'Get File Content',
7
+ description: 'Read the raw content of a file from a Bitbucket repository at a given branch, tag, or commit.',
8
+ summary: 'Read a file from a repository',
9
+ icon: 'file-text',
10
+ group: 'Source',
11
+ input: z.object({
12
+ workspace: z.string().describe('Workspace slug or UUID'),
13
+ repo_slug: z.string().describe('Repository slug'),
14
+ path: z.string().describe('File path relative to repository root'),
15
+ ref: z
16
+ .string()
17
+ .optional()
18
+ .describe('Branch name, tag, or commit SHA — defaults to the default branch. If not provided, uses "main"'),
19
+ }),
20
+ output: z.object({
21
+ content: z.string().describe('Raw file content'),
22
+ path: z.string().describe('File path'),
23
+ }),
24
+ handle: async (params) => {
25
+ const ref = params.ref ?? 'main';
26
+ const content = await apiRaw(`/repositories/${params.workspace}/${params.repo_slug}/src/${ref}/${params.path}`);
27
+ return { content, path: params.path };
28
+ },
29
+ });
30
+ //# sourceMappingURL=get-file-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-file-content.js","sourceRoot":"","sources":["../../src/tools/get-file-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,+FAA+F;IAC5G,OAAO,EAAE,+BAA+B;IACxC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;QAClE,GAAG,EAAE,CAAC;aACH,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,gGAAgG,CAAC;KAC9G,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QAChD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;KACvC,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC;QACjC,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,QAAQ,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAChH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IACxC,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const getPipeline: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ pipeline_uuid: z.ZodString;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ build_number: z.ZodNumber;
9
+ state_name: z.ZodString;
10
+ result_name: z.ZodString;
11
+ target_branch: z.ZodString;
12
+ target_hash: z.ZodString;
13
+ creator: z.ZodString;
14
+ duration_seconds: z.ZodNumber;
15
+ created_on: z.ZodString;
16
+ completed_on: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ //# sourceMappingURL=get-pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pipeline.d.ts","sourceRoot":"","sources":["../../src/tools/get-pipeline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;kBAmBtB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ import { pipelineSchema, mapPipeline } from './schemas.js';
5
+ export const getPipeline = defineTool({
6
+ name: 'get_pipeline',
7
+ displayName: 'Get Pipeline',
8
+ description: 'Get detailed information about a specific pipeline run.',
9
+ summary: 'Get pipeline details',
10
+ icon: 'play',
11
+ group: 'Pipelines',
12
+ input: z.object({
13
+ workspace: z.string().describe('Workspace slug or UUID'),
14
+ repo_slug: z.string().describe('Repository slug'),
15
+ pipeline_uuid: z.string().describe('Pipeline UUID'),
16
+ }),
17
+ output: pipelineSchema,
18
+ handle: async (params) => {
19
+ const data = await api(`/repositories/${params.workspace}/${params.repo_slug}/pipelines/${params.pipeline_uuid}`);
20
+ return mapPipeline(data);
21
+ },
22
+ });
23
+ //# sourceMappingURL=get-pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pipeline.js","sourceRoot":"","sources":["../../src/tools/get-pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAoB,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE7E,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IACpC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,yDAAyD;IACtE,OAAO,EAAE,sBAAsB;IAC/B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;KACpD,CAAC;IACF,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,GAAG,CACpB,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,cAAc,MAAM,CAAC,aAAa,EAAE,CAC1F,CAAC;QACF,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const getPullRequestDiff: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ pull_request_id: z.ZodNumber;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ diff: z.ZodString;
8
+ }, z.core.$strip>>;
9
+ //# sourceMappingURL=get-pull-request-diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pull-request-diff.d.ts","sourceRoot":"","sources":["../../src/tools/get-pull-request-diff.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;kBAqB7B,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { apiRaw } from '../bitbucket-api.js';
4
+ export const getPullRequestDiff = defineTool({
5
+ name: 'get_pull_request_diff',
6
+ displayName: 'Get Pull Request Diff',
7
+ description: 'Get the unified diff of all changed files in a pull request.',
8
+ summary: 'Get pull request diff',
9
+ icon: 'file-diff',
10
+ group: 'Pull Requests',
11
+ input: z.object({
12
+ workspace: z.string().describe('Workspace slug or UUID'),
13
+ repo_slug: z.string().describe('Repository slug'),
14
+ pull_request_id: z.number().int().describe('Pull request ID'),
15
+ }),
16
+ output: z.object({
17
+ diff: z.string().describe('Unified diff text for all changed files'),
18
+ }),
19
+ handle: async (params) => {
20
+ const diff = await apiRaw(`/repositories/${params.workspace}/${params.repo_slug}/pullrequests/${params.pull_request_id}/diff`);
21
+ return { diff };
22
+ },
23
+ });
24
+ //# sourceMappingURL=get-pull-request-diff.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pull-request-diff.js","sourceRoot":"","sources":["../../src/tools/get-pull-request-diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,8DAA8D;IAC3E,OAAO,EAAE,uBAAuB;IAChC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;KAC9D,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;KACrE,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,MAAM,CACvB,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,iBAAiB,MAAM,CAAC,eAAe,OAAO,CACpG,CAAC;QACF,OAAO,EAAE,IAAI,EAAE,CAAC;IAClB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export declare const getPullRequest: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ pull_request_id: z.ZodNumber;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ id: z.ZodNumber;
8
+ title: z.ZodString;
9
+ description: z.ZodString;
10
+ state: z.ZodString;
11
+ source_branch: z.ZodString;
12
+ destination_branch: z.ZodString;
13
+ author: z.ZodString;
14
+ close_source_branch: z.ZodBoolean;
15
+ comment_count: z.ZodNumber;
16
+ web_url: z.ZodString;
17
+ created_on: z.ZodString;
18
+ updated_on: z.ZodString;
19
+ }, z.core.$strip>>;
20
+ //# sourceMappingURL=get-pull-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pull-request.d.ts","sourceRoot":"","sources":["../../src/tools/get-pull-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;kBAmBzB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ import { pullRequestSchema, mapPullRequest } from './schemas.js';
5
+ export const getPullRequest = defineTool({
6
+ name: 'get_pull_request',
7
+ displayName: 'Get Pull Request',
8
+ description: 'Get detailed information about a specific pull request.',
9
+ summary: 'Get pull request details',
10
+ icon: 'git-pull-request',
11
+ group: 'Pull Requests',
12
+ input: z.object({
13
+ workspace: z.string().describe('Workspace slug or UUID'),
14
+ repo_slug: z.string().describe('Repository slug'),
15
+ pull_request_id: z.number().int().describe('Pull request ID'),
16
+ }),
17
+ output: pullRequestSchema,
18
+ handle: async (params) => {
19
+ const data = await api(`/repositories/${params.workspace}/${params.repo_slug}/pullrequests/${params.pull_request_id}`);
20
+ return mapPullRequest(data);
21
+ },
22
+ });
23
+ //# sourceMappingURL=get-pull-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-pull-request.js","sourceRoot":"","sources":["../../src/tools/get-pull-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAc,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE7E,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,yDAAyD;IACtE,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;KAC9D,CAAC;IACF,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,GAAG,CACpB,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,iBAAiB,MAAM,CAAC,eAAe,EAAE,CAC/F,CAAC;QACF,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ export declare const getRepository: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ }, z.core.$strip>, z.ZodObject<{
6
+ uuid: z.ZodString;
7
+ slug: z.ZodString;
8
+ full_name: z.ZodString;
9
+ name: z.ZodString;
10
+ description: z.ZodString;
11
+ is_private: z.ZodBoolean;
12
+ scm: z.ZodString;
13
+ language: z.ZodString;
14
+ default_branch: z.ZodString;
15
+ web_url: z.ZodString;
16
+ created_on: z.ZodString;
17
+ updated_on: z.ZodString;
18
+ }, z.core.$strip>>;
19
+ //# sourceMappingURL=get-repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-repository.d.ts","sourceRoot":"","sources":["../../src/tools/get-repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;kBAgBxB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ import { repositorySchema, mapRepository } from './schemas.js';
5
+ export const getRepository = defineTool({
6
+ name: 'get_repository',
7
+ displayName: 'Get Repository',
8
+ description: 'Get detailed information about a specific Bitbucket repository.',
9
+ summary: 'Get repository details',
10
+ icon: 'book',
11
+ group: 'Repositories',
12
+ input: z.object({
13
+ workspace: z.string().describe('Workspace slug or UUID'),
14
+ repo_slug: z.string().describe('Repository slug'),
15
+ }),
16
+ output: repositorySchema,
17
+ handle: async (params) => {
18
+ const data = await api(`/repositories/${params.workspace}/${params.repo_slug}`);
19
+ return mapRepository(data);
20
+ },
21
+ });
22
+ //# sourceMappingURL=get-repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-repository.js","sourceRoot":"","sources":["../../src/tools/get-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAgB,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7E,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACtC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,iEAAiE;IAC9E,OAAO,EAAE,wBAAwB;IACjC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;KAClD,CAAC;IACF,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,GAAG,CAAU,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;QACzF,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const getUserProfile: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
3
+ uuid: z.ZodString;
4
+ username: z.ZodString;
5
+ display_name: z.ZodString;
6
+ type: z.ZodString;
7
+ web_url: z.ZodString;
8
+ }, z.core.$strip>>;
9
+ //# sourceMappingURL=get-user-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-user-profile.d.ts","sourceRoot":"","sources":["../../src/tools/get-user-profile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,cAAc;;;;;;kBAazB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ import { userSchema, mapUser } from './schemas.js';
5
+ export const getUserProfile = defineTool({
6
+ name: 'get_user_profile',
7
+ displayName: 'Get User Profile',
8
+ description: 'Get the profile of the currently authenticated Bitbucket user.',
9
+ summary: 'Get current user profile',
10
+ icon: 'user',
11
+ group: 'Users',
12
+ input: z.object({}),
13
+ output: userSchema,
14
+ handle: async () => {
15
+ const data = await api('/user');
16
+ return mapUser(data);
17
+ },
18
+ });
19
+ //# sourceMappingURL=get-user-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-user-profile.js","sourceRoot":"","sources":["../../src/tools/get-user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAgB,UAAU,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEjE,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,gEAAgE;IAC7E,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,GAAG,CAAU,OAAO,CAAC,CAAC;QACzC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const listBranches: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ page: z.ZodOptional<z.ZodNumber>;
6
+ pagelen: z.ZodOptional<z.ZodNumber>;
7
+ query: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ branches: z.ZodArray<z.ZodObject<{
10
+ name: z.ZodString;
11
+ target_hash: z.ZodString;
12
+ target_date: z.ZodString;
13
+ target_message: z.ZodString;
14
+ target_author: z.ZodString;
15
+ }, z.core.$strip>>;
16
+ }, z.core.$strip>>;
17
+ //# sourceMappingURL=list-branches.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-branches.d.ts","sourceRoot":"","sources":["../../src/tools/list-branches.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;kBA6BvB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ import { branchSchema, mapBranch } from './schemas.js';
5
+ export const listBranches = defineTool({
6
+ name: 'list_branches',
7
+ displayName: 'List Branches',
8
+ description: 'List branches in a Bitbucket repository. Supports pagination and filtering.',
9
+ summary: 'List repository branches',
10
+ icon: 'git-branch',
11
+ group: 'Branches & Tags',
12
+ input: z.object({
13
+ workspace: z.string().describe('Workspace slug or UUID'),
14
+ repo_slug: z.string().describe('Repository slug'),
15
+ page: z.number().int().optional().describe('Page number for pagination (default 1)'),
16
+ pagelen: z.number().int().optional().describe('Number of results per page (default 25, max 100)'),
17
+ query: z.string().optional().describe('Filter branches by name (Bitbucket query language)'),
18
+ }),
19
+ output: z.object({
20
+ branches: z.array(branchSchema).describe('Array of branches'),
21
+ }),
22
+ handle: async (params) => {
23
+ const query = {
24
+ page: params.page,
25
+ pagelen: params.pagelen,
26
+ q: params.query,
27
+ };
28
+ const data = await api(`/repositories/${params.workspace}/${params.repo_slug}/refs/branches`, { query });
29
+ return { branches: (data.values ?? []).map(mapBranch) };
30
+ },
31
+ });
32
+ //# sourceMappingURL=list-branches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-branches.js","sourceRoot":"","sources":["../../src/tools/list-branches.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,6EAA6E;IAC1F,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;QACpF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;QACjG,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;KAC5F,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;KAC9D,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,KAAK,GAAgD;YACzD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,CAAC,EAAE,MAAM,CAAC,KAAK;SAChB,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,GAAG,CACpB,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,gBAAgB,EACrE,EAAE,KAAK,EAAE,CACV,CAAC;QACF,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;IAC1D,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const listCommits: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ page: z.ZodOptional<z.ZodNumber>;
6
+ pagelen: z.ZodOptional<z.ZodNumber>;
7
+ branch: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ commits: z.ZodArray<z.ZodObject<{
10
+ hash: z.ZodString;
11
+ message: z.ZodString;
12
+ author_raw: z.ZodString;
13
+ date: z.ZodString;
14
+ web_url: z.ZodString;
15
+ }, z.core.$strip>>;
16
+ }, z.core.$strip>>;
17
+ //# sourceMappingURL=list-commits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-commits.d.ts","sourceRoot":"","sources":["../../src/tools/list-commits.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;kBA4BtB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ import { commitSchema, mapCommit } from './schemas.js';
5
+ export const listCommits = defineTool({
6
+ name: 'list_commits',
7
+ displayName: 'List Commits',
8
+ description: 'List commits in a Bitbucket repository. Optionally filter by branch or tag name. Supports pagination.',
9
+ summary: 'List repository commits',
10
+ icon: 'git-commit',
11
+ group: 'Commits',
12
+ input: z.object({
13
+ workspace: z.string().describe('Workspace slug or UUID'),
14
+ repo_slug: z.string().describe('Repository slug'),
15
+ page: z.number().int().optional().describe('Page number for pagination (default 1)'),
16
+ pagelen: z.number().int().optional().describe('Number of results per page (default 25, max 100)'),
17
+ branch: z.string().optional().describe('Branch or tag name to filter commits by — pass as the include query param'),
18
+ }),
19
+ output: z.object({
20
+ commits: z.array(commitSchema).describe('Array of commits'),
21
+ }),
22
+ handle: async (params) => {
23
+ const query = {
24
+ page: params.page,
25
+ pagelen: params.pagelen,
26
+ include: params.branch,
27
+ };
28
+ const data = await api(`/repositories/${params.workspace}/${params.repo_slug}/commits`, {
29
+ query,
30
+ });
31
+ return { commits: (data.values ?? []).map(mapCommit) };
32
+ },
33
+ });
34
+ //# sourceMappingURL=list-commits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-commits.js","sourceRoot":"","sources":["../../src/tools/list-commits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IACpC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,uGAAuG;IACpH,OAAO,EAAE,yBAAyB;IAClC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;QACpF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;QACjG,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2EAA2E,CAAC;KACpH,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;KAC5D,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,KAAK,GAAgD;YACzD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,OAAO,EAAE,MAAM,CAAC,MAAM;SACvB,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,GAAG,CAA0B,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,UAAU,EAAE;YAC/G,KAAK;SACN,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;IACzD,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ export declare const listPipelineSteps: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ pipeline_uuid: z.ZodString;
6
+ page: z.ZodOptional<z.ZodNumber>;
7
+ pagelen: z.ZodOptional<z.ZodNumber>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ steps: z.ZodArray<z.ZodObject<{
10
+ uuid: z.ZodString;
11
+ name: z.ZodString;
12
+ state_name: z.ZodString;
13
+ result_name: z.ZodString;
14
+ duration_seconds: z.ZodNumber;
15
+ started_on: z.ZodString;
16
+ completed_on: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strip>>;
19
+ //# sourceMappingURL=list-pipeline-steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-pipeline-steps.d.ts","sourceRoot":"","sources":["../../src/tools/list-pipeline-steps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;kBA4B5B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ import { pipelineStepSchema, mapPipelineStep } from './schemas.js';
5
+ export const listPipelineSteps = defineTool({
6
+ name: 'list_pipeline_steps',
7
+ displayName: 'List Pipeline Steps',
8
+ description: 'List steps for a specific pipeline run. Supports pagination.',
9
+ summary: 'List pipeline steps',
10
+ icon: 'list',
11
+ group: 'Pipelines',
12
+ input: z.object({
13
+ workspace: z.string().describe('Workspace slug or UUID'),
14
+ repo_slug: z.string().describe('Repository slug'),
15
+ pipeline_uuid: z.string().describe('Pipeline UUID'),
16
+ page: z.number().int().optional().describe('Page number for pagination (default 1)'),
17
+ pagelen: z.number().int().optional().describe('Number of results per page (default 25, max 100)'),
18
+ }),
19
+ output: z.object({
20
+ steps: z.array(pipelineStepSchema).describe('Array of pipeline steps'),
21
+ }),
22
+ handle: async (params) => {
23
+ const query = {
24
+ page: params.page,
25
+ pagelen: params.pagelen,
26
+ };
27
+ const data = await api(`/repositories/${params.workspace}/${params.repo_slug}/pipelines/${params.pipeline_uuid}/steps/`, { query });
28
+ return { steps: (data.values ?? []).map(mapPipelineStep) };
29
+ },
30
+ });
31
+ //# sourceMappingURL=list-pipeline-steps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-pipeline-steps.js","sourceRoot":"","sources":["../../src/tools/list-pipeline-steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAwB,kBAAkB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEzF,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;IAC1C,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,8DAA8D;IAC3E,OAAO,EAAE,qBAAqB;IAC9B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACjD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;QACnD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;QACpF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;KAClG,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;KACvE,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,KAAK,GAAgD;YACzD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC;QACF,MAAM,IAAI,GAAG,MAAM,GAAG,CACpB,iBAAiB,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,cAAc,MAAM,CAAC,aAAa,SAAS,EAChG,EAAE,KAAK,EAAE,CACV,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;IAC7D,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ export declare const listPipelines: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ workspace: z.ZodString;
4
+ repo_slug: z.ZodString;
5
+ page: z.ZodOptional<z.ZodNumber>;
6
+ pagelen: z.ZodOptional<z.ZodNumber>;
7
+ sort: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ pipelines: z.ZodArray<z.ZodObject<{
10
+ uuid: z.ZodString;
11
+ build_number: z.ZodNumber;
12
+ state_name: z.ZodString;
13
+ result_name: z.ZodString;
14
+ target_branch: z.ZodString;
15
+ target_hash: z.ZodString;
16
+ creator: z.ZodString;
17
+ duration_seconds: z.ZodNumber;
18
+ created_on: z.ZodString;
19
+ completed_on: z.ZodString;
20
+ }, z.core.$strip>>;
21
+ }, z.core.$strip>>;
22
+ //# sourceMappingURL=list-pipelines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-pipelines.d.ts","sourceRoot":"","sources":["../../src/tools/list-pipelines.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;kBA6BxB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
2
+ import { z } from 'zod';
3
+ import { api } from '../bitbucket-api.js';
4
+ import { pipelineSchema, mapPipeline } from './schemas.js';
5
+ export const listPipelines = defineTool({
6
+ name: 'list_pipelines',
7
+ displayName: 'List Pipelines',
8
+ description: 'List CI/CD pipelines for a Bitbucket repository. Supports pagination and sorting.',
9
+ summary: 'List repository pipelines',
10
+ icon: 'play',
11
+ group: 'Pipelines',
12
+ input: z.object({
13
+ workspace: z.string().describe('Workspace slug or UUID'),
14
+ repo_slug: z.string().describe('Repository slug'),
15
+ page: z.number().int().optional().describe('Page number for pagination (default 1)'),
16
+ pagelen: z.number().int().optional().describe('Number of results per page (default 25, max 100)'),
17
+ sort: z.string().optional().describe('Sort field (e.g., "-created_on" for newest first)'),
18
+ }),
19
+ output: z.object({
20
+ pipelines: z.array(pipelineSchema).describe('Array of pipelines'),
21
+ }),
22
+ handle: async (params) => {
23
+ const query = {
24
+ page: params.page,
25
+ pagelen: params.pagelen,
26
+ sort: params.sort,
27
+ };
28
+ const data = await api(`/repositories/${params.workspace}/${params.repo_slug}/pipelines/`, { query });
29
+ return { pipelines: (data.values ?? []).map(mapPipeline) };
30
+ },
31
+ });
32
+ //# sourceMappingURL=list-pipelines.js.map