UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

28 lines (27 loc) • 1.09 kB
import { t as adoptCurrentPluginMetadataSnapshotIfAbsent } from "./current-plugin-metadata-snapshot-H0TP3PFt.mjs"; import { i as completePluginMetadataSnapshot } from "./plugin-metadata-snapshot-By9ySblt.mjs"; import { u as readConfigFileSnapshotWithPluginMetadata } from "./io.runtime-DsJ2dLCQ.mjs"; import "./config-CMA-J084.mjs"; //#region src/cli/command-config-snapshot.ts /** Reads full command config and adopts its metadata without replacing an existing owner. */ async function readCommandConfigSnapshot(e) { const t = await readConfigFileSnapshotWithPluginMetadata(e); const n = completePluginMetadataSnapshot({ snapshot: t.pluginMetadataSnapshot, config: t.snapshot.sourceConfig, env: process.env, workspaceDir: t.pluginMetadataSnapshot?.workspaceDir }); if (n) adoptCurrentPluginMetadataSnapshotIfAbsent(n, { config: t.snapshot.sourceConfig, compatibleConfigs: [t.snapshot.config, t.snapshot.runtimeConfig], env: process.env, workspaceDir: n.workspaceDir }); return { ...t, pluginMetadataSnapshot: n }; } //#endregion export { readCommandConfigSnapshot };