import { installSeedAgent } from "./opencode-config.js";
export async function runInstall(options = {}) {
    return installSeedAgent(options);
}
export function formatInstallResult(result, options = {}) {
    const lines = [
        "SEED-agent install",
        "",
        `${result.pluginAdded || result.opencodeConfigUpdated ? "[updated]" : "[ok]"} OpenCode plugin: ${result.pluginSpec}`,
        `        config: ${result.opencodeConfigPath}`,
        ...(result.rootOpenCodeConfigPath ? [`        root compatibility config: ${result.rootOpenCodeConfigPath}`] : []),
        "        default face: Lab-Representative; static SEED commands and the single SEED agent written; native Build/Plan disabled for SEED projects",
        `${result.seedConfigCreated ? "[created]" : result.seedConfigMigrated ? "[migrated]" : "[ok]"} SEED config: ${result.seedConfigPath}`,
        "        defaults: model-neutral OpenCode selection, user SEED config ignored for project installs, host MCP/tools/commands/agents isolated",
    ];
    if (result.backupPath)
        lines.push(`[backup] ${result.backupPath}`);
    if (result.rootBackupPath)
        lines.push(`[backup] ${result.rootBackupPath}`);
    if (result.seedConfigBackupPath)
        lines.push(`[backup] ${result.seedConfigBackupPath}`);
    if (result.seedConfigMigrated) {
        lines.push("        normalized SEED config to the current single Lab-Representative project shape");
    }
    if (!options.skipAuth) {
        lines.push("");
        lines.push("Provider auth stays in OpenCode.");
        if (options.provider) {
            lines.push(`  opencode providers login -p ${options.provider}`);
        }
        else {
            lines.push("  opencode providers login -p <provider>");
        }
    }
    lines.push("");
    lines.push("Then verify with:");
    lines.push("  seed-agent doctor --agents");
    return lines.join("\n");
}
//# sourceMappingURL=install.js.map