import { a as BaseAgent, b as AgentMeta, B as BaseAgentRunOptions } from '../../../base-CMzON_2C.cjs';
import { GetRunContext } from '../../../context.cjs';
import { C as Callback, E as Emitter } from '../../../emitter-BWtGHYn0.cjs';
import { BaseMemory } from '../../../memory/base.cjs';
import { ChatLLM, ChatLLMOutput } from '../../../llms/chat.cjs';
import { BaseMessage } from '../../../llms/primitives/message.cjs';
import { StreamlitAgentTemplates } from './prompts.cjs';
import { BaseLLMOutput } from '../../../llms/base.cjs';
import { TokenMemory } from '../../../memory/tokenMemory.cjs';
import '../../../errors.cjs';
import '../../../internals/types.cjs';
import '../../../internals/helpers/guards.cjs';
import '../../../internals/serializable.cjs';
import '../../../tools/base.cjs';
import 'ajv';
import 'promise-based-task';
import '../../../cache/base.cjs';
import '../../../internals/helpers/schema.cjs';
import 'zod';
import 'zod-to-json-schema';
import '../../../internals/helpers/promise.cjs';
import '../../../template.cjs';

/**
 * Copyright 2025 IBM Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

interface StreamlitAgentInput {
    llm: ChatLLM<ChatLLMOutput>;
    memory: BaseMemory;
    templates?: Partial<StreamlitAgentTemplates>;
}
interface StreamlitRunInput {
    prompt: string | null;
}
interface Block {
    name: "text" | "app";
    content: string;
    start: number;
    end: number;
}
interface Result {
    raw: string;
    blocks: Block[];
}
interface StreamlitRunOutput {
    result: Result;
    message: BaseMessage;
    memory: BaseMemory;
}
interface StreamlitEvents {
    newToken: Callback<{
        delta: string;
        state: Readonly<{
            content: string;
        }>;
        chunk: BaseLLMOutput;
    }>;
}
declare class StreamlitAgent extends BaseAgent<StreamlitRunInput, StreamlitRunOutput> {
    protected readonly input: StreamlitAgentInput;
    emitter: Emitter<StreamlitEvents>;
    constructor(input: StreamlitAgentInput);
    get meta(): AgentMeta;
    set memory(memory: BaseMemory);
    get memory(): BaseMemory;
    protected _run(input: StreamlitRunInput, _options: BaseAgentRunOptions, run: GetRunContext<typeof this>): Promise<StreamlitRunOutput>;
    protected prepare(input: StreamlitRunInput): Promise<{
        runMemory: TokenMemory;
        userMessage: BaseMessage | null;
    }>;
    protected parse(raw: string): Result;
    createSnapshot(): {
        input: StreamlitAgentInput;
        isRunning: boolean;
    };
}

export { StreamlitAgent, type StreamlitAgentInput, type StreamlitEvents, type StreamlitRunInput, type StreamlitRunOutput };
