import { ExtensionRegistry } from '../extension/registry.js'; import type { Container } from '../kernel/container.js'; import type { EventBus } from '../kernel/events.js'; import type { ProviderRegistry } from '../registry/provider-registry.js'; import type { ToolRegistry } from '../registry/tool-registry.js'; import type { ErrorHandler } from '../types/error-handler.js'; import type { Logger } from '../types/logger.js'; import type { Tracer } from '../types/observability.js'; import type { PermissionPolicy } from '../types/permission.js'; import type { Plugin, PluginAPI } from '../types/plugin.js'; import type { Renderer } from '../types/renderer.js'; import type { RetryPolicy } from '../types/retry-policy.js'; import type { Tool } from '../types/tool.js'; import type { ToolExecutorLike } from '../types/tool-executor.js'; import { type AgentInit, type AgentInput, type AgentPipelines, type ResolvedLoopDetectionConfig, type RunResult } from './agent-types.js'; import type { Context, RunOptions } from './context.js'; export { type AgentInit, type AgentInput, type AgentPipelines, createDefaultPipelines, DEFAULT_MAX_ITERATIONS, normalizeInput, type ResolvedLoopDetectionConfig, type RunResult, resolveLoopDetection, type ToolCallPipelinePayload, type UserInputPayload, } from './agent-types.js'; export declare class Agent { readonly container: Container; readonly tools: ToolRegistry; readonly providers: ProviderRegistry; readonly events: EventBus; readonly pipelines: AgentPipelines; readonly ctx: Context; /** Max agent-loop iterations per run. Mutable so the TUI `/settings` picker * can apply a new value to the live session (takes effect next run). */ maxIterations: number; readonly executionStrategy: 'parallel' | 'sequential' | 'smart'; readonly perIterationOutputCapBytes: number; private readonly plugins; readonly toolExecutor: ToolExecutorLike; readonly autoExtendLimit: boolean; /** Resolved loop-detector settings (see `tools.loopDetection`). */ readonly loopDetection: ResolvedLoopDetectionConfig; private readonly autonomousContinue; readonly tracer: Tracer | undefined; readonly extensions: ExtensionRegistry; private readonly _toolHandler; private readonly _responseHandler; private readonly _loopHandler; private readonly _logger; /** * Guards against concurrent `run()` calls on the same Agent instance. * `run()` mutates shared state (`ctx.signal`, `ctx.messages`, token * bookkeeping, compaction state) and a second concurrent call would * interleave those mutations with the first, producing an invalid * conversation or racing abort signals. */ private _runInProgress; /** SHA-256 of the last submitted input content — prevents duplicate runs. */ private _lastInputHash; constructor(init: AgentInit); get logger(): Logger; get retry(): RetryPolicy; get errorHandler(): ErrorHandler; get permission(): PermissionPolicy; get renderer(): Renderer | undefined; disableInteractiveConfirmation(): void; register(tool: Tool): void; use(plugin: Plugin, api: PluginAPI): Promise; teardown(): Promise; run(userInput: AgentInput, opts?: RunOptions): Promise; } //# sourceMappingURL=agent.d.ts.map