import type { CustomTool } from "../custom-tools/types"; import { type SessionQuarantine } from "./session-validation"; import type { GjcPluginScope, JsonSchema202012, NormalizedToolSurfaceV2 } from "./types"; export interface AlwaysOnPluginTools { tools: CustomTool[]; quarantine: SessionQuarantine[]; } export interface GjcPluginToolDeclaration extends NormalizedToolSurfaceV2 { plugin: string; scope: GjcPluginScope; } /** * Return v2 tool declarations without reading or importing implementation * modules. This is the schema-serving path used by discovery and diagnostics. */ export declare function getGjcPluginToolDeclarations(cwd: string): Promise; /** Serve the canonical schemas keyed by their stable tool surface id. */ export declare function serveGjcPluginSchemas(cwd: string): Promise>; /** * Load the always-on plugin tool surfaces for the effective registry at `cwd`. * * Safety properties: * - Hash drift quarantines the plugin (runtime_mismatch) before any import. * - Session-start collisions vs reserved/built-in names quarantine fail-closed. * - Manifest-declared tool names are authoritative: a factory that returns a * different/extra/missing name is rejected with runtime_mismatch and skipped. * - Reserved tool names are never overwritten. * * Returns an empty result when no plugins are installed, so callers that always * call this in `createAgentSession` incur no behavior change without plugins. */ export declare function loadAlwaysOnPluginTools(input: { cwd: string; reservedToolNames: string[]; declarations?: readonly GjcPluginToolDeclaration[]; /** Test seam runs before the final per-import integrity guard. */ beforeImport?: (resolvedPath: string) => Promise; }): Promise; /** * Render the always-on system-appendix blocks for the effective registry at * `cwd`, applying hash-drift + collision quarantine first. Returns "" when no * plugins are installed/enabled. Safe to call unconditionally at session start. */ export declare function renderAlwaysOnSystemAppendices(input: { cwd: string; }): Promise; /** * Render the agent-appendix block and Tier-1 sub-skill advertisement for a role * agent at session/spawn time. Hash-drift + collision quarantine applied first. * Returns empty strings when nothing applies. */ export declare function renderAgentPromptAdditions(input: { cwd: string; agentName: string; }): Promise<{ appendix: string; advertisement: string; }>; /** * Render the Tier-1 sub-skill advertisement for a workflow parent skill. * Returns "" when nothing applies. Quarantine applied first. */ export declare function renderSkillAdvertisement(input: { cwd: string; skillName: string; phase?: string; }): Promise; /** * Convert active plugin-bundle MCP surfaces into runtime MCPServerConfig entries, * applying install + runtime MCP policy (URL scheme/private-range deny, DNS * re-resolution for http/sse, stdio root-confinement) before connection. Servers * failing policy are quarantined and excluded. Returns {} when none. */ export declare function buildPluginMcpConfigs(input: { cwd: string; }): Promise<{ configs: Record; quarantine: SessionQuarantine[]; }>;