donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
25 lines • 781 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToolsApi = void 0;
/**
* This class reports a subset of Tools supported, to the frontend. This is a subset of all
* supported tool calls.
*/
class ToolsApi {
constructor(reportedSupportedTools) {
this.reportedSupportedTools = reportedSupportedTools;
}
/**
* GET endpoint handler that returns the supported tools as JSON
*/
async getSupportedTools(_req, res) {
const response = this.reportedSupportedTools.map((tool) => ({
name: tool.name,
description: tool.description,
inputSchema: tool.inputSchema,
}));
res.json(response);
}
}
exports.ToolsApi = ToolsApi;
//# sourceMappingURL=ToolsApi.js.map