/**
 * LangChain Adapter — primitive mappings between LangChain tool calls and APS delegations.
 *
 * Pure mapping + receipt-builder layer. Stateful runtime (pending-intent tracking,
 * audit trail, gateway reporting) lives in the gateway — callers that need those
 * behaviours supply them via the `onReceipt` / `onDenied` hooks.
 */
import type { Delegation, ActionReceipt, SignedPassport } from '../types/passport.js';
export interface LangChainToolCall {
    name: string;
    args: Record<string, unknown>;
    id?: string;
}
export interface GovernedToolResult {
    output: unknown;
    receipt: ActionReceipt;
}
export interface DeniedToolResult {
    denied: true;
    reason: string;
    receipt: ActionReceipt;
}
export interface LangChainGovernanceConfig {
    passport: SignedPassport;
    delegation: Delegation;
    privateKey: string;
    scopeMapping?: Record<string, string>;
    onReceipt?: (r: ActionReceipt) => void;
    onDenied?: (info: {
        tool: string;
        reason: string;
    }) => void;
}
/** Map LangChain tool name to APS scope */
export declare function langchainToolToScope(toolName: string, scopeMapping?: Record<string, string>): string;
/** Govern a single LangChain tool call */
export declare function governLangChainTool(call: LangChainToolCall, execute: (args: Record<string, unknown>) => Promise<unknown>, config: LangChainGovernanceConfig): Promise<GovernedToolResult | DeniedToolResult>;
/** Create a governance middleware for LangGraph */
export declare function createLangGraphGovernance(config: LangChainGovernanceConfig): (call: LangChainToolCall, execute: (args: Record<string, unknown>) => Promise<unknown>) => Promise<GovernedToolResult | DeniedToolResult>;
//# sourceMappingURL=langchain.d.ts.map