openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
20 lines (19 loc) • 1.02 kB
JavaScript
import "./utils-Bv29YgC5.mjs";
import { k as resolveIdentityPathViaExistingAncestorSync } from "./redact-DO6ydQMZ.mjs";
import { i as sha256HexPrefixCore } from "./crypto-digest-DqNCiRzt.mjs";
import "node:fs";
import path from "node:path";
//#region src/plugins/plugin-source-capture-path.ts
const PLUGIN_SOURCE_CAPTURE_PREFIX = "openclaw-plugin-build-";
function resolvePluginSourceCapturesDirectory(stateDir) {
return path.join(stateDir, "tmp", "plugin-captures");
}
function resolvePluginSourceCaptureFallbackPrefix(stateDir) {
const identity = resolveIdentityPathViaExistingAncestorSync(stateDir);
return `openclaw-plugin-captures-${sha256HexPrefixCore(identity, 32)}-`;
}
function isLegacyPluginSourceCaptureName(name) {
return name.startsWith("openclaw-plugin-build-") || name.startsWith("openclaw-model-catalog-");
}
//#endregion
export { resolvePluginSourceCapturesDirectory as i, isLegacyPluginSourceCaptureName as n, resolvePluginSourceCaptureFallbackPrefix as r, PLUGIN_SOURCE_CAPTURE_PREFIX as t };