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

38 lines (37 loc) • 1.65 kB
// 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/. /** * The model aliases akm itself speaks: a call asks for a model by one of these * (or by an exact name), and each connection or harness says which of its own * models answers to them. */ export const STANDARD_ALIASES = ["fast", "balanced", "reasoning"]; /** * The alias each kind of call asks for when nothing nearer (an asset, a process, * a flag) names a model. It is the farthest layer of the call. */ export const SHIPPED_ALIAS = { /** Improve's passes: reflect, distill, consolidate, memory inference, validation. */ improve: "fast", /** Judges: the reflect and distill quality gates, the triage judgment, a workflow gate. */ judge: "balanced", /** Agent work: `akm agent`, `command run`, `proposal new`, task dispatch, workflow agent units. */ agent: "balanced", extract: "fast", enrich: "fast", /** The index passes. */ index: "fast", }; /** One model answering to every standard alias: what a connection with a single model has. */ export function modelForEveryAlias(model) { return { fast: model, balanced: model, reasoning: model }; } /** The model name an alias entry holds. */ export function entryModel(entry) { return typeof entry === "string" ? entry : entry.model; } /** The entry for `entry` once it names `model`: an entry with request fields keeps them. */ export function entryWithModel(entry, model) { return typeof entry === "object" ? { ...entry, model } : model; }