import type { Agent, AgentCapabilities, AgentInput, AgentMetadata, AgentType, BaseAgentConfig, BaseAgentResult } from '../types/agent/index.js';
import type { AgentManagerContract } from '../types/agent/manager.js';
import type { RunId } from '../types/ids/index.js';
import type { RunEvent, RunEventListener } from '../types/run/index.js';
import { type Logger } from '../utils/logger.js';
export declare abstract class AbstractAgent<TConfig extends BaseAgentConfig = BaseAgentConfig, TResult extends BaseAgentResult = BaseAgentResult> implements Agent<TConfig, TResult> {
    abstract readonly type: AgentType;
    readonly metadata: AgentMetadata;
    protected log: Logger;
    protected abortController: AbortController;
    private readonly invocationLock;
    protected agentManager?: AgentManagerContract;
    protected currentRunId?: RunId;
    constructor(metadata: AgentMetadata);
    abstract run(input: AgentInput, config: TConfig, listener?: RunEventListener): Promise<TResult>;
    /**
     * Acquire the invocation lock to prevent concurrent execution.
     * Returns a Disposable that must be disposed to release the lock.
     *
     * Usage:
     * ```typescript
     * const lock = this.acquireInvocationLock()
     * try {
     *   // do work
     * } finally {
     *   lock[Symbol.dispose]()
     * }
     * ```
     *
     * @throws {ConcurrentInvocationError} if the agent is already executing
     */
    protected acquireInvocationLock(): import("./lock.js").Disposable;
    cancel(): Promise<void>;
    getCapabilities(): AgentCapabilities;
    protected createRunId(): RunId;
    protected createEmptyResult(runId: RunId, startTime: number): BaseAgentResult;
    protected emitEvent(event: RunEvent, listener?: RunEventListener): Promise<void>;
}
//# sourceMappingURL=AbstractAgent.d.ts.map