- Replace deferred OpenClaw placeholder runtime with an executable adapter that creates sessions, prompts with fallback, describes models, and disposes safely - Add a dedicated pi-module seam and local runtime contract types to decouple plugin compilation from engine internals while preserving runtime behavior - Update OpenClaw plugin metadata, manifest/package descriptions, and README to reflect active execution support instead of deferred status - Harden dashboard DevServerStore save flow against ENOENT temp-directory races and add regression coverage for project-directory removal during save
50 lines
1.7 KiB
JavaScript
50 lines
1.7 KiB
JavaScript
/**
|
|
* OpenClaw Runtime Plugin
|
|
*
|
|
* Provides an executable OpenClaw runtime adapter for Fusion's plugin runtime
|
|
* discovery and session execution pipeline.
|
|
*/
|
|
import { definePlugin } from "@fusion/plugin-sdk";
|
|
import { OpenClawRuntimeAdapter } from "./runtime-adapter.js";
|
|
const OPENCLAW_RUNTIME_ID = "openclaw";
|
|
const OPENCLAW_RUNTIME_VERSION = "0.1.0";
|
|
const openclawRuntimeMetadata = {
|
|
runtimeId: OPENCLAW_RUNTIME_ID,
|
|
name: "OpenClaw Runtime",
|
|
description: "OpenClaw-backed AI session using the user's configured pi provider and model",
|
|
version: OPENCLAW_RUNTIME_VERSION,
|
|
};
|
|
const openclawRuntimeFactory = async () => {
|
|
return new OpenClawRuntimeAdapter();
|
|
};
|
|
const plugin = definePlugin({
|
|
manifest: {
|
|
id: "fusion-plugin-openclaw-runtime",
|
|
name: "OpenClaw Runtime Plugin",
|
|
version: "0.1.0",
|
|
description: "Provides OpenClaw runtime for Fusion AI agents",
|
|
author: "Fusion Team",
|
|
homepage: "https://github.com/gsxdsm/fusion",
|
|
runtime: openclawRuntimeMetadata,
|
|
},
|
|
state: "installed",
|
|
hooks: {
|
|
onLoad: (ctx) => {
|
|
ctx.logger.info("OpenClaw Runtime Plugin loaded");
|
|
ctx.emitEvent("openclaw-runtime:loaded", {
|
|
runtimeId: OPENCLAW_RUNTIME_ID,
|
|
version: OPENCLAW_RUNTIME_VERSION,
|
|
});
|
|
},
|
|
onUnload: () => {
|
|
// No context available during unload
|
|
},
|
|
},
|
|
runtime: {
|
|
metadata: openclawRuntimeMetadata,
|
|
factory: openclawRuntimeFactory,
|
|
},
|
|
});
|
|
export default plugin;
|
|
export { openclawRuntimeMetadata, openclawRuntimeFactory, OPENCLAW_RUNTIME_ID };
|
|
//# sourceMappingURL=index.js.map
|