import { AgentIsolationContext } from '@cuylabs/agent-foundry-agentserver-core'; import { p as ResponseProvider, b as ResponseObject, O as OutputItem, s as ResponseStreamProvider, r as ResponseStreamEvent } from '../types-Dvs2F85g.js'; import 'node:http'; import 'express'; declare class FoundryStorageError extends Error { readonly status: number; readonly code: string; readonly responseBody?: unknown | undefined; constructor(message: string, status: number, code?: string, responseBody?: unknown | undefined); } declare class FoundryStorageNotFoundError extends FoundryStorageError { constructor(message: string, responseBody?: unknown); } interface FoundryStorageSettingsOptions { projectEndpoint?: string; storageBaseUrl?: string; env?: NodeJS.ProcessEnv; } declare class FoundryStorageSettings { readonly storageBaseUrl: string; constructor(options: { storageBaseUrl: string; }); static fromEnv(env?: NodeJS.ProcessEnv): FoundryStorageSettings; static fromEndpoint(endpoint: string): FoundryStorageSettings; static resolve(options?: FoundryStorageSettingsOptions): FoundryStorageSettings; buildUrl(path: string, query?: Record): string; } interface AccessToken { token: string; expiresOnTimestamp?: number; } interface TokenCredential { getToken(scopes: string | string[], options?: Record): Promise; } interface FoundryStorageProviderOptions extends FoundryStorageSettingsOptions { credential: TokenCredential; fetch?: typeof fetch; getServerVersion?: () => string; } declare class FoundryStorageProvider implements ResponseProvider { private readonly credential; private readonly fetchImpl; private readonly settings; private readonly getServerVersion?; constructor(options: FoundryStorageProviderOptions); createResponse(response: ResponseObject, inputItems: OutputItem[], options?: { historyItemIds?: readonly string[]; isolation?: AgentIsolationContext; }): Promise; getResponse(responseId: string, options?: { isolation?: AgentIsolationContext; }): Promise; updateResponse(response: ResponseObject, options?: { isolation?: AgentIsolationContext; }): Promise; deleteResponse(responseId: string, options?: { isolation?: AgentIsolationContext; }): Promise; getInputItems(responseId: string, options?: { after?: string; ascending?: boolean; before?: string; isolation?: AgentIsolationContext; limit?: number; }): Promise; getItems(itemIds: readonly string[], options?: { isolation?: AgentIsolationContext; }): Promise>; getHistoryItemIds(previousResponseId: string | undefined, conversationId: string | undefined, limit: number, options?: { isolation?: AgentIsolationContext; }): Promise; private request; private headers; } declare class InMemoryResponseProvider implements ResponseProvider, ResponseStreamProvider { private readonly responses; private readonly inputItems; private readonly historyItemIds; private readonly items; private readonly streamEvents; private readonly conversationResponses; private readonly deleted; createResponse(response: ResponseObject, inputItems: OutputItem[], options?: { historyItemIds?: readonly string[]; isolation?: AgentIsolationContext; }): Promise; getResponse(responseId: string, options?: { isolation?: AgentIsolationContext; }): Promise; updateResponse(response: ResponseObject, options?: { isolation?: AgentIsolationContext; }): Promise; deleteResponse(responseId: string, options?: { isolation?: AgentIsolationContext; }): Promise; getItems(itemIds: readonly string[], options?: { isolation?: AgentIsolationContext; }): Promise>; getInputItems(responseId: string, options?: { after?: string; ascending?: boolean; before?: string; isolation?: AgentIsolationContext; limit?: number; }): Promise; getHistoryItemIds(previousResponseId: string | undefined, conversationId: string | undefined, limit: number, options?: { isolation?: AgentIsolationContext; }): Promise; getHistoryItems(previousResponseId: string | undefined, conversationId: string | undefined, limit: number, options?: { isolation?: AgentIsolationContext; }): Promise; appendStreamEvent(responseId: string, event: ResponseStreamEvent, options?: { isolation?: AgentIsolationContext; }): Promise; getStreamEvents(responseId: string, options?: { isolation?: AgentIsolationContext; }): Promise; saveStreamEvents(responseId: string, events: ResponseStreamEvent[], options?: { isolation?: AgentIsolationContext; }): Promise; deleteStreamEvents(responseId: string, options?: { isolation?: AgentIsolationContext; }): Promise; isDeleted(responseId: string, isolation?: AgentIsolationContext): boolean; private collectPreviousResponseHistoryItemIds; private collectResponseItemIds; } export { type AccessToken, FoundryStorageError, FoundryStorageNotFoundError, FoundryStorageProvider, type FoundryStorageProviderOptions, FoundryStorageSettings, type FoundryStorageSettingsOptions, InMemoryResponseProvider, type TokenCredential };