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
34 lines (33 loc) • 1.4 kB
JavaScript
// 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 { opencodeBuilder } from "./agent-builder.js";
import { OpenCodeProvider } from "./session-log.js";
export { opencodeBuilder } from "./agent-builder.js";
export { openCodeImporter } from "./config-import.js";
export { OpenCodeProvider } from "./session-log.js";
/**
* OpenCode.
*
* Canonical id is `'opencode'`; it has no distinct runtime identity or alias.
*/
export class OpencodeHarness extends BaseHarness {
id = "opencode";
displayName = "OpenCode";
// Home-relative config dir scanned by `akm setup` (#567). OpenCode has a
// session-log provider, so offering it as a stash source is functional.
setupDetectionDir = ".config/opencode";
agentBuilder = opencodeBuilder;
// ── Workflow-engine descriptor (plan §"Capability matrix", P2) ────────────
// Session-id env marker for run attribution.
identityEnv = ["OPENCODE_SESSION_ID"];
sessionLogProvider = () => new OpenCodeProvider();
capabilities = caps({
sessionLogs: true,
agentDispatch: true,
detection: true,
configImport: true,
});
}