@opentabs-dev/opentabs-plugin-github 0.0.76 → 0.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -129
- package/dist/adapter.iife.js +1149 -663
- package/dist/adapter.iife.js.map +4 -4
- package/dist/github-api.d.ts +16 -10
- package/dist/github-api.d.ts.map +1 -1
- package/dist/github-api.js +314 -112
- package/dist/github-api.js.map +1 -1
- package/dist/tools/add-reaction.d.ts +5 -9
- package/dist/tools/add-reaction.d.ts.map +1 -1
- package/dist/tools/add-reaction.js +29 -31
- package/dist/tools/add-reaction.js.map +1 -1
- package/dist/tools/compare-commits.d.ts +2 -8
- package/dist/tools/compare-commits.d.ts.map +1 -1
- package/dist/tools/compare-commits.js +32 -34
- package/dist/tools/compare-commits.js.map +1 -1
- package/dist/tools/create-comment.d.ts +1 -8
- package/dist/tools/create-comment.d.ts.map +1 -1
- package/dist/tools/create-comment.js +21 -5
- package/dist/tools/create-comment.js.map +1 -1
- package/dist/tools/create-issue.d.ts +0 -2
- package/dist/tools/create-issue.d.ts.map +1 -1
- package/dist/tools/create-issue.js +32 -15
- package/dist/tools/create-issue.js.map +1 -1
- package/dist/tools/create-label.d.ts.map +1 -1
- package/dist/tools/create-label.js +20 -12
- package/dist/tools/create-label.js.map +1 -1
- package/dist/tools/create-or-update-file.d.ts +1 -4
- package/dist/tools/create-or-update-file.d.ts.map +1 -1
- package/dist/tools/create-or-update-file.js +23 -23
- package/dist/tools/create-or-update-file.js.map +1 -1
- package/dist/tools/create-pull-request.d.ts.map +1 -1
- package/dist/tools/create-pull-request.js +37 -16
- package/dist/tools/create-pull-request.js.map +1 -1
- package/dist/tools/create-release.d.ts.map +1 -1
- package/dist/tools/create-release.js +29 -19
- package/dist/tools/create-release.js.map +1 -1
- package/dist/tools/create-repo.d.ts.map +1 -1
- package/dist/tools/create-repo.js +33 -18
- package/dist/tools/create-repo.js.map +1 -1
- package/dist/tools/delete-file.d.ts +1 -6
- package/dist/tools/delete-file.d.ts.map +1 -1
- package/dist/tools/delete-file.js +8 -25
- package/dist/tools/delete-file.js.map +1 -1
- package/dist/tools/get-file-content.d.ts.map +1 -1
- package/dist/tools/get-file-content.js +5 -9
- package/dist/tools/get-file-content.js.map +1 -1
- package/dist/tools/get-issue.d.ts.map +1 -1
- package/dist/tools/get-issue.js +25 -4
- package/dist/tools/get-issue.js.map +1 -1
- package/dist/tools/get-pull-request-diff.d.ts.map +1 -1
- package/dist/tools/get-pull-request-diff.js +19 -5
- package/dist/tools/get-pull-request-diff.js.map +1 -1
- package/dist/tools/get-pull-request.d.ts.map +1 -1
- package/dist/tools/get-pull-request.js +32 -3
- package/dist/tools/get-pull-request.js.map +1 -1
- package/dist/tools/get-repo.d.ts.map +1 -1
- package/dist/tools/get-repo.js +21 -4
- package/dist/tools/get-repo.js.map +1 -1
- package/dist/tools/get-user-profile.d.ts.map +1 -1
- package/dist/tools/get-user-profile.js +15 -2
- package/dist/tools/get-user-profile.js.map +1 -1
- package/dist/tools/get-workflow-run.d.ts.map +1 -1
- package/dist/tools/get-workflow-run.js +28 -5
- package/dist/tools/get-workflow-run.js.map +1 -1
- package/dist/tools/list-branches.d.ts +0 -2
- package/dist/tools/list-branches.d.ts.map +1 -1
- package/dist/tools/list-branches.js +3 -9
- package/dist/tools/list-branches.js.map +1 -1
- package/dist/tools/list-comments.d.ts +0 -2
- package/dist/tools/list-comments.d.ts.map +1 -1
- package/dist/tools/list-comments.js +33 -10
- package/dist/tools/list-comments.js.map +1 -1
- package/dist/tools/list-commits.d.ts +0 -2
- package/dist/tools/list-commits.d.ts.map +1 -1
- package/dist/tools/list-commits.js +8 -13
- package/dist/tools/list-commits.js.map +1 -1
- package/dist/tools/list-issues.d.ts +2 -2
- package/dist/tools/list-issues.d.ts.map +1 -1
- package/dist/tools/list-issues.js +43 -16
- package/dist/tools/list-issues.js.map +1 -1
- package/dist/tools/list-labels.d.ts +0 -2
- package/dist/tools/list-labels.d.ts.map +1 -1
- package/dist/tools/list-labels.js +18 -10
- package/dist/tools/list-labels.js.map +1 -1
- package/dist/tools/list-notifications.d.ts +1 -6
- package/dist/tools/list-notifications.d.ts.map +1 -1
- package/dist/tools/list-notifications.js +30 -23
- package/dist/tools/list-notifications.js.map +1 -1
- package/dist/tools/list-org-members.d.ts +0 -3
- package/dist/tools/list-org-members.d.ts.map +1 -1
- package/dist/tools/list-org-members.js +24 -18
- package/dist/tools/list-org-members.js.map +1 -1
- package/dist/tools/list-pull-request-files.d.ts +0 -3
- package/dist/tools/list-pull-request-files.d.ts.map +1 -1
- package/dist/tools/list-pull-request-files.js +6 -28
- package/dist/tools/list-pull-request-files.js.map +1 -1
- package/dist/tools/list-pull-requests.d.ts +2 -4
- package/dist/tools/list-pull-requests.d.ts.map +1 -1
- package/dist/tools/list-pull-requests.js +34 -18
- package/dist/tools/list-pull-requests.js.map +1 -1
- package/dist/tools/list-releases.d.ts +0 -2
- package/dist/tools/list-releases.d.ts.map +1 -1
- package/dist/tools/list-releases.js +37 -10
- package/dist/tools/list-releases.js.map +1 -1
- package/dist/tools/list-repos.d.ts +0 -7
- package/dist/tools/list-repos.d.ts.map +1 -1
- package/dist/tools/list-repos.js +18 -23
- package/dist/tools/list-repos.js.map +1 -1
- package/dist/tools/list-workflow-runs.d.ts +0 -21
- package/dist/tools/list-workflow-runs.d.ts.map +1 -1
- package/dist/tools/list-workflow-runs.js +32 -43
- package/dist/tools/list-workflow-runs.js.map +1 -1
- package/dist/tools/merge-pull-request.d.ts +1 -3
- package/dist/tools/merge-pull-request.d.ts.map +1 -1
- package/dist/tools/merge-pull-request.js +11 -15
- package/dist/tools/merge-pull-request.js.map +1 -1
- package/dist/tools/request-pull-request-review.d.ts +1 -21
- package/dist/tools/request-pull-request-review.d.ts.map +1 -1
- package/dist/tools/request-pull-request-review.js +17 -10
- package/dist/tools/request-pull-request-review.js.map +1 -1
- package/dist/tools/schemas.d.ts +130 -38
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +140 -52
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools/search-issues.d.ts +0 -13
- package/dist/tools/search-issues.d.ts.map +1 -1
- package/dist/tools/search-issues.js +23 -17
- package/dist/tools/search-issues.js.map +1 -1
- package/dist/tools/search-repos.d.ts +0 -10
- package/dist/tools/search-repos.d.ts.map +1 -1
- package/dist/tools/search-repos.js +7 -12
- package/dist/tools/search-repos.js.map +1 -1
- package/dist/tools/update-issue.d.ts +2 -18
- package/dist/tools/update-issue.d.ts.map +1 -1
- package/dist/tools/update-issue.js +19 -16
- package/dist/tools/update-issue.js.map +1 -1
- package/dist/tools/update-pull-request.d.ts +2 -24
- package/dist/tools/update-pull-request.d.ts.map +1 -1
- package/dist/tools/update-pull-request.js +28 -20
- package/dist/tools/update-pull-request.js.map +1 -1
- package/dist/tools.json +70 -747
- package/package.json +10 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-repo.js","sourceRoot":"","sources":["../../src/tools/get-repo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get-repo.js","sourceRoot":"","sources":["../../src/tools/get-repo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAmChD,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;IAChC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,uDAAuD;IACpE,OAAO,EAAE,sCAAsC;IAC/C,IAAI,EAAE,WAAW;IACjB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gBAChD,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,IAAI,CAAC;gBACtC,iBAAiB,EAAE,IAAI,CAAC,IAAI,EAAE,cAAc,IAAI,CAAC;gBACjD,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,IAAI,KAAK;gBACxC,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,IAAI,EAAE;aACvC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-user-profile.d.ts","sourceRoot":"","sources":["../../src/tools/get-user-profile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-user-profile.d.ts","sourceRoot":"","sources":["../../src/tools/get-user-profile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;kBA6BzB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ToolError, fetchFromPage } from '@opentabs-dev/plugin-sdk';
|
|
1
2
|
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
+
import { getLogin, isAuthenticated } from '../github-api.js';
|
|
4
5
|
import { mapUser, userSchema } from './schemas.js';
|
|
5
6
|
export const getUserProfile = defineTool({
|
|
6
7
|
name: 'get_user_profile',
|
|
@@ -16,8 +17,20 @@ export const getUserProfile = defineTool({
|
|
|
16
17
|
user: userSchema.describe('User profile'),
|
|
17
18
|
}),
|
|
18
19
|
handle: async (params) => {
|
|
20
|
+
if (!isAuthenticated())
|
|
21
|
+
throw ToolError.auth('Not authenticated — please log in to GitHub.');
|
|
19
22
|
const username = params.username ?? getLogin();
|
|
20
|
-
|
|
23
|
+
// User profiles are public — use api.github.com without credentials
|
|
24
|
+
const response = await fetchFromPage(`https://api.github.com/users/${username}`, {
|
|
25
|
+
headers: { Accept: 'application/vnd.github+json' },
|
|
26
|
+
credentials: 'omit',
|
|
27
|
+
});
|
|
28
|
+
if (!response.ok) {
|
|
29
|
+
if (response.status === 404)
|
|
30
|
+
throw ToolError.notFound(`User not found: ${username}`);
|
|
31
|
+
throw ToolError.internal(`API error (${response.status}): /users/${username}`);
|
|
32
|
+
}
|
|
33
|
+
const data = await response.json();
|
|
21
34
|
return { user: mapUser(data) };
|
|
22
35
|
},
|
|
23
36
|
});
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"get-user-profile.js","sourceRoot":"","sources":["../../src/tools/get-user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,6FAA6F;IAC1G,OAAO,EAAE,kCAAkC;IAC3C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;KACjG,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC;KAC1C,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,IAAI,CAAC,eAAe,EAAE;YAAE,MAAM,SAAS,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;QAC7F,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAE/C,oEAAoE;QACpE,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,gCAAgC,QAAQ,EAAE,EAAE;YAC/E,OAAO,EAAE,EAAE,MAAM,EAAE,6BAA6B,EAAE;YAClD,WAAW,EAAE,MAAM;SACpB,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG;gBAAE,MAAM,SAAS,CAAC,QAAQ,CAAC,mBAAmB,QAAQ,EAAE,CAAC,CAAC;YACrF,MAAM,SAAS,CAAC,QAAQ,CAAC,cAAc,QAAQ,CAAC,MAAM,aAAa,QAAQ,EAAE,CAAC,CAAC;QACjF,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAA+B,CAAC,EAAE,CAAC;IAC5D,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-workflow-run.d.ts","sourceRoot":"","sources":["../../src/tools/get-workflow-run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-workflow-run.d.ts","sourceRoot":"","sources":["../../src/tools/get-workflow-run.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;kBA4CzB,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { ToolError, fetchText } from '@opentabs-dev/plugin-sdk';
|
|
1
2
|
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
4
|
+
import { isAuthenticated } from '../github-api.js';
|
|
5
|
+
import { workflowRunSchema } from './schemas.js';
|
|
5
6
|
export const getWorkflowRun = defineTool({
|
|
6
7
|
name: 'get_workflow_run',
|
|
7
8
|
displayName: 'Get Workflow Run',
|
|
8
|
-
description: 'Get
|
|
9
|
+
description: 'Get information about a specific GitHub Actions workflow run by its run ID.',
|
|
9
10
|
summary: 'Get a workflow run by ID',
|
|
10
11
|
icon: 'play',
|
|
11
12
|
group: 'Actions',
|
|
@@ -18,8 +19,30 @@ export const getWorkflowRun = defineTool({
|
|
|
18
19
|
workflow_run: workflowRunSchema.describe('The workflow run'),
|
|
19
20
|
}),
|
|
20
21
|
handle: async (params) => {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
if (!isAuthenticated())
|
|
23
|
+
throw ToolError.auth('Not authenticated — please log in to GitHub.');
|
|
24
|
+
const html = await fetchText(`/${params.owner}/${params.repo}/actions/runs/${params.run_id}`, {
|
|
25
|
+
headers: { 'X-Requested-With': 'XMLHttpRequest' },
|
|
26
|
+
});
|
|
27
|
+
const doc = new DOMParser().parseFromString(html, 'text/html');
|
|
28
|
+
const titleEl = doc.querySelector('h1, .workflow-run-title');
|
|
29
|
+
const statusEl = doc.querySelector('[data-testid="conclusion-icon"], .octicon-check, .octicon-x');
|
|
30
|
+
const branchEl = doc.querySelector('a[href*="tree/"]');
|
|
31
|
+
const timeEl = doc.querySelector('relative-time, time');
|
|
32
|
+
const shaEl = doc.querySelector('a[href*="commit/"]');
|
|
33
|
+
return {
|
|
34
|
+
workflow_run: {
|
|
35
|
+
id: params.run_id,
|
|
36
|
+
name: titleEl?.textContent?.trim() ?? '',
|
|
37
|
+
status: statusEl?.getAttribute('aria-label') ?? '',
|
|
38
|
+
conclusion: '',
|
|
39
|
+
head_branch: branchEl?.textContent?.trim() ?? '',
|
|
40
|
+
head_sha: shaEl?.textContent?.trim() ?? '',
|
|
41
|
+
html_url: `https://github.com/${params.owner}/${params.repo}/actions/runs/${params.run_id}`,
|
|
42
|
+
created_at: timeEl?.getAttribute('datetime') ?? '',
|
|
43
|
+
updated_at: timeEl?.getAttribute('datetime') ?? '',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
23
46
|
},
|
|
24
47
|
});
|
|
25
48
|
//# sourceMappingURL=get-workflow-run.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-workflow-run.js","sourceRoot":"","sources":["../../src/tools/get-workflow-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get-workflow-run.js","sourceRoot":"","sources":["../../src/tools/get-workflow-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,6EAA6E;IAC1F,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KA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D,OAAO;YACL,YAAY,EAAE;gBACZ,EAAE,EAAE,MAAM,CAAC,MAAM;gBACjB,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;gBACxC,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE;gBAClD,UAAU,EAAE,EAAE;gBACd,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;gBAChD,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;gBAC1C,QAAQ,EAAE,sBAAsB,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,iBAAiB,MAAM,CAAC,MAAM,EAAE;gBAC3F,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE;gBAClD,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE;aACnD;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -2,8 +2,6 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const listBranches: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
3
|
owner: z.ZodString;
|
|
4
4
|
repo: z.ZodString;
|
|
5
|
-
per_page: z.ZodOptional<z.ZodNumber>;
|
|
6
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
7
5
|
}, z.core.$strip>, z.ZodObject<{
|
|
8
6
|
branches: z.ZodArray<z.ZodObject<{
|
|
9
7
|
name: z.ZodString;
|
|
@@ -1 +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;
|
|
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;AASxB,eAAO,MAAM,YAAY;;;;;;;;;kBAkBvB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { pageJson } from '../github-api.js';
|
|
4
4
|
import { branchSchema, mapBranch } from './schemas.js';
|
|
5
5
|
export const listBranches = defineTool({
|
|
6
6
|
name: 'list_branches',
|
|
@@ -12,19 +12,13 @@ export const listBranches = defineTool({
|
|
|
12
12
|
input: z.object({
|
|
13
13
|
owner: z.string().min(1).describe('Repository owner (user or org)'),
|
|
14
14
|
repo: z.string().min(1).describe('Repository name'),
|
|
15
|
-
per_page: z.number().int().min(1).max(100).optional().describe('Results per page (default 30, max 100)'),
|
|
16
|
-
page: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
17
15
|
}),
|
|
18
16
|
output: z.object({
|
|
19
17
|
branches: z.array(branchSchema).describe('List of branches'),
|
|
20
18
|
}),
|
|
21
19
|
handle: async (params) => {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
page: params.page,
|
|
25
|
-
};
|
|
26
|
-
const data = await api(`/repos/${params.owner}/${params.repo}/branches`, { query });
|
|
27
|
-
return { branches: (data ?? []).map(mapBranch) };
|
|
20
|
+
const data = await pageJson(`/${params.owner}/${params.repo}/branches`);
|
|
21
|
+
return { branches: (data.branches ?? []).map(mapBranch) };
|
|
28
22
|
},
|
|
29
23
|
});
|
|
30
24
|
//# sourceMappingURL=list-branches.js.map
|
|
@@ -1 +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,
|
|
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,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOvE,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,iCAAiC;IAC9C,OAAO,EAAE,gCAAgC;IACzC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QACnE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;KACpD,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;KAC7D,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAkB,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,WAAW,CAAC,CAAC;QACzF,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;IAC5D,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -3,8 +3,6 @@ export declare const listComments: import("@opentabs-dev/plugin-sdk").ToolDefini
|
|
|
3
3
|
owner: z.ZodString;
|
|
4
4
|
repo: z.ZodString;
|
|
5
5
|
issue_number: z.ZodNumber;
|
|
6
|
-
per_page: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
8
6
|
}, z.core.$strip>, z.ZodObject<{
|
|
9
7
|
comments: z.ZodArray<z.ZodObject<{
|
|
10
8
|
id: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-comments.d.ts","sourceRoot":"","sources":["../../src/tools/list-comments.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list-comments.d.ts","sourceRoot":"","sources":["../../src/tools/list-comments.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;kBAoDvB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ToolError, fetchText } from '@opentabs-dev/plugin-sdk';
|
|
1
2
|
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
import { commentSchema
|
|
4
|
+
import { isAuthenticated } from '../github-api.js';
|
|
5
|
+
import { commentSchema } from './schemas.js';
|
|
5
6
|
export const listComments = defineTool({
|
|
6
7
|
name: 'list_comments',
|
|
7
8
|
displayName: 'List Comments',
|
|
@@ -13,19 +14,41 @@ export const listComments = defineTool({
|
|
|
13
14
|
owner: z.string().min(1).describe('Repository owner (user or org)'),
|
|
14
15
|
repo: z.string().min(1).describe('Repository name'),
|
|
15
16
|
issue_number: z.number().int().min(1).describe('Issue or pull request number'),
|
|
16
|
-
per_page: z.number().int().min(1).max(100).optional().describe('Results per page (default 30, max 100)'),
|
|
17
|
-
page: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
18
17
|
}),
|
|
19
18
|
output: z.object({
|
|
20
19
|
comments: z.array(commentSchema).describe('List of comments'),
|
|
21
20
|
}),
|
|
22
21
|
handle: async (params) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
if (!isAuthenticated())
|
|
23
|
+
throw ToolError.auth('Not authenticated — please log in to GitHub.');
|
|
24
|
+
// Fetch the issue/PR page HTML and parse comments from the rendered timeline
|
|
25
|
+
const html = await fetchText(`/${params.owner}/${params.repo}/issues/${params.issue_number}`, {
|
|
26
|
+
headers: { 'X-Requested-With': 'XMLHttpRequest' },
|
|
27
|
+
});
|
|
28
|
+
const doc = new DOMParser().parseFromString(html, 'text/html');
|
|
29
|
+
// Extract comments from the timeline DOM structure
|
|
30
|
+
const commentElements = doc.querySelectorAll('.js-comment-container, .timeline-comment');
|
|
31
|
+
const comments = [];
|
|
32
|
+
for (const el of commentElements) {
|
|
33
|
+
const bodyEl = el.querySelector('.comment-body, .js-comment-body');
|
|
34
|
+
const authorEl = el.querySelector('.author, a.timeline-comment-header-text');
|
|
35
|
+
const timeEl = el.querySelector('relative-time, time');
|
|
36
|
+
const linkEl = el.querySelector('a[id^="issuecomment-"]');
|
|
37
|
+
const id = linkEl?.getAttribute('id')?.replace('issuecomment-', '') ?? '0';
|
|
38
|
+
if (bodyEl) {
|
|
39
|
+
comments.push({
|
|
40
|
+
id: Number.parseInt(id, 10) || 0,
|
|
41
|
+
body: bodyEl.textContent?.trim() ?? '',
|
|
42
|
+
user_login: authorEl?.textContent?.trim() ?? '',
|
|
43
|
+
html_url: linkEl
|
|
44
|
+
? `https://github.com/${params.owner}/${params.repo}/issues/${params.issue_number}#${linkEl.getAttribute('id')}`
|
|
45
|
+
: '',
|
|
46
|
+
created_at: timeEl?.getAttribute('datetime') ?? '',
|
|
47
|
+
updated_at: timeEl?.getAttribute('datetime') ?? '',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return { comments };
|
|
29
52
|
},
|
|
30
53
|
});
|
|
31
54
|
//# sourceMappingURL=list-comments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-comments.js","sourceRoot":"","sources":["../../src/tools/list-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list-comments.js","sourceRoot":"","sources":["../../src/tools/list-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,4CAA4C;IACzD,OAAO,EAAE,2CAA2C;IACpD,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QACnE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACnD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8BAA8B,CAAC;KAC/E,CAAC;IACF,MAAM,EAAE,CAA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,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;oBAChC,IAAI,EAAE,MAAM,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;oBACtC,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;oBAC/C,QAAQ,EAAE,MAAM;wBACd,CAAC,CAAC,sBAAsB,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,WAAW,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;wBAChH,CAAC,CAAC,EAAE;oBACN,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE;oBAClD,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE;iBACnD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,CAAC;IACtB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -3,8 +3,6 @@ export declare const listCommits: import("@opentabs-dev/plugin-sdk").ToolDefinit
|
|
|
3
3
|
owner: z.ZodString;
|
|
4
4
|
repo: z.ZodString;
|
|
5
5
|
sha: z.ZodOptional<z.ZodString>;
|
|
6
|
-
per_page: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
8
6
|
}, z.core.$strip>, z.ZodObject<{
|
|
9
7
|
commits: z.ZodArray<z.ZodObject<{
|
|
10
8
|
sha: z.ZodString;
|
|
@@ -1 +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;
|
|
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;AAWxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;kBAwBtB,CAAC"}
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { pageJson } from '../github-api.js';
|
|
4
4
|
import { commitSchema, mapCommit } from './schemas.js';
|
|
5
5
|
export const listCommits = defineTool({
|
|
6
6
|
name: 'list_commits',
|
|
7
7
|
displayName: 'List Commits',
|
|
8
|
-
description: 'List commits for a repository. Optionally filter by branch
|
|
8
|
+
description: 'List commits for a repository. Optionally filter by branch or tag. Returns commits sorted by date descending.',
|
|
9
9
|
summary: 'List commits for a repository',
|
|
10
10
|
icon: 'git-commit',
|
|
11
11
|
group: 'Repositories',
|
|
12
12
|
input: z.object({
|
|
13
13
|
owner: z.string().min(1).describe('Repository owner (user or org)'),
|
|
14
14
|
repo: z.string().min(1).describe('Repository name'),
|
|
15
|
-
sha: z.string().optional().describe('Branch name
|
|
16
|
-
per_page: z.number().int().min(1).max(100).optional().describe('Results per page (default 30, max 100)'),
|
|
17
|
-
page: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
15
|
+
sha: z.string().optional().describe('Branch name or tag to list commits from (defaults to the default branch)'),
|
|
18
16
|
}),
|
|
19
17
|
output: z.object({
|
|
20
18
|
commits: z.array(commitSchema).describe('List of commits'),
|
|
21
19
|
}),
|
|
22
20
|
handle: async (params) => {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
query.sha = params.sha;
|
|
29
|
-
const data = await api(`/repos/${params.owner}/${params.repo}/commits`, { query });
|
|
30
|
-
return { commits: (data ?? []).map(mapCommit) };
|
|
21
|
+
const ref = params.sha ?? 'HEAD';
|
|
22
|
+
const data = await pageJson(`/${params.owner}/${params.repo}/commits/${ref}`);
|
|
23
|
+
// Commits are grouped by date; flatten all groups into a single list
|
|
24
|
+
const commits = (data.commitGroups ?? []).flatMap(g => (g.commits ?? []).map(mapCommit));
|
|
25
|
+
return { commits };
|
|
31
26
|
},
|
|
32
27
|
});
|
|
33
28
|
//# sourceMappingURL=list-commits.js.map
|
|
@@ -1 +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,
|
|
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,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASvE,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IACpC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EACT,+GAA+G;IACjH,OAAO,EAAE,+BAA+B;IACxC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QACnE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACnD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0EAA0E,CAAC;KAChH,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;KAC3D,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC;QACjC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAiB,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,YAAY,GAAG,EAAE,CAAC,CAAC;QAE9F,qEAAqE;QACrE,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;QACzF,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -3,8 +3,8 @@ export declare const listIssues: import("@opentabs-dev/plugin-sdk").ToolDefiniti
|
|
|
3
3
|
owner: z.ZodString;
|
|
4
4
|
repo: z.ZodString;
|
|
5
5
|
state: z.ZodOptional<z.ZodEnum<{
|
|
6
|
-
open: "open";
|
|
7
6
|
closed: "closed";
|
|
7
|
+
open: "open";
|
|
8
8
|
all: "all";
|
|
9
9
|
}>>;
|
|
10
10
|
labels: z.ZodOptional<z.ZodString>;
|
|
@@ -15,8 +15,8 @@ export declare const listIssues: import("@opentabs-dev/plugin-sdk").ToolDefiniti
|
|
|
15
15
|
updated: "updated";
|
|
16
16
|
}>>;
|
|
17
17
|
direction: z.ZodOptional<z.ZodEnum<{
|
|
18
|
-
asc: "asc";
|
|
19
18
|
desc: "desc";
|
|
19
|
+
asc: "asc";
|
|
20
20
|
}>>;
|
|
21
21
|
per_page: z.ZodOptional<z.ZodNumber>;
|
|
22
22
|
page: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-issues.d.ts","sourceRoot":"","sources":["../../src/tools/list-issues.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"list-issues.d.ts","sourceRoot":"","sources":["../../src/tools/list-issues.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkErB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
import { issueSchema, mapIssue } from './schemas.js';
|
|
3
|
+
import { discoverQueryId, graphql } from '../github-api.js';
|
|
4
|
+
import { issueSchema, mapIssue, relayNodeToRaw } from './schemas.js';
|
|
5
|
+
const ISSUE_INDEX_QUERY_NAME = 'IssueIndexPageQuery';
|
|
5
6
|
export const listIssues = defineTool({
|
|
6
7
|
name: 'list_issues',
|
|
7
8
|
displayName: 'List Issues',
|
|
@@ -17,26 +18,52 @@ export const listIssues = defineTool({
|
|
|
17
18
|
assignee: z.string().optional().describe('Filter by assignee login, or "none" for unassigned, "*" for any'),
|
|
18
19
|
sort: z.enum(['created', 'updated', 'comments']).optional().describe('Sort field (default: created)'),
|
|
19
20
|
direction: z.enum(['asc', 'desc']).optional().describe('Sort direction (default: desc)'),
|
|
20
|
-
per_page: z.number().int().min(1).max(100).optional().describe('Results per page (default
|
|
21
|
+
per_page: z.number().int().min(1).max(100).optional().describe('Results per page (default 25)'),
|
|
21
22
|
page: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
22
23
|
}),
|
|
23
24
|
output: z.object({
|
|
24
25
|
issues: z.array(issueSchema).describe('List of issues'),
|
|
25
26
|
}),
|
|
26
27
|
handle: async (params) => {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
if (params.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
const state = params.state ?? 'open';
|
|
29
|
+
const sort = params.sort ?? 'created';
|
|
30
|
+
const dir = params.direction ?? 'desc';
|
|
31
|
+
const perPage = params.per_page ?? 25;
|
|
32
|
+
const page = params.page ?? 1;
|
|
33
|
+
// Build search query for IssueIndexPageQuery
|
|
34
|
+
const parts = [`is:issue`, `repo:${params.owner}/${params.repo}`];
|
|
35
|
+
if (state !== 'all')
|
|
36
|
+
parts.push(`is:${state}`);
|
|
37
|
+
if (params.labels) {
|
|
38
|
+
for (const label of params.labels.split(',')) {
|
|
39
|
+
parts.push(`label:"${label.trim()}"`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (params.assignee) {
|
|
43
|
+
if (params.assignee === 'none')
|
|
44
|
+
parts.push('no:assignee');
|
|
45
|
+
else if (params.assignee !== '*')
|
|
46
|
+
parts.push(`assignee:${params.assignee}`);
|
|
47
|
+
}
|
|
48
|
+
parts.push(`sort:${sort}-${dir}`);
|
|
49
|
+
const query = parts.join(' ');
|
|
50
|
+
const queryId = await discoverQueryId(ISSUE_INDEX_QUERY_NAME, `/${params.owner}/${params.repo}/issues`, {
|
|
51
|
+
q: 'is:issue is:open',
|
|
52
|
+
});
|
|
53
|
+
const skip = (page - 1) * perPage;
|
|
54
|
+
const data = await graphql(queryId, {
|
|
55
|
+
owner: params.owner,
|
|
56
|
+
name: params.repo,
|
|
57
|
+
query,
|
|
58
|
+
skip,
|
|
59
|
+
includeReactions: false,
|
|
60
|
+
});
|
|
61
|
+
const edges = data?.repository?.search?.edges ?? [];
|
|
62
|
+
const issues = edges
|
|
63
|
+
.map(e => relayNodeToRaw(e.node))
|
|
64
|
+
.filter((n) => n.__typename === 'Issue')
|
|
65
|
+
.map(n => mapIssue(n, { owner: params.owner, repo: params.repo }));
|
|
66
|
+
return { issues };
|
|
40
67
|
},
|
|
41
68
|
});
|
|
42
69
|
//# sourceMappingURL=list-issues.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-issues.js","sourceRoot":"","sources":["../../src/tools/list-issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list-issues.js","sourceRoot":"","sources":["../../src/tools/list-issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAqB,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAExF,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AAYrD,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACnC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EACT,wIAAwI;IAC1I,OAAO,EAAE,8BAA8B;IACvC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QACnE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACnD,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QA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QAElC,MAAM,IAAI,GAAG,MAAM,OAAO,CAAmB,OAAO,EAAE;YACpD,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK;YACL,IAAI;YACJ,gBAAgB,EAAE,KAAK;SACxB,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC;QACpD,MAAM,MAAM,GAAG,KAAK;aACjB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aAChC,MAAM,CAAC,CAAC,CAAC,EAAqB,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,OAAO,CAAC;aAC1D,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAErE,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -2,8 +2,6 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const listLabels: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
3
|
owner: z.ZodString;
|
|
4
4
|
repo: z.ZodString;
|
|
5
|
-
per_page: z.ZodOptional<z.ZodNumber>;
|
|
6
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
7
5
|
}, z.core.$strip>, z.ZodObject<{
|
|
8
6
|
labels: z.ZodArray<z.ZodObject<{
|
|
9
7
|
id: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-labels.d.ts","sourceRoot":"","sources":["../../src/tools/list-labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"list-labels.d.ts","sourceRoot":"","sources":["../../src/tools/list-labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,UAAU;;;;;;;;;;kBAkCrB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
import { labelSchema
|
|
3
|
+
import { discoverQueryId, graphql } from '../github-api.js';
|
|
4
|
+
import { labelSchema } from './schemas.js';
|
|
5
|
+
const LABEL_QUERY_NAME = 'RepositoryLabelIndexPageQuery';
|
|
5
6
|
export const listLabels = defineTool({
|
|
6
7
|
name: 'list_labels',
|
|
7
8
|
displayName: 'List Labels',
|
|
@@ -12,19 +13,26 @@ export const listLabels = defineTool({
|
|
|
12
13
|
input: z.object({
|
|
13
14
|
owner: z.string().min(1).describe('Repository owner (user or org)'),
|
|
14
15
|
repo: z.string().min(1).describe('Repository name'),
|
|
15
|
-
per_page: z.number().int().min(1).max(100).optional().describe('Results per page (default 30, max 100)'),
|
|
16
|
-
page: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
17
16
|
}),
|
|
18
17
|
output: z.object({
|
|
19
18
|
labels: z.array(labelSchema).describe('List of labels'),
|
|
20
19
|
}),
|
|
21
20
|
handle: async (params) => {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
const queryId = await discoverQueryId(LABEL_QUERY_NAME, `/${params.owner}/${params.repo}/labels`);
|
|
22
|
+
const data = await graphql(queryId, {
|
|
23
|
+
owner: params.owner,
|
|
24
|
+
name: params.repo,
|
|
25
|
+
first: 100,
|
|
26
|
+
skip: 0,
|
|
27
|
+
});
|
|
28
|
+
const edges = data?.repository?.labels?.edges ?? [];
|
|
29
|
+
const labels = edges.map(e => ({
|
|
30
|
+
id: 0, // GraphQL returns string IDs, not numeric
|
|
31
|
+
name: e.node?.name ?? '',
|
|
32
|
+
color: e.node?.color ?? '',
|
|
33
|
+
description: e.node?.description ?? '',
|
|
34
|
+
}));
|
|
35
|
+
return { labels };
|
|
28
36
|
},
|
|
29
37
|
});
|
|
30
38
|
//# sourceMappingURL=list-labels.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-labels.js","sourceRoot":"","sources":["../../src/tools/list-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list-labels.js","sourceRoot":"","sources":["../../src/tools/list-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;AAkBzD,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACnC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,kFAAkF;IAC/F,OAAO,EAAE,8BAA8B;IACvC,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QACnE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;KACpD,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC;KACxD,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,gBAAgB,EAAE,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,SAAS,CAAC,CAAC;QAElG,MAAM,IAAI,GAAG,MAAM,OAAO,CAAmB,OAAO,EAAE;YACpD,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,CAAC;SACR,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC;QACpD,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC7B,EAAE,EAAE,CAAC,EAAE,0CAA0C;YACjD,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE;YACxB,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE;YAC1B,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,WAAW,IAAI,EAAE;SACvC,CAAC,CAAC,CAAC;QAEJ,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const listNotifications: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
-
all: z.ZodOptional<z.ZodBoolean>;
|
|
4
|
-
participating: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
-
per_page: z.ZodOptional<z.ZodNumber>;
|
|
6
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2
|
+
export declare const listNotifications: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
8
3
|
notifications: z.ZodArray<z.ZodObject<{
|
|
9
4
|
id: z.ZodString;
|
|
10
5
|
reason: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-notifications.d.ts","sourceRoot":"","sources":["../../src/tools/list-notifications.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list-notifications.d.ts","sourceRoot":"","sources":["../../src/tools/list-notifications.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;kBA2C5B,CAAC"}
|