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

19 lines (18 loc) • 1.03 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/. /** * Typed script-target preparer: given a script asset's own owned identity * (ref/file/bundleRoot — never a synthetic task ref), freezes the same byte * shape prepareTaskV3Execution's script arm freezes for a real * task-v3 script target — via the one shared captureScriptTarget() * implementation in ./script-capture. No task document is built or parsed * here (no synthetic task YAML is fabricated); this module imports nothing * from ../source-v3. */ import { captureScriptTarget } from "./script-capture.js"; /** Project a script asset's own identity into the frozen shape a workflow script step dispatches. */ export function prepareScriptTarget(input) { const captured = captureScriptTarget(input.ref, input.file, input.bundleRoot, input.read); return Object.freeze({ ref: input.ref, ...captured }); }