UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

39 lines (38 loc) • 2.74 kB
import { r as createLazyRuntimeModule } from "./lazy-runtime-CJrzFzqU.mjs"; import { c as normalizeE164 } from "./utils-DUAwk2p5.mjs"; import { l as resolveSessionStorePathCore } from "./paths-CAzSovN1.mjs"; import { i as loadConfig } from "./io.runtime-FunTy0y1.mjs"; import "./config-B-SAEPyK.mjs"; import { n as resolveSessionKey, t as deriveSessionKey } from "./session-key-DUHtsODn.mjs"; import { t as applyTemplate } from "./templating-B8oW7TYm.mjs"; import { i as handlePortError, n as describePortOwner, r as ensurePortAvailable, t as PortInUseError } from "./ports-CWfLl4I4.mjs"; import { t as createDefaultDeps } from "./deps-CwzDET6u.mjs"; import { r as saveLegacySessionStore, t as loadLegacySessionStore } from "./state-migrations.legacy-session-store-eX1Nynjl.mjs"; //#region src/cli/wait.ts function waitForever() { setInterval(() => {}, 1e6); return new Promise(() => {}); } //#endregion //#region src/library.ts const loadReplyRuntime = createLazyRuntimeModule(() => import("./reply.runtime.js")); const loadPromptRuntime = createLazyRuntimeModule(() => import("./prompt-DlogxYJV.mjs")); const loadBinariesRuntime = createLazyRuntimeModule(() => import("./binaries-ZMjZU-Sx.mjs")); const loadExecRuntime = createLazyRuntimeModule(() => import("./exec-B5ecvzP7.mjs")); const loadWebChannelRuntime = createLazyRuntimeModule(() => import("./runtime-web-channel-plugin-ZohkpMYx.mjs")); const getReplyFromConfig = async (...args) => (await loadReplyRuntime()).getReplyFromConfig(...args); const promptYesNo = async (...args) => (await loadPromptRuntime()).promptYesNo(...args); const ensureBinary = async (...args) => (await loadBinariesRuntime()).ensureBinary(...args); const runExec = async (...args) => (await loadExecRuntime()).runExec(...args); const runCommandWithTimeout = async (...args) => (await loadExecRuntime()).runCommandWithTimeout(...args); const monitorWebChannel = async (...args) => (await loadWebChannelRuntime()).monitorWebChannel(...args); /** * @deprecated Legacy sessions.json compatibility for package-root consumers. * Use SQLite-backed session APIs. Remove after 2026-10-12, once the v2026.7.x * upgrade window no longer requires the legacy doctor importer. */ async function saveSessionStore(storePath, store, options) { await saveLegacySessionStore(storePath, store, options); } //#endregion export { PortInUseError, applyTemplate, createDefaultDeps, deriveSessionKey, describePortOwner, ensureBinary, ensurePortAvailable, getReplyFromConfig, handlePortError, loadConfig, loadLegacySessionStore as loadSessionStore, monitorWebChannel, normalizeE164, promptYesNo, resolveSessionKey, resolveSessionStorePathCore as resolveStorePath, runCommandWithTimeout, runExec, saveSessionStore, waitForever };