import { n as TSchema } from "../../schema-LN4kiIw1.mjs"; import { a as UserTool, c as UserToolParam } from "../../user-tool-service-QjL2mMWW.mjs"; import { ToolDispatcher } from "./sandbox-runtime.mjs"; //#region extensions/crypto/src/services/tool-compiler.d.ts /** Shape matching AnyAgentTool from OpenClaw plugin SDK. */ interface CompiledTool { name: string; label: string; ownerOnly: boolean; description: string; parameters: TSchema; execute: (toolCallId: string, args: unknown, ctx?: any) => Promise; } /** * Build a TypeBox schema from UserToolParam[] definitions. * * Each param becomes a property in a Type.Object schema. Required params * are listed in the object's `required` array (handled by TypeBox's * Type.Optional wrapper for non-required params). */ declare function buildSchemaFromParams(params: UserToolParam[]): TSchema; /** * Compile a UserTool into an AnyAgentTool-compatible object. * * The returned object has the same shape as built-in tools (name, label, * ownerOnly, description, parameters, execute) and can be passed directly * to api.registerTool(). * * @param tool - The user tool definition from UserToolService * @param dispatcher - Interface for calling built-in tools (for composed/custom types) * @returns CompiledTool ready for registration */ declare function compileTool(tool: UserTool, dispatcher: ToolDispatcher): CompiledTool; /** * Compile all enabled user tools into registerable tool objects. * * Called at plugin init time to load persisted user tools. */ declare function compileAllEnabledTools(dispatcher: ToolDispatcher): CompiledTool[]; //#endregion export { CompiledTool, buildSchemaFromParams, compileAllEnabledTools, compileTool }; //# sourceMappingURL=tool-compiler.d.mts.map