@deadragdoll/tellymcp 0.0.1
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/.env.example.client +93 -0
- package/.env.example.gateway +120 -0
- package/CHANGELOG.md +155 -0
- package/LICENSE +21 -0
- package/README-ru.md +338 -0
- package/README.md +1262 -0
- package/STANDALONE-ru.md +266 -0
- package/STANDALONE.md +266 -0
- package/TOOLS.md +1296 -0
- package/config/templates/env.both.template +83 -0
- package/config/templates/env.client.template +60 -0
- package/config/templates/env.gateway.template +82 -0
- package/dist/cli.js +636 -0
- package/dist/index.js +17 -0
- package/dist/lib/logfeed/store.js +52 -0
- package/dist/lib/middlewares/tracer.js +172 -0
- package/dist/lib/mixins/db.js +267 -0
- package/dist/lib/mixins/logfeed.js +34 -0
- package/dist/lib/mixins/session.errors.js +142 -0
- package/dist/lib/moleculer.js +2 -0
- package/dist/lib/trace.js +147 -0
- package/dist/lib/traceContext.js +116 -0
- package/dist/moleculer.config.js +274 -0
- package/dist/services/features/telegram-mcp/approval.service.js +33 -0
- package/dist/services/features/telegram-mcp/browser.service.js +42 -0
- package/dist/services/features/telegram-mcp/collaboration.service.js +53 -0
- package/dist/services/features/telegram-mcp/ensuredb.service.js +337 -0
- package/dist/services/features/telegram-mcp/gateway-delivery.service.js +378 -0
- package/dist/services/features/telegram-mcp/gateway-loopback.js +10 -0
- package/dist/services/features/telegram-mcp/gateway-rmq.service.js +294 -0
- package/dist/services/features/telegram-mcp/gateway-socket.service.js +1463 -0
- package/dist/services/features/telegram-mcp/gateway.service.js +1141 -0
- package/dist/services/features/telegram-mcp/inbox.service.js +33 -0
- package/dist/services/features/telegram-mcp/mcp-http.service.js +76 -0
- package/dist/services/features/telegram-mcp/mcp-server.service.js +127 -0
- package/dist/services/features/telegram-mcp/notify.service.js +33 -0
- package/dist/services/features/telegram-mcp/pair.service.js +33 -0
- package/dist/services/features/telegram-mcp/runtime.service.js +36 -0
- package/dist/services/features/telegram-mcp/session-context.service.js +33 -0
- package/dist/services/features/telegram-mcp/src/app/bootstrap/runtime.js +103 -0
- package/dist/services/features/telegram-mcp/src/app/config/env.js +317 -0
- package/dist/services/features/telegram-mcp/src/app/http.js +774 -0
- package/dist/services/features/telegram-mcp/src/app/index.js +2 -0
- package/dist/services/features/telegram-mcp/src/app/providers/mcp/server.js +13 -0
- package/dist/services/features/telegram-mcp/src/app/providers/redis/client.js +18 -0
- package/dist/services/features/telegram-mcp/src/app/webapp/assets.js +740 -0
- package/dist/services/features/telegram-mcp/src/app/webapp/auth.js +267 -0
- package/dist/services/features/telegram-mcp/src/app/webapp/relay.js +69 -0
- package/dist/services/features/telegram-mcp/src/app/webapp/tmux.js +9 -0
- package/dist/services/features/telegram-mcp/src/entities/auth/model/types.js +2 -0
- package/dist/services/features/telegram-mcp/src/entities/browser/model/types.js +2 -0
- package/dist/services/features/telegram-mcp/src/entities/collaboration/model/types.js +2 -0
- package/dist/services/features/telegram-mcp/src/entities/inbox/model/types.js +2 -0
- package/dist/services/features/telegram-mcp/src/entities/request/model/schema.js +545 -0
- package/dist/services/features/telegram-mcp/src/entities/request/model/types.js +2 -0
- package/dist/services/features/telegram-mcp/src/entities/session/model/types.js +2 -0
- package/dist/services/features/telegram-mcp/src/features/ask-user/model/askUserTelegram.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserClearLogsTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserClickTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserCloseTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserComputedStyleTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserConsoleTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserDomTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserErrorsTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserFillTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserNetworkFailuresTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserOpenTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserPressTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserReloadTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserScreenshotTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserService.js +689 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserWaitForTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/browser/model/browserWaitForUrlTool.js +28 -0
- package/dist/services/features/telegram-mcp/src/features/collaboration/model/backend.js +2 -0
- package/dist/services/features/telegram-mcp/src/features/collaboration/model/collaborationService.js +26 -0
- package/dist/services/features/telegram-mcp/src/features/collaboration/model/localCollaborationBackend.js +390 -0
- package/dist/services/features/telegram-mcp/src/features/collaboration/model/sendPartnerFileService.js +102 -0
- package/dist/services/features/telegram-mcp/src/features/collaboration/model/sendPartnerFileTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/collaboration/model/sendPartnerNoteTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/distributed-client/model/gatewayCollaborationBackend.js +69 -0
- package/dist/services/features/telegram-mcp/src/features/distributed-gateway/model/gatewayHttpService.js +657 -0
- package/dist/services/features/telegram-mcp/src/features/distributed-gateway/model/gatewayReplyResolution.js +17 -0
- package/dist/services/features/telegram-mcp/src/features/inbox/model/deleteTelegramInboxMessageTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/inbox/model/getTelegramInboxCountTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/inbox/model/getTelegramInboxTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/inbox/model/inboxService.js +77 -0
- package/dist/services/features/telegram-mcp/src/features/notify/model/notifyService.js +93 -0
- package/dist/services/features/telegram-mcp/src/features/notify/model/notifyTelegramTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/pair-session/model/clearSessionPairingTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/pair-session/model/createSessionPairCodeTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/pair-session/model/generatePairCode.js +202 -0
- package/dist/services/features/telegram-mcp/src/features/session-context/model/clearSessionContextTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/session-context/model/getSessionContextTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/session-context/model/getTmuxTargetTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/session-context/model/renameSessionTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/session-context/model/sessionContextService.js +409 -0
- package/dist/services/features/telegram-mcp/src/features/session-context/model/setSessionContextTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/session-context/model/setTmuxTargetTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/features/tools-sync/model/refreshToolsMarkdownService.js +123 -0
- package/dist/services/features/telegram-mcp/src/features/tools-sync/model/refreshToolsMarkdownTool.js +33 -0
- package/dist/services/features/telegram-mcp/src/processes/human-approval/model/orchestrator.js +243 -0
- package/dist/services/features/telegram-mcp/src/shared/api/storage/contract.js +2 -0
- package/dist/services/features/telegram-mcp/src/shared/api/tool-registry/registry.js +8 -0
- package/dist/services/features/telegram-mcp/src/shared/api/tool-registry/types.js +2 -0
- package/dist/services/features/telegram-mcp/src/shared/api/transport/contract.js +2 -0
- package/dist/services/features/telegram-mcp/src/shared/integrations/object-storage/minioExchangeStore.js +86 -0
- package/dist/services/features/telegram-mcp/src/shared/integrations/redis/stateStore.js +436 -0
- package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/collabSemantics.js +21 -0
- package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/collabUi.js +87 -0
- package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/messageFormat.js +60 -0
- package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/proxyFetch.js +46 -0
- package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transport.js +6534 -0
- package/dist/services/features/telegram-mcp/src/shared/integrations/tmux/client.js +280 -0
- package/dist/services/features/telegram-mcp/src/shared/lib/ids/ids.js +34 -0
- package/dist/services/features/telegram-mcp/src/shared/lib/logger/logger.js +68 -0
- package/dist/services/features/telegram-mcp/src/shared/lib/project-identity/projectIdentity.js +223 -0
- package/dist/services/features/telegram-mcp/src/shared/lib/redact-secrets/redactSecrets.js +22 -0
- package/dist/services/features/telegram-mcp/src/shared/lib/truncate/truncate.js +12 -0
- package/dist/services/features/telegram-mcp/src/shared/lib/version/versionHandshake.js +124 -0
- package/dist/services/features/telegram-mcp/src/shared/types/common.js +2 -0
- package/dist/services/features/telegram-mcp/standalone-http.service.js +113 -0
- package/dist/services/features/telegram-mcp/tools-sync.service.js +33 -0
- package/package.json +110 -0
- package/scripts/postinstall.js +60 -0
package/dist/services/features/telegram-mcp/src/features/browser/model/browserComputedStyleTool.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserComputedStyleTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [{ type: "text", text: JSON.stringify(output, null, 2) }];
|
|
7
|
+
}
|
|
8
|
+
class BrowserComputedStyleTool {
|
|
9
|
+
browserService;
|
|
10
|
+
constructor(browserService) {
|
|
11
|
+
this.browserService = browserService;
|
|
12
|
+
}
|
|
13
|
+
register(server) {
|
|
14
|
+
server.registerTool("browser_computed_style", {
|
|
15
|
+
title: "Browser Computed Style",
|
|
16
|
+
description: "Read computed CSS properties and box metrics for a DOM element in the Playwright tab for the current session.",
|
|
17
|
+
inputSchema: schema_1.browserComputedStyleInputSchema,
|
|
18
|
+
outputSchema: schema_1.browserComputedStyleOutputSchema,
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const output = await this.browserService.getComputedStyle(args);
|
|
21
|
+
return {
|
|
22
|
+
content: createContent(output),
|
|
23
|
+
structuredContent: output,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BrowserComputedStyleTool = BrowserComputedStyleTool;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserConsoleTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [{ type: "text", text: JSON.stringify(output, null, 2) }];
|
|
7
|
+
}
|
|
8
|
+
class BrowserConsoleTool {
|
|
9
|
+
browserService;
|
|
10
|
+
constructor(browserService) {
|
|
11
|
+
this.browserService = browserService;
|
|
12
|
+
}
|
|
13
|
+
register(server) {
|
|
14
|
+
server.registerTool("browser_console", {
|
|
15
|
+
title: "Browser Console",
|
|
16
|
+
description: "Read recent console messages captured from the Playwright tab attached to the current session.",
|
|
17
|
+
inputSchema: schema_1.browserConsoleInputSchema,
|
|
18
|
+
outputSchema: schema_1.browserConsoleOutputSchema,
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const output = await this.browserService.getConsole(args);
|
|
21
|
+
return {
|
|
22
|
+
content: createContent(output),
|
|
23
|
+
structuredContent: output,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BrowserConsoleTool = BrowserConsoleTool;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserDomTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [{ type: "text", text: JSON.stringify(output, null, 2) }];
|
|
7
|
+
}
|
|
8
|
+
class BrowserDomTool {
|
|
9
|
+
browserService;
|
|
10
|
+
constructor(browserService) {
|
|
11
|
+
this.browserService = browserService;
|
|
12
|
+
}
|
|
13
|
+
register(server) {
|
|
14
|
+
server.registerTool("browser_dom", {
|
|
15
|
+
title: "Browser DOM",
|
|
16
|
+
description: "Inspect a DOM element in the Playwright tab for the current session and return text, HTML, attributes, and visibility.",
|
|
17
|
+
inputSchema: schema_1.browserDomInputSchema,
|
|
18
|
+
outputSchema: schema_1.browserDomOutputSchema,
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const output = await this.browserService.getDom(args);
|
|
21
|
+
return {
|
|
22
|
+
content: createContent(output),
|
|
23
|
+
structuredContent: output,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BrowserDomTool = BrowserDomTool;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserErrorsTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [{ type: "text", text: JSON.stringify(output, null, 2) }];
|
|
7
|
+
}
|
|
8
|
+
class BrowserErrorsTool {
|
|
9
|
+
browserService;
|
|
10
|
+
constructor(browserService) {
|
|
11
|
+
this.browserService = browserService;
|
|
12
|
+
}
|
|
13
|
+
register(server) {
|
|
14
|
+
server.registerTool("browser_errors", {
|
|
15
|
+
title: "Browser Errors",
|
|
16
|
+
description: "Read recent page-level runtime exceptions captured from the Playwright tab for the current session.",
|
|
17
|
+
inputSchema: schema_1.browserErrorsInputSchema,
|
|
18
|
+
outputSchema: schema_1.browserErrorsOutputSchema,
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const output = await this.browserService.getErrors(args);
|
|
21
|
+
return {
|
|
22
|
+
content: createContent(output),
|
|
23
|
+
structuredContent: output,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BrowserErrorsTool = BrowserErrorsTool;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserFillTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [{ type: "text", text: JSON.stringify(output, null, 2) }];
|
|
7
|
+
}
|
|
8
|
+
class BrowserFillTool {
|
|
9
|
+
browserService;
|
|
10
|
+
constructor(browserService) {
|
|
11
|
+
this.browserService = browserService;
|
|
12
|
+
}
|
|
13
|
+
register(server) {
|
|
14
|
+
server.registerTool("browser_fill", {
|
|
15
|
+
title: "Browser Fill",
|
|
16
|
+
description: "Fill an input or textarea in the session browser page by CSS selector or visible text.",
|
|
17
|
+
inputSchema: schema_1.browserFillInputSchema,
|
|
18
|
+
outputSchema: schema_1.browserFillOutputSchema,
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const output = await this.browserService.fill(args);
|
|
21
|
+
return {
|
|
22
|
+
content: createContent(output),
|
|
23
|
+
structuredContent: output,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BrowserFillTool = BrowserFillTool;
|
package/dist/services/features/telegram-mcp/src/features/browser/model/browserNetworkFailuresTool.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserNetworkFailuresTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [{ type: "text", text: JSON.stringify(output, null, 2) }];
|
|
7
|
+
}
|
|
8
|
+
class BrowserNetworkFailuresTool {
|
|
9
|
+
browserService;
|
|
10
|
+
constructor(browserService) {
|
|
11
|
+
this.browserService = browserService;
|
|
12
|
+
}
|
|
13
|
+
register(server) {
|
|
14
|
+
server.registerTool("browser_network_failures", {
|
|
15
|
+
title: "Browser Network Failures",
|
|
16
|
+
description: "Read recent failed or HTTP-error network requests captured from the Playwright tab for the current session.",
|
|
17
|
+
inputSchema: schema_1.browserNetworkFailuresInputSchema,
|
|
18
|
+
outputSchema: schema_1.browserNetworkFailuresOutputSchema,
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const output = await this.browserService.getNetworkFailures(args);
|
|
21
|
+
return {
|
|
22
|
+
content: createContent(output),
|
|
23
|
+
structuredContent: output,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BrowserNetworkFailuresTool = BrowserNetworkFailuresTool;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserOpenTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
type: "text",
|
|
9
|
+
text: JSON.stringify(output, null, 2),
|
|
10
|
+
},
|
|
11
|
+
];
|
|
12
|
+
}
|
|
13
|
+
class BrowserOpenTool {
|
|
14
|
+
browserService;
|
|
15
|
+
constructor(browserService) {
|
|
16
|
+
this.browserService = browserService;
|
|
17
|
+
}
|
|
18
|
+
register(server) {
|
|
19
|
+
server.registerTool("browser_open", {
|
|
20
|
+
title: "Browser Open",
|
|
21
|
+
description: "Open a URL in the isolated Playwright browser context for the current session. Reuse the existing tab unless reset_context=true.",
|
|
22
|
+
inputSchema: schema_1.browserOpenInputSchema,
|
|
23
|
+
outputSchema: schema_1.browserOpenOutputSchema,
|
|
24
|
+
}, async (args) => {
|
|
25
|
+
const output = await this.browserService.open(args);
|
|
26
|
+
return {
|
|
27
|
+
content: createContent(output),
|
|
28
|
+
structuredContent: output,
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.BrowserOpenTool = BrowserOpenTool;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserPressTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [{ type: "text", text: JSON.stringify(output, null, 2) }];
|
|
7
|
+
}
|
|
8
|
+
class BrowserPressTool {
|
|
9
|
+
browserService;
|
|
10
|
+
constructor(browserService) {
|
|
11
|
+
this.browserService = browserService;
|
|
12
|
+
}
|
|
13
|
+
register(server) {
|
|
14
|
+
server.registerTool("browser_press", {
|
|
15
|
+
title: "Browser Press",
|
|
16
|
+
description: "Send a key press to the session browser page or to a targeted element.",
|
|
17
|
+
inputSchema: schema_1.browserPressInputSchema,
|
|
18
|
+
outputSchema: schema_1.browserPressOutputSchema,
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const output = await this.browserService.press(args);
|
|
21
|
+
return {
|
|
22
|
+
content: createContent(output),
|
|
23
|
+
structuredContent: output,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BrowserPressTool = BrowserPressTool;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserReloadTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [{ type: "text", text: JSON.stringify(output, null, 2) }];
|
|
7
|
+
}
|
|
8
|
+
class BrowserReloadTool {
|
|
9
|
+
browserService;
|
|
10
|
+
constructor(browserService) {
|
|
11
|
+
this.browserService = browserService;
|
|
12
|
+
}
|
|
13
|
+
register(server) {
|
|
14
|
+
server.registerTool("browser_reload", {
|
|
15
|
+
title: "Browser Reload",
|
|
16
|
+
description: "Reload the current Playwright page for the session and wait for the selected load state.",
|
|
17
|
+
inputSchema: schema_1.browserReloadInputSchema,
|
|
18
|
+
outputSchema: schema_1.browserReloadOutputSchema,
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const output = await this.browserService.reload(args);
|
|
21
|
+
return {
|
|
22
|
+
content: createContent(output),
|
|
23
|
+
structuredContent: output,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BrowserReloadTool = BrowserReloadTool;
|
package/dist/services/features/telegram-mcp/src/features/browser/model/browserScreenshotTool.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserScreenshotTool = void 0;
|
|
4
|
+
const schema_1 = require("../../../entities/request/model/schema");
|
|
5
|
+
function createContent(output) {
|
|
6
|
+
return [{ type: "text", text: JSON.stringify(output, null, 2) }];
|
|
7
|
+
}
|
|
8
|
+
class BrowserScreenshotTool {
|
|
9
|
+
browserService;
|
|
10
|
+
constructor(browserService) {
|
|
11
|
+
this.browserService = browserService;
|
|
12
|
+
}
|
|
13
|
+
register(server) {
|
|
14
|
+
server.registerTool("browser_screenshot", {
|
|
15
|
+
title: "Browser Screenshot",
|
|
16
|
+
description: "Capture a screenshot from the Playwright tab for the current session and save it into .mcp-xchange. Use this when the user wants a visual artifact that can later be shared through Local or Collab flows.",
|
|
17
|
+
inputSchema: schema_1.browserScreenshotInputSchema,
|
|
18
|
+
outputSchema: schema_1.browserScreenshotOutputSchema,
|
|
19
|
+
}, async (args) => {
|
|
20
|
+
const output = await this.browserService.screenshot(args);
|
|
21
|
+
return {
|
|
22
|
+
content: createContent(output),
|
|
23
|
+
structuredContent: output,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BrowserScreenshotTool = BrowserScreenshotTool;
|