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.64 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 { caps } from "../shared.js"; import { BaseHarness } from "../types.js"; import { claudeBuilder } from "./agent-builder.js"; import { claudeResultExtractor } from "./result-extractor.js"; import { ClaudeCodeProvider } from "./session-log.js"; export { claudeBuilder } from "./agent-builder.js"; export { claudeCodeImporter } from "./config-import.js"; export { claudeResultExtractor } from "./result-extractor.js"; export { ClaudeCodeProvider } from "./session-log.js"; /** * Claude Code. * * `claude` is the sole runtime and persisted id. */ export class ClaudeHarness extends BaseHarness { id = "claude"; displayName = "Claude Code"; // Home-relative config dir scanned by `akm setup` (#567). Claude Code has a // session-log provider, so offering it as a stash source is functional. setupDetectionDir = ".claude"; agentBuilder = claudeBuilder; resultExtractor = claudeResultExtractor; // ── Workflow-engine descriptor (plan §"Capability matrix", P2) ──────────── // Session-id env marker: presence of a concrete session id (not the bare // "running under Claude Code" flag) attributes a run to this harness. identityEnv = ["CLAUDE_SESSION_ID"]; sessionLogProvider = () => new ClaudeCodeProvider(); capabilities = caps({ sessionLogs: true, agentDispatch: true, detection: true, configImport: true, }); }