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

30 lines (29 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/. import { TASK_V3_MAX_SCHEDULES } from "./source/bounded-document.js"; // D2-N4 (spec docs/plans/specs/p2a-task-source-v4.md §3.1, §9): re-exported // at its EXISTING name so no importer changes. The one name a surviving // `src` consumer still imports (task-source-v4.ts) — every other // bounded-document re-export this file used to carry was dropped in P4 // §3.2.3. export { TASK_V3_MAX_SCHEDULES }; export const TASK_EXTENSION = ".yml"; export const TASK_NEAR_MISS_EXTENSION = ".yaml"; /** Explain why the near-miss `.yaml` spelling is not a task source. */ export function taskExtensionDetail(relPath) { const base = relPath.replace(/\.yaml$/i, ""); return (`task file uses the ${TASK_NEAR_MISS_EXTENSION} extension; akm recognizes tasks only as ` + `${TASK_EXTENSION}, so this file is never indexed or scheduled — rename it to ${base}${TASK_EXTENSION}.`); } /** Closed authoring vocabulary. Arbitrary GitHub `{0}` shell templates are not accepted. */ export const TASK_V3_HOST_SHELLS = ["bash", "sh", "zsh", "pwsh", "powershell", "cmd"]; /** Preserve actionable classified hints when a parser failure becomes a diagnostic. */ export function taskSourceErrorDetail(cause) { if (!(cause instanceof Error)) return String(cause); const hint = "hint" in cause && typeof cause.hint === "function" ? cause.hint() : undefined; return hint ? `${cause.message} ${hint}` : cause.message; }