art-framework 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -4229,58 +4229,77 @@ declare class GeminiAdapter implements ProviderAdapter {
4229
4229
  interface OpenAIAdapterOptions {
4230
4230
  /** Your OpenAI API key. Handle securely. */
4231
4231
  apiKey: string;
4232
- /** The default OpenAI model ID to use (e.g., 'gpt-4o', 'gpt-4o-mini'). Defaults to 'gpt-3.5-turbo' if not provided. */
4232
+ /** The default OpenAI model ID to use (e.g., 'gpt-4o', 'gpt-5', 'gpt-5-mini'). */
4233
4233
  model?: string;
4234
4234
  /** Optional: Override the base URL for the OpenAI API (e.g., for Azure OpenAI or custom proxies). */
4235
4235
  apiBaseUrl?: string;
4236
+ /** Optional: Default maximum tokens for responses. */
4237
+ defaultMaxTokens?: number;
4238
+ /** Optional: Default temperature for responses. */
4239
+ defaultTemperature?: number;
4236
4240
  }
4237
4241
  /**
4238
4242
  * Implements the `ProviderAdapter` interface for interacting with OpenAI's
4239
- * Chat Completions API (compatible models like GPT-3.5, GPT-4, GPT-4o).
4243
+ * Responses API (supports reasoning models like GPT-5 family and other models).
4240
4244
  *
4241
- * Handles formatting requests and parsing responses for OpenAI.
4242
- * Uses raw `fetch` for now.
4245
+ * Handles formatting requests, parsing responses, streaming, reasoning token detection, and tool use.
4246
+ * Uses the official OpenAI SDK with the new Responses API for full reasoning model support.
4243
4247
  *
4244
4248
  * @see {@link ProviderAdapter} for the interface definition.
4249
+ * @see {@link OpenAIAdapterOptions} for configuration options.
4245
4250
  */
4246
4251
  declare class OpenAIAdapter implements ProviderAdapter {
4247
4252
  readonly providerName = "openai";
4248
- private apiKey;
4249
- private model;
4250
- private apiBaseUrl;
4253
+ private client;
4254
+ private defaultModel;
4255
+ private defaultMaxTokens;
4256
+ private defaultTemperature;
4251
4257
  /**
4252
4258
  * Creates an instance of the OpenAIAdapter.
4253
- * @param {OpenAIAdapterOptions} options - Configuration options including the API key and optional model/baseURL overrides.
4254
- * @throws {Error} If the API key is missing.
4255
- * @see https://platform.openai.com/docs/api-reference
4259
+ * @param options - Configuration options including the API key and optional model/baseURL/defaults.
4260
+ * @throws {ARTError} If the API key is missing.
4256
4261
  */
4257
4262
  constructor(options: OpenAIAdapterOptions);
4258
4263
  /**
4259
- * Sends a request to the OpenAI Chat Completions API.
4260
- * Translates `ArtStandardPrompt` to the OpenAI format, handles streaming and non-streaming responses.
4264
+ * Sends a request to the OpenAI Responses API.
4265
+ * Translates `ArtStandardPrompt` to the Responses API format and handles streaming/reasoning.
4261
4266
  *
4262
4267
  * @param {ArtStandardPrompt} prompt - The standardized prompt messages.
4263
- * @param {CallOptions} options - Call options, including `threadId`, `traceId`, `stream` preference, and any OpenAI-specific parameters (like `temperature`, `max_tokens`) passed through.
4268
+ * @param {CallOptions} options - Call options, including streaming, reasoning options, and model parameters.
4264
4269
  * @returns {Promise<AsyncIterable<StreamEvent>>} A promise resolving to an AsyncIterable of StreamEvent objects.
4265
- * @see https://platform.openai.com/docs/api-reference/chat/create
4266
4270
  */
4267
4271
  call(prompt: ArtStandardPrompt, options: CallOptions): Promise<AsyncIterable<StreamEvent>>;
4268
4272
  /**
4269
- * Processes the Server-Sent Events (SSE) stream from OpenAI.
4270
- * @param stream - The ReadableStream from the fetch response.
4271
- * @param options - The original CallOptions containing threadId, traceId, sessionId, and callContext.
4272
- * @returns An AsyncIterable yielding StreamEvent objects.
4273
- */
4274
- private processStream;
4273
+ * Optional: Method for graceful shutdown
4274
+ */
4275
+ shutdown(): Promise<void>;
4275
4276
  /**
4276
- * Translates the provider-agnostic `ArtStandardPrompt` into the OpenAI API's `OpenAIMessage[]` format.
4277
+ * Translates the provider-agnostic `ArtStandardPrompt` into the OpenAI Responses API format.
4278
+ * Extracts system prompt separately and formats messages as input array.
4277
4279
  *
4278
4280
  * @private
4279
4281
  * @param {ArtStandardPrompt} artPrompt - The input `ArtStandardPrompt` array.
4280
- * @returns {OpenAIMessage[]} The `OpenAIMessage[]` array formatted for the OpenAI API.
4281
- * @throws {ARTError} If translation encounters an issue (ErrorCode.PROMPT_TRANSLATION_FAILED).
4282
+ * @returns {{ systemPrompt?: string; input: OpenAIResponsesInputMessage[] }} An object containing the extracted system prompt and the array of Responses API formatted input messages.
4283
+ * @throws {ARTError} If translation encounters an issue.
4282
4284
  */
4283
- private translateToOpenAI;
4285
+ private translateToResponsesFormat;
4286
+ /**
4287
+ * Maps a single `ArtStandardMessage` to OpenAI Responses API input format.
4288
+ *
4289
+ * @private
4290
+ * @param {ArtStandardMessage} artMsg - The ART standard message to map.
4291
+ * @returns {OpenAIResponsesInputMessage | null} The translated message for the Responses API, or null if should be skipped.
4292
+ * @throws {ARTError} If tool call arguments are not valid JSON.
4293
+ */
4294
+ private mapArtMessageToResponsesContent;
4295
+ /**
4296
+ * Translates an array of `ToolSchema` from the ART framework format to OpenAI's Responses API tool format.
4297
+ * @private
4298
+ * @param {ToolSchema[]} artTools - An array of ART tool schemas.
4299
+ * @returns {OpenAIResponsesTool[]} An array of tools formatted for the OpenAI Responses API.
4300
+ * @throws {ARTError} If a tool's `inputSchema` is invalid.
4301
+ */
4302
+ private translateArtToolsToOpenAI;
4284
4303
  }
4285
4304
 
4286
4305
  /**
@@ -4330,9 +4349,12 @@ declare class AnthropicAdapter implements ProviderAdapter {
4330
4349
  * @returns {Promise<AsyncIterable<StreamEvent>>} A promise resolving to an AsyncIterable of StreamEvent objects.
4331
4350
  */
4332
4351
  call(prompt: ArtStandardPrompt, options: CallOptions): Promise<AsyncIterable<StreamEvent>>;
4352
+ /**
4353
+ * Optional: Method for graceful shutdown
4354
+ */
4355
+ shutdown(): Promise<void>;
4333
4356
  /**
4334
4357
  * Prepares request options, adding Anthropic beta headers if applicable for features like prompt caching.
4335
- * This allows opting into experimental features on a per-request basis.
4336
4358
  * @private
4337
4359
  * @param {string} modelId - The model ID being used for the request, to determine which beta features may apply.
4338
4360
  * @returns {Anthropic.RequestOptions} The request options object, potentially with custom headers.
@@ -4369,28 +4391,13 @@ declare class AnthropicAdapter implements ProviderAdapter {
4369
4391
  private translateArtToolsToAnthropic;
4370
4392
  }
4371
4393
 
4372
- /**
4373
- * Configuration options required for the `OpenRouterAdapter`.
4374
- */
4375
4394
  interface OpenRouterAdapterOptions {
4376
- /** Your OpenRouter API key. Handle securely. */
4377
4395
  apiKey: string;
4378
- /** The required OpenRouter model identifier string (e.g., 'google/gemini-pro', 'anthropic/claude-3-haiku', 'openai/gpt-4o'). This specifies which underlying model OpenRouter should use. */
4379
4396
  model: string;
4380
- /** Optional: Override the base URL for the OpenRouter API. Defaults to 'https://openrouter.ai/api/v1'. */
4381
4397
  apiBaseUrl?: string;
4382
- /** Optional: Your application's site URL, sent as the 'HTTP-Referer' header (recommended by OpenRouter). */
4383
4398
  siteUrl?: string;
4384
- /** Optional: Your application's name, sent as the 'X-Title' header (recommended by OpenRouter). */
4385
4399
  appName?: string;
4386
4400
  }
4387
- /**
4388
- * This adapter provides a unified interface for various LLM providers through OpenRouter,
4389
- * handling prompt conversion and response parsing into the ART `StreamEvent` format.
4390
- *
4391
- * @see {@link ProviderAdapter} for the interface it implements.
4392
- * @see {@link OpenRouterAdapterOptions} for configuration options.
4393
- */
4394
4401
  declare class OpenRouterAdapter implements ProviderAdapter {
4395
4402
  readonly providerName = "openrouter";
4396
4403
  private apiKey;
@@ -4398,34 +4405,11 @@ declare class OpenRouterAdapter implements ProviderAdapter {
4398
4405
  private apiBaseUrl;
4399
4406
  private siteUrl?;
4400
4407
  private appName?;
4401
- /**
4402
- * Creates an instance of the OpenRouterAdapter.
4403
- * @param {OpenRouterAdapterOptions} options - Configuration options including the API key, the specific OpenRouter model identifier, and optional headers/baseURL.
4404
- * @throws {Error} If the API key or model identifier is missing.
4405
- * @see https://openrouter.ai/docs
4406
- */
4407
4408
  constructor(options: OpenRouterAdapterOptions);
4408
- /**
4409
- * Sends a request to the OpenRouter Chat Completions API endpoint.
4410
- * Translates `ArtStandardPrompt` to the OpenAI-compatible format.
4411
- *
4412
- * **Note:** Streaming is **not yet implemented**.
4413
- *
4414
- * @param {ArtStandardPrompt} prompt - The standardized prompt messages.
4415
- * @param {CallOptions} options - Call options, including `threadId`, `traceId`, `stream`, and any OpenAI-compatible generation parameters.
4416
- * @returns {Promise<AsyncIterable<StreamEvent>>} A promise resolving to an AsyncIterable of StreamEvent objects. If streaming is requested, it yields an error event and ends.
4417
- * @see https://openrouter.ai/docs#api-reference-chat-completions
4418
- */
4419
4409
  call(prompt: ArtStandardPrompt, options: CallOptions): Promise<AsyncIterable<StreamEvent>>;
4420
- /**
4421
- * Translates the provider-agnostic `ArtStandardPrompt` into the OpenAI API's `OpenAIMessage[]` format.
4422
- * (Copied from OpenAIAdapter - assumes OpenRouter compatibility)
4423
- *
4424
- * @private
4425
- * @param {ArtStandardPrompt} artPrompt - The input `ArtStandardPrompt` array.
4426
- * @returns {OpenAIMessage[]} The `OpenAIMessage[]` array formatted for the OpenAI API.
4427
- * @throws {ARTError} If translation encounters an issue (ErrorCode.PROMPT_TRANSLATION_FAILED).
4428
- */
4410
+ private processStream;
4411
+ private processNonStreamingResponse;
4412
+ private translateArtToolsToOpenAI;
4429
4413
  private translateToOpenAI;
4430
4414
  }
4431
4415
 
@@ -5267,6 +5251,6 @@ declare const generateUUID: () => string;
5267
5251
  /**
5268
5252
  * The current version of the ART Framework package.
5269
5253
  */
5270
- declare const VERSION = "0.3.7";
5254
+ declare const VERSION = "0.3.8";
5271
5255
 
5272
5256
  export { type A2AAgentInfo, type A2ATask, type A2ATaskEvent, type A2ATaskFilter, type A2ATaskMetadata, A2ATaskPriority, type A2ATaskResult, A2ATaskSocket, A2ATaskStatus, ARTError, AdapterInstantiationError, type AgentDiscoveryConfig, AgentDiscoveryService, type AgentFinalResponse, type AgentOptions, type AgentPersona, type AgentProps, type AgentState, AnthropicAdapter, type AnthropicAdapterOptions, ApiKeyStrategy, ApiQueueTimeoutError, type ArtInstance, type ArtInstanceConfig, type ArtStandardMessage, type ArtStandardMessageRole, ArtStandardMessageSchema, type ArtStandardPrompt, ArtStandardPromptSchema, AuthManager, type AvailableProviderEntry, CalculatorTool, type CallOptions, type ConversationManager, type ConversationMessage, ConversationSocket, type CreateA2ATaskRequest, DeepSeekAdapter, type DeepSeekAdapterOptions, ErrorCode, type ExecutionContext, type ExecutionMetadata, type FilterOptions, type FormattedPrompt, GeminiAdapter, type GeminiAdapterOptions, GenericOAuthStrategy, type IA2ATaskRepository, type IAgentCore, type IAuthStrategy, type IConversationRepository, type IObservationRepository, type IProviderManager, type IStateRepository, type IToolExecutor, type ITypedSocket, InMemoryStorageAdapter, IndexedDBStorageAdapter, type JsonObjectSchema, type JsonSchema, type LLMMetadata, LLMStreamSocket, LocalInstanceBusyError, LocalProviderConflictError, LogLevel, Logger, type LoggerConfig, type ManagedAdapterAccessor, McpClientController, McpManager, type McpManagerConfig, McpProxyTool, type McpResource, type McpResourceTemplate, type McpServerConfig, type McpServerStatus, type McpToolDefinition, type MessageOptions, MessageRole, ModelCapability, type OAuthConfig, type Observation, type ObservationFilter, type ObservationManager, ObservationSocket, ObservationType, OllamaAdapter, type OllamaAdapterOptions, OpenAIAdapter, type OpenAIAdapterOptions, OpenRouterAdapter, type OpenRouterAdapterOptions, type OutputParser, PESAgent, type PKCEOAuthConfig, PKCEOAuthStrategy, type ParsedToolCall, type PromptBlueprint, type PromptContext, type PromptManager, type ProviderAdapter, type ProviderManagerConfig, ProviderManagerImpl, type ReasoningEngine, type RuntimeProviderConfig, type StageSpecificPrompts, StateManager, type StateSavingStrategy, type StorageAdapter, type StreamEvent, type StreamEventTypeFilter, SupabaseStorageAdapter, type SystemPromptMergeStrategy, type SystemPromptOverride, type SystemPromptResolver, type SystemPromptSpec, type SystemPromptsRegistry, type TaskDelegationConfig, TaskDelegationService, type TaskStatusResponse, type ThreadConfig, type ThreadContext, ToolRegistry, type ToolResult, type ToolSchema, type ToolSystem, TypedSocket, UISystem, UnknownProviderError, type UnsubscribeFunction, type UpdateA2ATaskRequest, VERSION, type ZyntopiaOAuthConfig, ZyntopiaOAuthStrategy, createArtInstance, generateUUID };
package/dist/index.d.ts CHANGED
@@ -4229,58 +4229,77 @@ declare class GeminiAdapter implements ProviderAdapter {
4229
4229
  interface OpenAIAdapterOptions {
4230
4230
  /** Your OpenAI API key. Handle securely. */
4231
4231
  apiKey: string;
4232
- /** The default OpenAI model ID to use (e.g., 'gpt-4o', 'gpt-4o-mini'). Defaults to 'gpt-3.5-turbo' if not provided. */
4232
+ /** The default OpenAI model ID to use (e.g., 'gpt-4o', 'gpt-5', 'gpt-5-mini'). */
4233
4233
  model?: string;
4234
4234
  /** Optional: Override the base URL for the OpenAI API (e.g., for Azure OpenAI or custom proxies). */
4235
4235
  apiBaseUrl?: string;
4236
+ /** Optional: Default maximum tokens for responses. */
4237
+ defaultMaxTokens?: number;
4238
+ /** Optional: Default temperature for responses. */
4239
+ defaultTemperature?: number;
4236
4240
  }
4237
4241
  /**
4238
4242
  * Implements the `ProviderAdapter` interface for interacting with OpenAI's
4239
- * Chat Completions API (compatible models like GPT-3.5, GPT-4, GPT-4o).
4243
+ * Responses API (supports reasoning models like GPT-5 family and other models).
4240
4244
  *
4241
- * Handles formatting requests and parsing responses for OpenAI.
4242
- * Uses raw `fetch` for now.
4245
+ * Handles formatting requests, parsing responses, streaming, reasoning token detection, and tool use.
4246
+ * Uses the official OpenAI SDK with the new Responses API for full reasoning model support.
4243
4247
  *
4244
4248
  * @see {@link ProviderAdapter} for the interface definition.
4249
+ * @see {@link OpenAIAdapterOptions} for configuration options.
4245
4250
  */
4246
4251
  declare class OpenAIAdapter implements ProviderAdapter {
4247
4252
  readonly providerName = "openai";
4248
- private apiKey;
4249
- private model;
4250
- private apiBaseUrl;
4253
+ private client;
4254
+ private defaultModel;
4255
+ private defaultMaxTokens;
4256
+ private defaultTemperature;
4251
4257
  /**
4252
4258
  * Creates an instance of the OpenAIAdapter.
4253
- * @param {OpenAIAdapterOptions} options - Configuration options including the API key and optional model/baseURL overrides.
4254
- * @throws {Error} If the API key is missing.
4255
- * @see https://platform.openai.com/docs/api-reference
4259
+ * @param options - Configuration options including the API key and optional model/baseURL/defaults.
4260
+ * @throws {ARTError} If the API key is missing.
4256
4261
  */
4257
4262
  constructor(options: OpenAIAdapterOptions);
4258
4263
  /**
4259
- * Sends a request to the OpenAI Chat Completions API.
4260
- * Translates `ArtStandardPrompt` to the OpenAI format, handles streaming and non-streaming responses.
4264
+ * Sends a request to the OpenAI Responses API.
4265
+ * Translates `ArtStandardPrompt` to the Responses API format and handles streaming/reasoning.
4261
4266
  *
4262
4267
  * @param {ArtStandardPrompt} prompt - The standardized prompt messages.
4263
- * @param {CallOptions} options - Call options, including `threadId`, `traceId`, `stream` preference, and any OpenAI-specific parameters (like `temperature`, `max_tokens`) passed through.
4268
+ * @param {CallOptions} options - Call options, including streaming, reasoning options, and model parameters.
4264
4269
  * @returns {Promise<AsyncIterable<StreamEvent>>} A promise resolving to an AsyncIterable of StreamEvent objects.
4265
- * @see https://platform.openai.com/docs/api-reference/chat/create
4266
4270
  */
4267
4271
  call(prompt: ArtStandardPrompt, options: CallOptions): Promise<AsyncIterable<StreamEvent>>;
4268
4272
  /**
4269
- * Processes the Server-Sent Events (SSE) stream from OpenAI.
4270
- * @param stream - The ReadableStream from the fetch response.
4271
- * @param options - The original CallOptions containing threadId, traceId, sessionId, and callContext.
4272
- * @returns An AsyncIterable yielding StreamEvent objects.
4273
- */
4274
- private processStream;
4273
+ * Optional: Method for graceful shutdown
4274
+ */
4275
+ shutdown(): Promise<void>;
4275
4276
  /**
4276
- * Translates the provider-agnostic `ArtStandardPrompt` into the OpenAI API's `OpenAIMessage[]` format.
4277
+ * Translates the provider-agnostic `ArtStandardPrompt` into the OpenAI Responses API format.
4278
+ * Extracts system prompt separately and formats messages as input array.
4277
4279
  *
4278
4280
  * @private
4279
4281
  * @param {ArtStandardPrompt} artPrompt - The input `ArtStandardPrompt` array.
4280
- * @returns {OpenAIMessage[]} The `OpenAIMessage[]` array formatted for the OpenAI API.
4281
- * @throws {ARTError} If translation encounters an issue (ErrorCode.PROMPT_TRANSLATION_FAILED).
4282
+ * @returns {{ systemPrompt?: string; input: OpenAIResponsesInputMessage[] }} An object containing the extracted system prompt and the array of Responses API formatted input messages.
4283
+ * @throws {ARTError} If translation encounters an issue.
4282
4284
  */
4283
- private translateToOpenAI;
4285
+ private translateToResponsesFormat;
4286
+ /**
4287
+ * Maps a single `ArtStandardMessage` to OpenAI Responses API input format.
4288
+ *
4289
+ * @private
4290
+ * @param {ArtStandardMessage} artMsg - The ART standard message to map.
4291
+ * @returns {OpenAIResponsesInputMessage | null} The translated message for the Responses API, or null if should be skipped.
4292
+ * @throws {ARTError} If tool call arguments are not valid JSON.
4293
+ */
4294
+ private mapArtMessageToResponsesContent;
4295
+ /**
4296
+ * Translates an array of `ToolSchema` from the ART framework format to OpenAI's Responses API tool format.
4297
+ * @private
4298
+ * @param {ToolSchema[]} artTools - An array of ART tool schemas.
4299
+ * @returns {OpenAIResponsesTool[]} An array of tools formatted for the OpenAI Responses API.
4300
+ * @throws {ARTError} If a tool's `inputSchema` is invalid.
4301
+ */
4302
+ private translateArtToolsToOpenAI;
4284
4303
  }
4285
4304
 
4286
4305
  /**
@@ -4330,9 +4349,12 @@ declare class AnthropicAdapter implements ProviderAdapter {
4330
4349
  * @returns {Promise<AsyncIterable<StreamEvent>>} A promise resolving to an AsyncIterable of StreamEvent objects.
4331
4350
  */
4332
4351
  call(prompt: ArtStandardPrompt, options: CallOptions): Promise<AsyncIterable<StreamEvent>>;
4352
+ /**
4353
+ * Optional: Method for graceful shutdown
4354
+ */
4355
+ shutdown(): Promise<void>;
4333
4356
  /**
4334
4357
  * Prepares request options, adding Anthropic beta headers if applicable for features like prompt caching.
4335
- * This allows opting into experimental features on a per-request basis.
4336
4358
  * @private
4337
4359
  * @param {string} modelId - The model ID being used for the request, to determine which beta features may apply.
4338
4360
  * @returns {Anthropic.RequestOptions} The request options object, potentially with custom headers.
@@ -4369,28 +4391,13 @@ declare class AnthropicAdapter implements ProviderAdapter {
4369
4391
  private translateArtToolsToAnthropic;
4370
4392
  }
4371
4393
 
4372
- /**
4373
- * Configuration options required for the `OpenRouterAdapter`.
4374
- */
4375
4394
  interface OpenRouterAdapterOptions {
4376
- /** Your OpenRouter API key. Handle securely. */
4377
4395
  apiKey: string;
4378
- /** The required OpenRouter model identifier string (e.g., 'google/gemini-pro', 'anthropic/claude-3-haiku', 'openai/gpt-4o'). This specifies which underlying model OpenRouter should use. */
4379
4396
  model: string;
4380
- /** Optional: Override the base URL for the OpenRouter API. Defaults to 'https://openrouter.ai/api/v1'. */
4381
4397
  apiBaseUrl?: string;
4382
- /** Optional: Your application's site URL, sent as the 'HTTP-Referer' header (recommended by OpenRouter). */
4383
4398
  siteUrl?: string;
4384
- /** Optional: Your application's name, sent as the 'X-Title' header (recommended by OpenRouter). */
4385
4399
  appName?: string;
4386
4400
  }
4387
- /**
4388
- * This adapter provides a unified interface for various LLM providers through OpenRouter,
4389
- * handling prompt conversion and response parsing into the ART `StreamEvent` format.
4390
- *
4391
- * @see {@link ProviderAdapter} for the interface it implements.
4392
- * @see {@link OpenRouterAdapterOptions} for configuration options.
4393
- */
4394
4401
  declare class OpenRouterAdapter implements ProviderAdapter {
4395
4402
  readonly providerName = "openrouter";
4396
4403
  private apiKey;
@@ -4398,34 +4405,11 @@ declare class OpenRouterAdapter implements ProviderAdapter {
4398
4405
  private apiBaseUrl;
4399
4406
  private siteUrl?;
4400
4407
  private appName?;
4401
- /**
4402
- * Creates an instance of the OpenRouterAdapter.
4403
- * @param {OpenRouterAdapterOptions} options - Configuration options including the API key, the specific OpenRouter model identifier, and optional headers/baseURL.
4404
- * @throws {Error} If the API key or model identifier is missing.
4405
- * @see https://openrouter.ai/docs
4406
- */
4407
4408
  constructor(options: OpenRouterAdapterOptions);
4408
- /**
4409
- * Sends a request to the OpenRouter Chat Completions API endpoint.
4410
- * Translates `ArtStandardPrompt` to the OpenAI-compatible format.
4411
- *
4412
- * **Note:** Streaming is **not yet implemented**.
4413
- *
4414
- * @param {ArtStandardPrompt} prompt - The standardized prompt messages.
4415
- * @param {CallOptions} options - Call options, including `threadId`, `traceId`, `stream`, and any OpenAI-compatible generation parameters.
4416
- * @returns {Promise<AsyncIterable<StreamEvent>>} A promise resolving to an AsyncIterable of StreamEvent objects. If streaming is requested, it yields an error event and ends.
4417
- * @see https://openrouter.ai/docs#api-reference-chat-completions
4418
- */
4419
4409
  call(prompt: ArtStandardPrompt, options: CallOptions): Promise<AsyncIterable<StreamEvent>>;
4420
- /**
4421
- * Translates the provider-agnostic `ArtStandardPrompt` into the OpenAI API's `OpenAIMessage[]` format.
4422
- * (Copied from OpenAIAdapter - assumes OpenRouter compatibility)
4423
- *
4424
- * @private
4425
- * @param {ArtStandardPrompt} artPrompt - The input `ArtStandardPrompt` array.
4426
- * @returns {OpenAIMessage[]} The `OpenAIMessage[]` array formatted for the OpenAI API.
4427
- * @throws {ARTError} If translation encounters an issue (ErrorCode.PROMPT_TRANSLATION_FAILED).
4428
- */
4410
+ private processStream;
4411
+ private processNonStreamingResponse;
4412
+ private translateArtToolsToOpenAI;
4429
4413
  private translateToOpenAI;
4430
4414
  }
4431
4415
 
@@ -5267,6 +5251,6 @@ declare const generateUUID: () => string;
5267
5251
  /**
5268
5252
  * The current version of the ART Framework package.
5269
5253
  */
5270
- declare const VERSION = "0.3.7";
5254
+ declare const VERSION = "0.3.8";
5271
5255
 
5272
5256
  export { type A2AAgentInfo, type A2ATask, type A2ATaskEvent, type A2ATaskFilter, type A2ATaskMetadata, A2ATaskPriority, type A2ATaskResult, A2ATaskSocket, A2ATaskStatus, ARTError, AdapterInstantiationError, type AgentDiscoveryConfig, AgentDiscoveryService, type AgentFinalResponse, type AgentOptions, type AgentPersona, type AgentProps, type AgentState, AnthropicAdapter, type AnthropicAdapterOptions, ApiKeyStrategy, ApiQueueTimeoutError, type ArtInstance, type ArtInstanceConfig, type ArtStandardMessage, type ArtStandardMessageRole, ArtStandardMessageSchema, type ArtStandardPrompt, ArtStandardPromptSchema, AuthManager, type AvailableProviderEntry, CalculatorTool, type CallOptions, type ConversationManager, type ConversationMessage, ConversationSocket, type CreateA2ATaskRequest, DeepSeekAdapter, type DeepSeekAdapterOptions, ErrorCode, type ExecutionContext, type ExecutionMetadata, type FilterOptions, type FormattedPrompt, GeminiAdapter, type GeminiAdapterOptions, GenericOAuthStrategy, type IA2ATaskRepository, type IAgentCore, type IAuthStrategy, type IConversationRepository, type IObservationRepository, type IProviderManager, type IStateRepository, type IToolExecutor, type ITypedSocket, InMemoryStorageAdapter, IndexedDBStorageAdapter, type JsonObjectSchema, type JsonSchema, type LLMMetadata, LLMStreamSocket, LocalInstanceBusyError, LocalProviderConflictError, LogLevel, Logger, type LoggerConfig, type ManagedAdapterAccessor, McpClientController, McpManager, type McpManagerConfig, McpProxyTool, type McpResource, type McpResourceTemplate, type McpServerConfig, type McpServerStatus, type McpToolDefinition, type MessageOptions, MessageRole, ModelCapability, type OAuthConfig, type Observation, type ObservationFilter, type ObservationManager, ObservationSocket, ObservationType, OllamaAdapter, type OllamaAdapterOptions, OpenAIAdapter, type OpenAIAdapterOptions, OpenRouterAdapter, type OpenRouterAdapterOptions, type OutputParser, PESAgent, type PKCEOAuthConfig, PKCEOAuthStrategy, type ParsedToolCall, type PromptBlueprint, type PromptContext, type PromptManager, type ProviderAdapter, type ProviderManagerConfig, ProviderManagerImpl, type ReasoningEngine, type RuntimeProviderConfig, type StageSpecificPrompts, StateManager, type StateSavingStrategy, type StorageAdapter, type StreamEvent, type StreamEventTypeFilter, SupabaseStorageAdapter, type SystemPromptMergeStrategy, type SystemPromptOverride, type SystemPromptResolver, type SystemPromptSpec, type SystemPromptsRegistry, type TaskDelegationConfig, TaskDelegationService, type TaskStatusResponse, type ThreadConfig, type ThreadContext, ToolRegistry, type ToolResult, type ToolSchema, type ToolSystem, TypedSocket, UISystem, UnknownProviderError, type UnsubscribeFunction, type UpdateA2ATaskRequest, VERSION, type ZyntopiaOAuthConfig, ZyntopiaOAuthStrategy, createArtInstance, generateUUID };