/** * `openlore install` — auto-configure popular agent surfaces so they call * `orient()` automatically. * * Dispatches to one or more adapters depending on `--agent` / detection, * supports `--dry-run`, `--force`, and `--uninstall`. */ import { Command } from 'commander'; import { type AgentName } from './detect.js'; import type { ProveEligibility } from '../../core/agent-eval/tasks.js'; export interface InstallOptions { agent?: AgentName; /** * Explicit list of surfaces to wire (used by `openlore connect`'s multi-select). * Takes precedence over `agent` and over detection. Each is rooted at `cwd`. */ agents?: AgentName[]; /** MCP tool preset wired into the registered server (validated against TOOL_PRESETS). */ preset?: string; /** Convenience full-surface selector (alias of `--preset full`), matching `openlore mcp --all-tools`. */ allTools?: boolean; dryRun?: boolean; force?: boolean; uninstall?: boolean; cwd?: string; /** * After configuring agent surfaces, build the index so orient() works on the * very first session (init if needed, then analyze). Default true; set false * via `--no-analyze`. Skipped for --dry-run and --uninstall. */ analyze?: boolean; /** * Confine wiring to the current repository — do NOT write the user-scope entries * that make every future repository reach OpenLore (change: * unify-onboarding-entrypoint). The escape hatch for users who want explicit * per-repo scope control; `--uninstall --repo-only` likewise leaves the user * scope alone. */ repoOnly?: boolean; /** User-scope root. Defaults to the user's home directory; a test seam, not a flag. */ home?: string; } /** * Build the openlore index so the freshly-wired orient() returns results on the * user's first session instead of "No analysis found". * * - init: use the programmatic API (openloreInit), which is silent and returns * created:false when config already exists. The init CLI command instead logs * a scary "[error] Configuration exists. Use --force" on re-runs, which is * misleading inside install where re-running is a clean no-op. * - analyze: drive the real CLI command — the searchable BM25 index orient reads * is built by analyze's embed step, which only the CLI command runs. It reads * process.cwd(), so we chdir into the target for the duration. * * Failures are non-fatal: the surfaces are already wired, so we warn and tell * the user to run analyze themselves rather than failing the whole install. */ export declare function buildIndex(cwd: string, opts?: { repair?: boolean; }): Promise; /** * Where the user-scope footprint is written. * * Precedence: an explicit caller root, then `OPENLORE_HOME` (for sandboxes, CI * images, and containers whose real `$HOME` is not the profile to configure), * then the user's home directory. * * The test interlock is deliberate and load-bearing: under a test runner, writing * the user scope without an explicit root is a HARD ERROR rather than a silent * write into the developer's own `~/.claude.json`, `~/.claude/settings.json`, and * `~/.claude/CLAUDE.md`. That is not a hypothetical — it is what the first draft * of this change did, and no assertion in the suite would ever have noticed * (change: unify-onboarding-entrypoint). */ export declare function resolveUserScopeRoot(explicit?: string): string; /** * Wire the decisions commit gate in AUTOPILOT mode — one entrypoint, both faces. * * Autopilot means the gate records and syncs verified decisions and NEVER blocks a * commit (change: add-decision-autopilot). Blocking human review stays an explicit * opt-in, so a user who runs the one advertised command gains a decision trail and * loses nothing: the doctrine is advisory by default, blocking on request. * * Fail-soft in every direction. Not a git repository, no config yet, an explicit * `autopilot: false`, an unwritable hook path — each is a one-line note, never a * failed install (change: unify-onboarding-entrypoint). */ export declare function wireGovernanceGate(cwd: string): Promise<'wired' | 'skipped'>; /** Remove the decisions commit gate on `--uninstall`. Quiet when there is nothing to remove. */ export declare function unwireGovernanceGate(cwd: string): Promise; export interface SurfaceStatus { agent: AgentName; /** A marker for this agent was found in the project tree. */ detected: boolean; /** OpenLore is already fully wired for this agent (a fresh apply would be a no-op). */ connected: boolean; /** Does this agent have a user-scope surface OpenLore can wire? */ supportsUserScope: boolean; /** * OpenLore's managed footprint is present at the USER scope, so every repository * reaches it (change: unify-onboarding-entrypoint). `false` for an agent with no * user scope. */ userScope: boolean; } /** * Status of every supported surface for `openlore connect list`. "connected" is * computed by asking each adapter to plan a dry-run apply and checking that it * has nothing left to create or update — reusing the adapters' own logic instead * of duplicating per-agent file knowledge here. */ export declare function surfaceStatus(cwd?: string, home?: string): Promise; export declare function runInstall(opts: InstallOptions): Promise; /** Render install's value-proof epilogue only after checking the built graph. */ export declare function printProveGuidance(cwd: string): Promise; export declare function formatProveGuidance(eligibility: ProveEligibility): { title: string; detail: string; }; export declare const installCommand: Command; //# sourceMappingURL=index.d.ts.map