@bosonprotocol/agentic-commerce 1.0.0-alpha.71 → 1.0.0-alpha.73
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 +2 -2
- package/dist/boson/goat-sdk-plugin/parameters.d.ts +2 -2
- package/dist/boson/mcp-server/external-tools/github.d.ts +473 -0
- package/dist/boson/mcp-server/external-tools/github.d.ts.map +1 -0
- package/dist/boson/mcp-server/external-tools/github.js +137 -0
- package/dist/boson/mcp-server/external-tools/github.js.map +1 -0
- package/dist/boson/mcp-server/external-tools/jsonSchemaValidator.d.ts +21 -0
- package/dist/boson/mcp-server/external-tools/jsonSchemaValidator.d.ts.map +1 -0
- package/dist/boson/mcp-server/external-tools/jsonSchemaValidator.js +102 -0
- package/dist/boson/mcp-server/external-tools/jsonSchemaValidator.js.map +1 -0
- package/dist/boson/mcp-server/external-tools/verify-signature.d.ts +15 -0
- package/dist/boson/mcp-server/external-tools/verify-signature.d.ts.map +1 -0
- package/dist/boson/mcp-server/external-tools/verify-signature.js +40 -0
- package/dist/boson/mcp-server/external-tools/verify-signature.js.map +1 -0
- package/dist/boson/mcp-server/handlers/agentRegistry.d.ts +4 -0
- package/dist/boson/mcp-server/handlers/agentRegistry.d.ts.map +1 -0
- package/dist/boson/mcp-server/handlers/agentRegistry.js +117 -0
- package/dist/boson/mcp-server/handlers/agentRegistry.js.map +1 -0
- package/dist/boson/mcp-server/index.d.ts.map +1 -1
- package/dist/boson/mcp-server/index.js +61 -10
- package/dist/boson/mcp-server/index.js.map +1 -1
- package/dist/boson/mcp-server/resourceParameterTypes.d.ts +86 -0
- package/dist/boson/mcp-server/resourceParameterTypes.d.ts.map +1 -1
- package/dist/boson/mcp-server/resourceParameterTypes.js +14 -1
- package/dist/boson/mcp-server/resourceParameterTypes.js.map +1 -1
- package/dist/boson/mcp-server/validation.d.ts +45 -2
- package/dist/boson/mcp-server/validation.d.ts.map +1 -1
- package/dist/boson/mcp-server/validation.js +2 -1
- package/dist/boson/mcp-server/validation.js.map +1 -1
- package/dist/common/mcp-client/index.d.ts +2 -1
- package/dist/common/mcp-client/index.d.ts.map +1 -1
- package/dist/common/mcp-client/index.js +2 -2
- package/dist/common/mcp-client/index.js.map +1 -1
- package/dist/common/mcp-server/validationUtils.d.ts +1 -0
- package/dist/common/mcp-server/validationUtils.d.ts.map +1 -1
- package/dist/common/mcp-server/validationUtils.js +11 -1
- package/dist/common/mcp-server/validationUtils.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @bosonprotocol/agentic-commerce
|
|
2
2
|
|
|
3
|
-

|
|
4
|
+

|
|
5
5
|

|
|
6
6
|

|
|
7
7
|
|
|
@@ -819,8 +819,8 @@ declare const RenderContractualAgreementParameters_base: import("@goat-sdk/core"
|
|
|
819
819
|
signerAddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
820
820
|
}, "strip", import("zod").ZodTypeAny, {
|
|
821
821
|
configId?: string;
|
|
822
|
-
template?: string;
|
|
823
822
|
signerAddress?: string;
|
|
823
|
+
template?: string;
|
|
824
824
|
offerData?: {
|
|
825
825
|
agentId?: string | number | bigint;
|
|
826
826
|
disputeResolverId?: string | number | bigint;
|
|
@@ -856,8 +856,8 @@ declare const RenderContractualAgreementParameters_base: import("@goat-sdk/core"
|
|
|
856
856
|
};
|
|
857
857
|
}, {
|
|
858
858
|
configId?: string;
|
|
859
|
-
template?: string;
|
|
860
859
|
signerAddress?: string;
|
|
860
|
+
template?: string;
|
|
861
861
|
offerData?: {
|
|
862
862
|
agentId?: string | number | bigint;
|
|
863
863
|
disputeResolverId?: string | number | bigint;
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
+
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
3
|
+
declare class GitHubMCPClient {
|
|
4
|
+
protected _isConnected: boolean;
|
|
5
|
+
protected transport: StreamableHTTPClientTransport | null;
|
|
6
|
+
protected mcp: Client;
|
|
7
|
+
constructor();
|
|
8
|
+
connectToServer(): Promise<void>;
|
|
9
|
+
get isConnected(): boolean;
|
|
10
|
+
disconnect(): Promise<void>;
|
|
11
|
+
listTools(): Promise<{
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
input_schema: string;
|
|
15
|
+
}[]>;
|
|
16
|
+
listResources(): Promise<{
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
input_schema: string;
|
|
20
|
+
}[]>;
|
|
21
|
+
listResourceTemplates(): Promise<{
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
input_schema: string;
|
|
25
|
+
}[]>;
|
|
26
|
+
createBranch({ branchName }: {
|
|
27
|
+
branchName: string;
|
|
28
|
+
}): Promise<import("zod").objectOutputType<{
|
|
29
|
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
30
|
+
} & {
|
|
31
|
+
content: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
32
|
+
type: import("zod").ZodLiteral<"text">;
|
|
33
|
+
text: import("zod").ZodString;
|
|
34
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
35
|
+
type: import("zod").ZodLiteral<"text">;
|
|
36
|
+
text: import("zod").ZodString;
|
|
37
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
38
|
+
type: import("zod").ZodLiteral<"text">;
|
|
39
|
+
text: import("zod").ZodString;
|
|
40
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
41
|
+
type: import("zod").ZodLiteral<"image">;
|
|
42
|
+
data: import("zod").ZodString;
|
|
43
|
+
mimeType: import("zod").ZodString;
|
|
44
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
45
|
+
type: import("zod").ZodLiteral<"image">;
|
|
46
|
+
data: import("zod").ZodString;
|
|
47
|
+
mimeType: import("zod").ZodString;
|
|
48
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
49
|
+
type: import("zod").ZodLiteral<"image">;
|
|
50
|
+
data: import("zod").ZodString;
|
|
51
|
+
mimeType: import("zod").ZodString;
|
|
52
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
53
|
+
type: import("zod").ZodLiteral<"audio">;
|
|
54
|
+
data: import("zod").ZodString;
|
|
55
|
+
mimeType: import("zod").ZodString;
|
|
56
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
57
|
+
type: import("zod").ZodLiteral<"audio">;
|
|
58
|
+
data: import("zod").ZodString;
|
|
59
|
+
mimeType: import("zod").ZodString;
|
|
60
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
61
|
+
type: import("zod").ZodLiteral<"audio">;
|
|
62
|
+
data: import("zod").ZodString;
|
|
63
|
+
mimeType: import("zod").ZodString;
|
|
64
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
65
|
+
type: import("zod").ZodLiteral<"resource">;
|
|
66
|
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
67
|
+
uri: import("zod").ZodString;
|
|
68
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
69
|
+
}, {
|
|
70
|
+
text: import("zod").ZodString;
|
|
71
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
72
|
+
uri: import("zod").ZodString;
|
|
73
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
+
}, {
|
|
75
|
+
text: import("zod").ZodString;
|
|
76
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
77
|
+
uri: import("zod").ZodString;
|
|
78
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
79
|
+
}, {
|
|
80
|
+
text: import("zod").ZodString;
|
|
81
|
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
82
|
+
uri: import("zod").ZodString;
|
|
83
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
84
|
+
}, {
|
|
85
|
+
blob: import("zod").ZodString;
|
|
86
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
87
|
+
uri: import("zod").ZodString;
|
|
88
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
89
|
+
}, {
|
|
90
|
+
blob: import("zod").ZodString;
|
|
91
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
92
|
+
uri: import("zod").ZodString;
|
|
93
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
94
|
+
}, {
|
|
95
|
+
blob: import("zod").ZodString;
|
|
96
|
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
97
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
98
|
+
type: import("zod").ZodLiteral<"resource">;
|
|
99
|
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
100
|
+
uri: import("zod").ZodString;
|
|
101
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
102
|
+
}, {
|
|
103
|
+
text: import("zod").ZodString;
|
|
104
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
105
|
+
uri: import("zod").ZodString;
|
|
106
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
107
|
+
}, {
|
|
108
|
+
text: import("zod").ZodString;
|
|
109
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
110
|
+
uri: import("zod").ZodString;
|
|
111
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
112
|
+
}, {
|
|
113
|
+
text: import("zod").ZodString;
|
|
114
|
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
115
|
+
uri: import("zod").ZodString;
|
|
116
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
117
|
+
}, {
|
|
118
|
+
blob: import("zod").ZodString;
|
|
119
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
120
|
+
uri: import("zod").ZodString;
|
|
121
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
122
|
+
}, {
|
|
123
|
+
blob: import("zod").ZodString;
|
|
124
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
125
|
+
uri: import("zod").ZodString;
|
|
126
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
127
|
+
}, {
|
|
128
|
+
blob: import("zod").ZodString;
|
|
129
|
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
130
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
131
|
+
type: import("zod").ZodLiteral<"resource">;
|
|
132
|
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
133
|
+
uri: import("zod").ZodString;
|
|
134
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
135
|
+
}, {
|
|
136
|
+
text: import("zod").ZodString;
|
|
137
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
138
|
+
uri: import("zod").ZodString;
|
|
139
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
140
|
+
}, {
|
|
141
|
+
text: import("zod").ZodString;
|
|
142
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
143
|
+
uri: import("zod").ZodString;
|
|
144
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
145
|
+
}, {
|
|
146
|
+
text: import("zod").ZodString;
|
|
147
|
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
148
|
+
uri: import("zod").ZodString;
|
|
149
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
150
|
+
}, {
|
|
151
|
+
blob: import("zod").ZodString;
|
|
152
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
153
|
+
uri: import("zod").ZodString;
|
|
154
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
155
|
+
}, {
|
|
156
|
+
blob: import("zod").ZodString;
|
|
157
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
158
|
+
uri: import("zod").ZodString;
|
|
159
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
160
|
+
}, {
|
|
161
|
+
blob: import("zod").ZodString;
|
|
162
|
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
163
|
+
}, import("zod").ZodTypeAny, "passthrough">>]>, "many">>;
|
|
164
|
+
structuredContent: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
165
|
+
isError: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
166
|
+
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectOutputType<{
|
|
167
|
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
168
|
+
} & {
|
|
169
|
+
toolResult: import("zod").ZodUnknown;
|
|
170
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
171
|
+
createFile({ organisation, repository, branch, filePath, content, message, }: {
|
|
172
|
+
organisation: string;
|
|
173
|
+
repository: string;
|
|
174
|
+
branch: string;
|
|
175
|
+
filePath: string;
|
|
176
|
+
content: string;
|
|
177
|
+
message?: string;
|
|
178
|
+
}): Promise<import("zod").objectOutputType<{
|
|
179
|
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
180
|
+
} & {
|
|
181
|
+
content: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
182
|
+
type: import("zod").ZodLiteral<"text">;
|
|
183
|
+
text: import("zod").ZodString;
|
|
184
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
185
|
+
type: import("zod").ZodLiteral<"text">;
|
|
186
|
+
text: import("zod").ZodString;
|
|
187
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
188
|
+
type: import("zod").ZodLiteral<"text">;
|
|
189
|
+
text: import("zod").ZodString;
|
|
190
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
191
|
+
type: import("zod").ZodLiteral<"image">;
|
|
192
|
+
data: import("zod").ZodString;
|
|
193
|
+
mimeType: import("zod").ZodString;
|
|
194
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
195
|
+
type: import("zod").ZodLiteral<"image">;
|
|
196
|
+
data: import("zod").ZodString;
|
|
197
|
+
mimeType: import("zod").ZodString;
|
|
198
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
199
|
+
type: import("zod").ZodLiteral<"image">;
|
|
200
|
+
data: import("zod").ZodString;
|
|
201
|
+
mimeType: import("zod").ZodString;
|
|
202
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
203
|
+
type: import("zod").ZodLiteral<"audio">;
|
|
204
|
+
data: import("zod").ZodString;
|
|
205
|
+
mimeType: import("zod").ZodString;
|
|
206
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
207
|
+
type: import("zod").ZodLiteral<"audio">;
|
|
208
|
+
data: import("zod").ZodString;
|
|
209
|
+
mimeType: import("zod").ZodString;
|
|
210
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
211
|
+
type: import("zod").ZodLiteral<"audio">;
|
|
212
|
+
data: import("zod").ZodString;
|
|
213
|
+
mimeType: import("zod").ZodString;
|
|
214
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
215
|
+
type: import("zod").ZodLiteral<"resource">;
|
|
216
|
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
217
|
+
uri: import("zod").ZodString;
|
|
218
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
219
|
+
}, {
|
|
220
|
+
text: import("zod").ZodString;
|
|
221
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
222
|
+
uri: import("zod").ZodString;
|
|
223
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
224
|
+
}, {
|
|
225
|
+
text: import("zod").ZodString;
|
|
226
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
227
|
+
uri: import("zod").ZodString;
|
|
228
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
229
|
+
}, {
|
|
230
|
+
text: import("zod").ZodString;
|
|
231
|
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
232
|
+
uri: import("zod").ZodString;
|
|
233
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
234
|
+
}, {
|
|
235
|
+
blob: import("zod").ZodString;
|
|
236
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
237
|
+
uri: import("zod").ZodString;
|
|
238
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
239
|
+
}, {
|
|
240
|
+
blob: import("zod").ZodString;
|
|
241
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
242
|
+
uri: import("zod").ZodString;
|
|
243
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
244
|
+
}, {
|
|
245
|
+
blob: import("zod").ZodString;
|
|
246
|
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
247
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
248
|
+
type: import("zod").ZodLiteral<"resource">;
|
|
249
|
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
250
|
+
uri: import("zod").ZodString;
|
|
251
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
252
|
+
}, {
|
|
253
|
+
text: import("zod").ZodString;
|
|
254
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
255
|
+
uri: import("zod").ZodString;
|
|
256
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
257
|
+
}, {
|
|
258
|
+
text: import("zod").ZodString;
|
|
259
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
260
|
+
uri: import("zod").ZodString;
|
|
261
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
262
|
+
}, {
|
|
263
|
+
text: import("zod").ZodString;
|
|
264
|
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
265
|
+
uri: import("zod").ZodString;
|
|
266
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
267
|
+
}, {
|
|
268
|
+
blob: import("zod").ZodString;
|
|
269
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
270
|
+
uri: import("zod").ZodString;
|
|
271
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
272
|
+
}, {
|
|
273
|
+
blob: import("zod").ZodString;
|
|
274
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
275
|
+
uri: import("zod").ZodString;
|
|
276
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
277
|
+
}, {
|
|
278
|
+
blob: import("zod").ZodString;
|
|
279
|
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
280
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
281
|
+
type: import("zod").ZodLiteral<"resource">;
|
|
282
|
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
283
|
+
uri: import("zod").ZodString;
|
|
284
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
285
|
+
}, {
|
|
286
|
+
text: import("zod").ZodString;
|
|
287
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
288
|
+
uri: import("zod").ZodString;
|
|
289
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
290
|
+
}, {
|
|
291
|
+
text: import("zod").ZodString;
|
|
292
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
293
|
+
uri: import("zod").ZodString;
|
|
294
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
295
|
+
}, {
|
|
296
|
+
text: import("zod").ZodString;
|
|
297
|
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
298
|
+
uri: import("zod").ZodString;
|
|
299
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
300
|
+
}, {
|
|
301
|
+
blob: import("zod").ZodString;
|
|
302
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
303
|
+
uri: import("zod").ZodString;
|
|
304
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
305
|
+
}, {
|
|
306
|
+
blob: import("zod").ZodString;
|
|
307
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
308
|
+
uri: import("zod").ZodString;
|
|
309
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
310
|
+
}, {
|
|
311
|
+
blob: import("zod").ZodString;
|
|
312
|
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
313
|
+
}, import("zod").ZodTypeAny, "passthrough">>]>, "many">>;
|
|
314
|
+
structuredContent: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
315
|
+
isError: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
316
|
+
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectOutputType<{
|
|
317
|
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
318
|
+
} & {
|
|
319
|
+
toolResult: import("zod").ZodUnknown;
|
|
320
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
321
|
+
createPullRequest({ organisation, repository, branch, title, body, }: {
|
|
322
|
+
organisation: string;
|
|
323
|
+
repository: string;
|
|
324
|
+
branch: string;
|
|
325
|
+
title: string;
|
|
326
|
+
body: string;
|
|
327
|
+
}): Promise<import("zod").objectOutputType<{
|
|
328
|
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
329
|
+
} & {
|
|
330
|
+
content: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
331
|
+
type: import("zod").ZodLiteral<"text">;
|
|
332
|
+
text: import("zod").ZodString;
|
|
333
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
334
|
+
type: import("zod").ZodLiteral<"text">;
|
|
335
|
+
text: import("zod").ZodString;
|
|
336
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
337
|
+
type: import("zod").ZodLiteral<"text">;
|
|
338
|
+
text: import("zod").ZodString;
|
|
339
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
340
|
+
type: import("zod").ZodLiteral<"image">;
|
|
341
|
+
data: import("zod").ZodString;
|
|
342
|
+
mimeType: import("zod").ZodString;
|
|
343
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
344
|
+
type: import("zod").ZodLiteral<"image">;
|
|
345
|
+
data: import("zod").ZodString;
|
|
346
|
+
mimeType: import("zod").ZodString;
|
|
347
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
348
|
+
type: import("zod").ZodLiteral<"image">;
|
|
349
|
+
data: import("zod").ZodString;
|
|
350
|
+
mimeType: import("zod").ZodString;
|
|
351
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
352
|
+
type: import("zod").ZodLiteral<"audio">;
|
|
353
|
+
data: import("zod").ZodString;
|
|
354
|
+
mimeType: import("zod").ZodString;
|
|
355
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
356
|
+
type: import("zod").ZodLiteral<"audio">;
|
|
357
|
+
data: import("zod").ZodString;
|
|
358
|
+
mimeType: import("zod").ZodString;
|
|
359
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
360
|
+
type: import("zod").ZodLiteral<"audio">;
|
|
361
|
+
data: import("zod").ZodString;
|
|
362
|
+
mimeType: import("zod").ZodString;
|
|
363
|
+
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
364
|
+
type: import("zod").ZodLiteral<"resource">;
|
|
365
|
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
366
|
+
uri: import("zod").ZodString;
|
|
367
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
368
|
+
}, {
|
|
369
|
+
text: import("zod").ZodString;
|
|
370
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
371
|
+
uri: import("zod").ZodString;
|
|
372
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
373
|
+
}, {
|
|
374
|
+
text: import("zod").ZodString;
|
|
375
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
376
|
+
uri: import("zod").ZodString;
|
|
377
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
378
|
+
}, {
|
|
379
|
+
text: import("zod").ZodString;
|
|
380
|
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
381
|
+
uri: import("zod").ZodString;
|
|
382
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
383
|
+
}, {
|
|
384
|
+
blob: import("zod").ZodString;
|
|
385
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
386
|
+
uri: import("zod").ZodString;
|
|
387
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
388
|
+
}, {
|
|
389
|
+
blob: import("zod").ZodString;
|
|
390
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
391
|
+
uri: import("zod").ZodString;
|
|
392
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
393
|
+
}, {
|
|
394
|
+
blob: import("zod").ZodString;
|
|
395
|
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
396
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
397
|
+
type: import("zod").ZodLiteral<"resource">;
|
|
398
|
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
399
|
+
uri: import("zod").ZodString;
|
|
400
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
401
|
+
}, {
|
|
402
|
+
text: import("zod").ZodString;
|
|
403
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
404
|
+
uri: import("zod").ZodString;
|
|
405
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
406
|
+
}, {
|
|
407
|
+
text: import("zod").ZodString;
|
|
408
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
409
|
+
uri: import("zod").ZodString;
|
|
410
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
411
|
+
}, {
|
|
412
|
+
text: import("zod").ZodString;
|
|
413
|
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
414
|
+
uri: import("zod").ZodString;
|
|
415
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
416
|
+
}, {
|
|
417
|
+
blob: import("zod").ZodString;
|
|
418
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
419
|
+
uri: import("zod").ZodString;
|
|
420
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
421
|
+
}, {
|
|
422
|
+
blob: import("zod").ZodString;
|
|
423
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
424
|
+
uri: import("zod").ZodString;
|
|
425
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
426
|
+
}, {
|
|
427
|
+
blob: import("zod").ZodString;
|
|
428
|
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
429
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
430
|
+
type: import("zod").ZodLiteral<"resource">;
|
|
431
|
+
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
432
|
+
uri: import("zod").ZodString;
|
|
433
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
434
|
+
}, {
|
|
435
|
+
text: import("zod").ZodString;
|
|
436
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
437
|
+
uri: import("zod").ZodString;
|
|
438
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
439
|
+
}, {
|
|
440
|
+
text: import("zod").ZodString;
|
|
441
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
442
|
+
uri: import("zod").ZodString;
|
|
443
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
444
|
+
}, {
|
|
445
|
+
text: import("zod").ZodString;
|
|
446
|
+
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
447
|
+
uri: import("zod").ZodString;
|
|
448
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
449
|
+
}, {
|
|
450
|
+
blob: import("zod").ZodString;
|
|
451
|
+
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
452
|
+
uri: import("zod").ZodString;
|
|
453
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
454
|
+
}, {
|
|
455
|
+
blob: import("zod").ZodString;
|
|
456
|
+
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
457
|
+
uri: import("zod").ZodString;
|
|
458
|
+
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
459
|
+
}, {
|
|
460
|
+
blob: import("zod").ZodString;
|
|
461
|
+
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
462
|
+
}, import("zod").ZodTypeAny, "passthrough">>]>, "many">>;
|
|
463
|
+
structuredContent: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
464
|
+
isError: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
465
|
+
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectOutputType<{
|
|
466
|
+
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
467
|
+
} & {
|
|
468
|
+
toolResult: import("zod").ZodUnknown;
|
|
469
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
470
|
+
}
|
|
471
|
+
export declare const gitHubMCPClient: GitHubMCPClient;
|
|
472
|
+
export {};
|
|
473
|
+
//# sourceMappingURL=github.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../../src/boson/mcp-server/external-tools/github.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAMnG,cAAM,eAAe;IACnB,SAAS,CAAC,YAAY,UAAS;IAC/B,SAAS,CAAC,SAAS,EAAE,6BAA6B,GAAG,IAAI,CAAQ;IACjE,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC;;IAMhB,eAAe;IAoBrB,IAAI,WAAW,YAEd;IAEK,UAAU;IAOV,SAAS;;;;;IAcT,aAAa;;;;;IAcb,qBAAqB;;;;;IAcrB,YAAY,CAAC,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkBnD,UAAU,CAAC,EACf,YAAY,EACZ,UAAU,EACV,MAAM,EACN,QAAQ,EACR,OAAO,EACP,OAAO,GACR,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmBK,iBAAiB,CAAC,EACtB,YAAY,EACZ,UAAU,EACV,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBF;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gitHubMCPClient = void 0;
|
|
4
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/client/index.js");
|
|
5
|
+
const streamableHttp_js_1 = require("@modelcontextprotocol/sdk/client/streamableHttp.js");
|
|
6
|
+
const GITHUB_MCP_URL = "https://api.githubcopilot.com/mcp";
|
|
7
|
+
const GITHUB_PAT = process.env.GITHUB_PERSONAL_ACCESS_TOKEN;
|
|
8
|
+
const GH_BASE_BRANCH = "main";
|
|
9
|
+
class GitHubMCPClient {
|
|
10
|
+
_isConnected = false;
|
|
11
|
+
transport = null;
|
|
12
|
+
mcp;
|
|
13
|
+
constructor() {
|
|
14
|
+
this.mcp = new index_js_1.Client({ name: "mcp-client-cli", version: "1.0.0" });
|
|
15
|
+
}
|
|
16
|
+
async connectToServer() {
|
|
17
|
+
this._isConnected = false;
|
|
18
|
+
try {
|
|
19
|
+
this.transport = new streamableHttp_js_1.StreamableHTTPClientTransport(new URL(GITHUB_MCP_URL), {
|
|
20
|
+
requestInit: {
|
|
21
|
+
headers: { Authorization: `Bearer ${GITHUB_PAT}` },
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
await this.mcp.connect(this.transport);
|
|
25
|
+
this._isConnected = true;
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
throw new Error(`Unable to connect to MCP server at ${GITHUB_MCP_URL}: ${error.message || error.toString()}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
get isConnected() {
|
|
32
|
+
return this._isConnected;
|
|
33
|
+
}
|
|
34
|
+
async disconnect() {
|
|
35
|
+
if (this.isConnected && this.transport) {
|
|
36
|
+
await this.transport.close();
|
|
37
|
+
this._isConnected = false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async listTools() {
|
|
41
|
+
if (!this._isConnected) {
|
|
42
|
+
await this.connectToServer();
|
|
43
|
+
}
|
|
44
|
+
const toolsResult = await this.mcp.listTools();
|
|
45
|
+
return toolsResult.tools.map((tool) => {
|
|
46
|
+
return {
|
|
47
|
+
name: tool.name,
|
|
48
|
+
description: tool.description,
|
|
49
|
+
input_schema: JSON.stringify(tool.inputSchema),
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
async listResources() {
|
|
54
|
+
if (!this._isConnected) {
|
|
55
|
+
await this.connectToServer();
|
|
56
|
+
}
|
|
57
|
+
const resourcesResult = await this.mcp.listResources();
|
|
58
|
+
return resourcesResult.resources.map((resource) => {
|
|
59
|
+
return {
|
|
60
|
+
name: resource.name,
|
|
61
|
+
description: resource.description,
|
|
62
|
+
input_schema: JSON.stringify(resource.inputSchema),
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async listResourceTemplates() {
|
|
67
|
+
if (!this._isConnected) {
|
|
68
|
+
await this.connectToServer();
|
|
69
|
+
}
|
|
70
|
+
const resourceTemplatesResult = await this.mcp.listResourceTemplates();
|
|
71
|
+
return resourceTemplatesResult.resourceTemplates.map((resourceTemplate) => {
|
|
72
|
+
return {
|
|
73
|
+
name: resourceTemplate.name,
|
|
74
|
+
description: resourceTemplate.description,
|
|
75
|
+
input_schema: JSON.stringify(resourceTemplate.inputSchema),
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async createBranch({ branchName }) {
|
|
80
|
+
if (!this._isConnected) {
|
|
81
|
+
await this.connectToServer();
|
|
82
|
+
}
|
|
83
|
+
// Implementation for creating a branch
|
|
84
|
+
const GH_ORGANISATION = "bosonprotocol";
|
|
85
|
+
const GH_REPOSITORY = "dACP-agents-registry";
|
|
86
|
+
return await this.mcp.callTool({
|
|
87
|
+
name: "create_branch",
|
|
88
|
+
arguments: {
|
|
89
|
+
owner: GH_ORGANISATION,
|
|
90
|
+
repo: GH_REPOSITORY,
|
|
91
|
+
branch: branchName,
|
|
92
|
+
from_branch: GH_BASE_BRANCH,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
async createFile({ organisation, repository, branch, filePath, content, message, }) {
|
|
97
|
+
if (!this._isConnected) {
|
|
98
|
+
await this.connectToServer();
|
|
99
|
+
}
|
|
100
|
+
// Implementation for creating a file
|
|
101
|
+
return this.mcp.callTool({
|
|
102
|
+
name: "create_or_update_file",
|
|
103
|
+
arguments: {
|
|
104
|
+
owner: organisation,
|
|
105
|
+
repo: repository,
|
|
106
|
+
path: filePath,
|
|
107
|
+
content,
|
|
108
|
+
branch,
|
|
109
|
+
message: message || `Create file ${filePath}`,
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
async createPullRequest({ organisation, repository, branch, title, body, }) {
|
|
114
|
+
if (!this._isConnected) {
|
|
115
|
+
await this.connectToServer();
|
|
116
|
+
}
|
|
117
|
+
// Implementation for creating a pull request
|
|
118
|
+
const draft = false;
|
|
119
|
+
const maintainer_can_modify = false;
|
|
120
|
+
return this.mcp.callTool({
|
|
121
|
+
name: "create_pull_request",
|
|
122
|
+
arguments: {
|
|
123
|
+
owner: organisation,
|
|
124
|
+
repo: repository,
|
|
125
|
+
title,
|
|
126
|
+
body,
|
|
127
|
+
head: branch,
|
|
128
|
+
base: GH_BASE_BRANCH,
|
|
129
|
+
draft: draft,
|
|
130
|
+
maintainer_can_modify: maintainer_can_modify,
|
|
131
|
+
labels: ["agent-registration"],
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.gitHubMCPClient = new GitHubMCPClient();
|
|
137
|
+
//# sourceMappingURL=github.js.map
|