repoburg 1.3.167 → 1.3.168
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/backend/dist/src/app.module.js +2 -0
- package/backend/dist/src/app.module.js.map +1 -1
- package/backend/dist/src/core-entities/mcp-config.entity.d.ts +9 -0
- package/backend/dist/src/core-entities/mcp-config.entity.js +71 -6
- package/backend/dist/src/core-entities/mcp-config.entity.js.map +1 -1
- package/backend/dist/src/events/websocket.events.d.ts +12 -0
- package/backend/dist/src/events/websocket.events.js +4 -0
- package/backend/dist/src/events/websocket.events.js.map +1 -1
- package/backend/dist/src/mcp/marketplace/dto/initiate-connect.dto.d.ts +3 -0
- package/backend/dist/src/mcp/marketplace/dto/initiate-connect.dto.js +27 -0
- package/backend/dist/src/mcp/marketplace/dto/initiate-connect.dto.js.map +1 -0
- package/backend/dist/src/mcp/marketplace/marketplace.controller.d.ts +20 -0
- package/backend/dist/src/mcp/marketplace/marketplace.controller.js +145 -0
- package/backend/dist/src/mcp/marketplace/marketplace.controller.js.map +1 -0
- package/backend/dist/src/mcp/marketplace/marketplace.module.d.ts +2 -0
- package/backend/dist/src/mcp/marketplace/marketplace.module.js +34 -0
- package/backend/dist/src/mcp/marketplace/marketplace.module.js.map +1 -0
- package/backend/dist/src/mcp/marketplace/marketplace.service.d.ts +35 -0
- package/backend/dist/src/mcp/marketplace/marketplace.service.js +275 -0
- package/backend/dist/src/mcp/marketplace/marketplace.service.js.map +1 -0
- package/backend/dist/src/mcp/marketplace/oauth-provider.d.ts +29 -0
- package/backend/dist/src/mcp/marketplace/oauth-provider.js +55 -0
- package/backend/dist/src/mcp/marketplace/oauth-provider.js.map +1 -0
- package/backend/dist/src/mcp/marketplace/remote-servers.catalog.d.ts +12 -0
- package/backend/dist/src/mcp/marketplace/remote-servers.catalog.js +2318 -0
- package/backend/dist/src/mcp/marketplace/remote-servers.catalog.js.map +1 -0
- package/backend/dist/src/mcp/mcp.service.d.ts +2 -0
- package/backend/dist/src/mcp/mcp.service.js +92 -4
- package/backend/dist/src/mcp/mcp.service.js.map +1 -1
- package/backend/dist/src/seeding/data/system-prompts/control-repoburg-agent.js +2 -0
- package/backend/dist/src/seeding/data/system-prompts/control-repoburg-agent.js.map +1 -1
- package/backend/dist/src/seeding/data/system-prompts/default_native_tool_agent.js +2 -0
- package/backend/dist/src/seeding/data/system-prompts/default_native_tool_agent.js.map +1 -1
- package/backend/dist/src/seeding/data/system-prompts/explore-codebase-agent.js +2 -0
- package/backend/dist/src/seeding/data/system-prompts/explore-codebase-agent.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/backend/test-workspace-llm-turn-processor/.repoburg/hooks/context-size-hook.ts +0 -19
|
@@ -44,6 +44,7 @@ const llm_call_logs_module_1 = require("./llm-call-logs/llm-call-logs.module");
|
|
|
44
44
|
const global_config_module_1 = require("./global-config/global-config.module");
|
|
45
45
|
const agents_module_1 = require("./agents/agents.module");
|
|
46
46
|
const mcp_server_module_1 = require("./mcp-server/mcp-server.module");
|
|
47
|
+
const marketplace_module_1 = require("./mcp/marketplace/marketplace.module");
|
|
47
48
|
let dbPath = ':memory:';
|
|
48
49
|
if (process.env.NODE_ENV === 'production') {
|
|
49
50
|
const projectPath = process.env.REPOBURG_PROJECT_PATH || process.cwd();
|
|
@@ -113,6 +114,7 @@ exports.AppModule = AppModule = __decorate([
|
|
|
113
114
|
llm_call_logs_module_1.LlmCallLogsModule,
|
|
114
115
|
agents_module_1.AgentsModule,
|
|
115
116
|
mcp_server_module_1.McpServerModule,
|
|
117
|
+
marketplace_module_1.MarketplaceModule,
|
|
116
118
|
],
|
|
117
119
|
controllers: [app_controller_1.AppController],
|
|
118
120
|
providers: [app_service_1.AppService],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAC3C,6CAAgD;AAChD,mDAgByB;AACzB,oEAAyD;AACzD,mDAAwC;AACxC,gEAA4D;AAC5D,gEAA4D;AAC5D,kFAA6E;AAC7E,sEAAiE;AACjE,kFAA6E;AAC7E,2FAAsF;AACtF,8FAAyF;AACzF,kFAA6E;AAC7E,6DAAyD;AACzD,mEAA+D;AAC/D,qFAAgF;AAChF,6BAA6B;AAC7B,yBAAyB;AACzB,wFAAmF;AACnF,wFAAmF;AACnF,2FAAsF;AACtF,+EAA0E;AAC1E,0DAAsD;AACtD,wFAAmF;AACnF,gEAAuE;AACvE,iDAA6C;AAC7C,+EAA0E;AAC1E,wFAAmF;AACnF,sEAAiE;AACjE,yEAAoE;AACpE,wFAAmF;AACnF,+EAAyE;AACzE,+EAA0E;AAC1E,0DAAsD;AACtD,sEAAiE;
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAC3C,6CAAgD;AAChD,mDAgByB;AACzB,oEAAyD;AACzD,mDAAwC;AACxC,gEAA4D;AAC5D,gEAA4D;AAC5D,kFAA6E;AAC7E,sEAAiE;AACjE,kFAA6E;AAC7E,2FAAsF;AACtF,8FAAyF;AACzF,kFAA6E;AAC7E,6DAAyD;AACzD,mEAA+D;AAC/D,qFAAgF;AAChF,6BAA6B;AAC7B,yBAAyB;AACzB,wFAAmF;AACnF,wFAAmF;AACnF,2FAAsF;AACtF,+EAA0E;AAC1E,0DAAsD;AACtD,wFAAmF;AACnF,gEAAuE;AACvE,iDAA6C;AAC7C,+EAA0E;AAC1E,wFAAmF;AACnF,sEAAiE;AACjE,yEAAoE;AACpE,wFAAmF;AACnF,+EAAyE;AACzE,+EAA0E;AAC1E,0DAAsD;AACtD,sEAAiE;AACjE,6EAAyE;AAEzE,IAAI,MAAM,GAAG,UAAU,CAAC;AAExB,IAAI,OAAO,CAAC,GAA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B;YACpB,+CAAqB;YACrB,+CAAqB;YACrB,yCAAkB;YAClB,iDAAsB;YACtB,yCAAkB;YAClB,4BAAY;YACZ,+CAAqB;YACrB,mCAAqB;YACrB,sBAAS;YACT,yCAAkB;YAClB,+CAAqB;YACrB,mCAAe;YACf,qCAAgB;YAChB,wCAAiB;YACjB,4BAAY;YACZ,mCAAe;YACf,sCAAiB;SAClB;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;QACvB,OAAO,EAAE,CAAC,wBAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { BaseEntity } from './base.entity';
|
|
2
2
|
export declare class McpConfig extends BaseEntity {
|
|
3
3
|
server_name: string;
|
|
4
|
+
transport_type: 'stdio' | 'streamable_http';
|
|
4
5
|
command: string;
|
|
5
6
|
args: string[];
|
|
6
7
|
env: Record<string, string>;
|
|
8
|
+
server_url: string;
|
|
9
|
+
access_token: string;
|
|
10
|
+
refresh_token: string;
|
|
11
|
+
token_expires_at: Date;
|
|
12
|
+
client_information: Record<string, any>;
|
|
13
|
+
logo_url: string;
|
|
14
|
+
category: string;
|
|
15
|
+
marketplace_id: string;
|
|
7
16
|
is_active: boolean;
|
|
8
17
|
}
|
|
@@ -27,15 +27,23 @@ __decorate([
|
|
|
27
27
|
], McpConfig.prototype, "server_name", void 0);
|
|
28
28
|
__decorate([
|
|
29
29
|
(0, swagger_1.ApiProperty)({
|
|
30
|
-
description: '
|
|
30
|
+
description: 'Transport type: stdio (local process) or streamable_http (remote)',
|
|
31
|
+
example: 'stdio',
|
|
32
|
+
}),
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'text', default: 'stdio' }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], McpConfig.prototype, "transport_type", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({
|
|
38
|
+
description: 'Command to launch the MCP server (stdio only)',
|
|
31
39
|
example: 'npx',
|
|
32
40
|
}),
|
|
33
|
-
(0, typeorm_1.Column)({ type: 'text' }),
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
34
42
|
__metadata("design:type", String)
|
|
35
43
|
], McpConfig.prototype, "command", void 0);
|
|
36
44
|
__decorate([
|
|
37
|
-
(0, swagger_1.
|
|
38
|
-
description: 'Arguments for the command',
|
|
45
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
46
|
+
description: 'Arguments for the command (stdio only)',
|
|
39
47
|
example: [
|
|
40
48
|
'-y',
|
|
41
49
|
'@modelcontextprotocol/server-filesystem',
|
|
@@ -43,17 +51,74 @@ __decorate([
|
|
|
43
51
|
],
|
|
44
52
|
type: 'array',
|
|
45
53
|
}),
|
|
46
|
-
(0, typeorm_1.Column)({ type: 'json' }),
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
47
55
|
__metadata("design:type", Array)
|
|
48
56
|
], McpConfig.prototype, "args", void 0);
|
|
49
57
|
__decorate([
|
|
50
58
|
(0, swagger_1.ApiPropertyOptional)({
|
|
51
|
-
description: 'Environment variables for the server process',
|
|
59
|
+
description: 'Environment variables for the server process (stdio only)',
|
|
52
60
|
example: { NODE_ENV: 'production' },
|
|
53
61
|
}),
|
|
54
62
|
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
55
63
|
__metadata("design:type", Object)
|
|
56
64
|
], McpConfig.prototype, "env", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
67
|
+
description: 'Remote server URL for streamable_http transport',
|
|
68
|
+
example: 'https://mcp.stripe.com',
|
|
69
|
+
}),
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], McpConfig.prototype, "server_url", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
75
|
+
description: 'OAuth access token for remote servers',
|
|
76
|
+
}),
|
|
77
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], McpConfig.prototype, "access_token", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
82
|
+
description: 'OAuth refresh token for remote servers',
|
|
83
|
+
}),
|
|
84
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], McpConfig.prototype, "refresh_token", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
89
|
+
description: 'When the access token expires',
|
|
90
|
+
}),
|
|
91
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
92
|
+
__metadata("design:type", Date)
|
|
93
|
+
], McpConfig.prototype, "token_expires_at", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
96
|
+
description: 'OAuth client information from dynamic registration',
|
|
97
|
+
}),
|
|
98
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], McpConfig.prototype, "client_information", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
103
|
+
description: 'Logo URL for marketplace display',
|
|
104
|
+
}),
|
|
105
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], McpConfig.prototype, "logo_url", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
110
|
+
description: 'Category label for marketplace grouping',
|
|
111
|
+
}),
|
|
112
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], McpConfig.prototype, "category", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
117
|
+
description: 'Slug identifying which marketplace entry this was added from',
|
|
118
|
+
}),
|
|
119
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], McpConfig.prototype, "marketplace_id", void 0);
|
|
57
122
|
__decorate([
|
|
58
123
|
(0, swagger_1.ApiProperty)({
|
|
59
124
|
description: 'Whether this MCP server is active/enabled',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-config.entity.js","sourceRoot":"","sources":["../../../src/core-entities/mcp-config.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgD;AAChD,6CAAmE;AACnE,+CAA2C;
|
|
1
|
+
{"version":3,"file":"mcp-config.entity.js","sourceRoot":"","sources":["../../../src/core-entities/mcp-config.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgD;AAChD,6CAAmE;AACnE,+CAA2C;AAmBpC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAU;CAmGxC,CAAA;AAnGY,8BAAS;AAOpB;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,iCAAiC;QAC9C,OAAO,EAAE,YAAY;KACtB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACtC,IAAA,eAAK,GAAE;;8CACY;AAQpB;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EACT,mEAAmE;QACrE,OAAO,EAAE,OAAO;KACjB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;;iDACC;AAO5C;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,KAAK;K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,IAAI,EAAE,CAAC;8BAC3B,IAAI;mDAAC;AAMvB;IAJC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,oDAAoD;KAClE,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACD;AAMxC;IAJC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,kCAAkC;KAChD,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACxB;AAMjB;IAJC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,yCAAyC;KACvD,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACxB;AAMjB;IAJC,IAAA,6BAAmB,EAAC;QACnB,WAAW,EAAE,8DAA8D;KAC5E,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAClB;AAQvB;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KACd,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;4CACxB;oBAlGR,SAAS;IADrB,IAAA,gBAAM,EAAC,aAAa,CAAC;GACT,SAAS,CAmGrB"}
|
|
@@ -60,6 +60,18 @@ export type WebSocketEvent = {
|
|
|
60
60
|
attempt: number;
|
|
61
61
|
maxAttempts: number;
|
|
62
62
|
};
|
|
63
|
+
} | {
|
|
64
|
+
event: 'mcp-marketplace-connected';
|
|
65
|
+
data: {
|
|
66
|
+
marketplaceId: string;
|
|
67
|
+
serverName: string;
|
|
68
|
+
};
|
|
69
|
+
} | {
|
|
70
|
+
event: 'mcp-marketplace-error';
|
|
71
|
+
data: {
|
|
72
|
+
marketplaceId: string;
|
|
73
|
+
error: string;
|
|
74
|
+
};
|
|
63
75
|
};
|
|
64
76
|
export type WebSocketEventName = WebSocketEvent['event'];
|
|
65
77
|
export declare function isWebSocketEvent(obj: unknown): obj is WebSocketEvent;
|
|
@@ -43,6 +43,10 @@ function isWebSocketEvent(obj) {
|
|
|
43
43
|
'sessionId' in data &&
|
|
44
44
|
'attempt' in data &&
|
|
45
45
|
'maxAttempts' in data);
|
|
46
|
+
case 'mcp-marketplace-connected':
|
|
47
|
+
return data !== null && 'marketplaceId' in data && 'serverName' in data;
|
|
48
|
+
case 'mcp-marketplace-error':
|
|
49
|
+
return data !== null && 'marketplaceId' in data && 'error' in data;
|
|
46
50
|
default:
|
|
47
51
|
return false;
|
|
48
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.events.js","sourceRoot":"","sources":["../../../src/events/websocket.events.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"websocket.events.js","sourceRoot":"","sources":["../../../src/events/websocket.events.ts"],"names":[],"mappings":";;AAoDA,4CA0DC;AA1DD,SAAgB,gBAAgB,CAAC,GAAY;IAC3C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,GAAuC,CAAC;IAChE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC1D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,YAAY;YACf,OAAO,IAAI,CAAC;QACd,KAAK,YAAY;YACf,OAAO,IAAI,KAAK,IAAI,IAAI,WAAW,IAAI,IAAI,IAAI,gBAAgB,IAAI,IAAI,CAAC;QA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0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.InitiateConnectDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class InitiateConnectDto {
|
|
16
|
+
}
|
|
17
|
+
exports.InitiateConnectDto = InitiateConnectDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: 'The marketplace server slug to connect to (e.g. "github")',
|
|
21
|
+
example: 'github',
|
|
22
|
+
}),
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], InitiateConnectDto.prototype, "marketplaceId", void 0);
|
|
27
|
+
//# sourceMappingURL=initiate-connect.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initiate-connect.dto.js","sourceRoot":"","sources":["../../../../../src/mcp/marketplace/dto/initiate-connect.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAuD;AAEvD,MAAa,kBAAkB;CAQ9B;AARD,gDAQC;AADC;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2DAA2D;QACxE,OAAO,EAAE,QAAQ;KAClB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACS"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Response } from 'express';
|
|
2
|
+
import { MarketplaceService } from './marketplace.service';
|
|
3
|
+
import { InitiateConnectDto } from './dto/initiate-connect.dto';
|
|
4
|
+
export declare class MarketplaceController {
|
|
5
|
+
private readonly marketplaceService;
|
|
6
|
+
private readonly logger;
|
|
7
|
+
constructor(marketplaceService: MarketplaceService);
|
|
8
|
+
getMarketplaceServers(): import("./remote-servers.catalog").RemoteServerCatalogEntry[];
|
|
9
|
+
getMarketplaceServer(id: string): import("./remote-servers.catalog").RemoteServerCatalogEntry;
|
|
10
|
+
initiateConnect(dto: InitiateConnectDto): Promise<{
|
|
11
|
+
authUrl: string;
|
|
12
|
+
state: string;
|
|
13
|
+
}>;
|
|
14
|
+
getConnectStatus(marketplaceId: string): Promise<{
|
|
15
|
+
status: "pending" | "connected" | "error";
|
|
16
|
+
error?: string;
|
|
17
|
+
}>;
|
|
18
|
+
handleOAuthCallback(code: string, state: string, error: string, res: Response): Promise<void>;
|
|
19
|
+
private sendCallbackHtml;
|
|
20
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var MarketplaceController_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.MarketplaceController = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
19
|
+
const marketplace_service_1 = require("./marketplace.service");
|
|
20
|
+
const initiate_connect_dto_1 = require("./dto/initiate-connect.dto");
|
|
21
|
+
let MarketplaceController = MarketplaceController_1 = class MarketplaceController {
|
|
22
|
+
constructor(marketplaceService) {
|
|
23
|
+
this.marketplaceService = marketplaceService;
|
|
24
|
+
this.logger = new common_1.Logger(MarketplaceController_1.name);
|
|
25
|
+
}
|
|
26
|
+
getMarketplaceServers() {
|
|
27
|
+
return this.marketplaceService.getMarketplaceServers();
|
|
28
|
+
}
|
|
29
|
+
getMarketplaceServer(id) {
|
|
30
|
+
return this.marketplaceService.getMarketplaceServer(id);
|
|
31
|
+
}
|
|
32
|
+
async initiateConnect(dto) {
|
|
33
|
+
this.logger.log(`POST /mcp/marketplace/connect for ${dto.marketplaceId}`);
|
|
34
|
+
return this.marketplaceService.initiateConnect(dto.marketplaceId);
|
|
35
|
+
}
|
|
36
|
+
async getConnectStatus(marketplaceId) {
|
|
37
|
+
return this.marketplaceService.getConnectStatus(marketplaceId);
|
|
38
|
+
}
|
|
39
|
+
async handleOAuthCallback(code, state, error, res) {
|
|
40
|
+
this.logger.log(`GET /mcp/oauth/callback (state: ${state?.substring(0, 8)}...)`);
|
|
41
|
+
if (error) {
|
|
42
|
+
return this.sendCallbackHtml(res, false, `Authorization failed: ${error}`);
|
|
43
|
+
}
|
|
44
|
+
if (!code || !state) {
|
|
45
|
+
return this.sendCallbackHtml(res, false, 'Missing authorization code or state parameter.');
|
|
46
|
+
}
|
|
47
|
+
const result = await this.marketplaceService.handleOAuthCallback(code, state);
|
|
48
|
+
return this.sendCallbackHtml(res, result.success, result.error);
|
|
49
|
+
}
|
|
50
|
+
sendCallbackHtml(res, success, error) {
|
|
51
|
+
const html = success
|
|
52
|
+
? `<!DOCTYPE html>
|
|
53
|
+
<html>
|
|
54
|
+
<head><title>Authorization Successful</title></head>
|
|
55
|
+
<body style="font-family: -apple-system, sans-serif; text-align: center; padding: 3rem;">
|
|
56
|
+
<h1 style="color: #16a34a;">✅ Authorization Successful</h1>
|
|
57
|
+
<p style="color: #666;">You can close this tab and return to Repoburg.</p>
|
|
58
|
+
<script>setTimeout(() => window.close(), 2000);</script>
|
|
59
|
+
</body>
|
|
60
|
+
</html>`
|
|
61
|
+
: `<!DOCTYPE html>
|
|
62
|
+
<html>
|
|
63
|
+
<head><title>Authorization Failed</title></head>
|
|
64
|
+
<body style="font-family: -apple-system, sans-serif; text-align: center; padding: 3rem;">
|
|
65
|
+
<h1 style="color: #dc2626;">❌ Authorization Failed</h1>
|
|
66
|
+
<p style="color: #666;">${error || 'An unknown error occurred.'}</p>
|
|
67
|
+
<p style="color: #999; font-size: 0.85rem;">You can close this tab and try again in Repoburg.</p>
|
|
68
|
+
</body>
|
|
69
|
+
</html>`;
|
|
70
|
+
res.type('html').send(html);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.MarketplaceController = MarketplaceController;
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, common_1.Get)('marketplace/servers'),
|
|
76
|
+
(0, swagger_1.ApiOperation)({
|
|
77
|
+
summary: 'List all remote MCP servers in the marketplace catalog',
|
|
78
|
+
}),
|
|
79
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'List of remote MCP servers' }),
|
|
80
|
+
__metadata("design:type", Function),
|
|
81
|
+
__metadata("design:paramtypes", []),
|
|
82
|
+
__metadata("design:returntype", void 0)
|
|
83
|
+
], MarketplaceController.prototype, "getMarketplaceServers", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, common_1.Get)('marketplace/servers/:id'),
|
|
86
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get details for a single marketplace server' }),
|
|
87
|
+
(0, swagger_1.ApiParam)({
|
|
88
|
+
name: 'id',
|
|
89
|
+
description: 'Marketplace server slug (e.g. "github")',
|
|
90
|
+
}),
|
|
91
|
+
(0, swagger_1.ApiResponse)({ status: 200, description: 'Marketplace server details' }),
|
|
92
|
+
(0, swagger_1.ApiResponse)({ status: 404, description: 'Server not found' }),
|
|
93
|
+
__param(0, (0, common_1.Param)('id')),
|
|
94
|
+
__metadata("design:type", Function),
|
|
95
|
+
__metadata("design:paramtypes", [String]),
|
|
96
|
+
__metadata("design:returntype", void 0)
|
|
97
|
+
], MarketplaceController.prototype, "getMarketplaceServer", null);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, common_1.Post)('marketplace/connect'),
|
|
100
|
+
(0, common_1.HttpCode)(200),
|
|
101
|
+
(0, swagger_1.ApiOperation)({ summary: 'Initiate OAuth flow for a remote MCP server' }),
|
|
102
|
+
(0, swagger_1.ApiResponse)({
|
|
103
|
+
status: 200,
|
|
104
|
+
description: 'Returns the authorization URL and state',
|
|
105
|
+
}),
|
|
106
|
+
__param(0, (0, common_1.Body)()),
|
|
107
|
+
__metadata("design:type", Function),
|
|
108
|
+
__metadata("design:paramtypes", [initiate_connect_dto_1.InitiateConnectDto]),
|
|
109
|
+
__metadata("design:returntype", Promise)
|
|
110
|
+
], MarketplaceController.prototype, "initiateConnect", null);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, common_1.Get)('marketplace/connect/status/:marketplaceId'),
|
|
113
|
+
(0, swagger_1.ApiOperation)({
|
|
114
|
+
summary: 'Check the OAuth connection status for a marketplace server',
|
|
115
|
+
}),
|
|
116
|
+
(0, swagger_1.ApiParam)({
|
|
117
|
+
name: 'marketplaceId',
|
|
118
|
+
description: 'Marketplace server slug',
|
|
119
|
+
}),
|
|
120
|
+
(0, swagger_1.ApiResponse)({
|
|
121
|
+
status: 200,
|
|
122
|
+
description: 'Connection status: pending, connected, or error',
|
|
123
|
+
}),
|
|
124
|
+
__param(0, (0, common_1.Param)('marketplaceId')),
|
|
125
|
+
__metadata("design:type", Function),
|
|
126
|
+
__metadata("design:paramtypes", [String]),
|
|
127
|
+
__metadata("design:returntype", Promise)
|
|
128
|
+
], MarketplaceController.prototype, "getConnectStatus", null);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, common_1.Get)('oauth/callback'),
|
|
131
|
+
(0, swagger_1.ApiOperation)({ summary: 'OAuth callback handler' }),
|
|
132
|
+
__param(0, (0, common_1.Query)('code')),
|
|
133
|
+
__param(1, (0, common_1.Query)('state')),
|
|
134
|
+
__param(2, (0, common_1.Query)('error')),
|
|
135
|
+
__param(3, (0, common_1.Res)()),
|
|
136
|
+
__metadata("design:type", Function),
|
|
137
|
+
__metadata("design:paramtypes", [String, String, String, Object]),
|
|
138
|
+
__metadata("design:returntype", Promise)
|
|
139
|
+
], MarketplaceController.prototype, "handleOAuthCallback", null);
|
|
140
|
+
exports.MarketplaceController = MarketplaceController = MarketplaceController_1 = __decorate([
|
|
141
|
+
(0, swagger_1.ApiTags)('mcp-marketplace'),
|
|
142
|
+
(0, common_1.Controller)('mcp'),
|
|
143
|
+
__metadata("design:paramtypes", [marketplace_service_1.MarketplaceService])
|
|
144
|
+
], MarketplaceController);
|
|
145
|
+
//# sourceMappingURL=marketplace.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.controller.js","sourceRoot":"","sources":["../../../../src/mcp/marketplace/marketplace.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAUwB;AACxB,6CAA+E;AAE/E,+DAA2D;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ACb,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,6CAA6C,EAAE,CAAC;IACxE,IAAA,qBAAW,EAAC;QACX,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,yCAAyC;KACvD,CAAC;IACqB,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAM,yCAAkB;;4DAGpD;AAcK;IAZL,IAAA,YAAG,EAAC,2CAA2C,CAAC;IAChD,IAAA,sBAAY,EAAC;QACZ,OAAO,EAAE,4DAA4D;KACtE,CAAC;IACD,IAAA,kBAAQ,EAAC;QACR,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,yBAAyB;KACvC,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,iDAAiD;KAC/D,CAAC;IACsB,WAAA,IAAA,cAAK,EAAC,eAAe,CAAC,CAAA;;;;6DAE7C;AASK;IAFL,IAAA,YAAG,EAAC,gBAAgB,CAAC;IACrB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,CAAC;IAEjD,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IACb,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;IACd,WAAA,IAAA,cAAK,EAAC,OAAO,CAAC,CAAA;IACd,WAAA,IAAA,YAAG,GAAE,CAAA;;;;gEA6BP;gCA9FU,qBAAqB;IAFjC,IAAA,iBAAO,EAAC,iBAAiB,CAAC;IAC1B,IAAA,mBAAU,EAAC,KAAK,CAAC;qCAIiC,wCAAkB;GAHxD,qBAAqB,CA+HjC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.MarketplaceModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const core_entities_1 = require("../../core-entities");
|
|
13
|
+
const marketplace_controller_1 = require("./marketplace.controller");
|
|
14
|
+
const marketplace_service_1 = require("./marketplace.service");
|
|
15
|
+
const mcp_module_1 = require("../mcp.module");
|
|
16
|
+
const events_module_1 = require("../../events/events.module");
|
|
17
|
+
const app_module_1 = require("../../app.module");
|
|
18
|
+
let MarketplaceModule = class MarketplaceModule {
|
|
19
|
+
};
|
|
20
|
+
exports.MarketplaceModule = MarketplaceModule;
|
|
21
|
+
exports.MarketplaceModule = MarketplaceModule = __decorate([
|
|
22
|
+
(0, common_1.Module)({
|
|
23
|
+
imports: [
|
|
24
|
+
typeorm_1.TypeOrmModule.forFeature([core_entities_1.McpConfig]),
|
|
25
|
+
mcp_module_1.McpModule,
|
|
26
|
+
events_module_1.EventsModule,
|
|
27
|
+
(0, common_1.forwardRef)(() => app_module_1.AppModule),
|
|
28
|
+
],
|
|
29
|
+
controllers: [marketplace_controller_1.MarketplaceController],
|
|
30
|
+
providers: [marketplace_service_1.MarketplaceService],
|
|
31
|
+
exports: [marketplace_service_1.MarketplaceService],
|
|
32
|
+
})
|
|
33
|
+
], MarketplaceModule);
|
|
34
|
+
//# sourceMappingURL=marketplace.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.module.js","sourceRoot":"","sources":["../../../../src/mcp/marketplace/marketplace.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,uDAAgD;AAChD,qEAAiE;AACjE,+DAA2D;AAC3D,8CAA0C;AAC1C,8DAA0D;AAC1D,iDAA6C;AAatC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAX7B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,yBAAS,CAAC,CAAC;YACrC,sBAAS;YACT,4BAAY;YACZ,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAS,CAAC;SAC5B;QACD,WAAW,EAAE,CAAC,8CAAqB,CAAC;QACpC,SAAS,EAAE,CAAC,wCAAkB,CAAC;QAC/B,OAAO,EAAE,CAAC,wCAAkB,CAAC;KAC9B,CAAC;GACW,iBAAiB,CAAG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { McpConfig } from '../../core-entities';
|
|
3
|
+
import { AppService } from '../../app.service';
|
|
4
|
+
import { EventsGateway } from '../../events/events.gateway';
|
|
5
|
+
import { McpService } from '../mcp.service';
|
|
6
|
+
import { RemoteServerCatalogEntry } from './remote-servers.catalog';
|
|
7
|
+
import { DbBackedOAuthProvider } from './oauth-provider';
|
|
8
|
+
export declare class MarketplaceService {
|
|
9
|
+
private readonly mcpConfigRepository;
|
|
10
|
+
private readonly appService;
|
|
11
|
+
private readonly eventsGateway;
|
|
12
|
+
private readonly mcpService;
|
|
13
|
+
private readonly logger;
|
|
14
|
+
private readonly pendingAuths;
|
|
15
|
+
constructor(mcpConfigRepository: Repository<McpConfig>, appService: AppService, eventsGateway: EventsGateway, mcpService: McpService);
|
|
16
|
+
getMarketplaceServers(): RemoteServerCatalogEntry[];
|
|
17
|
+
getMarketplaceServer(id: string): RemoteServerCatalogEntry;
|
|
18
|
+
getConnectStatus(marketplaceId: string): Promise<{
|
|
19
|
+
status: 'pending' | 'connected' | 'error';
|
|
20
|
+
error?: string;
|
|
21
|
+
}>;
|
|
22
|
+
initiateConnect(marketplaceId: string): Promise<{
|
|
23
|
+
authUrl: string;
|
|
24
|
+
state: string;
|
|
25
|
+
}>;
|
|
26
|
+
handleOAuthCallback(code: string, state: string): Promise<{
|
|
27
|
+
success: boolean;
|
|
28
|
+
serverName?: string;
|
|
29
|
+
error?: string;
|
|
30
|
+
}>;
|
|
31
|
+
private probeServerAuth;
|
|
32
|
+
private finalizeDirectConnection;
|
|
33
|
+
private finalizeConnection;
|
|
34
|
+
createProviderForConfig(config: McpConfig): DbBackedOAuthProvider;
|
|
35
|
+
}
|