@ldraney/github-mcp 0.1.0 → 0.2.0-beta.1

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 (84) hide show
  1. package/dist/index.js +8 -2
  2. package/dist/prompts/activity-summary.d.ts +10 -0
  3. package/dist/prompts/activity-summary.js +154 -0
  4. package/dist/prompts/code-review.d.ts +9 -0
  5. package/dist/prompts/code-review.js +145 -0
  6. package/dist/prompts/issue-triage.d.ts +9 -0
  7. package/dist/prompts/issue-triage.js +202 -0
  8. package/dist/prompts/release-notes.d.ts +9 -0
  9. package/dist/prompts/release-notes.js +236 -0
  10. package/dist/server.d.ts +8 -1
  11. package/dist/server.js +36 -210
  12. package/dist/tools/categories/actions.d.ts +2 -5
  13. package/dist/tools/categories/actions.js +640 -369
  14. package/dist/tools/categories/activity.d.ts +2 -0
  15. package/dist/tools/categories/activity.js +534 -0
  16. package/dist/tools/categories/apps.d.ts +2 -0
  17. package/dist/tools/categories/apps.js +224 -0
  18. package/dist/tools/categories/billing.d.ts +2 -0
  19. package/dist/tools/categories/billing.js +145 -0
  20. package/dist/tools/categories/checks.d.ts +2 -0
  21. package/dist/tools/categories/checks.js +554 -0
  22. package/dist/tools/categories/codeScanning.d.ts +2 -0
  23. package/dist/tools/categories/codeScanning.js +375 -0
  24. package/dist/tools/categories/codeSecurity.d.ts +2 -0
  25. package/dist/tools/categories/codeSecurity.js +463 -0
  26. package/dist/tools/categories/codesOfConduct.d.ts +2 -0
  27. package/dist/tools/categories/codesOfConduct.js +45 -0
  28. package/dist/tools/categories/codespaces.d.ts +2 -0
  29. package/dist/tools/categories/codespaces.js +259 -0
  30. package/dist/tools/categories/copilot.d.ts +2 -0
  31. package/dist/tools/categories/copilot.js +187 -0
  32. package/dist/tools/categories/dependabot.d.ts +2 -0
  33. package/dist/tools/categories/dependabot.js +454 -0
  34. package/dist/tools/categories/emojis.d.ts +2 -0
  35. package/dist/tools/categories/emojis.js +22 -0
  36. package/dist/tools/categories/gists.d.ts +2 -5
  37. package/dist/tools/categories/gists.js +474 -285
  38. package/dist/tools/categories/git.d.ts +2 -0
  39. package/dist/tools/categories/git.js +520 -0
  40. package/dist/tools/categories/gitignore.d.ts +2 -0
  41. package/dist/tools/categories/gitignore.js +45 -0
  42. package/dist/tools/categories/index.d.ts +33 -0
  43. package/dist/tools/categories/index.js +33 -0
  44. package/dist/tools/categories/interactions.d.ts +2 -0
  45. package/dist/tools/categories/interactions.js +184 -0
  46. package/dist/tools/categories/issues.d.ts +2 -5
  47. package/dist/tools/categories/issues.js +692 -390
  48. package/dist/tools/categories/licenses.d.ts +2 -0
  49. package/dist/tools/categories/licenses.js +95 -0
  50. package/dist/tools/categories/markdown.d.ts +2 -0
  51. package/dist/tools/categories/markdown.js +64 -0
  52. package/dist/tools/categories/meta.d.ts +2 -0
  53. package/dist/tools/categories/meta.js +74 -0
  54. package/dist/tools/categories/migrations.d.ts +2 -0
  55. package/dist/tools/categories/migrations.js +290 -0
  56. package/dist/tools/categories/orgs.d.ts +2 -5
  57. package/dist/tools/categories/orgs.js +585 -417
  58. package/dist/tools/categories/packages.d.ts +2 -0
  59. package/dist/tools/categories/packages.js +918 -0
  60. package/dist/tools/categories/projects.d.ts +2 -0
  61. package/dist/tools/categories/projects.js +692 -0
  62. package/dist/tools/categories/pulls.d.ts +2 -5
  63. package/dist/tools/categories/pulls.js +715 -332
  64. package/dist/tools/categories/rateLimit.d.ts +2 -0
  65. package/dist/tools/categories/rateLimit.js +22 -0
  66. package/dist/tools/categories/reactions.d.ts +2 -0
  67. package/dist/tools/categories/reactions.js +385 -0
  68. package/dist/tools/categories/repos.d.ts +2 -5
  69. package/dist/tools/categories/repos.js +844 -366
  70. package/dist/tools/categories/search.d.ts +2 -5
  71. package/dist/tools/categories/search.js +294 -196
  72. package/dist/tools/categories/secretScanning.d.ts +2 -0
  73. package/dist/tools/categories/secretScanning.js +324 -0
  74. package/dist/tools/categories/securityAdvisories.d.ts +2 -0
  75. package/dist/tools/categories/securityAdvisories.js +407 -0
  76. package/dist/tools/categories/teams.d.ts +2 -0
  77. package/dist/tools/categories/teams.js +614 -0
  78. package/dist/tools/categories/users.d.ts +2 -5
  79. package/dist/tools/categories/users.js +474 -247
  80. package/dist/tools/generator.d.ts +35 -15
  81. package/dist/tools/generator.js +113 -57
  82. package/dist/tools/types.d.ts +63 -0
  83. package/dist/tools/types.js +17 -0
  84. package/package.json +1 -1
@@ -0,0 +1,259 @@
1
+ import { successResult } from '../types.js';
2
+ export const codespacesCategory = {
3
+ name: 'codespaces',
4
+ description: 'GitHub Codespaces tools',
5
+ tools: [
6
+ // list_for_authenticated_user - List codespaces for authenticated user
7
+ {
8
+ definition: {
9
+ name: 'github_codespaces_list_for_authenticated_user',
10
+ description: 'List codespaces for the authenticated user',
11
+ inputSchema: {
12
+ type: 'object',
13
+ properties: {
14
+ per_page: {
15
+ type: 'number',
16
+ description: 'Results per page (max 100)',
17
+ },
18
+ page: {
19
+ type: 'number',
20
+ description: 'Page number',
21
+ },
22
+ repository_id: {
23
+ type: 'number',
24
+ description: 'Filter by repository ID',
25
+ },
26
+ },
27
+ },
28
+ },
29
+ handler: async (octokit, args) => {
30
+ const { data } = await octokit.codespaces.listForAuthenticatedUser({
31
+ per_page: args.per_page,
32
+ page: args.page,
33
+ repository_id: args.repository_id,
34
+ });
35
+ return successResult(data);
36
+ },
37
+ },
38
+ // list_in_repository_for_authenticated_user - List codespaces in a repository
39
+ {
40
+ definition: {
41
+ name: 'github_codespaces_list_in_repository_for_authenticated_user',
42
+ description: 'List codespaces in a repository for the authenticated user',
43
+ inputSchema: {
44
+ type: 'object',
45
+ properties: {
46
+ owner: {
47
+ type: 'string',
48
+ description: 'The account owner of the repository',
49
+ },
50
+ repo: {
51
+ type: 'string',
52
+ description: 'The name of the repository',
53
+ },
54
+ per_page: {
55
+ type: 'number',
56
+ description: 'Results per page (max 100)',
57
+ },
58
+ page: {
59
+ type: 'number',
60
+ description: 'Page number',
61
+ },
62
+ },
63
+ required: ['owner', 'repo'],
64
+ },
65
+ },
66
+ handler: async (octokit, args) => {
67
+ const { data } = await octokit.codespaces.listInRepositoryForAuthenticatedUser({
68
+ owner: args.owner,
69
+ repo: args.repo,
70
+ per_page: args.per_page,
71
+ page: args.page,
72
+ });
73
+ return successResult(data);
74
+ },
75
+ },
76
+ // get_for_authenticated_user - Get a codespace
77
+ {
78
+ definition: {
79
+ name: 'github_codespaces_get_for_authenticated_user',
80
+ description: 'Get a codespace by name for the authenticated user',
81
+ inputSchema: {
82
+ type: 'object',
83
+ properties: {
84
+ codespace_name: {
85
+ type: 'string',
86
+ description: 'The name of the codespace',
87
+ },
88
+ },
89
+ required: ['codespace_name'],
90
+ },
91
+ },
92
+ handler: async (octokit, args) => {
93
+ const { data } = await octokit.codespaces.getForAuthenticatedUser({
94
+ codespace_name: args.codespace_name,
95
+ });
96
+ return successResult(data);
97
+ },
98
+ },
99
+ // create_for_authenticated_user - Create a codespace
100
+ {
101
+ definition: {
102
+ name: 'github_codespaces_create_for_authenticated_user',
103
+ description: 'Create a codespace for the authenticated user',
104
+ inputSchema: {
105
+ type: 'object',
106
+ properties: {
107
+ repository_id: {
108
+ type: 'number',
109
+ description: 'Repository ID to create the codespace for',
110
+ },
111
+ ref: {
112
+ type: 'string',
113
+ description: 'Git ref (branch or commit) to create the codespace from',
114
+ },
115
+ location: {
116
+ type: 'string',
117
+ description: 'The geographic area for the codespace (e.g., EastUs, WestUs2)',
118
+ },
119
+ machine: {
120
+ type: 'string',
121
+ description: 'Machine type to use for the codespace',
122
+ },
123
+ devcontainer_path: {
124
+ type: 'string',
125
+ description: 'Path to the devcontainer.json file to use',
126
+ },
127
+ working_directory: {
128
+ type: 'string',
129
+ description: 'Working directory for the codespace',
130
+ },
131
+ idle_timeout_minutes: {
132
+ type: 'number',
133
+ description: 'Time in minutes before the codespace is stopped after being idle',
134
+ },
135
+ display_name: {
136
+ type: 'string',
137
+ description: 'Display name for the codespace',
138
+ },
139
+ retention_period_minutes: {
140
+ type: 'number',
141
+ description: 'Duration in minutes after codespace stops before automatic deletion',
142
+ },
143
+ },
144
+ required: ['repository_id'],
145
+ },
146
+ },
147
+ handler: async (octokit, args) => {
148
+ const { data } = await octokit.codespaces.createForAuthenticatedUser({
149
+ repository_id: args.repository_id,
150
+ ref: args.ref,
151
+ location: args.location,
152
+ machine: args.machine,
153
+ devcontainer_path: args.devcontainer_path,
154
+ working_directory: args.working_directory,
155
+ idle_timeout_minutes: args.idle_timeout_minutes,
156
+ display_name: args.display_name,
157
+ retention_period_minutes: args.retention_period_minutes,
158
+ });
159
+ return successResult(data);
160
+ },
161
+ },
162
+ // start_for_authenticated_user - Start a codespace
163
+ {
164
+ definition: {
165
+ name: 'github_codespaces_start_for_authenticated_user',
166
+ description: 'Start a codespace for the authenticated user',
167
+ inputSchema: {
168
+ type: 'object',
169
+ properties: {
170
+ codespace_name: {
171
+ type: 'string',
172
+ description: 'The name of the codespace',
173
+ },
174
+ },
175
+ required: ['codespace_name'],
176
+ },
177
+ },
178
+ handler: async (octokit, args) => {
179
+ const { data } = await octokit.codespaces.startForAuthenticatedUser({
180
+ codespace_name: args.codespace_name,
181
+ });
182
+ return successResult(data);
183
+ },
184
+ },
185
+ // stop_for_authenticated_user - Stop a codespace
186
+ {
187
+ definition: {
188
+ name: 'github_codespaces_stop_for_authenticated_user',
189
+ description: 'Stop a codespace for the authenticated user',
190
+ inputSchema: {
191
+ type: 'object',
192
+ properties: {
193
+ codespace_name: {
194
+ type: 'string',
195
+ description: 'The name of the codespace',
196
+ },
197
+ },
198
+ required: ['codespace_name'],
199
+ },
200
+ },
201
+ handler: async (octokit, args) => {
202
+ const { data } = await octokit.codespaces.stopForAuthenticatedUser({
203
+ codespace_name: args.codespace_name,
204
+ });
205
+ return successResult(data);
206
+ },
207
+ },
208
+ // delete_for_authenticated_user - Delete a codespace
209
+ {
210
+ definition: {
211
+ name: 'github_codespaces_delete_for_authenticated_user',
212
+ description: 'Delete a codespace for the authenticated user',
213
+ inputSchema: {
214
+ type: 'object',
215
+ properties: {
216
+ codespace_name: {
217
+ type: 'string',
218
+ description: 'The name of the codespace',
219
+ },
220
+ },
221
+ required: ['codespace_name'],
222
+ },
223
+ },
224
+ handler: async (octokit, args) => {
225
+ await octokit.codespaces.deleteForAuthenticatedUser({
226
+ codespace_name: args.codespace_name,
227
+ });
228
+ return successResult({ success: true, message: 'Codespace deleted' });
229
+ },
230
+ },
231
+ // list_secrets_for_authenticated_user - List codespace secrets
232
+ {
233
+ definition: {
234
+ name: 'github_codespaces_list_secrets_for_authenticated_user',
235
+ description: 'List secrets for the authenticated user for codespaces',
236
+ inputSchema: {
237
+ type: 'object',
238
+ properties: {
239
+ per_page: {
240
+ type: 'number',
241
+ description: 'Results per page (max 100)',
242
+ },
243
+ page: {
244
+ type: 'number',
245
+ description: 'Page number',
246
+ },
247
+ },
248
+ },
249
+ },
250
+ handler: async (octokit, args) => {
251
+ const { data } = await octokit.codespaces.listSecretsForAuthenticatedUser({
252
+ per_page: args.per_page,
253
+ page: args.page,
254
+ });
255
+ return successResult(data);
256
+ },
257
+ },
258
+ ],
259
+ };
@@ -0,0 +1,2 @@
1
+ import type { ToolCategory } from '../types.js';
2
+ export declare const copilotCategory: ToolCategory;
@@ -0,0 +1,187 @@
1
+ import { successResult } from '../types.js';
2
+ export const copilotCategory = {
3
+ name: 'copilot',
4
+ description: 'GitHub Copilot tools',
5
+ tools: [
6
+ // get_copilot_organization_details - Get Copilot organization details
7
+ {
8
+ definition: {
9
+ name: 'github_copilot_get_copilot_organization_details',
10
+ description: 'Get Copilot for Business or Enterprise details for an organization',
11
+ inputSchema: {
12
+ type: 'object',
13
+ properties: {
14
+ org: {
15
+ type: 'string',
16
+ description: 'Organization name',
17
+ },
18
+ },
19
+ required: ['org'],
20
+ },
21
+ },
22
+ handler: async (octokit, args) => {
23
+ const { data } = await octokit.copilot.getCopilotOrganizationDetails({
24
+ org: args.org,
25
+ });
26
+ return successResult(data);
27
+ },
28
+ },
29
+ // list_copilot_seats - List Copilot seats for an organization
30
+ {
31
+ definition: {
32
+ name: 'github_copilot_list_copilot_seats',
33
+ description: 'List all Copilot seat assignments for an organization',
34
+ inputSchema: {
35
+ type: 'object',
36
+ properties: {
37
+ org: {
38
+ type: 'string',
39
+ description: 'Organization name',
40
+ },
41
+ per_page: {
42
+ type: 'number',
43
+ description: 'Results per page (max 100)',
44
+ },
45
+ page: {
46
+ type: 'number',
47
+ description: 'Page number',
48
+ },
49
+ },
50
+ required: ['org'],
51
+ },
52
+ },
53
+ handler: async (octokit, args) => {
54
+ const { data } = await octokit.copilot.listCopilotSeats({
55
+ org: args.org,
56
+ per_page: args.per_page,
57
+ page: args.page,
58
+ });
59
+ return successResult(data);
60
+ },
61
+ },
62
+ // add_copilot_seats_for_teams - Add Copilot seats for teams
63
+ {
64
+ definition: {
65
+ name: 'github_copilot_add_copilot_seats_for_teams',
66
+ description: 'Add Copilot seat assignments for teams in an organization',
67
+ inputSchema: {
68
+ type: 'object',
69
+ properties: {
70
+ org: {
71
+ type: 'string',
72
+ description: 'Organization name',
73
+ },
74
+ selected_teams: {
75
+ type: 'string',
76
+ description: 'Comma-separated list of team slugs to add Copilot seats for',
77
+ },
78
+ },
79
+ required: ['org', 'selected_teams'],
80
+ },
81
+ },
82
+ handler: async (octokit, args) => {
83
+ const selectedTeams = args.selected_teams
84
+ .split(',')
85
+ .map((t) => t.trim());
86
+ const { data } = await octokit.copilot.addCopilotSeatsForTeams({
87
+ org: args.org,
88
+ selected_teams: selectedTeams,
89
+ });
90
+ return successResult(data);
91
+ },
92
+ },
93
+ // add_copilot_seats_for_users - Add Copilot seats for users
94
+ {
95
+ definition: {
96
+ name: 'github_copilot_add_copilot_seats_for_users',
97
+ description: 'Add Copilot seat assignments for users in an organization',
98
+ inputSchema: {
99
+ type: 'object',
100
+ properties: {
101
+ org: {
102
+ type: 'string',
103
+ description: 'Organization name',
104
+ },
105
+ selected_usernames: {
106
+ type: 'string',
107
+ description: 'Comma-separated list of GitHub usernames to add Copilot seats for',
108
+ },
109
+ },
110
+ required: ['org', 'selected_usernames'],
111
+ },
112
+ },
113
+ handler: async (octokit, args) => {
114
+ const selectedUsernames = args.selected_usernames
115
+ .split(',')
116
+ .map((u) => u.trim());
117
+ const { data } = await octokit.copilot.addCopilotSeatsForUsers({
118
+ org: args.org,
119
+ selected_usernames: selectedUsernames,
120
+ });
121
+ return successResult(data);
122
+ },
123
+ },
124
+ // cancel_copilot_seat_assignment_for_teams - Cancel Copilot seats for teams
125
+ {
126
+ definition: {
127
+ name: 'github_copilot_cancel_copilot_seat_assignment_for_teams',
128
+ description: 'Cancel Copilot seat assignments for teams in an organization',
129
+ inputSchema: {
130
+ type: 'object',
131
+ properties: {
132
+ org: {
133
+ type: 'string',
134
+ description: 'Organization name',
135
+ },
136
+ selected_teams: {
137
+ type: 'string',
138
+ description: 'Comma-separated list of team slugs to cancel Copilot seats for',
139
+ },
140
+ },
141
+ required: ['org', 'selected_teams'],
142
+ },
143
+ },
144
+ handler: async (octokit, args) => {
145
+ const selectedTeams = args.selected_teams
146
+ .split(',')
147
+ .map((t) => t.trim());
148
+ const { data } = await octokit.copilot.cancelCopilotSeatAssignmentForTeams({
149
+ org: args.org,
150
+ selected_teams: selectedTeams,
151
+ });
152
+ return successResult(data);
153
+ },
154
+ },
155
+ // cancel_copilot_seat_assignment_for_users - Cancel Copilot seats for users
156
+ {
157
+ definition: {
158
+ name: 'github_copilot_cancel_copilot_seat_assignment_for_users',
159
+ description: 'Cancel Copilot seat assignments for users in an organization',
160
+ inputSchema: {
161
+ type: 'object',
162
+ properties: {
163
+ org: {
164
+ type: 'string',
165
+ description: 'Organization name',
166
+ },
167
+ selected_usernames: {
168
+ type: 'string',
169
+ description: 'Comma-separated list of GitHub usernames to cancel Copilot seats for',
170
+ },
171
+ },
172
+ required: ['org', 'selected_usernames'],
173
+ },
174
+ },
175
+ handler: async (octokit, args) => {
176
+ const selectedUsernames = args.selected_usernames
177
+ .split(',')
178
+ .map((u) => u.trim());
179
+ const { data } = await octokit.copilot.cancelCopilotSeatAssignmentForUsers({
180
+ org: args.org,
181
+ selected_usernames: selectedUsernames,
182
+ });
183
+ return successResult(data);
184
+ },
185
+ },
186
+ ],
187
+ };
@@ -0,0 +1,2 @@
1
+ import type { ToolCategory } from '../types.js';
2
+ export declare const dependabotCategory: ToolCategory;