/** * ADR-406 P0 — engine capability report. * * Every probe runs a fixed argv through an injected runner (never a shell), * with `CLAUDE_CONFIG_DIR` pointed at an isolated directory so the probe * never reads or writes the person's real `~/.claude`. Anything that could * not be observed is reported as `unknown` with the reason, never assumed. */ import type { ModCommandHook } from './inventory.js'; export type Runner = (file: string, args: readonly string[], env: NodeJS.ProcessEnv) => { status: number | null; stdout: string; stderr: string; }; export interface PluginValidation { readonly plugin: string; readonly passed: boolean | 'unknown'; readonly commandHooks: readonly string[]; readonly hostCalls: readonly string[]; /** A `command.run{command=?}` matcher: names chosen at run time, which only the source scan can list. */ readonly dynamicCommandHook?: true; readonly reason?: string; } export interface EngineReport { readonly schemaVersion: 1; readonly engine: { readonly executable: string | null; readonly version: string | null; readonly binarySha256: string | null; }; readonly typeGeneration: 'none-in-engine-cli' | 'unknown'; readonly vendoredTypes: readonly { readonly path: string; readonly sha256: string; }[]; readonly validations: readonly PluginValidation[]; readonly affordances: { readonly promptFill: boolean | 'unknown'; readonly processRun: boolean | 'unknown'; }; readonly collisions: readonly { readonly name: string; readonly builtin: boolean | 'unknown'; readonly repoCommand: boolean; readonly verdict: 'free' | 'taken' | 'unknown'; }[]; readonly limits: readonly string[]; } /** Parse `claude plugin validate` text: hooks and `$.` calls the static scanner found. */ export declare function parseValidateOutput(plugin: string, status: number | null, text: string): PluginValidation; /** Plugins that are function-hook mods (have `hooks/register.ts`). */ export declare function modPlugins(repoRoot: string): string[]; export interface EngineProbeInput { readonly repoRoot: string; readonly executable: string | null; readonly isolatedConfigDir: string; readonly run: Runner; /** Names to check for collisions, e.g. `ruflo`, `ruflo-workbench`. */ readonly proposedNames: readonly string[]; /** Every name the repository already exposes (legacy + mod names). */ readonly existingNames: ReadonlySet; } export declare function probeEngine(input: EngineProbeInput): EngineReport; /** Engine-observed command hooks, in the inventory's `ModCommandHook` shape. */ export declare function hooksFromValidations(validations: readonly PluginValidation[]): ModCommandHook[]; //# sourceMappingURL=engine-report.d.ts.map