import { type OffRouterConfig, type PolicyDenialCode } from "offrouter-core"; import { z } from "zod"; export declare const CLAUDE_INSTALL_STATE_REL: ".offrouter/claude-install-state.json"; export declare const INSTALLED_PLUGIN_REL: "skills/offrouter"; export declare const ClaudeInstallStateSchema: z.ZodObject<{ version: z.ZodLiteral<1>; profile: z.ZodString; harness: z.ZodLiteral<"claude">; installedAt: z.ZodString; pluginRootRelative: z.ZodString; files: z.ZodRecord; hash: z.ZodOptional; }, "strip", z.ZodTypeAny, { previous: string | null; hash?: string | undefined; }, { previous: string | null; hash?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { version: 1; profile: string; harness: "claude"; installedAt: string; pluginRootRelative: string; files: Record; }, { version: 1; profile: string; harness: "claude"; installedAt: string; pluginRootRelative: string; files: Record; }>; export type ClaudeInstallState = z.infer; export type InstallChangeKind = "create" | "update" | "unchanged" | "remove"; export interface InstallFileChange { path: string; relativePath: string; kind: InstallChangeKind; /** Diff-like summary line for human output. */ summary: string; } export interface ClaudeInstallOptions { profile: string; config: OffRouterConfig; env?: NodeJS.ProcessEnv; homedir?: () => string; dryRun?: boolean; /** Override source plugin directory (tests). Defaults to repo plugins/claude-offrouter. */ pluginSourceDir?: string; } export interface ClaudeInstallResult { ok: boolean; dryRun: boolean; profile: string; profileDir: string; changes: InstallFileChange[]; message: string; errorCode?: PolicyDenialCode | "install_error"; statePath?: string; } export interface ResolveClaudeProfileDirOptions { env?: NodeJS.ProcessEnv; homedir?: () => string; } export declare function isSafeProfileId(profile: string): boolean; /** * Resolve the on-disk Claude profile directory for a OffRouter profile id. * * - When OFFROUTER_CLAUDE_PROFILES_DIR is set: $DIR/ * - profile id `claude` -> ~/.claude (the only path that may touch global Claude) * - otherwise -> ~/. (e.g. claude-personal -> ~/.claude-personal) */ export declare function resolveClaudeProfileDir(profile: string, options?: ResolveClaudeProfileDirOptions): string; /** * Personal Claude profiles only: id starts with "claude" or is exactly "claude", * not a work profile by default pattern. */ export declare function isClaudeHarnessProfile(profile: string): boolean; export declare function isWorkLikeProfile(profile: string): boolean; /** * Allowlisted personal Claude profiles eligible for install --all-personal. */ export declare function listAllowlistedPersonalClaudeProfiles(config: OffRouterConfig): string[]; /** * Default plugin source: monorepo plugins/claude-offrouter relative to this package. */ export declare function defaultPluginSourceDir(): string; /** * Use routeRequest with empty candidates so work/unallowlisted profile denials * reuse the same core policy codes users see from route explain / hooks. */ export declare function evaluateInstallProfilePolicy(profile: string, config: OffRouterConfig): { allowed: boolean; errorCode?: PolicyDenialCode; message?: string; }; /** * Install the OffRouter Claude plugin into a single profile directory. */ export declare function installClaudeProfile(options: ClaudeInstallOptions): Promise; /** * Human-readable diff-like text for an install/uninstall result matrix. */ export declare function formatInstallDiffText(results: ClaudeInstallResult[], headline?: string): string; /** Copy helper retained for future link-mode installs. */ export declare function copyPluginFile(source: string, dest: string): Promise; //# sourceMappingURL=install.d.ts.map