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.95 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/. /** * GitHub Copilot CLI harness (P2 integration, plan §"The adapter contract"). * * Per-harness barrel gathering the Copilot CLI integration surfaces: * - agent command builder → ./agent-builder.ts (copilotBuilder) * - result extractor → ./result-extractor.ts (copilotResultExtractor) * * It also defines {@link CopilotHarness}, the {@link AkmHarness} descriptor * that `HARNESS_REGISTRY` registers. This is the LOCAL Copilot CLI * (`copilot -p …`); the cloud "Copilot coding agent" is a separate, future * descriptor. */ import { caps } from "../shared.js"; import { BaseHarness } from "../types.js"; import { copilotBuilder } from "./agent-builder.js"; import { copilotResultExtractor } from "./result-extractor.js"; export { COPILOT_PLATFORM, copilotBuilder } from "./agent-builder.js"; export { copilotResultExtractor } from "./result-extractor.js"; /** * GitHub Copilot CLI (local headless CLI, not the cloud coding agent). * * Canonical id is `'copilot'`; no alias or distinct runtime identity. */ export class CopilotHarness extends BaseHarness { id = "copilot"; displayName = "GitHub Copilot CLI"; agentBuilder = copilotBuilder; resultExtractor = copilotResultExtractor; // ── Workflow-engine descriptor (plan §"Capability matrix", P2) ──────────── // Session-id env marker only. The matrix's other candidates (GH_TOKEN, // bare COPILOT_* presence vars) are credential/presence flags that would // stamp identity onto manual runs, so they are deliberately NOT registered // (see `AkmHarness.identityEnv`). identityEnv = ["COPILOT_SESSION_ID"]; capabilities = caps({ agentDispatch: true, detection: true, }); }