mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
23 lines
823 B
TypeScript
23 lines
823 B
TypeScript
/**
|
|
* ACPX setup plugin entry. It auto-enables setup when ACP config already points
|
|
* at the embedded ACPX runtime backend.
|
|
*/
|
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
|
|
export default definePluginEntry({
|
|
id: "acpx",
|
|
name: "ACPX Setup",
|
|
description: "Lightweight ACPX setup hooks",
|
|
register(api) {
|
|
api.registerAutoEnableProbe(({ config }) => {
|
|
const backendRaw = normalizeLowercaseStringOrEmpty(config.acp?.backend);
|
|
const configured =
|
|
config.acp?.enabled === true ||
|
|
config.acp?.dispatch?.enabled === true ||
|
|
backendRaw === "acpx";
|
|
return configured && (!backendRaw || backendRaw === "acpx") ? "ACP runtime configured" : null;
|
|
});
|
|
},
|
|
});
|