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
16 lines (15 loc) • 800 B
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/.
// ── Factory map ─────────────────────────────────────────────────────────────
const factories = new Map();
export function registerRegistryProvider(type, factory) {
factories.set(type, factory);
}
export function resolveRegistryProviderFactory(type) {
return factories.get(type) ?? null;
}
/** Test-only seam: removes a registration made with {@link registerRegistryProvider}. */
export function unregisterRegistryProvider(type) {
factories.delete(type);
}