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
32 lines (31 loc) • 1.43 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/.
/**
* True only when the user has explicitly opted into autonomous `akm improve`
* mutation.
*
* Accepts a partial config so callers holding a plain object (tests, the
* strategy resolver) do not need a fully-parsed one.
*/
export function isImproveAutonomyEnabled(config) {
return config?.experimental?.improveAutonomy === true;
}
/**
* The config key an operator sets to enable a gated lane.
*
* Named rather than inlined because it is user-facing text: it goes into the
* `improve_skipped` event metadata, the `akm task doctor` output, and the
* health advisory, and those three must name the same key as the schema.
*/
export const IMPROVE_AUTONOMY_CONFIG_KEY = "experimental.improveAutonomy";
/** True only when the user has explicitly let improve's reflect propose tags for memories. */
export function isMemoryEnrichmentEnabled(config) {
return config?.experimental?.memoryEnrichment === true;
}
/** True only when the user has explicitly turned `akm exec` on. */
export function isExecEnabled(config) {
return config?.experimental?.exec === true;
}
/** The config key that turns `akm exec` on; the refusal and the docs name the same one. */
export const EXEC_CONFIG_KEY = "experimental.exec";