import fs from "node:fs"; import path from "node:path"; import { buildChannelConfigSchema } from "../channels/plugins/config-schema.js"; import type { ChannelConfigRuntimeSchema } from "../channels/plugins/types.config.js"; import type { JsonSchemaObject } from "../shared/json-schema.types.js"; import {
normalizeBundledPluginStringList,
trimBundledPluginString,
} from "./bundled-plugin-scan.js"; import { getCachedPluginJitiLoader, type PluginJitiLoaderCache } from "./jiti-loader-cache.js"; import type { PluginConfigUiHint } from "./manifest-types.js"; import type {
OpenClawPackageManifest,
PluginManifest,
PluginManifestChannelConfig,
} from "./manifest.js"; import { PUBLIC_SURFACE_SOURCE_EXTENSIONS } from "./public-surface-runtime.js";
const jitiLoaders: PluginJitiLoaderCache = new Map();
function isBuiltChannelConfigSchema(value: unknown): value is ChannelConfigSurface { if (!value || typeof value !== "object") { returnfalse;
} const candidate = value as { schema?: unknown }; returnBoolean(candidate.schema && typeof candidate.schema === "object");
}
function resolveConfigSchemaExport(imported: Record<string, unknown>): ChannelConfigSurface | null { for (const [name, value] of Object.entries(imported)) { if (name.endsWith("ChannelConfigSchema") && isBuiltChannelConfigSchema(value)) { return value;
}
}
for (const [name, value] of Object.entries(imported)) { if (!name.endsWith("ConfigSchema") || name.endsWith("AccountConfigSchema")) { continue;
} if (isBuiltChannelConfigSchema(value)) { return value;
} if (value && typeof value === "object") { return buildChannelConfigSchema(value as never);
}
}
for (const value of Object.values(imported)) { if (isBuiltChannelConfigSchema(value)) { return value;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.