@loopstack/github-module 0.1.0 → 0.2.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/dist/tools/actions/github-get-workflow-run.tool.d.ts +11 -9
- package/dist/tools/actions/github-get-workflow-run.tool.d.ts.map +1 -1
- package/dist/tools/actions/github-get-workflow-run.tool.js +13 -18
- package/dist/tools/actions/github-get-workflow-run.tool.js.map +1 -1
- package/dist/tools/actions/github-list-workflow-runs.tool.d.ts +29 -12
- package/dist/tools/actions/github-list-workflow-runs.tool.d.ts.map +1 -1
- package/dist/tools/actions/github-list-workflow-runs.tool.js +33 -38
- package/dist/tools/actions/github-list-workflow-runs.tool.js.map +1 -1
- package/dist/tools/actions/github-trigger-workflow.tool.d.ts +13 -11
- package/dist/tools/actions/github-trigger-workflow.tool.d.ts.map +1 -1
- package/dist/tools/actions/github-trigger-workflow.tool.js +15 -20
- package/dist/tools/actions/github-trigger-workflow.tool.js.map +1 -1
- package/dist/tools/content/github-create-or-update-file.tool.d.ts +15 -13
- package/dist/tools/content/github-create-or-update-file.tool.d.ts.map +1 -1
- package/dist/tools/content/github-create-or-update-file.tool.js +17 -22
- package/dist/tools/content/github-create-or-update-file.tool.js.map +1 -1
- package/dist/tools/content/github-get-commit.tool.d.ts +11 -9
- package/dist/tools/content/github-get-commit.tool.d.ts.map +1 -1
- package/dist/tools/content/github-get-commit.tool.js +13 -18
- package/dist/tools/content/github-get-commit.tool.js.map +1 -1
- package/dist/tools/content/github-get-file-content.tool.d.ts +12 -10
- package/dist/tools/content/github-get-file-content.tool.d.ts.map +1 -1
- package/dist/tools/content/github-get-file-content.tool.js +14 -19
- package/dist/tools/content/github-get-file-content.tool.js.map +1 -1
- package/dist/tools/content/github-list-directory.tool.d.ts +12 -10
- package/dist/tools/content/github-list-directory.tool.d.ts.map +1 -1
- package/dist/tools/content/github-list-directory.tool.js +14 -19
- package/dist/tools/content/github-list-directory.tool.js.map +1 -1
- package/dist/tools/issues/github-create-issue-comment.tool.d.ts +12 -10
- package/dist/tools/issues/github-create-issue-comment.tool.d.ts.map +1 -1
- package/dist/tools/issues/github-create-issue-comment.tool.js +14 -19
- package/dist/tools/issues/github-create-issue-comment.tool.js.map +1 -1
- package/dist/tools/issues/github-create-issue.tool.d.ts +14 -12
- package/dist/tools/issues/github-create-issue.tool.d.ts.map +1 -1
- package/dist/tools/issues/github-create-issue.tool.js +16 -21
- package/dist/tools/issues/github-create-issue.tool.js.map +1 -1
- package/dist/tools/issues/github-get-issue.tool.d.ts +11 -9
- package/dist/tools/issues/github-get-issue.tool.d.ts.map +1 -1
- package/dist/tools/issues/github-get-issue.tool.js +13 -18
- package/dist/tools/issues/github-get-issue.tool.js.map +1 -1
- package/dist/tools/issues/github-list-issues.tool.d.ts +19 -13
- package/dist/tools/issues/github-list-issues.tool.d.ts.map +1 -1
- package/dist/tools/issues/github-list-issues.tool.js +17 -22
- package/dist/tools/issues/github-list-issues.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-create-pull-request.tool.d.ts +15 -13
- package/dist/tools/pull-requests/github-create-pull-request.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-create-pull-request.tool.js +17 -22
- package/dist/tools/pull-requests/github-create-pull-request.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-get-pull-request.tool.d.ts +11 -9
- package/dist/tools/pull-requests/github-get-pull-request.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-get-pull-request.tool.js +13 -18
- package/dist/tools/pull-requests/github-get-pull-request.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-list-pr-reviews.tool.d.ts +11 -9
- package/dist/tools/pull-requests/github-list-pr-reviews.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-list-pr-reviews.tool.js +13 -18
- package/dist/tools/pull-requests/github-list-pr-reviews.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-list-pull-requests.tool.d.ts +18 -12
- package/dist/tools/pull-requests/github-list-pull-requests.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-list-pull-requests.tool.js +16 -21
- package/dist/tools/pull-requests/github-list-pull-requests.tool.js.map +1 -1
- package/dist/tools/pull-requests/github-merge-pull-request.tool.d.ts +18 -12
- package/dist/tools/pull-requests/github-merge-pull-request.tool.d.ts.map +1 -1
- package/dist/tools/pull-requests/github-merge-pull-request.tool.js +16 -21
- package/dist/tools/pull-requests/github-merge-pull-request.tool.js.map +1 -1
- package/dist/tools/repos/github-create-repo.tool.d.ts +12 -10
- package/dist/tools/repos/github-create-repo.tool.d.ts.map +1 -1
- package/dist/tools/repos/github-create-repo.tool.js +14 -19
- package/dist/tools/repos/github-create-repo.tool.js.map +1 -1
- package/dist/tools/repos/github-get-repo.tool.d.ts +10 -8
- package/dist/tools/repos/github-get-repo.tool.d.ts.map +1 -1
- package/dist/tools/repos/github-get-repo.tool.js +12 -17
- package/dist/tools/repos/github-get-repo.tool.js.map +1 -1
- package/dist/tools/repos/github-list-branches.tool.d.ts +11 -9
- package/dist/tools/repos/github-list-branches.tool.d.ts.map +1 -1
- package/dist/tools/repos/github-list-branches.tool.js +13 -18
- package/dist/tools/repos/github-list-branches.tool.js.map +1 -1
- package/dist/tools/repos/github-list-repos.tool.d.ts +21 -10
- package/dist/tools/repos/github-list-repos.tool.d.ts.map +1 -1
- package/dist/tools/repos/github-list-repos.tool.js +14 -19
- package/dist/tools/repos/github-list-repos.tool.js.map +1 -1
- package/dist/tools/search/github-search-code.tool.d.ts +11 -9
- package/dist/tools/search/github-search-code.tool.d.ts.map +1 -1
- package/dist/tools/search/github-search-code.tool.js +13 -18
- package/dist/tools/search/github-search-code.tool.js.map +1 -1
- package/dist/tools/search/github-search-issues.tool.d.ts +20 -10
- package/dist/tools/search/github-search-issues.tool.d.ts.map +1 -1
- package/dist/tools/search/github-search-issues.tool.js +16 -21
- package/dist/tools/search/github-search-issues.tool.js.map +1 -1
- package/dist/tools/search/github-search-repos.tool.d.ts +17 -10
- package/dist/tools/search/github-search-repos.tool.d.ts.map +1 -1
- package/dist/tools/search/github-search-repos.tool.js +14 -19
- package/dist/tools/search/github-search-repos.tool.js.map +1 -1
- package/dist/tools/users/github-get-authenticated-user.tool.d.ts +7 -5
- package/dist/tools/users/github-get-authenticated-user.tool.d.ts.map +1 -1
- package/dist/tools/users/github-get-authenticated-user.tool.js +7 -12
- package/dist/tools/users/github-get-authenticated-user.tool.js.map +1 -1
- package/dist/tools/users/github-list-user-orgs.tool.d.ts +9 -7
- package/dist/tools/users/github-list-user-orgs.tool.d.ts.map +1 -1
- package/dist/tools/users/github-list-user-orgs.tool.js +11 -16
- package/dist/tools/users/github-list-user-orgs.tool.js.map +1 -1
- package/package.json +2 -2
- package/src/tools/actions/github-get-workflow-run.tool.ts +16 -22
- package/src/tools/actions/github-list-workflow-runs.tool.ts +36 -45
- package/src/tools/actions/github-trigger-workflow.tool.ts +18 -26
- package/src/tools/content/github-create-or-update-file.tool.ts +20 -30
- package/src/tools/content/github-get-commit.tool.ts +16 -22
- package/src/tools/content/github-get-file-content.tool.ts +17 -24
- package/src/tools/content/github-list-directory.tool.ts +17 -24
- package/src/tools/issues/github-create-issue-comment.tool.ts +17 -24
- package/src/tools/issues/github-create-issue.tool.ts +19 -28
- package/src/tools/issues/github-get-issue.tool.ts +16 -22
- package/src/tools/issues/github-list-issues.tool.ts +20 -30
- package/src/tools/pull-requests/github-create-pull-request.tool.ts +20 -30
- package/src/tools/pull-requests/github-get-pull-request.tool.ts +16 -22
- package/src/tools/pull-requests/github-list-pr-reviews.tool.ts +16 -22
- package/src/tools/pull-requests/github-list-pull-requests.tool.ts +19 -28
- package/src/tools/pull-requests/github-merge-pull-request.tool.ts +19 -28
- package/src/tools/repos/github-create-repo.tool.ts +17 -24
- package/src/tools/repos/github-get-repo.tool.ts +15 -20
- package/src/tools/repos/github-list-branches.tool.ts +16 -22
- package/src/tools/repos/github-list-repos.tool.ts +17 -24
- package/src/tools/search/github-search-code.tool.ts +16 -22
- package/src/tools/search/github-search-issues.tool.ts +19 -26
- package/src/tools/search/github-search-repos.tool.ts +17 -24
- package/src/tools/users/github-get-authenticated-user.tool.ts +10 -12
- package/src/tools/users/github-list-user-orgs.tool.ts +14 -18
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
owner: z.ZodString;
|
|
5
|
+
repo: z.ZodString;
|
|
6
|
+
path: z.ZodString;
|
|
7
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export type GitHubGetFileContentArgs = z.infer<typeof inputSchema>;
|
|
10
|
+
export declare class GitHubGetFileContentTool extends BaseTool {
|
|
9
11
|
private readonly logger;
|
|
10
12
|
private tokenStore;
|
|
11
|
-
args: GitHubGetFileContentArgs
|
|
12
|
-
execute(args: GitHubGetFileContentArgs, ctx: RunContext): Promise<ToolResult>;
|
|
13
|
+
call(args: GitHubGetFileContentArgs): Promise<ToolResult>;
|
|
13
14
|
}
|
|
15
|
+
export {};
|
|
14
16
|
//# sourceMappingURL=github-get-file-content.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-get-file-content.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/content/github-get-file-content.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-get-file-content.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/content/github-get-file-content.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/D,QAAA,MAAM,WAAW;;;;;kBAON,CAAC;AAEZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEnE,qBAOa,wBAAyB,SAAQ,QAAQ;IACpD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6C;IAGpE,OAAO,CAAC,UAAU,CAAkB;IAE9B,IAAI,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC;CA2EhE"}
|
|
@@ -15,12 +15,19 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const zod_1 = require("zod");
|
|
16
16
|
const common_2 = require("@loopstack/common");
|
|
17
17
|
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
18
|
-
|
|
18
|
+
const inputSchema = zod_1.z
|
|
19
|
+
.object({
|
|
20
|
+
owner: zod_1.z.string(),
|
|
21
|
+
repo: zod_1.z.string(),
|
|
22
|
+
path: zod_1.z.string(),
|
|
23
|
+
ref: zod_1.z.string().optional(),
|
|
24
|
+
})
|
|
25
|
+
.strict();
|
|
26
|
+
let GitHubGetFileContentTool = GitHubGetFileContentTool_1 = class GitHubGetFileContentTool extends common_2.BaseTool {
|
|
19
27
|
logger = new common_1.Logger(GitHubGetFileContentTool_1.name);
|
|
20
28
|
tokenStore;
|
|
21
|
-
args
|
|
22
|
-
|
|
23
|
-
const accessToken = await this.tokenStore.getValidAccessToken(ctx.userId, 'github');
|
|
29
|
+
async call(args) {
|
|
30
|
+
const accessToken = await this.tokenStore.getValidAccessToken(this.ctx.context.userId, 'github');
|
|
24
31
|
if (!accessToken) {
|
|
25
32
|
return {
|
|
26
33
|
data: {
|
|
@@ -41,7 +48,7 @@ let GitHubGetFileContentTool = GitHubGetFileContentTool_1 = class GitHubGetFileC
|
|
|
41
48
|
},
|
|
42
49
|
});
|
|
43
50
|
if (response.status === 401 || response.status === 403) {
|
|
44
|
-
this.logger.warn(`GitHub API returned ${response.status} for user ${ctx.userId}`);
|
|
51
|
+
this.logger.warn(`GitHub API returned ${response.status} for user ${this.ctx.context.userId}`);
|
|
45
52
|
return {
|
|
46
53
|
data: {
|
|
47
54
|
error: '401',
|
|
@@ -84,24 +91,12 @@ __decorate([
|
|
|
84
91
|
(0, common_1.Inject)(),
|
|
85
92
|
__metadata("design:type", oauth_module_1.OAuthTokenStore)
|
|
86
93
|
], GitHubGetFileContentTool.prototype, "tokenStore", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, common_2.Input)({
|
|
89
|
-
schema: zod_1.z
|
|
90
|
-
.object({
|
|
91
|
-
owner: zod_1.z.string(),
|
|
92
|
-
repo: zod_1.z.string(),
|
|
93
|
-
path: zod_1.z.string(),
|
|
94
|
-
ref: zod_1.z.string().optional(),
|
|
95
|
-
})
|
|
96
|
-
.strict(),
|
|
97
|
-
}),
|
|
98
|
-
__metadata("design:type", Object)
|
|
99
|
-
], GitHubGetFileContentTool.prototype, "args", void 0);
|
|
100
94
|
exports.GitHubGetFileContentTool = GitHubGetFileContentTool = GitHubGetFileContentTool_1 = __decorate([
|
|
101
95
|
(0, common_2.Tool)({
|
|
102
|
-
|
|
96
|
+
uiConfig: {
|
|
103
97
|
description: 'Gets the content of a file from a GitHub repository. Decodes base64-encoded content from the API. Returns { error: "unauthorized" } if no valid token is available.',
|
|
104
98
|
},
|
|
99
|
+
schema: inputSchema,
|
|
105
100
|
})
|
|
106
101
|
], GitHubGetFileContentTool);
|
|
107
102
|
//# sourceMappingURL=github-get-file-content.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-get-file-content.tool.js","sourceRoot":"","sources":["../../../src/tools/content/github-get-file-content.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"github-get-file-content.tool.js","sourceRoot":"","sources":["../../../src/tools/content/github-get-file-content.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,8CAA+D;AAC/D,0DAA0D;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,CAAC,IAAI;oBACf,GAAG,EAAE,IAAI,CAAC,GAAG;oBACb,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,OAAO;oBACP,OAAO,EAAE,IAAI,CAAC,QAAQ;iBACvB;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAjFY,4DAAwB;AAI3B;IADP,IAAA,eAAM,GAAE;8BACW,8BAAe;4DAAC;mCAJzB,wBAAwB;IAPpC,IAAA,aAAI,EAAC;QACJ,QAAQ,EAAE;YACR,WAAW,EACT,qKAAqK;SACxK;QACD,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,wBAAwB,CAiFpC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
owner: z.ZodString;
|
|
5
|
+
repo: z.ZodString;
|
|
6
|
+
path: z.ZodDefault<z.ZodString>;
|
|
7
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export type GitHubListDirectoryArgs = z.input<typeof inputSchema>;
|
|
10
|
+
export declare class GitHubListDirectoryTool extends BaseTool {
|
|
9
11
|
private readonly logger;
|
|
10
12
|
private tokenStore;
|
|
11
|
-
args: GitHubListDirectoryArgs
|
|
12
|
-
execute(args: GitHubListDirectoryArgs, ctx: RunContext): Promise<ToolResult>;
|
|
13
|
+
call(args: GitHubListDirectoryArgs): Promise<ToolResult>;
|
|
13
14
|
}
|
|
15
|
+
export {};
|
|
14
16
|
//# sourceMappingURL=github-list-directory.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-list-directory.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/content/github-list-directory.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-list-directory.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/content/github-list-directory.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/D,QAAA,MAAM,WAAW;;;;;kBAON,CAAC;AAEZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAElE,qBAOa,uBAAwB,SAAQ,QAAQ;IACnD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4C;IAGnE,OAAO,CAAC,UAAU,CAAkB;IAE9B,IAAI,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC;CAoE/D"}
|
|
@@ -15,12 +15,19 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const zod_1 = require("zod");
|
|
16
16
|
const common_2 = require("@loopstack/common");
|
|
17
17
|
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
18
|
-
|
|
18
|
+
const inputSchema = zod_1.z
|
|
19
|
+
.object({
|
|
20
|
+
owner: zod_1.z.string(),
|
|
21
|
+
repo: zod_1.z.string(),
|
|
22
|
+
path: zod_1.z.string().default(''),
|
|
23
|
+
ref: zod_1.z.string().optional(),
|
|
24
|
+
})
|
|
25
|
+
.strict();
|
|
26
|
+
let GitHubListDirectoryTool = GitHubListDirectoryTool_1 = class GitHubListDirectoryTool extends common_2.BaseTool {
|
|
19
27
|
logger = new common_1.Logger(GitHubListDirectoryTool_1.name);
|
|
20
28
|
tokenStore;
|
|
21
|
-
args
|
|
22
|
-
|
|
23
|
-
const accessToken = await this.tokenStore.getValidAccessToken(ctx.userId, 'github');
|
|
29
|
+
async call(args) {
|
|
30
|
+
const accessToken = await this.tokenStore.getValidAccessToken(this.ctx.context.userId, 'github');
|
|
24
31
|
if (!accessToken) {
|
|
25
32
|
return {
|
|
26
33
|
data: {
|
|
@@ -42,7 +49,7 @@ let GitHubListDirectoryTool = GitHubListDirectoryTool_1 = class GitHubListDirect
|
|
|
42
49
|
},
|
|
43
50
|
});
|
|
44
51
|
if (response.status === 401 || response.status === 403) {
|
|
45
|
-
this.logger.warn(`GitHub API returned ${response.status} for user ${ctx.userId}`);
|
|
52
|
+
this.logger.warn(`GitHub API returned ${response.status} for user ${this.ctx.context.userId}`);
|
|
46
53
|
return {
|
|
47
54
|
data: {
|
|
48
55
|
error: '401',
|
|
@@ -79,24 +86,12 @@ __decorate([
|
|
|
79
86
|
(0, common_1.Inject)(),
|
|
80
87
|
__metadata("design:type", oauth_module_1.OAuthTokenStore)
|
|
81
88
|
], GitHubListDirectoryTool.prototype, "tokenStore", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, common_2.Input)({
|
|
84
|
-
schema: zod_1.z
|
|
85
|
-
.object({
|
|
86
|
-
owner: zod_1.z.string(),
|
|
87
|
-
repo: zod_1.z.string(),
|
|
88
|
-
path: zod_1.z.string().default(''),
|
|
89
|
-
ref: zod_1.z.string().optional(),
|
|
90
|
-
})
|
|
91
|
-
.strict(),
|
|
92
|
-
}),
|
|
93
|
-
__metadata("design:type", Object)
|
|
94
|
-
], GitHubListDirectoryTool.prototype, "args", void 0);
|
|
95
89
|
exports.GitHubListDirectoryTool = GitHubListDirectoryTool = GitHubListDirectoryTool_1 = __decorate([
|
|
96
90
|
(0, common_2.Tool)({
|
|
97
|
-
|
|
91
|
+
uiConfig: {
|
|
98
92
|
description: 'Lists the contents of a directory in a GitHub repository. Returns { error: "unauthorized" } if no valid token is available.',
|
|
99
93
|
},
|
|
94
|
+
schema: inputSchema,
|
|
100
95
|
})
|
|
101
96
|
], GitHubListDirectoryTool);
|
|
102
97
|
//# sourceMappingURL=github-list-directory.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-list-directory.tool.js","sourceRoot":"","sources":["../../../src/tools/content/github-list-directory.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"github-list-directory.tool.js","sourceRoot":"","sources":["../../../src/tools/content/github-list-directory.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,8CAA+D;AAC/D,0DAA0D;AAE1D,MAAM,WAAW,GAAG,OAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC;KACD,MAAM,EAAE,CAAC;AAWL,IAAM,uBAAuB,+BAA7B,MAAM,uBAAwB,SAAQ,iBAAQ;IAClC,MAAM,GAAG,IAAI,eAAM,CAAC,yBAAuB,CAAC,IAAI,CAAC,CAAC;IAG3D,UAAU,CAAkB;IAEpC,KAAK,CAAC,IAAI,CAAC,IAA6B;QACtC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEjG,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO;gBACL,IAAI,EAAE;oBACJ,KAAK,EAAE,cAAc;oBACrB,OAAO,EAAE,yDAAyD;iBACnE;aACF,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,GAAG;YAAE,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QA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AAC,IAAI,EAAE,CAOjC,CAAC;QAEH,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACnC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,OAAO,EAAE,KAAK,CAAC,QAAQ;SACxB,CAAC,CAAC,CAAC;QAEJ,OAAO;YACL,IAAI,EAAE,EAAE,OAAO,EAAE;SAClB,CAAC;IACJ,CAAC;CACF,CAAA;AA1EY,0DAAuB;AAI1B;IADP,IAAA,eAAM,GAAE;8BACW,8BAAe;2DAAC;kCAJzB,uBAAuB;IAPnC,IAAA,aAAI,EAAC;QACJ,QAAQ,EAAE;YACR,WAAW,EACT,6HAA6H;SAChI;QACD,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,uBAAuB,CA0EnC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
owner: z.ZodString;
|
|
5
|
+
repo: z.ZodString;
|
|
6
|
+
issueNumber: z.ZodNumber;
|
|
7
|
+
body: z.ZodString;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export type GitHubCreateIssueCommentArgs = z.infer<typeof inputSchema>;
|
|
10
|
+
export declare class GitHubCreateIssueCommentTool extends BaseTool {
|
|
9
11
|
private readonly logger;
|
|
10
12
|
private tokenStore;
|
|
11
|
-
args: GitHubCreateIssueCommentArgs
|
|
12
|
-
execute(args: GitHubCreateIssueCommentArgs, ctx: RunContext): Promise<ToolResult>;
|
|
13
|
+
call(args: GitHubCreateIssueCommentArgs): Promise<ToolResult>;
|
|
13
14
|
}
|
|
15
|
+
export {};
|
|
14
16
|
//# sourceMappingURL=github-create-issue-comment.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-create-issue-comment.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/github-create-issue-comment.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-create-issue-comment.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/github-create-issue-comment.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/D,QAAA,MAAM,WAAW;;;;;kBAON,CAAC;AAEZ,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEvE,qBAOa,4BAA6B,SAAQ,QAAQ;IACxD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiD;IAGxE,OAAO,CAAC,UAAU,CAAkB;IAE9B,IAAI,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAAC,UAAU,CAAC;CA+DpE"}
|
|
@@ -15,12 +15,19 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const zod_1 = require("zod");
|
|
16
16
|
const common_2 = require("@loopstack/common");
|
|
17
17
|
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
18
|
-
|
|
18
|
+
const inputSchema = zod_1.z
|
|
19
|
+
.object({
|
|
20
|
+
owner: zod_1.z.string(),
|
|
21
|
+
repo: zod_1.z.string(),
|
|
22
|
+
issueNumber: zod_1.z.number(),
|
|
23
|
+
body: zod_1.z.string(),
|
|
24
|
+
})
|
|
25
|
+
.strict();
|
|
26
|
+
let GitHubCreateIssueCommentTool = GitHubCreateIssueCommentTool_1 = class GitHubCreateIssueCommentTool extends common_2.BaseTool {
|
|
19
27
|
logger = new common_1.Logger(GitHubCreateIssueCommentTool_1.name);
|
|
20
28
|
tokenStore;
|
|
21
|
-
args
|
|
22
|
-
|
|
23
|
-
const accessToken = await this.tokenStore.getValidAccessToken(ctx.userId, 'github');
|
|
29
|
+
async call(args) {
|
|
30
|
+
const accessToken = await this.tokenStore.getValidAccessToken(this.ctx.context.userId, 'github');
|
|
24
31
|
if (!accessToken) {
|
|
25
32
|
return {
|
|
26
33
|
data: {
|
|
@@ -41,7 +48,7 @@ let GitHubCreateIssueCommentTool = GitHubCreateIssueCommentTool_1 = class GitHub
|
|
|
41
48
|
body: JSON.stringify({ body: args.body }),
|
|
42
49
|
});
|
|
43
50
|
if (response.status === 401 || response.status === 403) {
|
|
44
|
-
this.logger.warn(`GitHub API returned ${response.status} for user ${ctx.userId}`);
|
|
51
|
+
this.logger.warn(`GitHub API returned ${response.status} for user ${this.ctx.context.userId}`);
|
|
45
52
|
return {
|
|
46
53
|
data: {
|
|
47
54
|
error: '401',
|
|
@@ -77,24 +84,12 @@ __decorate([
|
|
|
77
84
|
(0, common_1.Inject)(),
|
|
78
85
|
__metadata("design:type", oauth_module_1.OAuthTokenStore)
|
|
79
86
|
], GitHubCreateIssueCommentTool.prototype, "tokenStore", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, common_2.Input)({
|
|
82
|
-
schema: zod_1.z
|
|
83
|
-
.object({
|
|
84
|
-
owner: zod_1.z.string(),
|
|
85
|
-
repo: zod_1.z.string(),
|
|
86
|
-
issueNumber: zod_1.z.number(),
|
|
87
|
-
body: zod_1.z.string(),
|
|
88
|
-
})
|
|
89
|
-
.strict(),
|
|
90
|
-
}),
|
|
91
|
-
__metadata("design:type", Object)
|
|
92
|
-
], GitHubCreateIssueCommentTool.prototype, "args", void 0);
|
|
93
87
|
exports.GitHubCreateIssueCommentTool = GitHubCreateIssueCommentTool = GitHubCreateIssueCommentTool_1 = __decorate([
|
|
94
88
|
(0, common_2.Tool)({
|
|
95
|
-
|
|
89
|
+
uiConfig: {
|
|
96
90
|
description: 'Creates a comment on a GitHub issue or pull request. Returns { error: "unauthorized" } if no valid token is available.',
|
|
97
91
|
},
|
|
92
|
+
schema: inputSchema,
|
|
98
93
|
})
|
|
99
94
|
], GitHubCreateIssueCommentTool);
|
|
100
95
|
//# sourceMappingURL=github-create-issue-comment.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-create-issue-comment.tool.js","sourceRoot":"","sources":["../../../src/tools/issues/github-create-issue-comment.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"github-create-issue-comment.tool.js","sourceRoot":"","sources":["../../../src/tools/issues/github-create-issue-comment.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,8CAA+D;AAC/D,0DAA0D;AAE1D,MAAM,WAAW,GAAG,OAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CACjB,CAAC;KACD,MAAM,EAAE,CAAC;AAWL,IAAM,4BAA4B,oCAAlC,MAAM,4BAA6B,SAAQ,iBAAQ;IACvC,MAAM,GAAG,IAAI,eAAM,CAAC,8BAA4B,CAAC,IAAI,CAAC,CAAC;IAGhE,UAAU,CAAkB;IAEpC,KAAK,CAAC,IAAI,CAAC,IAAkC;QAC3C,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEjG,IAAI,CAAC,WAAW,EAAE,CAAC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QAAQ,CAAC,UAAU,EAAE;iBACpD;aACF,CAAC;QACJ,CAAC;QAED,MAAM,OAAO,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAKrC,CAAC;QAEF,OAAO;YACL,IAAI,EAAE;gBACJ,OAAO,EAAE;oBACP,EAAE,EAAE,OAAO,CAAC,EAAE;oBACd,OAAO,EAAE,OAAO,CAAC,QAAQ;oBACzB,SAAS,EAAE,OAAO,CAAC,UAAU;oBAC7B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;iBACzB;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AArEY,oEAA4B;AAI/B;IADP,IAAA,eAAM,GAAE;8BACW,8BAAe;gEAAC;uCAJzB,4BAA4B;IAPxC,IAAA,aAAI,EAAC;QACJ,QAAQ,EAAE;YACR,WAAW,EACT,wHAAwH;SAC3H;QACD,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,4BAA4B,CAqExC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
owner: z.ZodString;
|
|
5
|
+
repo: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
body: z.ZodOptional<z.ZodString>;
|
|
8
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
assignees: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
export type GitHubCreateIssueArgs = z.infer<typeof inputSchema>;
|
|
12
|
+
export declare class GitHubCreateIssueTool extends BaseTool {
|
|
11
13
|
private readonly logger;
|
|
12
14
|
private tokenStore;
|
|
13
|
-
args: GitHubCreateIssueArgs
|
|
14
|
-
execute(args: GitHubCreateIssueArgs, ctx: RunContext): Promise<ToolResult>;
|
|
15
|
+
call(args: GitHubCreateIssueArgs): Promise<ToolResult>;
|
|
15
16
|
}
|
|
17
|
+
export {};
|
|
16
18
|
//# sourceMappingURL=github-create-issue.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-create-issue.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/github-create-issue.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-create-issue.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/github-create-issue.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/D,QAAA,MAAM,WAAW;;;;;;;kBASN,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhE,qBAOa,qBAAsB,SAAQ,QAAQ;IACjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0C;IAGjE,OAAO,CAAC,UAAU,CAAkB;IAE9B,IAAI,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC;CAyE7D"}
|
|
@@ -15,12 +15,21 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const zod_1 = require("zod");
|
|
16
16
|
const common_2 = require("@loopstack/common");
|
|
17
17
|
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
18
|
-
|
|
18
|
+
const inputSchema = zod_1.z
|
|
19
|
+
.object({
|
|
20
|
+
owner: zod_1.z.string(),
|
|
21
|
+
repo: zod_1.z.string(),
|
|
22
|
+
title: zod_1.z.string(),
|
|
23
|
+
body: zod_1.z.string().optional(),
|
|
24
|
+
labels: zod_1.z.array(zod_1.z.string()).optional(),
|
|
25
|
+
assignees: zod_1.z.array(zod_1.z.string()).optional(),
|
|
26
|
+
})
|
|
27
|
+
.strict();
|
|
28
|
+
let GitHubCreateIssueTool = GitHubCreateIssueTool_1 = class GitHubCreateIssueTool extends common_2.BaseTool {
|
|
19
29
|
logger = new common_1.Logger(GitHubCreateIssueTool_1.name);
|
|
20
30
|
tokenStore;
|
|
21
|
-
args
|
|
22
|
-
|
|
23
|
-
const accessToken = await this.tokenStore.getValidAccessToken(ctx.userId, 'github');
|
|
31
|
+
async call(args) {
|
|
32
|
+
const accessToken = await this.tokenStore.getValidAccessToken(this.ctx.context.userId, 'github');
|
|
24
33
|
if (!accessToken) {
|
|
25
34
|
return {
|
|
26
35
|
data: {
|
|
@@ -50,7 +59,7 @@ let GitHubCreateIssueTool = GitHubCreateIssueTool_1 = class GitHubCreateIssueToo
|
|
|
50
59
|
body: JSON.stringify(requestBody),
|
|
51
60
|
});
|
|
52
61
|
if (response.status === 401 || response.status === 403) {
|
|
53
|
-
this.logger.warn(`GitHub API returned ${response.status} for user ${ctx.userId}`);
|
|
62
|
+
this.logger.warn(`GitHub API returned ${response.status} for user ${this.ctx.context.userId}`);
|
|
54
63
|
return {
|
|
55
64
|
data: {
|
|
56
65
|
error: '401',
|
|
@@ -87,26 +96,12 @@ __decorate([
|
|
|
87
96
|
(0, common_1.Inject)(),
|
|
88
97
|
__metadata("design:type", oauth_module_1.OAuthTokenStore)
|
|
89
98
|
], GitHubCreateIssueTool.prototype, "tokenStore", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, common_2.Input)({
|
|
92
|
-
schema: zod_1.z
|
|
93
|
-
.object({
|
|
94
|
-
owner: zod_1.z.string(),
|
|
95
|
-
repo: zod_1.z.string(),
|
|
96
|
-
title: zod_1.z.string(),
|
|
97
|
-
body: zod_1.z.string().optional(),
|
|
98
|
-
labels: zod_1.z.array(zod_1.z.string()).optional(),
|
|
99
|
-
assignees: zod_1.z.array(zod_1.z.string()).optional(),
|
|
100
|
-
})
|
|
101
|
-
.strict(),
|
|
102
|
-
}),
|
|
103
|
-
__metadata("design:type", Object)
|
|
104
|
-
], GitHubCreateIssueTool.prototype, "args", void 0);
|
|
105
99
|
exports.GitHubCreateIssueTool = GitHubCreateIssueTool = GitHubCreateIssueTool_1 = __decorate([
|
|
106
100
|
(0, common_2.Tool)({
|
|
107
|
-
|
|
101
|
+
uiConfig: {
|
|
108
102
|
description: 'Creates a new issue in a GitHub repository. Returns { error: "unauthorized" } if no valid token is available.',
|
|
109
103
|
},
|
|
104
|
+
schema: inputSchema,
|
|
110
105
|
})
|
|
111
106
|
], GitHubCreateIssueTool);
|
|
112
107
|
//# sourceMappingURL=github-create-issue.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-create-issue.tool.js","sourceRoot":"","sources":["../../../src/tools/issues/github-create-issue.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"github-create-issue.tool.js","sourceRoot":"","sources":["../../../src/tools/issues/github-create-issue.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,8CAA+D;AAC/D,0DAA0D;AAE1D,MAAM,WAAW,GAAG,OAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC;KACD,MAAM,EAAE,CAAC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,qBAAqB,CA+EjC"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
owner: z.ZodString;
|
|
5
|
+
repo: z.ZodString;
|
|
6
|
+
issueNumber: z.ZodNumber;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export type GitHubGetIssueArgs = z.infer<typeof inputSchema>;
|
|
9
|
+
export declare class GitHubGetIssueTool extends BaseTool {
|
|
8
10
|
private readonly logger;
|
|
9
11
|
private tokenStore;
|
|
10
|
-
args: GitHubGetIssueArgs
|
|
11
|
-
execute(args: GitHubGetIssueArgs, ctx: RunContext): Promise<ToolResult>;
|
|
12
|
+
call(args: GitHubGetIssueArgs): Promise<ToolResult>;
|
|
12
13
|
}
|
|
14
|
+
export {};
|
|
13
15
|
//# sourceMappingURL=github-get-issue.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-get-issue.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/github-get-issue.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-get-issue.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/github-get-issue.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/D,QAAA,MAAM,WAAW;;;;kBAMN,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAE7D,qBAOa,kBAAmB,SAAQ,QAAQ;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAG9D,OAAO,CAAC,UAAU,CAAkB;IAE9B,IAAI,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;CAgF1D"}
|
|
@@ -15,12 +15,18 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const zod_1 = require("zod");
|
|
16
16
|
const common_2 = require("@loopstack/common");
|
|
17
17
|
const oauth_module_1 = require("@loopstack/oauth-module");
|
|
18
|
-
|
|
18
|
+
const inputSchema = zod_1.z
|
|
19
|
+
.object({
|
|
20
|
+
owner: zod_1.z.string(),
|
|
21
|
+
repo: zod_1.z.string(),
|
|
22
|
+
issueNumber: zod_1.z.number(),
|
|
23
|
+
})
|
|
24
|
+
.strict();
|
|
25
|
+
let GitHubGetIssueTool = GitHubGetIssueTool_1 = class GitHubGetIssueTool extends common_2.BaseTool {
|
|
19
26
|
logger = new common_1.Logger(GitHubGetIssueTool_1.name);
|
|
20
27
|
tokenStore;
|
|
21
|
-
args
|
|
22
|
-
|
|
23
|
-
const accessToken = await this.tokenStore.getValidAccessToken(ctx.userId, 'github');
|
|
28
|
+
async call(args) {
|
|
29
|
+
const accessToken = await this.tokenStore.getValidAccessToken(this.ctx.context.userId, 'github');
|
|
24
30
|
if (!accessToken) {
|
|
25
31
|
return {
|
|
26
32
|
data: {
|
|
@@ -38,7 +44,7 @@ let GitHubGetIssueTool = GitHubGetIssueTool_1 = class GitHubGetIssueTool {
|
|
|
38
44
|
},
|
|
39
45
|
});
|
|
40
46
|
if (response.status === 401 || response.status === 403) {
|
|
41
|
-
this.logger.warn(`GitHub API returned ${response.status} for user ${ctx.userId}`);
|
|
47
|
+
this.logger.warn(`GitHub API returned ${response.status} for user ${this.ctx.context.userId}`);
|
|
42
48
|
return {
|
|
43
49
|
data: {
|
|
44
50
|
error: '401',
|
|
@@ -84,23 +90,12 @@ __decorate([
|
|
|
84
90
|
(0, common_1.Inject)(),
|
|
85
91
|
__metadata("design:type", oauth_module_1.OAuthTokenStore)
|
|
86
92
|
], GitHubGetIssueTool.prototype, "tokenStore", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, common_2.Input)({
|
|
89
|
-
schema: zod_1.z
|
|
90
|
-
.object({
|
|
91
|
-
owner: zod_1.z.string(),
|
|
92
|
-
repo: zod_1.z.string(),
|
|
93
|
-
issueNumber: zod_1.z.number(),
|
|
94
|
-
})
|
|
95
|
-
.strict(),
|
|
96
|
-
}),
|
|
97
|
-
__metadata("design:type", Object)
|
|
98
|
-
], GitHubGetIssueTool.prototype, "args", void 0);
|
|
99
93
|
exports.GitHubGetIssueTool = GitHubGetIssueTool = GitHubGetIssueTool_1 = __decorate([
|
|
100
94
|
(0, common_2.Tool)({
|
|
101
|
-
|
|
95
|
+
uiConfig: {
|
|
102
96
|
description: 'Gets detailed information about a specific GitHub issue. Returns { error: "unauthorized" } if no valid token is available.',
|
|
103
97
|
},
|
|
98
|
+
schema: inputSchema,
|
|
104
99
|
})
|
|
105
100
|
], GitHubGetIssueTool);
|
|
106
101
|
//# sourceMappingURL=github-get-issue.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-get-issue.tool.js","sourceRoot":"","sources":["../../../src/tools/issues/github-get-issue.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"github-get-issue.tool.js","sourceRoot":"","sources":["../../../src/tools/issues/github-get-issue.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,6BAAwB;AACxB,8CAA+D;AAC/D,0DAA0D;AAE1D,MAAM,WAAW,GAAG,OAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;CACxB,CAAC;KACD,MAAM,EAAE,CAAC;AAWL,IAAM,kBAAkB,0BA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QACJ,QAAQ,EAAE;YACR,WAAW,EACT,4HAA4H;SAC/H;QACD,MAAM,EAAE,WAAW;KACpB,CAAC;GACW,kBAAkB,CAsF9B"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseTool, ToolResult } from '@loopstack/common';
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
owner: z.ZodString;
|
|
5
|
+
repo: z.ZodString;
|
|
6
|
+
state: z.ZodDefault<z.ZodEnum<{
|
|
7
|
+
open: "open";
|
|
8
|
+
closed: "closed";
|
|
9
|
+
all: "all";
|
|
10
|
+
}>>;
|
|
11
|
+
labels: z.ZodOptional<z.ZodString>;
|
|
12
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
13
|
+
perPage: z.ZodDefault<z.ZodNumber>;
|
|
14
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export type GitHubListIssuesArgs = z.input<typeof inputSchema>;
|
|
17
|
+
export declare class GitHubListIssuesTool extends BaseTool {
|
|
12
18
|
private readonly logger;
|
|
13
19
|
private tokenStore;
|
|
14
|
-
args: GitHubListIssuesArgs
|
|
15
|
-
execute(args: GitHubListIssuesArgs, ctx: RunContext): Promise<ToolResult>;
|
|
20
|
+
call(args: GitHubListIssuesArgs): Promise<ToolResult>;
|
|
16
21
|
}
|
|
22
|
+
export {};
|
|
17
23
|
//# sourceMappingURL=github-list-issues.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-list-issues.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/github-list-issues.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-list-issues.tool.d.ts","sourceRoot":"","sources":["../../../src/tools/issues/github-list-issues.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAQ,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/D,QAAA,MAAM,WAAW;;;;;;;;;;;;kBAUN,CAAC;AAEZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAE/D,qBAOa,oBAAqB,SAAQ,QAAQ;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;IAGhE,OAAO,CAAC,UAAU,CAAkB;IAE9B,IAAI,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;CAmF5D"}
|