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
40 lines (39 loc) • 1.64 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/.
/**
* Pi coding-agent CLI harness (P2 integration, plan §"The adapter contract").
*
* Per-harness barrel gathering the Pi integration surfaces:
* - agent command builder → ./agent-builder.ts (piBuilder)
* - result extractor → ./result-extractor.ts (piResultExtractor)
*
* It also defines {@link PiHarness}, 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 { piBuilder } from "./agent-builder.js";
import { piResultExtractor } from "./result-extractor.js";
export { PI_PLATFORM, piBuilder } from "./agent-builder.js";
export { piResultExtractor } from "./result-extractor.js";
/**
* Pi coding-agent CLI.
*
* Canonical id is `'pi'`; no alias or distinct runtime identity.
*/
export class PiHarness extends BaseHarness {
id = "pi";
displayName = "Pi";
agentBuilder = piBuilder;
resultExtractor = piResultExtractor;
// ── Workflow-engine descriptor (plan §"Capability matrix", P2) ────────────
// Session-id env marker only — the matrix's bare PI_* presence vars must
// not stamp identity onto manual runs (see `AkmHarness.identityEnv`).
identityEnv = ["PI_SESSION_ID"];
capabilities = caps({
agentDispatch: true,
detection: true,
});
}