mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
fix(build): restore plugin-sdk and line compat after refactor
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
import { Type } from "@sinclair/typebox";
|
||||
import { jsonResult, readNumberParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
||||
import { optionalStringEnum } from "openclaw/plugin-sdk/core";
|
||||
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-runtime";
|
||||
import { runFirecrawlScrape } from "./firecrawl-client.js";
|
||||
|
||||
function optionalStringEnum<const T extends readonly string[]>(
|
||||
values: T,
|
||||
options?: { description?: string },
|
||||
) {
|
||||
return Type.Optional(
|
||||
Type.Union(values.map((value) => Type.Literal(value)) as never, {
|
||||
description: options?.description,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
const FirecrawlScrapeToolSchema = Type.Object(
|
||||
{
|
||||
url: Type.String({ description: "HTTP or HTTPS URL to scrape via Firecrawl." }),
|
||||
|
||||
Reference in New Issue
Block a user