akm-cli
Version:
akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cur
25 lines (24 loc) • 1.1 kB
JavaScript
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
import { getCacheDir, getConfigDir, getDataDir, getDbPath, getDefaultStashDir, getLockfileLockPath, getLockfilePath, } from "../core/paths.js";
import { getStateDbPath } from "../core/state-db.js";
/**
* Resolve the current {@link StorageLocations} by delegating to the existing
* path getters. Resolution honours the same environment overrides
* (`AKM_DATA_DIR`, XDG variables, transient-stash isolation) as the underlying
* getters, so this is safe to call at boot or per-operation — it carries no
* cached state of its own.
*/
export function resolveStorageLocations() {
return {
indexDb: getDbPath(),
stateDb: getStateDbPath(),
lockfile: getLockfilePath(),
lockfileSentinel: getLockfileLockPath(),
dataDir: getDataDir(),
cacheDir: getCacheDir(),
configDir: getConfigDir(),
stashDir: getDefaultStashDir(),
};
}