import type { Plugin } from '../../plugins/plugin.js';
import type { Tool } from '../../tools/tool.js';
import type { LocalAgent } from '../../types/agent.js';
import { type Storage } from './storage.js';
/** Configuration for the {@link ContextOffloader} plugin. */
export interface ContextOffloaderConfig {
    /** Storage backend for persisting offloaded content. */
    storage: Storage;
    /** Token threshold above which tool results are offloaded. Defaults to 2,500. */
    maxResultTokens?: number;
    /** Number of tokens to keep as an inline preview. Defaults to 1,000. */
    previewTokens?: number;
    /** Whether to register the `retrieve_offloaded_content` tool. Defaults to true. */
    includeRetrievalTool?: boolean;
}
/**
 * Plugin that offloads oversized tool results to reduce context consumption.
 *
 * When a tool result exceeds the configured token threshold, this plugin stores
 * each content block to a storage backend and replaces the in-context result with
 * a truncated text preview plus per-block storage references.
 *
 * @example
 * ```typescript
 * import { ContextOffloader, InMemoryStorage } from '@strands-agents/sdk/vended-plugins/context-offloader'
 *
 * const agent = new Agent({
 *   model,
 *   plugins: [new ContextOffloader({ storage: new InMemoryStorage() })],
 * })
 * ```
 */
export declare class ContextOffloader implements Plugin {
    readonly name = "strands:context-offloader";
    private readonly _storage;
    private readonly _maxResultTokens;
    private readonly _previewTokens;
    private readonly _includeRetrievalTool;
    private readonly _storageByAgent;
    private _retrievalTool;
    constructor(config: ContextOffloaderConfig);
    initAgent(agent: LocalAgent): void;
    getTools(): Tool[];
    private _storageForAgent;
    private _storageForToolContext;
    private _createRetrievalTool;
    private _storeBlock;
    private _buildPreviewText;
    private _handleToolResult;
}
//# sourceMappingURL=plugin.d.ts.map