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

15 lines (14 loc) • 702 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 { toPosix } from "../common.js"; /** Bundle-root directory reserved for temporary working material; never indexed. */ export const SCRATCH_DIR = ".scratch"; /** * True when `relPath` (relative to the effective bundle root) is the * root `.scratch/` directory or anything beneath it. Root-scoped: a nested * `.scratch` is ordinary content. Paths that escape the root are not scratch. */ export function isScratchPath(relPath) { return toPosix(relPath).split("/")[0] === SCRATCH_DIR; }