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

43 lines (42 loc) • 1.96 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/. /** * OpenHands CLI harness (P2 integration, plan §"The adapter contract"). * * Per-harness barrel gathering the OpenHands integration surfaces: * - agent command builder → ./agent-builder.ts (openhandsBuilder) * - result extractor → ./result-extractor.ts (openhandsResultExtractor) * * It also defines {@link OpenhandsHarness}, the {@link AkmHarness} descriptor * that `HARNESS_REGISTRY` registers. Dispatch-only: no native session-log * reader or config importer yet. */ import { caps } from "../shared.js"; import { BaseHarness } from "../types.js"; import { openhandsBuilder } from "./agent-builder.js"; import { openhandsResultExtractor } from "./result-extractor.js"; export { OPENHANDS_MODEL_ENV, OPENHANDS_PLATFORM, openhandsBuilder } from "./agent-builder.js"; export { openhandsResultExtractor } from "./result-extractor.js"; /** * OpenHands CLI. * * Canonical id is `'openhands'`; no alias or distinct runtime identity. */ export class OpenhandsHarness extends BaseHarness { id = "openhands"; displayName = "OpenHands"; agentBuilder = openhandsBuilder; resultExtractor = openhandsResultExtractor; // ── Workflow-engine descriptor (plan §"Capability matrix", P2) ──────────── // No flag-shaped resume: per the matrix OpenHands resumes from workspace state, not a // session-id flag. The extractor still captures a conversation id // opportunistically; akm's `workflow_run_units` remains the durable source // of truth. // No `identityEnv`: the matrix lists OpenHands' identity markers as // uncertain, and it stamps no session var onto child processes. capabilities = caps({ agentDispatch: true, detection: true, }); }