import type { Cli } from "../internals/clis.js"; import { type Action } from "../internals/plan.js"; import type { Platform } from "../platform/base.js"; import type { EccInstallMechanism } from "./install-manifest.js"; import type { EccLanguagePack } from "./select.js"; /** * ECC is installed by running ECC's OWN published installer — aih assembles no ECC * content itself. `npx --yes --package ecc-universal ecc-install` fetches the * LATEST `ecc-universal` from npm and runs its `ecc-install` bin for the target * CLI, so a fresh machine with no ECC checkout and no user setup still gets the * current version. aih only passes the target + profile (the selection); ECC's * installer does the rest. * * Source of truth: ECC's `SUPPORTED_INSTALL_TARGETS` in `scripts/install-apply.js` * (v2) — claude, claude-project, cursor, antigravity, codex, gemini, opencode, * qwen, zed. Intersected with the harness's own CLIs, the supported upstream * targets are the seven below. Codex is special-cased in index.ts because the * upstream target copies shared `~/.codex` files; aih routes it through ECC's * add-only merge helpers instead. Kiro is NOT an `ecc-install` target (it ships * only in the git repo's `.kiro/`) — index.ts fetches the repo and runs ECC's * `.kiro/install.sh`. * copilot / windsurf / kimi are NOT ECC targets — they route through the `consult` * advisor rather than fabricating a `--target` ECC's installer would reject. */ export declare const ECC_INSTALL_TARGETS: readonly Cli[]; export declare const AIH_DIRECT_ECC_INSTALL_TARGETS: readonly Cli[]; export declare function isEccInstallTarget(cli: Cli): boolean; export declare function isAihDirectEccInstallTarget(cli: Cli): boolean; /** A mechanism that writes files, or `consult` — the advisor path, which installs nothing. */ export type EccMechanism = EccInstallMechanism | "consult"; export declare function eccInstallMechanism(cli: Cli): EccMechanism; /** The repo-relative root aih can prove ownership within, when there is one. */ export declare function eccManagedRoot(cli: Cli): string | undefined; /** Short human label per mechanism (reports and the coverage test key off this). */ export declare const ECC_INSTALL_MECHANISM_LABELS: Record; /** The mechanisms a CLI selection actually uses, in canonical order. */ export declare function eccMechanismsFor(clis: readonly Cli[]): EccMechanism[]; /** How the install runs, per mechanism — emitted ONLY for the mechanisms in play. */ export declare function eccMechanismInstallLines(clis: readonly Cli[], profile: string): string[]; /** * What a RERUN does, per mechanism (#558's honesty half, now registry-driven). No * mechanism replaces already-installed content, so none can re-scope an existing * install — but the REASON differs per mechanism, and only the reasons true for the * SELECTED targets are emitted. */ export declare function eccMechanismRerunLines(clis: readonly Cli[]): string[]; export interface EccInstallInputs { /** ECC install profile: minimal | core | full. */ profile: string; /** Short human stack summary for the advisor / summary docs. */ stackSummary: string; /** * Host platform — routes the `npx` installer through `cmd /c` on Windows, where * `execFile` cannot spawn a `.cmd` shim directly (npm/npx have no `.exe`). */ platform: Platform; /** * Optional pin for `npx --package ecc-universal@ ecc-install` * (enterprise supply-chain control, from `AIH_ECC_INSTALL_VERSION`). Unset → * latest from npm. */ installVersion?: string; /** Stack-specific ECC language packs appended after --profile. */ packs?: readonly EccLanguagePack[]; } export declare const ECC_NPM_PACKAGE = "ecc-universal"; export declare const ECC_NPM_BIN = "ecc-install"; export declare const ECC_NPM_CLI_BIN = "ecc"; export declare const ECC_NPM_BINS: readonly ["ecc-install", "ecc"]; export declare function normalizeEccInstallVersion(raw: string | undefined): string | undefined; /** The `npx --package ecc-universal ecc-install` argv for a target CLI. */ export declare function eccInstallerArgv(cli: Cli, profile: string, version?: string, packs?: readonly EccLanguagePack[]): string[]; /** Build the ECC install action(s) for one CLI (Kiro is handled in index.ts). */ export declare function eccActionsForCli(cli: Cli, inputs: EccInstallInputs): Action[]; /** * A supply-chain advisory emitted whenever ECC runs UNPINNED (the default `latest` * surfaces). Names the mutable-upstream execution explicitly and how to pin/mirror * it for an enterprise rollout — the "explicit acknowledgement" the review asked for. */ export declare function eccSupplyChainDoc(): Action; /** The ECC ecosystem tools doc (advisor + security scanner), emitted once. */ export declare function eccToolsDoc(): Action;