export declare const UNSET: unique symbol;
export type FuncParam = {
    name: string;
    hasDefault: boolean;
    defaultValue: unknown;
    variadic: boolean;
    boundValue?: unknown;
    isBound?: boolean;
};
export type CallType = {
    type: "positional";
    args: unknown[];
} | {
    type: "named";
    positionalArgs: unknown[];
    namedArgs: Record<string, unknown>;
    /** Trailing-block argument from `f(name: val) as { ... }` syntax.
     *
     *  In the positional case the block is simply appended to `args`
     *  (it's always the next positional slot), so no separate field
     *  is needed. In the named case earlier params may be filled by
     *  name and intermediate params may need UNSET padding, so the
     *  block must be bound by NAME to the last non-variadic
     *  parameter — appending it as positional[N] would mis-fill
     *  parameter N. resolveNamed synthesizes it into namedArgs under
     *  the last param's name so the rest of fill logic treats it
     *  uniformly. Without this, `f(name: val) as { ... }` silently
     *  dropped the block. */
    blockArg?: unknown;
};
export type ToolDefinition = {
    name: string;
    description: string;
    schema: unknown;
};
export type AgencyFunctionOpts = {
    name: string;
    module: string;
    fn: (...args: any[]) => any;
    params: FuncParam[];
    toolDefinition: ToolDefinition | null;
    exported?: boolean;
    safe?: boolean;
    isPreapproved?: boolean;
};
export declare class AgencyFunction {
    readonly __agencyFunction = true;
    readonly name: string;
    readonly module: string;
    readonly params: FuncParam[];
    readonly toolDefinition: ToolDefinition | null;
    private readonly _fn;
    private readonly _unboundParams;
    private readonly _nonVariadicUnbound;
    private readonly _hasVariadic;
    private readonly _isBound;
    readonly exported: boolean;
    readonly safe: boolean;
    private readonly _isPreapproved;
    constructor(opts: AgencyFunctionOpts);
    get isPreapproved(): boolean;
    get boundArgs(): {
        indices: number[];
        values: unknown[];
        originalParams: FuncParam[];
    } | null;
    withToolDefinition(toolDefinition: ToolDefinition | null): AgencyFunction;
    getOriginalParams(): FuncParam[];
    getUnboundParams(): FuncParam[];
    invoke(descriptor: CallType): Promise<unknown>;
    partial(bindings: Record<string, unknown>): AgencyFunction;
    preapprove(): AgencyFunction;
    describe(description: string): AgencyFunction;
    private mergeWithBound;
    private resolveArgs;
    private resolvePositional;
    private resolveNamed;
    static isAgencyFunction(value: unknown): value is AgencyFunction;
    static create(opts: AgencyFunctionOpts, registry: Record<string, AgencyFunction>): AgencyFunction;
}
