UNPKG

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

23 lines (22 loc) • 973 B
// 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 { createFilesystemProvider } from "./providers/filesystem.js"; import { GitSourceProvider } from "./providers/git-provider.js"; import { NpmSourceProvider } from "./providers/npm.js"; import { createWebsiteProvider } from "./providers/website.js"; /** The factory for a configured source kind, or null for a kind akm does not support. */ export function resolveSourceProviderFactory(type) { switch (type) { case "filesystem": return createFilesystemProvider; case "git": return (config) => new GitSourceProvider(config); case "npm": return (config) => new NpmSourceProvider(config); case "website": return createWebsiteProvider; default: return null; } }