import { AgentProfile, AgentProfileValidationResult } from '@tangle-network/agent-interface';
import { AgentEnvironmentProvider, AgentEnvironmentCapabilities, CreateAgentEnvironmentInput, AgentTurnInput, AgentProfileRef } from '@tangle-network/agent-interface/environment-provider';
export { AgentEnvironment, AgentEnvironmentCapabilities, AgentEnvironmentEvent, AgentEnvironmentProvider, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentProfileRef, AgentSession, AgentSessionRef, AgentSessionStatus, AgentTurnInput, AgentTurnResult, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from '@tangle-network/agent-interface/environment-provider';
import { CreateSandboxOptions, BackendType } from '@tangle-network/sandbox';
import { R as Runtime, E as ExecutorFactory } from './types-Driepl87.js';
import { S as SandboxClient } from './types-ESeMOj94.js';
import '@tangle-network/agent-eval';

/** Provider object or registry name accepted by runtime provider adapters.
 * @experimental */
type AgentEnvironmentProviderRef = AgentEnvironmentProvider | string;
/** In-memory registry for named `AgentEnvironmentProvider` instances.
 * @experimental */
interface AgentEnvironmentProviderRegistry {
    register(provider: AgentEnvironmentProvider, options?: {
        replace?: boolean;
    }): void;
    has(name: string): boolean;
    get(name: string): AgentEnvironmentProvider | undefined;
    require(name: string): AgentEnvironmentProvider;
    names(): string[];
    providers(): AgentEnvironmentProvider[];
    capabilities(name: string): Promise<AgentEnvironmentCapabilities>;
}
/** Create a registry that resolves provider names to concrete provider instances.
 * @experimental */
declare function createAgentEnvironmentProviderRegistry(providers?: Iterable<AgentEnvironmentProvider>): AgentEnvironmentProviderRegistry;
/** Resolve a provider instance or registry name, failing loudly when a name is unknown.
 * @experimental */
declare function resolveAgentEnvironmentProvider(provider: AgentEnvironmentProviderRef, registry?: AgentEnvironmentProviderRegistry): AgentEnvironmentProvider;
/** Options for exposing an `AgentEnvironmentProvider` through the legacy sandbox client port.
 * @experimental */
interface ProviderAsSandboxClientOptions {
    defaults?: Partial<CreateAgentEnvironmentInput>;
    requireTerminalEvent?: boolean;
    mapCreateOptions?: (options: CreateSandboxOptions | undefined) => Partial<CreateAgentEnvironmentInput>;
}
/** Adapt a neutral environment provider to the `SandboxClient` interface used by existing loop paths.
 * @experimental */
declare function providerAsSandboxClient(provider: AgentEnvironmentProvider, options?: ProviderAsSandboxClientOptions): SandboxClient;
/** Options for wrapping the current Tangle sandbox client as an environment provider.
 * @experimental */
interface SandboxClientProviderOptions {
    name?: string;
    defaultBackend?: BackendType;
    capabilities?: AgentEnvironmentCapabilities | (() => AgentEnvironmentCapabilities | Promise<AgentEnvironmentCapabilities>);
    validateProfile?: (profile: AgentProfileRef) => AgentProfileValidationResult | Promise<AgentProfileValidationResult>;
    mapCreateInput?: (input: CreateAgentEnvironmentInput) => CreateSandboxOptions;
}
/** Adapt a `SandboxClient` into the shared `AgentEnvironmentProvider` contract.
 * @experimental */
declare function sandboxClientAsProvider(client: SandboxClient, options?: SandboxClientProviderOptions): AgentEnvironmentProvider;
/** Options for running a provider as a supervise-mode executor.
 * @experimental */
interface ProviderExecutorOptions {
    defaults?: Partial<CreateAgentEnvironmentInput>;
    runtime?: Runtime;
    destroyOnSettle?: boolean;
    requireTerminalEvent?: boolean;
    taskToTurn?: (task: unknown, specProfile: AgentProfile) => AgentTurnInput;
}
/** Adapt an environment provider into an `ExecutorFactory` for `createExecutor`.
 * @experimental */
declare function providerAsExecutor(provider: AgentEnvironmentProvider, options?: ProviderExecutorOptions): ExecutorFactory<unknown>;

export { type AgentEnvironmentProviderRef, type AgentEnvironmentProviderRegistry, type ProviderAsSandboxClientOptions, type ProviderExecutorOptions, type SandboxClientProviderOptions, createAgentEnvironmentProviderRegistry, providerAsExecutor, providerAsSandboxClient, resolveAgentEnvironmentProvider, sandboxClientAsProvider };
