import type { ExtensionFactory } from '@earendil-works/pi-coding-agent'; import { z } from 'zod'; import type { Config } from '../config/schema.js'; import type { NativeMcpConfig } from '../agent/mcp/native-mcp.js'; export declare const AutomationMcpSourceInput: z.ZodObject<{ serverId: z.ZodString; toolNames: z.ZodArray; toolInputs: z.ZodOptional>>; }, z.core.$strict>; type Source = { id: string; agentId: string; serverId: string; revision: string; workspaceDir: string; tools: Array<{ name: string; digest: string; argumentsHash?: string; }>; createdAtMs: number; }; export declare class AutomationMcpSourceError extends Error { } export declare function getAutomationMcpSource(id: string, agentId: string): Source; export declare function assertAutomationMcpSource(source: Source, config: Config): void; /** Discovery is outside SQLite write transactions; the saved reference contains no credentials. */ export declare function prepareAutomationMcpSource(input: unknown, context: { conversationId?: string; agentId?: string; canConfigure: boolean; readConfig: () => Config; workspaceDir: string; signal?: AbortSignal; }): Promise<{ sourceId: string; serverId: string; agentId: string; toolNames: string[]; fixedInputs: { [k: string]: Record; }; verified: boolean; accountIdentityVerified: boolean; instruction: string; }>; /** A run cannot succeed from a model answer alone or silently select a different service. */ export declare function withAutomationMcpSource(input: { runId: string; conversationId: string; sourceId: string; agentId: string; readConfig: () => Config; signal: AbortSignal; }, operation: () => Promise): Promise; export declare function boundAutomationMcpSource(runId: string, conversationId: string): Source | undefined; export declare function restrictAutomationMcpConfig(runId: string, conversationId: string, loaded: NativeMcpConfig): NativeMcpConfig; /** Native pi still executes tools. The guard pins the current contract at each actual call. */ export declare function createAutomationMcpSourceGuard(runId: string): ExtensionFactory; export {};