/** * BSO M9 v0.3 — Layer 3 KernelAdapter 注册表 + 装配 * * Refs: * - docs/prd/PRD-BSO-M9-HARNESS-HOOKS.md §3.4.3 * * `installAll(host)`:根据 host 命中所有匹配的 adapter,并行 install。 * 多内核共存策略:M9 P0 取强制力最强的一类(hook-file > deny-pipeline > mcp-only)。 * * 用法: * ```ts * const host = detectHostInfo(); * const report = await installAll({ host, cwd: process.cwd(), apply: true }); * ``` */ import { type Harness } from '../detector.js'; import type { DiagnoseResult, HostId, HostInfo, InstallResult, KernelAdapter, KernelType } from './types.js'; export declare const REGISTRY: KernelAdapter[]; export declare const ALL_ADAPTERS: KernelAdapter[]; export declare function getAdapter(kind: KernelType): KernelAdapter | undefined; /** * detectHarness 只识别 v0.2 的 5 个 IDE/CLI host;v0.3 新增的 mcp-only host * (Claude Desktop / 5ire / Tome / Witsy)需要走配置文件扫描。 * * 策略: * 1. detector 命中 → 返回该 host * 2. detector unknown → 扫 mcp-only 候选;若有命中且唯一 → 返回该 host * 3. 多个候选或无候选 → 返回 unknown */ export declare function detectPrimaryHost(): HostInfo; export interface InstallAllOptions { host: HostInfo; cwd: string; /** 真正落盘 */ apply: boolean; /** 强制走某个 kernel(覆盖 matches 判断),用于测试 / 用户显式 --kernel= */ forceKernel?: KernelType; /** mcp-only 的额外 host 安装(让用户一次给 Claude Desktop + 5ire 同时装) */ alsoInstallMcpHosts?: HostId[]; } export interface InstallAllReport { host: HostInfo; /** 命中的 adapter 顺序(强制力降序) */ matched: KernelType[]; results: InstallResult[]; warnings: string[]; } export declare function installAll(opts: InstallAllOptions): Promise; export interface DiagnoseAllReport { host: HostInfo; layer3: DiagnoseResult[]; layer2: DiagnoseResult; } export declare function diagnoseAll(host: HostInfo, cwd: string): Promise; export declare function harnessToHostId(h: Harness): HostId; //# sourceMappingURL=registry.d.ts.map