openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
20 lines (19 loc) • 964 B
JavaScript
import { r as resolveStateDir } from "./state-dir-DiG0gXzD.mjs";
import { o as resolveOpenClawStateDirForDatabasePath, r as resolveDatabasePath, s as resolveOpenClawStateSqlitePath } from "./openclaw-state-db.paths-R3ArRCcz.mjs";
import path from "node:path";
//#region src/infra/client-credential-paths.ts
/** Local inventory must resolve this family without loading its credential writer. */
function resolveClientCredentialStorePath(e) {
return path.join(resolveStateDir(e), "client", "credentials.sqlite");
}
/** Only the canonical shared file owns the native client's local companion. */
function resolveStateClientCredentialEnvironment(e) {
const t = resolveDatabasePath({ path: e.path });
const n = {
...e.env,
OPENCLAW_STATE_DIR: resolveOpenClawStateDirForDatabasePath(t)
};
return t === resolveOpenClawStateSqlitePath(n) ? n : void 0;
}
//#endregion
export { resolveStateClientCredentialEnvironment as n, resolveClientCredentialStorePath as t };