UNPKG

@openai/agents-core

Version:

The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.

41 lines (40 loc) • 2.41 kB
import type { Agent, AgentOutputType } from '../../agent'; import type { RunState } from '../../runState'; import type { SandboxClient } from '../client'; import type { SandboxSessionLike, SandboxSessionState } from '../session'; import type { SerializedSandboxSessionEntry, SerializedSandboxState } from './sessionState'; export type LivePreservedOwnedSessionEntry = { agentKey: string; backendId: string; currentAgentName: string; session: SandboxSessionLike<SandboxSessionState>; reuseRejected?: boolean; }; export declare function rememberLivePreservedOwnedSessions<TContext>(args: { state: RunState<TContext, Agent<TContext, AgentOutputType>>; serializedState: SerializedSandboxState; sessionsByAgentKey: ReadonlyMap<string, SandboxSessionLike<SandboxSessionState>>; }): void; export declare function forgetLivePreservedOwnedSessions<TContext>(state: RunState<TContext, Agent<TContext, AgentOutputType>>): void; export declare function hasRejectedLivePreservedOwnedSessions<TContext>(state: RunState<TContext, Agent<TContext, AgentOutputType>>): boolean; export declare function forgetLivePreservedOwnedSessionHandle<TContext>(args: { state: RunState<TContext, Agent<TContext, AgentOutputType>> | undefined; session: SandboxSessionLike<SandboxSessionState>; }): void; export declare function rememberRejectedLivePreservedOwnedSessionHandle<TContext>(args: { state: RunState<TContext, Agent<TContext, AgentOutputType>> | undefined; source: LivePreservedOwnedSessionEntry; session: SandboxSessionLike<SandboxSessionState>; }): void; export declare function rejectLivePreservedOwnedSessionHandle<TContext>(args: { state: RunState<TContext, Agent<TContext, AgentOutputType>> | undefined; session: SandboxSessionLike<SandboxSessionState>; }): void; export declare function livePreservedOwnedSessionEntries<TContext>(state: RunState<TContext, Agent<TContext, AgentOutputType>>): LivePreservedOwnedSessionEntry[]; export declare function preservedOwnedSessionAgentKeysWithoutLiveReuse(serializedState: SerializedSandboxState): Set<string>; export declare function livePreservedOwnedSession<TContext>(args: { runState: RunState<TContext, Agent<TContext, AgentOutputType>> | undefined; client: SandboxClient; agentKey: string; serializedEntry: SerializedSandboxSessionEntry | undefined; }): LivePreservedOwnedSessionEntry | undefined;