mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 00:40:21 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -5,12 +5,12 @@ import fs from "node:fs/promises";
|
||||
import Ajv from "ajv";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
|
||||
// NOTE: This extension is intended to be bundled with Moltbot.
|
||||
// When running from source (tests/dev), Moltbot internals live under src/.
|
||||
// NOTE: This extension is intended to be bundled with OpenClaw.
|
||||
// When running from source (tests/dev), OpenClaw internals live under src/.
|
||||
// When running from a built install, internals live under dist/ (no src/ tree).
|
||||
// So we resolve internal imports dynamically with src-first, dist-fallback.
|
||||
|
||||
import type { MoltbotPluginApi } from "../../../src/plugins/types.js";
|
||||
import type { OpenClawPluginApi } from "../../../src/plugins/types.js";
|
||||
|
||||
type RunEmbeddedPiAgentFn = (params: Record<string, unknown>) => Promise<unknown>;
|
||||
|
||||
@@ -61,11 +61,11 @@ type PluginCfg = {
|
||||
timeoutMs?: number;
|
||||
};
|
||||
|
||||
export function createLlmTaskTool(api: MoltbotPluginApi) {
|
||||
export function createLlmTaskTool(api: OpenClawPluginApi) {
|
||||
return {
|
||||
name: "llm-task",
|
||||
description:
|
||||
"Run a generic JSON-only LLM task and return schema-validated JSON. Designed for orchestration from Lobster workflows via clawd.invoke.",
|
||||
"Run a generic JSON-only LLM task and return schema-validated JSON. Designed for orchestration from Lobster workflows via openclaw.invoke.",
|
||||
parameters: Type.Object({
|
||||
prompt: Type.String({ description: "Task instruction for the LLM." }),
|
||||
input: Type.Optional(Type.Unknown({ description: "Optional input payload for the task." })),
|
||||
@@ -154,7 +154,7 @@ export function createLlmTaskTool(api: MoltbotPluginApi) {
|
||||
|
||||
let tmpDir: string | null = null;
|
||||
try {
|
||||
tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "moltbot-llm-task-"));
|
||||
tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-llm-task-"));
|
||||
const sessionId = `llm-task-${Date.now()}`;
|
||||
const sessionFile = path.join(tmpDir, "session.json");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user