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.92 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/. /** * Gemini CLI harness (P2 integration, plan §"The adapter contract"). * * Per-harness barrel gathering the Gemini CLI integration surfaces: * - agent command builder → ./agent-builder.ts (geminiBuilder) * - result extractor → ./result-extractor.ts (geminiResultExtractor) * * It also defines {@link GeminiHarness}, 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 { geminiBuilder } from "./agent-builder.js"; import { geminiResultExtractor } from "./result-extractor.js"; export { GEMINI_PLATFORM, geminiBuilder } from "./agent-builder.js"; export { geminiResultExtractor } from "./result-extractor.js"; /** * Gemini CLI. * * Canonical id is `'gemini'`; no alias or distinct runtime identity. */ export class GeminiHarness extends BaseHarness { id = "gemini"; displayName = "Gemini CLI"; agentBuilder = geminiBuilder; resultExtractor = geminiResultExtractor; // ── Workflow-engine descriptor (plan §"Capability matrix", P2) ──────────── // The matrix's identity marker: Gemini CLI stamps GEMINI_CLI=1 only on // processes it spawns, so it genuinely means "running under gemini" (it is // not a user-profile config var) — but its VALUE ("1") is a bare flag, not // a session id, so it is registered as `presenceEnv` (harness inference // only), never `identityEnv` (whose values persist as agent_session_id). presenceEnv = ["GEMINI_CLI"]; capabilities = caps({ agentDispatch: true, detection: true, }); }