repoburg 1.3.166 → 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/llm-orchestration/action-handlers/dto/web-fetch.args.dto.d.ts +3 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/web-fetch.args.dto.js +22 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/web-fetch.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/web-search.args.dto.d.ts +4 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/web-search.args.dto.js +30 -0
- package/backend/dist/src/llm-orchestration/action-handlers/dto/web-search.args.dto.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/web-fetch.handler.d.ts +16 -0
- package/backend/dist/src/llm-orchestration/action-handlers/web-fetch.handler.js +180 -0
- package/backend/dist/src/llm-orchestration/action-handlers/web-fetch.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/action-handlers/web-search.handler.d.ts +16 -0
- package/backend/dist/src/llm-orchestration/action-handlers/web-search.handler.js +185 -0
- package/backend/dist/src/llm-orchestration/action-handlers/web-search.handler.js.map +1 -0
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.js +9 -1
- package/backend/dist/src/llm-orchestration/llm-orchestration.module.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/mcp-server/mcp-server.constants.js +2 -0
- package/backend/dist/src/mcp-server/mcp-server.constants.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/src/system-prompts/system-prompts.service.js +2 -0
- package/backend/dist/src/system-prompts/system-prompts.service.js.map +1 -1
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/backend/package.json +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,185 @@
|
|
|
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 WebSearchHandler_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.WebSearchHandler = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const web_search_args_dto_1 = require("./dto/web-search.args.dto");
|
|
16
|
+
const class_transformer_1 = require("class-transformer");
|
|
17
|
+
const class_validator_1 = require("class-validator");
|
|
18
|
+
const application_state_service_1 = require("../../application-state/application-state.service");
|
|
19
|
+
const utils_1 = require("../../utils");
|
|
20
|
+
const gpt_tokenizer_1 = require("gpt-tokenizer");
|
|
21
|
+
let WebSearchHandler = WebSearchHandler_1 = class WebSearchHandler {
|
|
22
|
+
constructor(applicationStateService) {
|
|
23
|
+
this.applicationStateService = applicationStateService;
|
|
24
|
+
this.toolName = 'web_search';
|
|
25
|
+
this.logger = new common_1.Logger(WebSearchHandler_1.name);
|
|
26
|
+
this.baseUrl = 'https://ollama.com/api';
|
|
27
|
+
}
|
|
28
|
+
getMetadata() {
|
|
29
|
+
return {
|
|
30
|
+
name: this.toolName,
|
|
31
|
+
description: this.getDefinition(),
|
|
32
|
+
arguments: [
|
|
33
|
+
{
|
|
34
|
+
name: 'query',
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'The search query string.',
|
|
37
|
+
required: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'max_results',
|
|
41
|
+
type: 'number',
|
|
42
|
+
description: 'Maximum results to return (default 5, max 10).',
|
|
43
|
+
required: false,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
generateExample(toolCall) {
|
|
49
|
+
return (0, utils_1.generateToolCallJson)(toolCall);
|
|
50
|
+
}
|
|
51
|
+
getDefinition() {
|
|
52
|
+
const example = this.generateExample({
|
|
53
|
+
tool_name: this.toolName,
|
|
54
|
+
query: 'what is ollama?',
|
|
55
|
+
max_results: 5,
|
|
56
|
+
});
|
|
57
|
+
const definition = `
|
|
58
|
+
-------------
|
|
59
|
+
### ${this.toolName}
|
|
60
|
+
Performs a web search using Ollama's web search API.
|
|
61
|
+
Returns relevant search results with titles, URLs, and content snippets.
|
|
62
|
+
Useful for finding the latest information, reducing hallucinations, and augmenting model knowledge.
|
|
63
|
+
|
|
64
|
+
Requires an Ollama API key to be configured in settings.
|
|
65
|
+
|
|
66
|
+
#### Parameters
|
|
67
|
+
- "query": (string, required) The search query string.
|
|
68
|
+
- "max_results": (number, optional) Maximum results to return. Default is 5, maximum is 10.
|
|
69
|
+
|
|
70
|
+
#### Example
|
|
71
|
+
:${example}
|
|
72
|
+
-------------
|
|
73
|
+
`;
|
|
74
|
+
return `\n${definition.trim()}\n`;
|
|
75
|
+
}
|
|
76
|
+
async execute(args, context) {
|
|
77
|
+
const validatedArgs = (0, class_transformer_1.plainToClass)(web_search_args_dto_1.WebSearchArgsDto, args);
|
|
78
|
+
const errors = await (0, class_validator_1.validate)(validatedArgs);
|
|
79
|
+
if (errors.length > 0) {
|
|
80
|
+
const errorMessages = errors
|
|
81
|
+
.map((err) => Object.values(err.constraints || {}).join(', '))
|
|
82
|
+
.join('; ');
|
|
83
|
+
return {
|
|
84
|
+
status: 'FAILURE',
|
|
85
|
+
summary: `Invalid arguments for ${this.toolName}.`,
|
|
86
|
+
error_message: errorMessages,
|
|
87
|
+
persisted_args: args,
|
|
88
|
+
execution_log: { output: '', error_message: errorMessages },
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
const { query, max_results } = validatedArgs;
|
|
92
|
+
const maxResults = max_results ?? 5;
|
|
93
|
+
const apiKey = await this.applicationStateService.getOllamaApiKey();
|
|
94
|
+
if (!apiKey) {
|
|
95
|
+
const msg = 'Ollama API key is not configured. Web search requires an Ollama API key. Please ask the user to set their Ollama API key in the Settings page (Ollama section). A free Ollama account is required — create one at https://ollama.com/settings/keys to generate an API key.';
|
|
96
|
+
this.logger.warn(msg);
|
|
97
|
+
return {
|
|
98
|
+
status: 'FAILURE',
|
|
99
|
+
summary: msg,
|
|
100
|
+
error_message: msg,
|
|
101
|
+
persisted_args: { query, max_results: maxResults },
|
|
102
|
+
execution_log: { output: '', error_message: msg },
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
let output;
|
|
106
|
+
let status = 'SUCCESS';
|
|
107
|
+
let errorMessage;
|
|
108
|
+
try {
|
|
109
|
+
this.logger.log(`Web search: "${query}" (max ${maxResults} results)`);
|
|
110
|
+
const response = await fetch(`${this.baseUrl}/web_search`, {
|
|
111
|
+
method: 'POST',
|
|
112
|
+
headers: {
|
|
113
|
+
'Content-Type': 'application/json',
|
|
114
|
+
Authorization: `Bearer ${apiKey}`,
|
|
115
|
+
},
|
|
116
|
+
body: JSON.stringify({ query, max_results: maxResults }),
|
|
117
|
+
});
|
|
118
|
+
if (!response.ok) {
|
|
119
|
+
const errorText = await response.text();
|
|
120
|
+
let errorDetail = errorText;
|
|
121
|
+
try {
|
|
122
|
+
const errorJson = JSON.parse(errorText);
|
|
123
|
+
errorDetail = errorJson?.error || errorText;
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
}
|
|
127
|
+
const msg = `Ollama web search API error (${response.status}): ${errorDetail}`;
|
|
128
|
+
this.logger.error(msg);
|
|
129
|
+
return {
|
|
130
|
+
status: 'FAILURE',
|
|
131
|
+
summary: `Web search failed.`,
|
|
132
|
+
error_message: msg,
|
|
133
|
+
persisted_args: { query, max_results: maxResults },
|
|
134
|
+
execution_log: { output: '', error_message: msg },
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const data = (await response.json());
|
|
138
|
+
const results = data.results || [];
|
|
139
|
+
output = results
|
|
140
|
+
.map((r, i) => `### Result ${i + 1}\n**Title:** ${r.title}\n**URL:** ${r.url}\n**Content:** ${r.content}`)
|
|
141
|
+
.join('\n\n---\n\n');
|
|
142
|
+
if (!output) {
|
|
143
|
+
output = 'No search results found.';
|
|
144
|
+
}
|
|
145
|
+
this.logger.log(`Web search returned ${results.length} results`);
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
const execError = error;
|
|
149
|
+
status = 'FAILURE';
|
|
150
|
+
errorMessage = execError.message;
|
|
151
|
+
output = `Web search failed: ${execError.message}`;
|
|
152
|
+
this.logger.error(`Web search error: ${execError.message}`);
|
|
153
|
+
}
|
|
154
|
+
const tokenCount = (0, gpt_tokenizer_1.countTokens)(output);
|
|
155
|
+
const tokenLimit = await this.applicationStateService.getEffectiveFollowupTokenLimit(context.system_prompt_id);
|
|
156
|
+
if (tokenCount > tokenLimit) {
|
|
157
|
+
const ratio = tokenLimit / tokenCount;
|
|
158
|
+
const truncatedLength = Math.floor(output.length * ratio);
|
|
159
|
+
const truncationWarning = `\n\n[OUTPUT TRUNCATED: ${tokenCount} tokens exceeds limit of ${tokenLimit}.]`;
|
|
160
|
+
output = output.slice(0, truncatedLength) + truncationWarning;
|
|
161
|
+
errorMessage =
|
|
162
|
+
(errorMessage || '') +
|
|
163
|
+
` Output truncated due to size limit (${tokenCount} > ${tokenLimit} tokens).`;
|
|
164
|
+
this.logger.warn(`Web search output truncated: ${tokenCount} tokens exceeds limit of ${tokenLimit}`);
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
status,
|
|
168
|
+
summary: status === 'SUCCESS'
|
|
169
|
+
? `Web search for "${query}" completed.`
|
|
170
|
+
: `Web search failed.`,
|
|
171
|
+
persisted_args: { query, max_results: maxResults },
|
|
172
|
+
error_message: errorMessage,
|
|
173
|
+
execution_log: {
|
|
174
|
+
output,
|
|
175
|
+
error_message: errorMessage || '',
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
exports.WebSearchHandler = WebSearchHandler;
|
|
181
|
+
exports.WebSearchHandler = WebSearchHandler = WebSearchHandler_1 = __decorate([
|
|
182
|
+
(0, common_1.Injectable)(),
|
|
183
|
+
__metadata("design:paramtypes", [application_state_service_1.ApplicationStateService])
|
|
184
|
+
], WebSearchHandler);
|
|
185
|
+
//# sourceMappingURL=web-search.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-search.handler.js","sourceRoot":"","sources":["../../../../src/llm-orchestration/action-handlers/web-search.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AAOpD,mEAA6D;AAC7D,yDAAiD;AACjD,qDAA2C;AAC3C,iGAA4F;AAC5F,uCAAmD;AACnD,iDAA4C;AAarC,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAK3B,YACmB,uBAAgD;QAAhD,4BAAuB,GAAvB,uBAAuB,CAAyB;QAL1D,aAAQ,GAAG,YAAY,CAAC;QAChB,WAAM,GAAG,IAAI,eAAM,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAC;QAC3C,YAAO,GAAG,wBAAwB,CAAC;IAIjD,CAAC;IAEJ,WAAW;QACT,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,WAAW,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;YAClD,aAAa,EAAE,YAAY;YAC3B,aAAa,EAAE;gBACb,MAAM;gBACN,aAAa,EAAE,YAAY,IAAI,EAAE;aAClC;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA9LY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAOiC,mDAAuB;GANxD,gBAAgB,CA8L5B"}
|
|
@@ -66,6 +66,8 @@ const manage_sub_agents_handler_1 = require("./action-handlers/manage-sub-agents
|
|
|
66
66
|
const manage_agents_handler_1 = require("./action-handlers/manage-agents.handler");
|
|
67
67
|
const manage_mcp_servers_handler_1 = require("./action-handlers/manage-mcp-servers.handler");
|
|
68
68
|
const manage_tool_hooks_handler_1 = require("./action-handlers/manage-tool-hooks.handler");
|
|
69
|
+
const web_search_handler_1 = require("./action-handlers/web-search.handler");
|
|
70
|
+
const web_fetch_handler_1 = require("./action-handlers/web-fetch.handler");
|
|
69
71
|
const invalid_tool_feedback_hook_1 = require("./hooks/invalid-tool-feedback.hook");
|
|
70
72
|
const frontend_notification_hook_1 = require("./hooks/frontend-notification.hook");
|
|
71
73
|
const follow_up_post_execution_hook_1 = require("./hooks/follow-up-post-execution.hook");
|
|
@@ -135,13 +137,15 @@ exports.LlmOrchestrationModule = LlmOrchestrationModule = __decorate([
|
|
|
135
137
|
manage_agents_handler_1.ManageAgentsHandler,
|
|
136
138
|
manage_mcp_servers_handler_1.ManageMcpServersHandler,
|
|
137
139
|
manage_tool_hooks_handler_1.ManageToolHooksHandler,
|
|
140
|
+
web_search_handler_1.WebSearchHandler,
|
|
141
|
+
web_fetch_handler_1.WebFetchHandler,
|
|
138
142
|
invalid_tool_feedback_hook_1.InvalidToolFeedbackHook,
|
|
139
143
|
frontend_notification_hook_1.FrontendNotificationHook,
|
|
140
144
|
follow_up_post_execution_hook_1.FollowUpPostExecutionHook,
|
|
141
145
|
yolo_mode_post_execution_hook_1.YoloModePostExecutionHook,
|
|
142
146
|
{
|
|
143
147
|
provide: 'ACTION_HANDLER_REGISTRY',
|
|
144
|
-
useFactory: (createFile, deleteFile, overwriteFile, runCommand, requestContext, final, quickEdit, applyDiff, patch, newSession, writeTodo, executeCode, invokeSubAgent, listSubAgents, getSessionHistory, generateTitle, askUser, getMessages, discardMessages, sessionStatus, htmlFinal, manageSystemPrompts, manageContextTemplates, manageContextSnippets, manageCustomSnippets, manageCustomVariables, manageSubAgents, manageAgents, manageMcpServers, manageToolHooks) => {
|
|
148
|
+
useFactory: (createFile, deleteFile, overwriteFile, runCommand, requestContext, final, quickEdit, applyDiff, patch, newSession, writeTodo, executeCode, invokeSubAgent, listSubAgents, getSessionHistory, generateTitle, askUser, getMessages, discardMessages, sessionStatus, htmlFinal, manageSystemPrompts, manageContextTemplates, manageContextSnippets, manageCustomSnippets, manageCustomVariables, manageSubAgents, manageAgents, manageMcpServers, manageToolHooks, webSearch, webFetch) => {
|
|
145
149
|
const registry = new Map();
|
|
146
150
|
registry.set(createFile.toolName, createFile);
|
|
147
151
|
registry.set(deleteFile.toolName, deleteFile);
|
|
@@ -173,6 +177,8 @@ exports.LlmOrchestrationModule = LlmOrchestrationModule = __decorate([
|
|
|
173
177
|
registry.set(manageAgents.toolName, manageAgents);
|
|
174
178
|
registry.set(manageMcpServers.toolName, manageMcpServers);
|
|
175
179
|
registry.set(manageToolHooks.toolName, manageToolHooks);
|
|
180
|
+
registry.set(webSearch.toolName, webSearch);
|
|
181
|
+
registry.set(webFetch.toolName, webFetch);
|
|
176
182
|
return registry;
|
|
177
183
|
},
|
|
178
184
|
inject: [
|
|
@@ -206,6 +212,8 @@ exports.LlmOrchestrationModule = LlmOrchestrationModule = __decorate([
|
|
|
206
212
|
manage_agents_handler_1.ManageAgentsHandler,
|
|
207
213
|
manage_mcp_servers_handler_1.ManageMcpServersHandler,
|
|
208
214
|
manage_tool_hooks_handler_1.ManageToolHooksHandler,
|
|
215
|
+
web_search_handler_1.WebSearchHandler,
|
|
216
|
+
web_fetch_handler_1.WebFetchHandler,
|
|
209
217
|
],
|
|
210
218
|
},
|
|
211
219
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-orchestration.module.js","sourceRoot":"","sources":["../../../src/llm-orchestration/llm-orchestration.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,kFAA4E;AAC5E,6EAAuE;AACvE,+DAA0D;AAC1D,+EAA0E;AAC1E,uEAAkE;AAClE,mFAA8E;AAC9E,iEAAwE;AAExE,2DAAuD;AACvD,4FAAuF;AACvF,0EAAqE;AACrE,gFAA4E;AAC5E,8CAA0C;AAC1C,oDAK0B;AAC1B,mFAA8E;AAE9E,mFAA8E;AAC9E,iEAA6D;AAC7D,oEAAgE;AAChE,kDAA8C;AAC9C,uEAAkE;AAClE,uEAAkE;AAClE,4FAAuF;AACvF,+FAA0F;AAC1F,4FAAuF;AACvF,yFAAoF;AACpF,sFAAiF;AACjF,yFAAoF;AACpF,2DAAuD;AAGvD,+EAA0E;AAC1E,+EAA0E;AAC1E,qFAAgF;AAChF,+EAA0E;AAC1E,uFAAkF;AAClF,mEAA+D;AAC/D,6EAAwE;AACxE,6EAAwE;AACxE,mEAA+D;AAC/D,+EAA0E;AAC1E,6EAAwE;AACxE,iFAA4E;AAE5E,uFAAkF;AAClF,uFAAiF;AACjF,+FAAyF;AACzF,qFAAgF;AAChF,yEAAoE;AACpE,iFAA4E;AAC5E,yFAAoF;AACpF,qFAAgF;AAChF,6EAAwE;AACxE,mGAA6F;AAC7F,yGAAmG;AACnG,uGAAiG;AACjG,qGAA+F;AAC/F,uGAAiG;AACjG,2FAAqF;AACrF,mFAA8E;AAC9E,6FAAuF;AACvF,2FAAqF;
|
|
1
|
+
{"version":3,"file":"llm-orchestration.module.js","sourceRoot":"","sources":["../../../src/llm-orchestration/llm-orchestration.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,kFAA4E;AAC5E,6EAAuE;AACvE,+DAA0D;AA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,OAAO,EAAE;YACP,oDAAuB;YACvB,uCAAiB;YACjB,uDAAyB;YACzB,yBAAyB;SAC1B;KACF,CAAC;GACW,sBAAsB,CAAG"}
|
|
@@ -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","sourceR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AAC,IAAI,CAAC,CAAA;;;;iEAEhC;AASK;IAPL,IAAA,aAAI,EAAC,qBAAqB,CAAC;IAC3B,IAAA,iBAAQ,EAAC,GAAG,CAAC;IACb,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
|
+
}
|