ScuttleBot
| f7eb47b… | lmata | 1 | "use strict"; |
| f7eb47b… | lmata | 2 | var __defProp = Object.defineProperty; |
| f7eb47b… | lmata | 3 | var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
| f7eb47b… | lmata | 4 | var __getOwnPropNames = Object.getOwnPropertyNames; |
| f7eb47b… | lmata | 5 | var __hasOwnProp = Object.prototype.hasOwnProperty; |
| f7eb47b… | lmata | 6 | var __export = (target, all) => { |
| f7eb47b… | lmata | 7 | for (var name in all) |
| f7eb47b… | lmata | 8 | __defProp(target, name, { get: all[name], enumerable: true }); |
| f7eb47b… | lmata | 9 | }; |
| f7eb47b… | lmata | 10 | var __copyProps = (to, from, except, desc) => { |
| f7eb47b… | lmata | 11 | if (from && typeof from === "object" || typeof from === "function") { |
| f7eb47b… | lmata | 12 | for (let key of __getOwnPropNames(from)) |
| f7eb47b… | lmata | 13 | if (!__hasOwnProp.call(to, key) && key !== except) |
| f7eb47b… | lmata | 14 | __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); |
| f7eb47b… | lmata | 15 | } |
| f7eb47b… | lmata | 16 | return to; |
| f7eb47b… | lmata | 17 | }; |
| f7eb47b… | lmata | 18 | var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); |
| f7eb47b… | lmata | 19 | var tool_exports = {}; |
| f7eb47b… | lmata | 20 | __export(tool_exports, { |
| f7eb47b… | lmata | 21 | defineToolSchema: () => defineToolSchema, |
| f7eb47b… | lmata | 22 | toMcpTool: () => toMcpTool |
| f7eb47b… | lmata | 23 | }); |
| f7eb47b… | lmata | 24 | module.exports = __toCommonJS(tool_exports); |
| f7eb47b… | lmata | 25 | var import_mcpBundle = require("playwright-core/lib/mcpBundle"); |
| f7eb47b… | lmata | 26 | function toMcpTool(tool) { |
| f7eb47b… | lmata | 27 | const readOnly = tool.type === "readOnly" || tool.type === "assertion"; |
| f7eb47b… | lmata | 28 | return { |
| f7eb47b… | lmata | 29 | name: tool.name, |
| f7eb47b… | lmata | 30 | description: tool.description, |
| f7eb47b… | lmata | 31 | inputSchema: import_mcpBundle.z.toJSONSchema(tool.inputSchema), |
| f7eb47b… | lmata | 32 | annotations: { |
| f7eb47b… | lmata | 33 | title: tool.title, |
| f7eb47b… | lmata | 34 | readOnlyHint: readOnly, |
| f7eb47b… | lmata | 35 | destructiveHint: !readOnly, |
| f7eb47b… | lmata | 36 | openWorldHint: true |
| f7eb47b… | lmata | 37 | } |
| f7eb47b… | lmata | 38 | }; |
| f7eb47b… | lmata | 39 | } |
| f7eb47b… | lmata | 40 | function defineToolSchema(tool) { |
| f7eb47b… | lmata | 41 | return tool; |
| f7eb47b… | lmata | 42 | } |
| f7eb47b… | lmata | 43 | // Annotate the CommonJS export names for ESM import in node: |
| f7eb47b… | lmata | 44 | 0 && (module.exports = { |
| f7eb47b… | lmata | 45 | defineToolSchema, |
| f7eb47b… | lmata | 46 | toMcpTool |
| f7eb47b… | lmata | 47 | }); |