@combycode/llm-sdk 1.7.0 → 2.0.1
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/CHANGELOG.md +462 -1
- package/MIGRATION.md +93 -0
- package/README.md +17 -2
- package/dist/agent/loop-config.d.ts +22 -0
- package/dist/agent/loop-step-state.d.ts +2 -0
- package/dist/agent/loop.d.ts +7 -0
- package/dist/agent/reflect-retry.d.ts +56 -0
- package/dist/agent/tool-key.d.ts +3 -0
- package/dist/agent/types.d.ts +8 -2
- package/dist/helpers/mcp.d.ts +24 -2
- package/dist/helpers/provenance-types.d.ts +63 -0
- package/dist/helpers/provenance.d.ts +12 -0
- package/dist/helpers/transcribe.d.ts +35 -6
- package/dist/index.browser.js +2997 -708
- package/dist/index.d.ts +19 -7
- package/dist/index.js +2997 -708
- package/dist/llm/providers/anthropic/constants.d.ts +2 -0
- package/dist/llm/providers/openai/completions.d.ts +9 -0
- package/dist/llm/providers/openai/provenance.d.ts +26 -0
- package/dist/llm/providers/openai/responses.d.ts +4 -2
- package/dist/llm/providers/openai/transcription.d.ts +39 -2
- package/dist/llm/types/audio.d.ts +31 -0
- package/dist/llm/types/messages.d.ts +89 -1
- package/dist/llm/types/options.d.ts +15 -0
- package/dist/llm/types/request.d.ts +13 -1
- package/dist/llm/types/response.d.ts +31 -1
- package/dist/llm/types/stream.d.ts +14 -1
- package/dist/llm/types/tiers.d.ts +6 -6
- package/dist/network/queue-state-config.d.ts +5 -0
- package/dist/network/queue-state.d.ts +7 -0
- package/dist/network/types.d.ts +23 -0
- package/dist/plugins/context-guard/strategies/anchored.d.ts +47 -0
- package/dist/plugins/context-measurer/counter/hybrid.d.ts +4 -1
- package/dist/plugins/context-measurer/counter/tiktoken.d.ts +8 -1
- package/dist/plugins/mcp/base-transport.d.ts +16 -0
- package/dist/plugins/mcp/client.d.ts +144 -7
- package/dist/plugins/mcp/input-required.d.ts +35 -0
- package/dist/plugins/mcp/jsonrpc.d.ts +7 -0
- package/dist/plugins/mcp/oauth.d.ts +21 -1
- package/dist/plugins/mcp/protocol-version.d.ts +61 -0
- package/dist/plugins/mcp/result-cache.d.ts +31 -0
- package/dist/plugins/mcp/subscriptions.d.ts +69 -0
- package/dist/plugins/mcp/transport-http.d.ts +31 -0
- package/dist/plugins/mcp/transport-stdio.d.ts +2 -0
- package/dist/plugins/mcp/transport-ws.d.ts +11 -1
- package/dist/plugins/mcp/transport.d.ts +11 -0
- package/dist/plugins/mcp/types.d.ts +54 -2
- package/dist/plugins/telemetry/telemetry.d.ts +12 -0
- package/dist/util/http.d.ts +8 -0
- package/package.json +9 -6
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { MemoryCacheStore } from './plugins/cache/memory-store';
|
|
|
27
27
|
export { FileCacheStore } from './plugins/cache/file-store';
|
|
28
28
|
export type { FileCacheStoreConfig } from './plugins/cache/file-store';
|
|
29
29
|
export type { CacheEntry, CacheStore } from './plugins/cache/types';
|
|
30
|
-
export type { FetchFn, HttpRequest, HttpResponse, SSEEvent, QueueSnapshot, TraceContext, ConnectFn, EngineConnect, EngineFetch, EngineFetchStream, RealtimeConnection, RealtimeFrame, RealtimeSocket, WsRequest } from './network/types';
|
|
30
|
+
export type { FetchFn, HttpRequest, HttpResponse, SSEEvent, QueueSnapshot, RequestRetryOverride, TraceContext, ConnectFn, EngineConnect, EngineFetch, EngineFetchStream, RealtimeConnection, RealtimeFrame, RealtimeSocket, WsRequest } from './network/types';
|
|
31
31
|
export { RealtimeConnectionImpl } from './network/realtime-connection';
|
|
32
32
|
export { LLMError, classifyError } from './network/errors';
|
|
33
33
|
export type { ErrorKind } from './network/errors';
|
|
@@ -43,13 +43,13 @@ export { DEFAULT_RETRY, Priority } from './network/queue-state-config';
|
|
|
43
43
|
export type { BackoffConfig, ErrorRetryConfig, QueueStateConfig, RetryConfig } from './network/queue-state-config';
|
|
44
44
|
export { NetworkEngine } from './network/engine';
|
|
45
45
|
export type { FetchOptions, NetworkEngineConfig, QueueSettings } from './network/engine';
|
|
46
|
-
export type { AudioFormat, AudioOptions, AudioInput } from './llm/types/audio';
|
|
47
|
-
export { contentParts, contentText } from './llm/types/messages';
|
|
48
|
-
export type { Role, MessageOrigin, ContentPart, TextPart, ImagePart, DocumentPart, AudioPart, VideoPart, ToolCallPart, ToolResultPart, ImageOutputPart, AudioOutputPart, VideoOutputPart, MediaOutputPart, DataSource, Content, Message } from './llm/types/messages';
|
|
46
|
+
export type { AudioFormat, AudioOptions, AudioInput, TranscriptLanguage, TranscriptSegment, TranscriptWord, } from './llm/types/audio';
|
|
47
|
+
export { contentParts, contentText, finalAnswerText } from './llm/types/messages';
|
|
48
|
+
export type { AssistantPhase, Role, MessageOrigin, ContentPart, TextPart, ImagePart, DocumentPart, AudioPart, VideoPart, ToolCallPart, ToolResultPart, ToolCaller, ToolCallerType, ProgramCallPart, ProgramResultPart, ImageOutputPart, AudioOutputPart, VideoOutputPart, MediaOutputPart, DataSource, Content, Message } from './llm/types/messages';
|
|
49
49
|
export { isFunctionTool, isBuiltinTool } from './llm/types/tools';
|
|
50
50
|
export type { FunctionTool, BuiltinTool, McpToolParams, Tool, ToolChoice, JsonSchema } from './llm/types/tools';
|
|
51
51
|
export { emptyUsage } from './llm/types/response';
|
|
52
|
-
export type { BuiltinToolCall, CompletionResponse, FileOutput, FinishReason, Usage, } from './llm/types/response';
|
|
52
|
+
export type { BuiltinToolCall, CompletionResponse, FileOutput, FinishReason, KnownFinishReason, Usage, } from './llm/types/response';
|
|
53
53
|
export type { FileStream, RetrievedFile } from './llm/files/retrieve';
|
|
54
54
|
export type { NormalizedRequest, ReasoningContext, ThinkingConfig, CacheConfig } from './llm/types/request';
|
|
55
55
|
export type { MediaStreamType, StreamEvent } from './llm/types/stream';
|
|
@@ -77,7 +77,7 @@ export { OpenAIRealtimeAdapter } from './llm/providers/openai/realtime';
|
|
|
77
77
|
export type { OpenAIRealtimeAdapterConfig } from './llm/providers/openai/realtime';
|
|
78
78
|
export { OpenAIResponsesAdapter } from './llm/providers/openai/responses';
|
|
79
79
|
export { OpenAITranscriptionAdapter } from './llm/providers/openai/transcription';
|
|
80
|
-
export type { OpenAITranscriptionAdapterConfig, TranscriptionRequest } from './llm/providers/openai/transcription';
|
|
80
|
+
export type { OpenAITranscriptionAdapterConfig, OpenAITranscriptionResult, TranscriptionRequest, } from './llm/providers/openai/transcription';
|
|
81
81
|
export { OpenRouterAdapter } from './llm/providers/openrouter/completions';
|
|
82
82
|
export { OpenRouterResponsesAdapter } from './llm/providers/openrouter/responses';
|
|
83
83
|
export { XAIBatchAdapter } from './llm/providers/xai/batch';
|
|
@@ -227,7 +227,19 @@ export type { McpSamplingConfig, McpSamplingHandler, McpSamplingViaLLM } from '.
|
|
|
227
227
|
export type { McpCreateMessageParams, McpCreateMessageResult, McpElicitRequestParams, McpElicitResult, McpRoot, McpSamplingMessage, McpTask, McpTaskMetadata, McpTaskStatus, } from './plugins/mcp/types';
|
|
228
228
|
export type { IncomingMcpHandlers } from './plugins/mcp/transport';
|
|
229
229
|
export { MCP_PROTOCOL_VERSION, isHttpConfig } from './plugins/mcp/types';
|
|
230
|
-
export type { McpCallResult, McpCompletionRef, McpCompletionResult, McpContentBlock, McpGetPromptResult, McpHttpConfig, McpInitializeResult, McpLogLevel, McpPrompt, McpPromptArg, McpPromptMessage, McpResource, McpResourceContent, McpResourceTemplate, McpServerConfig, McpStdioConfig, McpToolDef } from './plugins/mcp/types';
|
|
230
|
+
export type { McpCallResult, McpCompletionRef, McpCompletionResult, McpContentBlock, McpDiscoverResult, McpGetPromptResult, McpCacheHints, McpInputRequest, McpInputRequiredFields, McpHttpConfig, McpInitializeResult, McpLogLevel, McpPrompt, McpPromptArg, McpPromptMessage, McpResource, McpResourceContent, McpResourceTemplate, McpServerConfig, McpStdioConfig, McpToolDef } from './plugins/mcp/types';
|
|
231
|
+
export { MCP_HANDSHAKE_PROTOCOL_VERSIONS, MCP_KNOWN_PROTOCOL_VERSIONS, MCP_LATEST_HANDSHAKE_VERSION, MCP_LATEST_MODERN_VERSION, MCP_MODERN_PROTOCOL_VERSIONS, isHandshakeMcpVersion, isModernMcpVersion, mcpEraOf, } from './plugins/mcp/protocol-version';
|
|
232
|
+
export type { McpEra } from './plugins/mcp/protocol-version';
|
|
233
|
+
export { McpResultCache } from './plugins/mcp/result-cache';
|
|
234
|
+
export { MCP_LISTEN_STREAM_METHODS, McpSubscription, eventFromWire } from './plugins/mcp/subscriptions';
|
|
235
|
+
export type { McpServerEvent, McpSubscriptionFilter } from './plugins/mcp/subscriptions';
|
|
236
|
+
export { checkProvenance } from './helpers/provenance';
|
|
237
|
+
export type { CheckProvenanceOptions, ProvenanceCheckResult, ProvenanceSignal, ProvenanceSignalKind, ProvenanceValidationState } from './helpers/provenance-types';
|
|
238
|
+
export { OpenAIProvenanceAdapter } from './llm/providers/openai/provenance';
|
|
239
|
+
export { DEFAULT_REFLECT_RETRY_REASONS, ReflectAndRetryPolicy, reflectionGuidance } from './agent/reflect-retry';
|
|
240
|
+
export type { ReflectAndRetryConfig } from './agent/reflect-retry';
|
|
241
|
+
export { AnchoredStrategy } from './plugins/context-guard/strategies/anchored';
|
|
242
|
+
export type { AnchoredStrategyConfig } from './plugins/context-guard/strategies/anchored';
|
|
231
243
|
export { loadContent, loadImageContent } from './helpers/content';
|
|
232
244
|
export type { LoadImageOptions } from './helpers/content';
|
|
233
245
|
export { createMediaOutput } from './helpers/media';
|