@lexmata/bitbucket-mcp 1.0.0
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/LICENSE +21 -0
- package/README.md +281 -0
- package/dist/api/branches.js +27 -0
- package/dist/api/branches.js.map +1 -0
- package/dist/api/client.js +88 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/commits.js +32 -0
- package/dist/api/commits.js.map +1 -0
- package/dist/api/issues.js +51 -0
- package/dist/api/issues.js.map +1 -0
- package/dist/api/pipelines.js +34 -0
- package/dist/api/pipelines.js.map +1 -0
- package/dist/api/pullrequests.js +91 -0
- package/dist/api/pullrequests.js.map +1 -0
- package/dist/api/repositories.js +36 -0
- package/dist/api/repositories.js.map +1 -0
- package/dist/api/search.js +15 -0
- package/dist/api/search.js.map +1 -0
- package/dist/auth/oauth.js +104 -0
- package/dist/auth/oauth.js.map +1 -0
- package/dist/index.js +103 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/index.js +122 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/tools/index.js +1698 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/tools/index.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { BitbucketClient } from '../api/client.js';\nimport { RepositoriesAPI } from '../api/repositories.js';\nimport { PullRequestsAPI } from '../api/pullrequests.js';\nimport { BranchesAPI } from '../api/branches.js';\nimport { CommitsAPI } from '../api/commits.js';\nimport { IssuesAPI } from '../api/issues.js';\nimport { PipelinesAPI } from '../api/pipelines.js';\nimport { SearchAPI } from '../api/search.js';\n\n// Tool schemas\nexport const toolSchemas = {\n // Repository tools\n list_repositories: z.object({\n workspace: z.string().describe('The workspace slug'),\n role: z.enum(['owner', 'admin', 'contributor', 'member']).optional().describe('Filter by role'),\n q: z.string().optional().describe('Query string for filtering'),\n sort: z.string().optional().describe('Sort field (e.g., \"-updated_on\")'),\n page: z.number().optional().describe('Page number'),\n pagelen: z.number().optional().describe('Results per page (max 100)'),\n }),\n\n get_repository: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n }),\n\n create_repository: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n name: z.string().optional().describe('Repository name'),\n description: z.string().optional().describe('Repository description'),\n is_private: z.boolean().optional().describe('Whether the repository is private'),\n language: z.string().optional().describe('Primary language'),\n has_issues: z.boolean().optional().describe('Enable issue tracker'),\n has_wiki: z.boolean().optional().describe('Enable wiki'),\n project_key: z.string().optional().describe('Project key to add repo to'),\n }),\n\n delete_repository: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n }),\n\n list_repository_forks: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n page: z.number().optional().describe('Page number'),\n pagelen: z.number().optional().describe('Results per page'),\n }),\n\n // Pull request tools\n list_pull_requests: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n state: z\n .enum(['OPEN', 'MERGED', 'DECLINED', 'SUPERSEDED'])\n .optional()\n .describe('Filter by state'),\n page: z.number().optional().describe('Page number'),\n pagelen: z.number().optional().describe('Results per page'),\n }),\n\n get_pull_request: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pr_id: z.number().describe('The pull request ID'),\n }),\n\n create_pull_request: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n title: z.string().describe('Pull request title'),\n source_branch: z.string().describe('Source branch name'),\n destination_branch: z\n .string()\n .optional()\n .describe('Destination branch (defaults to main branch)'),\n description: z.string().optional().describe('Pull request description'),\n close_source_branch: z.boolean().optional().describe('Close source branch after merge'),\n reviewers: z.array(z.string()).optional().describe('List of reviewer UUIDs'),\n }),\n\n update_pull_request: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pr_id: z.number().describe('The pull request ID'),\n title: z.string().optional().describe('New title'),\n description: z.string().optional().describe('New description'),\n destination_branch: z.string().optional().describe('New destination branch'),\n }),\n\n merge_pull_request: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pr_id: z.number().describe('The pull request ID'),\n message: z.string().optional().describe('Merge commit message'),\n close_source_branch: z.boolean().optional().describe('Close source branch after merge'),\n merge_strategy: z\n .enum(['merge_commit', 'squash', 'fast_forward'])\n .optional()\n .describe('Merge strategy'),\n }),\n\n decline_pull_request: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pr_id: z.number().describe('The pull request ID'),\n }),\n\n approve_pull_request: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pr_id: z.number().describe('The pull request ID'),\n }),\n\n request_changes: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pr_id: z.number().describe('The pull request ID'),\n }),\n\n list_pr_comments: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pr_id: z.number().describe('The pull request ID'),\n page: z.number().optional().describe('Page number'),\n pagelen: z.number().optional().describe('Results per page'),\n }),\n\n add_pr_comment: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pr_id: z.number().describe('The pull request ID'),\n content: z.string().describe('Comment content (markdown)'),\n path: z.string().optional().describe('File path for inline comment'),\n line: z.number().optional().describe('Line number for inline comment'),\n }),\n\n get_pr_diff: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pr_id: z.number().describe('The pull request ID'),\n }),\n\n // Branch tools\n list_branches: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n q: z.string().optional().describe('Query string for filtering'),\n sort: z.string().optional().describe('Sort field'),\n page: z.number().optional().describe('Page number'),\n pagelen: z.number().optional().describe('Results per page'),\n }),\n\n get_branch: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n branch_name: z.string().describe('The branch name'),\n }),\n\n create_branch: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n name: z.string().describe('New branch name'),\n target: z.string().describe('Target commit hash or branch name'),\n }),\n\n delete_branch: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n branch_name: z.string().describe('The branch name to delete'),\n }),\n\n // Commit tools\n list_commits: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n branch: z.string().optional().describe('Branch name to filter commits'),\n include: z.string().optional().describe('Commit to include'),\n exclude: z.string().optional().describe('Commit to exclude'),\n page: z.number().optional().describe('Page number'),\n pagelen: z.number().optional().describe('Results per page'),\n }),\n\n get_commit: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n commit_hash: z.string().describe('The commit hash'),\n }),\n\n get_commit_diff: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n commit_hash: z.string().describe('The commit hash'),\n }),\n\n // Issue tools\n list_issues: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n q: z.string().optional().describe('Query string for filtering'),\n sort: z.string().optional().describe('Sort field'),\n page: z.number().optional().describe('Page number'),\n pagelen: z.number().optional().describe('Results per page'),\n }),\n\n get_issue: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n issue_id: z.number().describe('The issue ID'),\n }),\n\n create_issue: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n title: z.string().describe('Issue title'),\n content: z.string().optional().describe('Issue content/description'),\n kind: z.enum(['bug', 'enhancement', 'proposal', 'task']).optional().describe('Issue type'),\n priority: z\n .enum(['trivial', 'minor', 'major', 'critical', 'blocker'])\n .optional()\n .describe('Priority level'),\n assignee: z.string().optional().describe('Assignee UUID'),\n }),\n\n update_issue: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n issue_id: z.number().describe('The issue ID'),\n title: z.string().optional().describe('New title'),\n content: z.string().optional().describe('New content'),\n state: z\n .enum(['new', 'open', 'resolved', 'on hold', 'invalid', 'duplicate', 'wontfix', 'closed'])\n .optional()\n .describe('New state'),\n kind: z.enum(['bug', 'enhancement', 'proposal', 'task']).optional().describe('Issue type'),\n priority: z\n .enum(['trivial', 'minor', 'major', 'critical', 'blocker'])\n .optional()\n .describe('Priority level'),\n assignee: z.string().optional().describe('Assignee UUID'),\n }),\n\n delete_issue: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n issue_id: z.number().describe('The issue ID'),\n }),\n\n // Pipeline tools\n list_pipelines: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n page: z.number().optional().describe('Page number'),\n pagelen: z.number().optional().describe('Results per page'),\n }),\n\n get_pipeline: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pipeline_uuid: z.string().describe('The pipeline UUID'),\n }),\n\n trigger_pipeline: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n ref_type: z.enum(['branch', 'tag', 'bookmark']).describe('Reference type'),\n ref_name: z.string().describe('Reference name (branch/tag name)'),\n variables: z\n .array(\n z.object({\n key: z.string(),\n value: z.string(),\n secured: z.boolean().optional(),\n })\n )\n .optional()\n .describe('Pipeline variables'),\n }),\n\n stop_pipeline: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n pipeline_uuid: z.string().describe('The pipeline UUID'),\n }),\n\n // Search tools\n search_code: z.object({\n workspace: z.string().describe('The workspace slug'),\n search_query: z.string().describe('Search query string'),\n page: z.number().optional().describe('Page number'),\n pagelen: z.number().optional().describe('Results per page'),\n }),\n\n // File tools\n get_file_content: z.object({\n workspace: z.string().describe('The workspace slug'),\n repo_slug: z.string().describe('The repository slug'),\n path: z.string().describe('File path'),\n ref: z.string().optional().describe('Git ref (branch, tag, or commit)'),\n }),\n};\n\n// Tool definitions for MCP\nexport const toolDefinitions = [\n // Repository tools\n {\n name: 'list_repositories',\n description:\n 'List repositories in a workspace. Returns paginated results with repository details.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n role: {\n type: 'string',\n enum: ['owner', 'admin', 'contributor', 'member'],\n description: 'Filter by role',\n },\n q: { type: 'string', description: 'Query string for filtering' },\n sort: { type: 'string', description: 'Sort field (e.g., \"-updated_on\")' },\n page: { type: 'number', description: 'Page number' },\n pagelen: { type: 'number', description: 'Results per page (max 100)' },\n },\n required: ['workspace'],\n },\n },\n {\n name: 'get_repository',\n description:\n 'Get details of a specific repository including its branches, pull requests, and other metadata.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n },\n required: ['workspace', 'repo_slug'],\n },\n },\n {\n name: 'create_repository',\n description: 'Create a new repository in the specified workspace.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n name: { type: 'string', description: 'Repository name' },\n description: { type: 'string', description: 'Repository description' },\n is_private: { type: 'boolean', description: 'Whether the repository is private' },\n language: { type: 'string', description: 'Primary language' },\n has_issues: { type: 'boolean', description: 'Enable issue tracker' },\n has_wiki: { type: 'boolean', description: 'Enable wiki' },\n project_key: { type: 'string', description: 'Project key to add repo to' },\n },\n required: ['workspace', 'repo_slug'],\n },\n },\n {\n name: 'delete_repository',\n description: 'Delete a repository. This action is irreversible.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n },\n required: ['workspace', 'repo_slug'],\n },\n },\n {\n name: 'list_repository_forks',\n description: 'List all forks of a repository.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n page: { type: 'number', description: 'Page number' },\n pagelen: { type: 'number', description: 'Results per page' },\n },\n required: ['workspace', 'repo_slug'],\n },\n },\n\n // Pull request tools\n {\n name: 'list_pull_requests',\n description: 'List pull requests for a repository with optional filtering by state.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n state: {\n type: 'string',\n enum: ['OPEN', 'MERGED', 'DECLINED', 'SUPERSEDED'],\n description: 'Filter by state',\n },\n page: { type: 'number', description: 'Page number' },\n pagelen: { type: 'number', description: 'Results per page' },\n },\n required: ['workspace', 'repo_slug'],\n },\n },\n {\n name: 'get_pull_request',\n description:\n 'Get details of a specific pull request including its source, destination, and status.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pr_id: { type: 'number', description: 'The pull request ID' },\n },\n required: ['workspace', 'repo_slug', 'pr_id'],\n },\n },\n {\n name: 'create_pull_request',\n description: 'Create a new pull request from a source branch to a destination branch.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n title: { type: 'string', description: 'Pull request title' },\n source_branch: { type: 'string', description: 'Source branch name' },\n destination_branch: {\n type: 'string',\n description: 'Destination branch (defaults to main branch)',\n },\n description: { type: 'string', description: 'Pull request description' },\n close_source_branch: { type: 'boolean', description: 'Close source branch after merge' },\n reviewers: {\n type: 'array',\n items: { type: 'string' },\n description: 'List of reviewer UUIDs',\n },\n },\n required: ['workspace', 'repo_slug', 'title', 'source_branch'],\n },\n },\n {\n name: 'update_pull_request',\n description: 'Update a pull request title, description, or destination branch.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pr_id: { type: 'number', description: 'The pull request ID' },\n title: { type: 'string', description: 'New title' },\n description: { type: 'string', description: 'New description' },\n destination_branch: { type: 'string', description: 'New destination branch' },\n },\n required: ['workspace', 'repo_slug', 'pr_id'],\n },\n },\n {\n name: 'merge_pull_request',\n description:\n 'Merge an open pull request. Supports merge commit, squash, and fast-forward strategies.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pr_id: { type: 'number', description: 'The pull request ID' },\n message: { type: 'string', description: 'Merge commit message' },\n close_source_branch: { type: 'boolean', description: 'Close source branch after merge' },\n merge_strategy: {\n type: 'string',\n enum: ['merge_commit', 'squash', 'fast_forward'],\n description: 'Merge strategy',\n },\n },\n required: ['workspace', 'repo_slug', 'pr_id'],\n },\n },\n {\n name: 'decline_pull_request',\n description: 'Decline/close a pull request without merging.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pr_id: { type: 'number', description: 'The pull request ID' },\n },\n required: ['workspace', 'repo_slug', 'pr_id'],\n },\n },\n {\n name: 'approve_pull_request',\n description: 'Approve a pull request.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pr_id: { type: 'number', description: 'The pull request ID' },\n },\n required: ['workspace', 'repo_slug', 'pr_id'],\n },\n },\n {\n name: 'request_changes',\n description: 'Request changes on a pull request.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pr_id: { type: 'number', description: 'The pull request ID' },\n },\n required: ['workspace', 'repo_slug', 'pr_id'],\n },\n },\n {\n name: 'list_pr_comments',\n description: 'List all comments on a pull request.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pr_id: { type: 'number', description: 'The pull request ID' },\n page: { type: 'number', description: 'Page number' },\n pagelen: { type: 'number', description: 'Results per page' },\n },\n required: ['workspace', 'repo_slug', 'pr_id'],\n },\n },\n {\n name: 'add_pr_comment',\n description:\n 'Add a comment to a pull request. Can be a general comment or an inline comment on a specific file/line.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pr_id: { type: 'number', description: 'The pull request ID' },\n content: { type: 'string', description: 'Comment content (markdown)' },\n path: { type: 'string', description: 'File path for inline comment' },\n line: { type: 'number', description: 'Line number for inline comment' },\n },\n required: ['workspace', 'repo_slug', 'pr_id', 'content'],\n },\n },\n {\n name: 'get_pr_diff',\n description: 'Get the diff for a pull request showing all changes.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pr_id: { type: 'number', description: 'The pull request ID' },\n },\n required: ['workspace', 'repo_slug', 'pr_id'],\n },\n },\n\n // Branch tools\n {\n name: 'list_branches',\n description: 'List all branches in a repository.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n q: { type: 'string', description: 'Query string for filtering' },\n sort: { type: 'string', description: 'Sort field' },\n page: { type: 'number', description: 'Page number' },\n pagelen: { type: 'number', description: 'Results per page' },\n },\n required: ['workspace', 'repo_slug'],\n },\n },\n {\n name: 'get_branch',\n description: 'Get details of a specific branch including its latest commit.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n branch_name: { type: 'string', description: 'The branch name' },\n },\n required: ['workspace', 'repo_slug', 'branch_name'],\n },\n },\n {\n name: 'create_branch',\n description: 'Create a new branch from a specific commit or existing branch.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n name: { type: 'string', description: 'New branch name' },\n target: { type: 'string', description: 'Target commit hash or branch name' },\n },\n required: ['workspace', 'repo_slug', 'name', 'target'],\n },\n },\n {\n name: 'delete_branch',\n description: 'Delete a branch from a repository.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n branch_name: { type: 'string', description: 'The branch name to delete' },\n },\n required: ['workspace', 'repo_slug', 'branch_name'],\n },\n },\n\n // Commit tools\n {\n name: 'list_commits',\n description: 'List commits in a repository with optional filtering by branch.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n branch: { type: 'string', description: 'Branch name to filter commits' },\n include: { type: 'string', description: 'Commit to include' },\n exclude: { type: 'string', description: 'Commit to exclude' },\n page: { type: 'number', description: 'Page number' },\n pagelen: { type: 'number', description: 'Results per page' },\n },\n required: ['workspace', 'repo_slug'],\n },\n },\n {\n name: 'get_commit',\n description:\n 'Get details of a specific commit including its message, author, and parent commits.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n commit_hash: { type: 'string', description: 'The commit hash' },\n },\n required: ['workspace', 'repo_slug', 'commit_hash'],\n },\n },\n {\n name: 'get_commit_diff',\n description: 'Get the diff for a specific commit showing all changes.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n commit_hash: { type: 'string', description: 'The commit hash' },\n },\n required: ['workspace', 'repo_slug', 'commit_hash'],\n },\n },\n\n // Issue tools\n {\n name: 'list_issues',\n description: 'List issues in a repository with optional filtering.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n q: { type: 'string', description: 'Query string for filtering' },\n sort: { type: 'string', description: 'Sort field' },\n page: { type: 'number', description: 'Page number' },\n pagelen: { type: 'number', description: 'Results per page' },\n },\n required: ['workspace', 'repo_slug'],\n },\n },\n {\n name: 'get_issue',\n description: 'Get details of a specific issue.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n issue_id: { type: 'number', description: 'The issue ID' },\n },\n required: ['workspace', 'repo_slug', 'issue_id'],\n },\n },\n {\n name: 'create_issue',\n description: 'Create a new issue in a repository.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n title: { type: 'string', description: 'Issue title' },\n content: { type: 'string', description: 'Issue content/description' },\n kind: {\n type: 'string',\n enum: ['bug', 'enhancement', 'proposal', 'task'],\n description: 'Issue type',\n },\n priority: {\n type: 'string',\n enum: ['trivial', 'minor', 'major', 'critical', 'blocker'],\n description: 'Priority level',\n },\n assignee: { type: 'string', description: 'Assignee UUID' },\n },\n required: ['workspace', 'repo_slug', 'title'],\n },\n },\n {\n name: 'update_issue',\n description: 'Update an existing issue.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n issue_id: { type: 'number', description: 'The issue ID' },\n title: { type: 'string', description: 'New title' },\n content: { type: 'string', description: 'New content' },\n state: {\n type: 'string',\n enum: ['new', 'open', 'resolved', 'on hold', 'invalid', 'duplicate', 'wontfix', 'closed'],\n description: 'New state',\n },\n kind: {\n type: 'string',\n enum: ['bug', 'enhancement', 'proposal', 'task'],\n description: 'Issue type',\n },\n priority: {\n type: 'string',\n enum: ['trivial', 'minor', 'major', 'critical', 'blocker'],\n description: 'Priority level',\n },\n assignee: { type: 'string', description: 'Assignee UUID' },\n },\n required: ['workspace', 'repo_slug', 'issue_id'],\n },\n },\n {\n name: 'delete_issue',\n description: 'Delete an issue from a repository.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n issue_id: { type: 'number', description: 'The issue ID' },\n },\n required: ['workspace', 'repo_slug', 'issue_id'],\n },\n },\n\n // Pipeline tools\n {\n name: 'list_pipelines',\n description: 'List pipeline runs for a repository.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n page: { type: 'number', description: 'Page number' },\n pagelen: { type: 'number', description: 'Results per page' },\n },\n required: ['workspace', 'repo_slug'],\n },\n },\n {\n name: 'get_pipeline',\n description: 'Get details of a specific pipeline run.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pipeline_uuid: { type: 'string', description: 'The pipeline UUID' },\n },\n required: ['workspace', 'repo_slug', 'pipeline_uuid'],\n },\n },\n {\n name: 'trigger_pipeline',\n description: 'Trigger a new pipeline run on a branch, tag, or bookmark.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n ref_type: {\n type: 'string',\n enum: ['branch', 'tag', 'bookmark'],\n description: 'Reference type',\n },\n ref_name: { type: 'string', description: 'Reference name (branch/tag name)' },\n variables: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n key: { type: 'string' },\n value: { type: 'string' },\n secured: { type: 'boolean' },\n },\n required: ['key', 'value'],\n },\n description: 'Pipeline variables',\n },\n },\n required: ['workspace', 'repo_slug', 'ref_type', 'ref_name'],\n },\n },\n {\n name: 'stop_pipeline',\n description: 'Stop a running pipeline.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n pipeline_uuid: { type: 'string', description: 'The pipeline UUID' },\n },\n required: ['workspace', 'repo_slug', 'pipeline_uuid'],\n },\n },\n\n // Search tools\n {\n name: 'search_code',\n description: 'Search for code across all repositories in a workspace.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n search_query: { type: 'string', description: 'Search query string' },\n page: { type: 'number', description: 'Page number' },\n pagelen: { type: 'number', description: 'Results per page' },\n },\n required: ['workspace', 'search_query'],\n },\n },\n\n // File tools\n {\n name: 'get_file_content',\n description: 'Get the content of a file from a repository.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n workspace: { type: 'string', description: 'The workspace slug' },\n repo_slug: { type: 'string', description: 'The repository slug' },\n path: { type: 'string', description: 'File path' },\n ref: { type: 'string', description: 'Git ref (branch, tag, or commit)' },\n },\n required: ['workspace', 'repo_slug', 'path'],\n },\n },\n];\n\n// Tool handler class\nexport class ToolHandler {\n private repos: RepositoriesAPI;\n private prs: PullRequestsAPI;\n private branches: BranchesAPI;\n private commits: CommitsAPI;\n private issues: IssuesAPI;\n private pipelines: PipelinesAPI;\n private search: SearchAPI;\n\n constructor(client: BitbucketClient) {\n this.repos = new RepositoriesAPI(client);\n this.prs = new PullRequestsAPI(client);\n this.branches = new BranchesAPI(client);\n this.commits = new CommitsAPI(client);\n this.issues = new IssuesAPI(client);\n this.pipelines = new PipelinesAPI(client);\n this.search = new SearchAPI(client);\n }\n\n async handleTool(name: string, args: Record<string, unknown>): Promise<unknown> {\n switch (name) {\n // Repository tools\n case 'list_repositories': {\n const params = toolSchemas.list_repositories.parse(args);\n return this.repos.list(params);\n }\n case 'get_repository': {\n const params = toolSchemas.get_repository.parse(args);\n return this.repos.get(params);\n }\n case 'create_repository': {\n const params = toolSchemas.create_repository.parse(args);\n return this.repos.create(params);\n }\n case 'delete_repository': {\n const params = toolSchemas.delete_repository.parse(args);\n await this.repos.delete(params);\n return { success: true, message: 'Repository deleted' };\n }\n case 'list_repository_forks': {\n const params = toolSchemas.list_repository_forks.parse(args);\n return this.repos.listForks(params);\n }\n\n // Pull request tools\n case 'list_pull_requests': {\n const params = toolSchemas.list_pull_requests.parse(args);\n return this.prs.list(params);\n }\n case 'get_pull_request': {\n const params = toolSchemas.get_pull_request.parse(args);\n return this.prs.get(params.workspace, params.repo_slug, params.pr_id);\n }\n case 'create_pull_request': {\n const params = toolSchemas.create_pull_request.parse(args);\n return this.prs.create(params);\n }\n case 'update_pull_request': {\n const params = toolSchemas.update_pull_request.parse(args);\n const { workspace, repo_slug, pr_id, ...updates } = params;\n return this.prs.update(workspace, repo_slug, pr_id, updates);\n }\n case 'merge_pull_request': {\n const params = toolSchemas.merge_pull_request.parse(args);\n const { workspace, repo_slug, pr_id, ...options } = params;\n return this.prs.merge(workspace, repo_slug, pr_id, options);\n }\n case 'decline_pull_request': {\n const params = toolSchemas.decline_pull_request.parse(args);\n return this.prs.decline(params.workspace, params.repo_slug, params.pr_id);\n }\n case 'approve_pull_request': {\n const params = toolSchemas.approve_pull_request.parse(args);\n await this.prs.approve(params.workspace, params.repo_slug, params.pr_id);\n return { success: true, message: 'Pull request approved' };\n }\n case 'request_changes': {\n const params = toolSchemas.request_changes.parse(args);\n await this.prs.requestChanges(params.workspace, params.repo_slug, params.pr_id);\n return { success: true, message: 'Changes requested' };\n }\n case 'list_pr_comments': {\n const params = toolSchemas.list_pr_comments.parse(args);\n return this.prs.listComments(params.workspace, params.repo_slug, params.pr_id, {\n page: params.page,\n pagelen: params.pagelen,\n });\n }\n case 'add_pr_comment': {\n const params = toolSchemas.add_pr_comment.parse(args);\n const inline = params.path ? { path: params.path, line: params.line } : undefined;\n return this.prs.addComment(\n params.workspace,\n params.repo_slug,\n params.pr_id,\n params.content,\n inline\n );\n }\n case 'get_pr_diff': {\n const params = toolSchemas.get_pr_diff.parse(args);\n const diff = await this.prs.getDiff(params.workspace, params.repo_slug, params.pr_id);\n return { diff };\n }\n\n // Branch tools\n case 'list_branches': {\n const params = toolSchemas.list_branches.parse(args);\n return this.branches.list(params);\n }\n case 'get_branch': {\n const params = toolSchemas.get_branch.parse(args);\n return this.branches.get(params.workspace, params.repo_slug, params.branch_name);\n }\n case 'create_branch': {\n const params = toolSchemas.create_branch.parse(args);\n return this.branches.create(params);\n }\n case 'delete_branch': {\n const params = toolSchemas.delete_branch.parse(args);\n await this.branches.delete(params.workspace, params.repo_slug, params.branch_name);\n return { success: true, message: 'Branch deleted' };\n }\n\n // Commit tools\n case 'list_commits': {\n const params = toolSchemas.list_commits.parse(args);\n return this.commits.list(params);\n }\n case 'get_commit': {\n const params = toolSchemas.get_commit.parse(args);\n return this.commits.get(params.workspace, params.repo_slug, params.commit_hash);\n }\n case 'get_commit_diff': {\n const params = toolSchemas.get_commit_diff.parse(args);\n const diff = await this.commits.getDiff(\n params.workspace,\n params.repo_slug,\n params.commit_hash\n );\n return { diff };\n }\n\n // Issue tools\n case 'list_issues': {\n const params = toolSchemas.list_issues.parse(args);\n return this.issues.list(params);\n }\n case 'get_issue': {\n const params = toolSchemas.get_issue.parse(args);\n return this.issues.get(params.workspace, params.repo_slug, params.issue_id);\n }\n case 'create_issue': {\n const params = toolSchemas.create_issue.parse(args);\n return this.issues.create(params);\n }\n case 'update_issue': {\n const params = toolSchemas.update_issue.parse(args);\n const { workspace, repo_slug, issue_id, ...updates } = params;\n return this.issues.update(workspace, repo_slug, issue_id, updates);\n }\n case 'delete_issue': {\n const params = toolSchemas.delete_issue.parse(args);\n await this.issues.delete(params.workspace, params.repo_slug, params.issue_id);\n return { success: true, message: 'Issue deleted' };\n }\n\n // Pipeline tools\n case 'list_pipelines': {\n const params = toolSchemas.list_pipelines.parse(args);\n return this.pipelines.list(params);\n }\n case 'get_pipeline': {\n const params = toolSchemas.get_pipeline.parse(args);\n return this.pipelines.get(params.workspace, params.repo_slug, params.pipeline_uuid);\n }\n case 'trigger_pipeline': {\n const params = toolSchemas.trigger_pipeline.parse(args);\n return this.pipelines.trigger({\n workspace: params.workspace,\n repo_slug: params.repo_slug,\n target: {\n type: 'pipeline_ref_target',\n ref_type: params.ref_type,\n ref_name: params.ref_name,\n },\n variables: params.variables,\n });\n }\n case 'stop_pipeline': {\n const params = toolSchemas.stop_pipeline.parse(args);\n await this.pipelines.stop(params.workspace, params.repo_slug, params.pipeline_uuid);\n return { success: true, message: 'Pipeline stopped' };\n }\n\n // Search tools\n case 'search_code': {\n const params = toolSchemas.search_code.parse(args);\n return this.search.searchCode(params);\n }\n\n // File tools\n case 'get_file_content': {\n const params = toolSchemas.get_file_content.parse(args);\n const content = await this.repos.getFileContent(\n params.workspace,\n params.repo_slug,\n params.path,\n params.ref\n );\n return { content };\n }\n\n default:\n throw new Error(`Unknown tool: ${name}`);\n }\n }\n}\n"],"names":["z","RepositoriesAPI","PullRequestsAPI","BranchesAPI","CommitsAPI","IssuesAPI","PipelinesAPI","SearchAPI","toolSchemas","list_repositories","object","workspace","string","describe","role","enum","optional","q","sort","page","number","pagelen","get_repository","repo_slug","create_repository","name","description","is_private","boolean","language","has_issues","has_wiki","project_key","delete_repository","list_repository_forks","list_pull_requests","state","get_pull_request","pr_id","create_pull_request","title","source_branch","destination_branch","close_source_branch","reviewers","array","update_pull_request","merge_pull_request","message","merge_strategy","decline_pull_request","approve_pull_request","request_changes","list_pr_comments","add_pr_comment","content","path","line","get_pr_diff","list_branches","get_branch","branch_name","create_branch","target","delete_branch","list_commits","branch","include","exclude","get_commit","commit_hash","get_commit_diff","list_issues","get_issue","issue_id","create_issue","kind","priority","assignee","update_issue","delete_issue","list_pipelines","get_pipeline","pipeline_uuid","trigger_pipeline","ref_type","ref_name","variables","key","value","secured","stop_pipeline","search_code","search_query","get_file_content","ref","toolDefinitions","inputSchema","type","properties","required","items","ToolHandler","repos","prs","branches","commits","issues","pipelines","search","client","handleTool","args","params","parse","list","get","create","delete","success","listForks","updates","update","options","merge","decline","approve","requestChanges","listComments","inline","undefined","addComment","diff","getDiff","trigger","stop","searchCode","getFileContent","Error"],"mappings":"AAAA,SAASA,CAAC,QAAQ,MAAM;AAExB,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,WAAW,QAAQ,qBAAqB;AACjD,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,YAAY,QAAQ,sBAAsB;AACnD,SAASC,SAAS,QAAQ,mBAAmB;AAG7C,OAAO,MAAMC,cAAc;IAEzBC,mBAAmBT,EAAEU,MAAM,CAAC;QAC1BC,WAAWX,EAAEY,MAAM,GAAGC,QAAQ,CAAC;QAC/BC,MAAMd,EAAEe,IAAI,CAAC;YAAC;YAAS;YAAS;YAAe;SAAS,EAAEC,QAAQ,GAAGH,QAAQ,CAAC;QAC9EI,GAAGjB,EAAEY,MAAM,GAAGI,QAAQ,GAAGH,QAAQ,CAAC;QAClCK,MAAMlB,EAAEY,MAAM,GAAGI,QAAQ,GAAGH,QAAQ,CAAC;QACrCM,MAAMnB,EAAEoB,MAAM,GAAGJ,QAAQ,GAAGH,QAAQ,CAAC;QACrCQ,SAASrB,EAAEoB,MAAM,GAAGJ,QAAQ,GAAGH,QAAQ,CAAC;IAC1C;IAEAS,gBAAgBtB,EAAEU,MAAM,CAAC;QACvBC,WAAWX,EAAEY,MAAM,GAAGC,QAAQ,CAAC;QAC/BU,WAAWvB,EAAEY,MAAM,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GAAG;oBAEZ,OAAO;wBAAExC;oBAAQ;gBACnB;YAEA;gBACE,MAAM,IAAImF,MAAM,CAAC,cAAc,EAAEjH,MAAM;QAC3C;IACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// OAuth types\nexport interface OAuthConfig {\n clientId: string;\n clientSecret: string;\n accessToken?: string;\n refreshToken?: string;\n}\n\nexport interface OAuthTokenResponse {\n access_token: string;\n refresh_token: string;\n token_type: string;\n expires_in: number;\n scopes: string;\n}\n\nexport interface TokenState {\n accessToken: string;\n refreshToken: string;\n expiresAt: number;\n}\n\n// Bitbucket API types\nexport interface BitbucketUser {\n uuid: string;\n username: string;\n display_name: string;\n account_id: string;\n links: {\n self: { href: string };\n html: { href: string };\n avatar: { href: string };\n };\n}\n\nexport interface BitbucketWorkspace {\n uuid: string;\n slug: string;\n name: string;\n links: {\n self: { href: string };\n html: { href: string };\n avatar: { href: string };\n };\n}\n\nexport interface BitbucketRepository {\n uuid: string;\n slug: string;\n name: string;\n full_name: string;\n description: string;\n is_private: boolean;\n language: string;\n created_on: string;\n updated_on: string;\n size: number;\n mainbranch?: {\n name: string;\n type: string;\n };\n owner: BitbucketUser;\n workspace: BitbucketWorkspace;\n links: {\n self: { href: string };\n html: { href: string };\n clone: Array<{ href: string; name: string }>;\n commits: { href: string };\n branches: { href: string };\n pullrequests: { href: string };\n };\n}\n\nexport interface BitbucketBranch {\n name: string;\n target: {\n hash: string;\n date: string;\n message: string;\n author: {\n raw: string;\n user?: BitbucketUser;\n };\n };\n links: {\n self: { href: string };\n html: { href: string };\n commits: { href: string };\n };\n}\n\nexport interface BitbucketCommit {\n hash: string;\n date: string;\n message: string;\n author: {\n raw: string;\n user?: BitbucketUser;\n };\n parents: Array<{ hash: string }>;\n links: {\n self: { href: string };\n html: { href: string };\n diff: { href: string };\n };\n}\n\nexport interface BitbucketPullRequest {\n id: number;\n title: string;\n description: string;\n state: 'OPEN' | 'MERGED' | 'DECLINED' | 'SUPERSEDED';\n author: BitbucketUser;\n source: {\n branch: { name: string };\n commit: { hash: string };\n repository: BitbucketRepository;\n };\n destination: {\n branch: { name: string };\n commit: { hash: string };\n repository: BitbucketRepository;\n };\n merge_commit?: { hash: string };\n close_source_branch: boolean;\n created_on: string;\n updated_on: string;\n comment_count: number;\n task_count: number;\n links: {\n self: { href: string };\n html: { href: string };\n commits: { href: string };\n comments: { href: string };\n merge: { href: string };\n diff: { href: string };\n };\n}\n\nexport interface BitbucketPRComment {\n id: number;\n content: {\n raw: string;\n markup: string;\n html: string;\n };\n user: BitbucketUser;\n created_on: string;\n updated_on: string;\n inline?: {\n path: string;\n from?: number;\n to?: number;\n };\n links: {\n self: { href: string };\n html: { href: string };\n };\n}\n\nexport interface BitbucketIssue {\n id: number;\n title: string;\n content: {\n raw: string;\n markup: string;\n html: string;\n };\n reporter: BitbucketUser;\n assignee?: BitbucketUser;\n state: 'new' | 'open' | 'resolved' | 'on hold' | 'invalid' | 'duplicate' | 'wontfix' | 'closed';\n kind: 'bug' | 'enhancement' | 'proposal' | 'task';\n priority: 'trivial' | 'minor' | 'major' | 'critical' | 'blocker';\n created_on: string;\n updated_on: string;\n links: {\n self: { href: string };\n html: { href: string };\n };\n}\n\nexport interface BitbucketPipeline {\n uuid: string;\n build_number: number;\n state: {\n name: string;\n type: string;\n result?: {\n name: string;\n type: string;\n };\n };\n target: {\n type: string;\n ref_type: string;\n ref_name: string;\n commit: {\n hash: string;\n };\n };\n trigger: {\n type: string;\n };\n created_on: string;\n completed_on?: string;\n duration_in_seconds?: number;\n links: {\n self: { href: string };\n steps: { href: string };\n };\n}\n\nexport interface BitbucketSearchResult {\n content_matches: Array<{\n lines: Array<{\n line: number;\n segments: Array<{\n text: string;\n match?: boolean;\n }>;\n }>;\n }>;\n path_matches: Array<{\n text: string;\n match?: boolean;\n }>;\n file: {\n path: string;\n type: string;\n links: {\n self: { href: string };\n };\n };\n}\n\n// Paginated response\nexport interface PaginatedResponse<T> {\n size: number;\n page: number;\n pagelen: number;\n next?: string;\n previous?: string;\n values: T[];\n}\n\n// API Error\nexport interface BitbucketError {\n type: string;\n error: {\n message: string;\n detail?: string;\n data?: Record<string, unknown>;\n };\n}\n\n// Tool parameter types\nexport interface ListRepositoriesParams {\n workspace: string;\n role?: 'owner' | 'admin' | 'contributor' | 'member';\n q?: string;\n sort?: string;\n page?: number;\n pagelen?: number;\n}\n\nexport interface GetRepositoryParams {\n workspace: string;\n repo_slug: string;\n}\n\nexport interface CreateRepositoryParams {\n workspace: string;\n repo_slug: string;\n name?: string;\n description?: string;\n is_private?: boolean;\n language?: string;\n has_issues?: boolean;\n has_wiki?: boolean;\n project_key?: string;\n}\n\nexport interface ListPullRequestsParams {\n workspace: string;\n repo_slug: string;\n state?: 'OPEN' | 'MERGED' | 'DECLINED' | 'SUPERSEDED';\n page?: number;\n pagelen?: number;\n}\n\nexport interface CreatePullRequestParams {\n workspace: string;\n repo_slug: string;\n title: string;\n source_branch: string;\n destination_branch?: string;\n description?: string;\n close_source_branch?: boolean;\n reviewers?: string[];\n}\n\nexport interface ListBranchesParams {\n workspace: string;\n repo_slug: string;\n q?: string;\n sort?: string;\n page?: number;\n pagelen?: number;\n}\n\nexport interface CreateBranchParams {\n workspace: string;\n repo_slug: string;\n name: string;\n target: string;\n}\n\nexport interface ListCommitsParams {\n workspace: string;\n repo_slug: string;\n branch?: string;\n include?: string;\n exclude?: string;\n page?: number;\n pagelen?: number;\n}\n\nexport interface ListIssuesParams {\n workspace: string;\n repo_slug: string;\n q?: string;\n sort?: string;\n page?: number;\n pagelen?: number;\n}\n\nexport interface CreateIssueParams {\n workspace: string;\n repo_slug: string;\n title: string;\n content?: string;\n kind?: 'bug' | 'enhancement' | 'proposal' | 'task';\n priority?: 'trivial' | 'minor' | 'major' | 'critical' | 'blocker';\n assignee?: string;\n}\n\nexport interface ListPipelinesParams {\n workspace: string;\n repo_slug: string;\n page?: number;\n pagelen?: number;\n}\n\nexport interface TriggerPipelineParams {\n workspace: string;\n repo_slug: string;\n target: {\n type: 'pipeline_ref_target';\n ref_type: 'branch' | 'tag' | 'bookmark';\n ref_name: string;\n };\n variables?: Array<{\n key: string;\n value: string;\n secured?: boolean;\n }>;\n}\n\nexport interface SearchCodeParams {\n workspace: string;\n search_query: string;\n page?: number;\n pagelen?: number;\n}\n"],"names":[],"mappings":"AAgXA,WAKC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lexmata/bitbucket-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP (Model Context Protocol) server for Bitbucket Cloud - 25+ tools for repositories, pull requests, branches, commits, issues, pipelines, and code search",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"bitbucket-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"keywords": [
|
|
14
|
+
"mcp",
|
|
15
|
+
"model-context-protocol",
|
|
16
|
+
"bitbucket",
|
|
17
|
+
"bitbucket-cloud",
|
|
18
|
+
"atlassian",
|
|
19
|
+
"api",
|
|
20
|
+
"claude",
|
|
21
|
+
"ai",
|
|
22
|
+
"llm",
|
|
23
|
+
"typescript",
|
|
24
|
+
"oauth2",
|
|
25
|
+
"developer-tools"
|
|
26
|
+
],
|
|
27
|
+
"author": "Lexmata LLC",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/lexmata/bitbucket-mcp.git"
|
|
32
|
+
},
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/lexmata/bitbucket-mcp/issues"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://lexmata.github.io/bitbucket-mcp",
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18.0.0"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
42
|
+
"zod": "^3.22.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@commitlint/cli": "^19.0.0",
|
|
46
|
+
"@commitlint/config-conventional": "^19.0.0",
|
|
47
|
+
"@eslint/js": "^9.0.0",
|
|
48
|
+
"@swc-node/register": "^1.9.0",
|
|
49
|
+
"@swc/cli": "^0.3.12",
|
|
50
|
+
"@swc/core": "^1.4.0",
|
|
51
|
+
"@types/node": "^20.11.0",
|
|
52
|
+
"eslint": "^9.0.0",
|
|
53
|
+
"husky": "^9.0.0",
|
|
54
|
+
"lint-staged": "^15.0.0",
|
|
55
|
+
"prettier": "^3.2.0",
|
|
56
|
+
"typescript": "^5.3.0",
|
|
57
|
+
"typescript-eslint": "^8.0.0"
|
|
58
|
+
},
|
|
59
|
+
"lint-staged": {
|
|
60
|
+
"*.ts": [
|
|
61
|
+
"eslint --fix",
|
|
62
|
+
"prettier --write"
|
|
63
|
+
],
|
|
64
|
+
"*.{json,md,yml,yaml}": [
|
|
65
|
+
"prettier --write"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"scripts": {
|
|
69
|
+
"build": "swc src -d dist --strip-leading-paths",
|
|
70
|
+
"dev": "node --import @swc-node/register/esm-register src/index.ts",
|
|
71
|
+
"start": "node dist/index.js",
|
|
72
|
+
"typecheck": "tsc --noEmit",
|
|
73
|
+
"lint": "eslint src",
|
|
74
|
+
"lint:fix": "eslint src --fix",
|
|
75
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
76
|
+
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
77
|
+
"clean": "rm -rf dist"
|
|
78
|
+
}
|
|
79
|
+
}
|