import type { AgentSessionState } from '../types'; export type AgentRuntimeAdapterKey = 'langgraph' | 'langchain' | 'workflow-devkit'; export interface AgentCheckpointEnvelope { sessionId: string; threadId?: string; state: AgentSessionState; checkpointId?: string; createdAt: Date; } export interface AgentCheckpointPort { save(envelope: AgentCheckpointEnvelope): Promise; load(sessionId: string): Promise; delete(sessionId: string): Promise; } export interface AgentSuspendResumePort { suspend(params: { sessionId: string; reason: string; metadata?: Record; }): Promise; resume(params: { sessionId: string; input?: string; metadata?: Record; }): Promise; } export interface AgentRuntimeMiddlewareHooks { beforeModel?: (state: TState) => Promise | TState | undefined; afterModel?: (state: TState) => Promise | TState | undefined; } export interface AgentRuntimeAdapterBundle { key: AgentRuntimeAdapterKey; checkpoint?: AgentCheckpointPort; suspendResume?: AgentSuspendResumePort; middleware?: AgentRuntimeMiddlewareHooks; }