/** * Plugin discovery and wiring. * * Discovers plugin directories under the `plugins/` folders, parses their * manifests (see {@link parsePluginDir}), and turns each into a synthetic * {@link ExtensionFactory} that registers the plugin's capabilities through the * existing ExtensionAPI. The factory is loaded by the standard extension loader, * so plugins are just extensions assembled from a manifest instead of code. * * Capability wiring (minimum): * - skills / themes → `resources_discover` skill/theme paths * - commands → `resources_discover` slash-command paths (`.agents/commands`) * - agents → `resources_discover` agent paths (`.agents/agents` subagents) * - providers (native only) → `registerProvider` * - hooks → shell-protocol bridge (see hooks-bridge.ts) * - mcpServers → parsed; wiring deferred (see design doc) */ import type { ExtensionFactory } from "../types.js"; import { type NormalizedPlugin } from "./manifest.js"; /** Extension path a plugin is loaded under: ``. */ export declare function pluginExtensionPath(id: string): string; /** Recover the plugin id from {@link pluginExtensionPath}, or undefined for a non-plugin extension. */ export declare function pluginIdFromExtensionPath(extensionPath: string): string | undefined; /** * The template variables a plugin may use, mapped to their values. * * All vendor spellings are honored rather than only the ones hoocode invented. * A plugin does not know which agent is loading it: a Copilot plugin writes * `${PLUGIN_ROOT}`, a Claude one `${CLAUDE_PLUGIN_ROOT}`, and either may use * `${*_PLUGIN_DATA}` for runtime state. Supporting one spelling means the others * reach the shell or the MCP client as literal text. */ export declare function pluginVariables(root: string, dataDir: string): Record; export type { NormalizedPlugin } from "./manifest.js"; export { parsePluginDir } from "./manifest.js"; export declare function discoverPlugins(pluginDirs: string[]): NormalizedPlugin[]; export interface PluginFactoryOptions { /** * Load only capabilities that cannot execute: skills, commands, subagents, * themes. Hooks and MCP servers are skipped and reported. * * Set for **project-scoped** plugins — those discovered under the workspace, * chiefly `/.claude/skills/`. That content arrives with a cloned * repository rather than from the user, and registering shell hooks or * spawning MCP servers from it with no confirmation is a real escalation over * reading skill text, which is all a project skills directory gets today. * * Claude Code gates the same content behind a workspace trust dialog and * per-server MCP approval. hoocode has no trust mechanism at all, so it * withholds the executable half instead of pretending to gate it. If a trust * gate is ever added, this is the flag it replaces. * See docs/plugin-system-architecture.md §5.9. */ passiveOnly?: boolean; } /** Capabilities withheld from a passive-only plugin, for reporting. */ export declare function withheldCapabilities(plugin: NormalizedPlugin): string[]; /** Build a synthetic extension factory that wires one normalized plugin. */ export declare function buildPluginFactory(plugin: NormalizedPlugin, options?: PluginFactoryOptions): ExtensionFactory; //# sourceMappingURL=index.d.ts.map