UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

28 lines (27 loc) 1.21 kB
import { u as readConfigFileSnapshotWithPluginMetadata } from "./io.runtime-B9iJRs3w.js"; import { t as adoptCurrentPluginMetadataSnapshotIfAbsent } from "./current-plugin-metadata-snapshot-CmSX4G3W.js"; import { t as completePluginMetadataSnapshot } from "./plugin-metadata-snapshot-w-4EjxI4.js"; import "./config-Cs0XXL3x.js"; //#region src/cli/command-config-snapshot.ts /** Reads full command config and adopts its metadata without replacing an existing owner. */ async function readCommandConfigSnapshot(options) { const read = await readConfigFileSnapshotWithPluginMetadata(options); const pluginMetadataSnapshot = completePluginMetadataSnapshot({ snapshot: read.pluginMetadataSnapshot, config: read.snapshot.sourceConfig, env: process.env, workspaceDir: read.pluginMetadataSnapshot?.workspaceDir }); if (pluginMetadataSnapshot) adoptCurrentPluginMetadataSnapshotIfAbsent(pluginMetadataSnapshot, { config: read.snapshot.sourceConfig, compatibleConfigs: [read.snapshot.config, read.snapshot.runtimeConfig], env: process.env, workspaceDir: pluginMetadataSnapshot.workspaceDir }); return { ...read, pluginMetadataSnapshot }; } //#endregion export { readCommandConfigSnapshot };