/** * ADR-510 — where a ruflo plugin lives on disk, for a headless `claude -p` * worker (`--plugin-dir `) or an Agent SDK session * (`plugins: [{ type: "local", path }]`). * * `claude -p` on a fresh config loads no marketplace plugins: the marketplace * is cloned only by an interactive, trusted start. So a worker has to be told * where each plugin is. Sources, in order: * * 1. a `--source local` directory marketplace (a ruflo checkout) that Claude * Code itself records in the user-level `known_marketplaces.json`, i.e. * one the user added through an interactive, trusted start; * 2. the marketplace clone (`/plugins/marketplaces/ruflo/...`); * 3. the install cache (`/plugins/cache/ruflo//`). * * A folder without `.claude-plugin/plugin.json` is never returned: the plugin * is reported missing instead. Read-only; the filesystem is injectable. * * Trust: nothing inside the project decides the path. A repository's own * `.claude/settings.json` / `settings.local.json` (`extraKnownMarketplaces`) * is never read here: interactive Claude Code gates a project-declared * marketplace behind workspace trust, but `--plugin-dir` loads with no prompt * and replaces the user's installed copy of the same name. Letting a cloned * repo point the headless worker at its own folder would run repo-supplied * function hooks in every daemon worker, in place of the user's guard. */ import { type ReadFs } from './plugin-resolve.js'; export type PluginSource = 'local' | 'clone' | 'cache'; export interface ResolvedPlugin { name: string; /** Absolute plugin folder (the one holding `.claude-plugin/plugin.json`). */ path: string; source: PluginSource; } export interface MissingPlugin { name: string; reason: string; } export interface PluginPaths { resolved: ResolvedPlugin[]; missing: MissingPlugin[]; } /** ReadFs plus a directory listing (for the install cache's version folders). */ export interface PluginFs extends ReadFs { list(path: string): string[]; } export declare const nodePluginFs: PluginFs; export interface ResolveOptions { /** * Accepted for callers' convenience but deliberately not consulted: the * project's own settings never choose a headless plugin folder (see "Trust"). */ projectRoot?: string; env?: NodeJS.ProcessEnv; home?: string; fs?: PluginFs; } /** Resolve each plugin name (e.g. `ruflo-mods`) to an absolute folder, or report it missing. */ export declare function resolvePluginPaths(names: readonly string[], opts?: ResolveOptions): PluginPaths; //# sourceMappingURL=plugin-paths.d.ts.map