@flutchai/flutch-sdk 0.2.17 → 0.2.19
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.cjs +137 -112
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +138 -113
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
package/dist/index.d.cts
CHANGED
|
@@ -313,6 +313,7 @@ interface ILangGraphConfig {
|
|
|
313
313
|
};
|
|
314
314
|
metadata?: Record<string, any>;
|
|
315
315
|
graphSettings?: any;
|
|
316
|
+
[key: string]: unknown;
|
|
316
317
|
};
|
|
317
318
|
recursionLimit?: number;
|
|
318
319
|
signal?: AbortSignal;
|
|
@@ -1400,12 +1401,11 @@ declare abstract class AbstractGraphBuilder<V extends string = string> {
|
|
|
1400
1401
|
protected manifestPath: string | null;
|
|
1401
1402
|
protected manifest?: IGraphManifest;
|
|
1402
1403
|
constructor();
|
|
1403
|
-
abstract buildGraph(
|
|
1404
|
-
preparePayload(payload: IGraphRequestPayload): Promise<
|
|
1405
|
-
protected customizeConfig(payload: IGraphRequestPayload): Promise<
|
|
1404
|
+
abstract buildGraph(payload: IGraphRequestPayload): Promise<unknown>;
|
|
1405
|
+
preparePayload(payload: IGraphRequestPayload): Promise<IGraphRequestPayload>;
|
|
1406
|
+
protected customizeConfig(payload: IGraphRequestPayload): Promise<IGraphRequestPayload>;
|
|
1406
1407
|
protected loadManifest(): Promise<IGraphManifest | null>;
|
|
1407
1408
|
protected loadManifestSync(): IGraphManifest | null;
|
|
1408
|
-
protected validateManifest(manifest: IGraphManifest): void;
|
|
1409
1409
|
getGraphMetadata(): Promise<IGraphManifest | null>;
|
|
1410
1410
|
getVersionConfig(): Promise<{
|
|
1411
1411
|
configSchema: any;
|
|
@@ -1571,9 +1571,17 @@ interface MongoDBConfig {
|
|
|
1571
1571
|
checkpointCollectionName?: string;
|
|
1572
1572
|
checkpointWritesCollectionName?: string;
|
|
1573
1573
|
}
|
|
1574
|
+
interface PostgresConfig {
|
|
1575
|
+
connectionString?: string;
|
|
1576
|
+
schema?: string;
|
|
1577
|
+
}
|
|
1574
1578
|
interface UniversalGraphModuleOptions {
|
|
1575
1579
|
engineType?: GraphEngineType;
|
|
1576
1580
|
versioning?: VersioningConfig[];
|
|
1581
|
+
redis?: {
|
|
1582
|
+
url: string;
|
|
1583
|
+
};
|
|
1584
|
+
postgres?: PostgresConfig;
|
|
1577
1585
|
mongodb?: MongoDBConfig;
|
|
1578
1586
|
}
|
|
1579
1587
|
declare class UniversalGraphModule {
|
|
@@ -1775,4 +1783,4 @@ declare class MongoTokenStore implements IOAuthTokenStore {
|
|
|
1775
1783
|
private ensureIndex;
|
|
1776
1784
|
}
|
|
1777
1785
|
|
|
1778
|
-
export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, type ApiKeyResolver, AttachmentType, type AuditEntry, type BaseGraphConfig, type BaseGraphContext, GraphController as BaseGraphServiceController, UniversalGraphModule as BaseGraphServiceModule, type BaseGraphState, BuilderRegistryService, Callback, CallbackACL, CallbackAuditAction, CallbackAuditor, type CallbackContext, CallbackController, type CallbackEntry, type CallbackHandler, type CallbackMetadata, CallbackMetrics, type CallbackPatch, type CallbackPatchHandler, CallbackPatchService, CallbackRateLimiter, type CallbackRecord, CallbackRegistry, type CallbackRequest, type CallbackResult, CallbackStore, CallbackTokenGuard, type CallbackUser, type ChannelState, type ChartType, ChatFeature, type ChatModelCreator, type ChatModelOrRunnable, type ChatModelWithTools, type CitationValue, type CompiledGraphFor, type CustomDocument, DEFAULT_ATTACHMENT_THRESHOLD, DEFAULT_ROUTER_URL, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExecuteToolWithAttachmentsParams, type ExecuteToolWithAttachmentsResult, type ExtendedCallbackContext, type ExtendedCallbackHandler, ExternalGraphBuilder, FileBasedDiscovery, FileTokenStore, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IContentBlock, type IContentChain, type IDeletionInfo, type IGenericGraphType, type IGraphAttachment, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, type IGraphLogger, type IGraphManifest, type IGraphMetadata, type IGraphMetadataRegistry, type IGraphRequestPayload, type IGraphResponsePayload, type IGraphRunnableConfig, type IGraphService, type IGraphServiceRegistry, type IGraphSettingsRepository, type IGraphTraceEvent, type IGraphTracer, type IGraphTypeMetadata, type IGraphTypeRegistry, type ILangGraphConfig, type IModelInitializer, type IOAuthTokenStore, type IReasoningChain, type IReasoningStep, type IStoredMessageContent, type ISystemToolCredentials, type IToolCall, type IToolCatalog, type IToolConfigOption, type IToolExecutionContext, type ITracingEvent, type IUsageMetrics, type IUsageRecorder, type IdempotencyConfig, type IdempotencyEntry, IdempotencyManager, IdempotencyStatus, type KnowledgeBaseInfo, type LLMCallRecord, type LLMConfig, type LLModel, LangGraphEngine, type MappedChannels, McpConverter, type McpRuntimeClient, McpRuntimeHttpClient, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type MongoDBConfig, MongoTokenStore, type OAuthProviderConfig, type OAuthProviderDef, OAuthTokenManager, type OAuthTokenManagerOptions, type OAuthTokens, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, type ServiceDiscoveryProvider, SmartCallbackRouter, StaticDiscovery, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, type ToolConfig, type ToolExecutionResult, type TraceApiCallResult, type TracingLevel, UIDispatchController, type UIDispatchDto, UIEndpoint, type UIEndpointClassMetadata, type UIEndpointMethodMetadata, UIEndpointsDiscoveryService, UniversalCallbackService, UniversalGraphModule, type UniversalGraphModuleOptions, UniversalGraphService, type VersionResolution, type VersionResolutionOptions, type VersionRoute, VersionedGraphService, type VersioningConfig, VoyageAIRerank, type VoyageAIRerankConfig, WebPatchHandler, WithCallbacks, WithEndpoints, WithUIEndpoints, _internals, bootstrap, buildOAuthAuthorizationUrl, buildOpenAIModelConfig, clearAttachmentDataStore, createEndpointDescriptors, createGraphAttachment, createMongoClientAdapter, createStaticMessage, decryptTokens, dispatchAttachments, encryptTokens, executeToolWithAttachments, findCallbackMethod, findEndpointMethod, generateAttachmentSummary, generateModelCacheKey, getAttachmentData, getCallbackMetadata, getEndpointMetadata, getOAuthProvider, getOAuthProviderNames, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, hashToolsConfig, isReasoningModel, loadOAuthProviders, normalizeToolConfigs, registerFinanceExampleCallback, registerUIEndpointsFromClass, resolveOAuthProviderConfig, resolveRouterURL, sanitizeTraceData, storeAttachmentData, traceApiCall };
|
|
1786
|
+
export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, type ApiKeyResolver, AttachmentType, type AuditEntry, type BaseGraphConfig, type BaseGraphContext, GraphController as BaseGraphServiceController, UniversalGraphModule as BaseGraphServiceModule, type BaseGraphState, BuilderRegistryService, Callback, CallbackACL, CallbackAuditAction, CallbackAuditor, type CallbackContext, CallbackController, type CallbackEntry, type CallbackHandler, type CallbackMetadata, CallbackMetrics, type CallbackPatch, type CallbackPatchHandler, CallbackPatchService, CallbackRateLimiter, type CallbackRecord, CallbackRegistry, type CallbackRequest, type CallbackResult, CallbackStore, CallbackTokenGuard, type CallbackUser, type ChannelState, type ChartType, ChatFeature, type ChatModelCreator, type ChatModelOrRunnable, type ChatModelWithTools, type CitationValue, type CompiledGraphFor, type CustomDocument, DEFAULT_ATTACHMENT_THRESHOLD, DEFAULT_ROUTER_URL, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExecuteToolWithAttachmentsParams, type ExecuteToolWithAttachmentsResult, type ExtendedCallbackContext, type ExtendedCallbackHandler, ExternalGraphBuilder, FileBasedDiscovery, FileTokenStore, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IContentBlock, type IContentChain, type IDeletionInfo, type IGenericGraphType, type IGraphAttachment, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, type IGraphLogger, type IGraphManifest, type IGraphMetadata, type IGraphMetadataRegistry, type IGraphRequestPayload, type IGraphResponsePayload, type IGraphRunnableConfig, type IGraphService, type IGraphServiceRegistry, type IGraphSettingsRepository, type IGraphTraceEvent, type IGraphTracer, type IGraphTypeMetadata, type IGraphTypeRegistry, type ILangGraphConfig, type IModelInitializer, type IOAuthTokenStore, type IReasoningChain, type IReasoningStep, type IStoredMessageContent, type ISystemToolCredentials, type IToolCall, type IToolCatalog, type IToolConfigOption, type IToolExecutionContext, type ITracingEvent, type IUsageMetrics, type IUsageRecorder, type IdempotencyConfig, type IdempotencyEntry, IdempotencyManager, IdempotencyStatus, type KnowledgeBaseInfo, type LLMCallRecord, type LLMConfig, type LLModel, LangGraphEngine, type MappedChannels, McpConverter, type McpRuntimeClient, McpRuntimeHttpClient, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type MongoDBConfig, MongoTokenStore, type OAuthProviderConfig, type OAuthProviderDef, OAuthTokenManager, type OAuthTokenManagerOptions, type OAuthTokens, type PostgresConfig, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, type ServiceDiscoveryProvider, SmartCallbackRouter, StaticDiscovery, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, type ToolConfig, type ToolExecutionResult, type TraceApiCallResult, type TracingLevel, UIDispatchController, type UIDispatchDto, UIEndpoint, type UIEndpointClassMetadata, type UIEndpointMethodMetadata, UIEndpointsDiscoveryService, UniversalCallbackService, UniversalGraphModule, type UniversalGraphModuleOptions, UniversalGraphService, type VersionResolution, type VersionResolutionOptions, type VersionRoute, VersionedGraphService, type VersioningConfig, VoyageAIRerank, type VoyageAIRerankConfig, WebPatchHandler, WithCallbacks, WithEndpoints, WithUIEndpoints, _internals, bootstrap, buildOAuthAuthorizationUrl, buildOpenAIModelConfig, clearAttachmentDataStore, createEndpointDescriptors, createGraphAttachment, createMongoClientAdapter, createStaticMessage, decryptTokens, dispatchAttachments, encryptTokens, executeToolWithAttachments, findCallbackMethod, findEndpointMethod, generateAttachmentSummary, generateModelCacheKey, getAttachmentData, getCallbackMetadata, getEndpointMetadata, getOAuthProvider, getOAuthProviderNames, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, hashToolsConfig, isReasoningModel, loadOAuthProviders, normalizeToolConfigs, registerFinanceExampleCallback, registerUIEndpointsFromClass, resolveOAuthProviderConfig, resolveRouterURL, sanitizeTraceData, storeAttachmentData, traceApiCall };
|
package/dist/index.d.ts
CHANGED
|
@@ -313,6 +313,7 @@ interface ILangGraphConfig {
|
|
|
313
313
|
};
|
|
314
314
|
metadata?: Record<string, any>;
|
|
315
315
|
graphSettings?: any;
|
|
316
|
+
[key: string]: unknown;
|
|
316
317
|
};
|
|
317
318
|
recursionLimit?: number;
|
|
318
319
|
signal?: AbortSignal;
|
|
@@ -1400,12 +1401,11 @@ declare abstract class AbstractGraphBuilder<V extends string = string> {
|
|
|
1400
1401
|
protected manifestPath: string | null;
|
|
1401
1402
|
protected manifest?: IGraphManifest;
|
|
1402
1403
|
constructor();
|
|
1403
|
-
abstract buildGraph(
|
|
1404
|
-
preparePayload(payload: IGraphRequestPayload): Promise<
|
|
1405
|
-
protected customizeConfig(payload: IGraphRequestPayload): Promise<
|
|
1404
|
+
abstract buildGraph(payload: IGraphRequestPayload): Promise<unknown>;
|
|
1405
|
+
preparePayload(payload: IGraphRequestPayload): Promise<IGraphRequestPayload>;
|
|
1406
|
+
protected customizeConfig(payload: IGraphRequestPayload): Promise<IGraphRequestPayload>;
|
|
1406
1407
|
protected loadManifest(): Promise<IGraphManifest | null>;
|
|
1407
1408
|
protected loadManifestSync(): IGraphManifest | null;
|
|
1408
|
-
protected validateManifest(manifest: IGraphManifest): void;
|
|
1409
1409
|
getGraphMetadata(): Promise<IGraphManifest | null>;
|
|
1410
1410
|
getVersionConfig(): Promise<{
|
|
1411
1411
|
configSchema: any;
|
|
@@ -1571,9 +1571,17 @@ interface MongoDBConfig {
|
|
|
1571
1571
|
checkpointCollectionName?: string;
|
|
1572
1572
|
checkpointWritesCollectionName?: string;
|
|
1573
1573
|
}
|
|
1574
|
+
interface PostgresConfig {
|
|
1575
|
+
connectionString?: string;
|
|
1576
|
+
schema?: string;
|
|
1577
|
+
}
|
|
1574
1578
|
interface UniversalGraphModuleOptions {
|
|
1575
1579
|
engineType?: GraphEngineType;
|
|
1576
1580
|
versioning?: VersioningConfig[];
|
|
1581
|
+
redis?: {
|
|
1582
|
+
url: string;
|
|
1583
|
+
};
|
|
1584
|
+
postgres?: PostgresConfig;
|
|
1577
1585
|
mongodb?: MongoDBConfig;
|
|
1578
1586
|
}
|
|
1579
1587
|
declare class UniversalGraphModule {
|
|
@@ -1775,4 +1783,4 @@ declare class MongoTokenStore implements IOAuthTokenStore {
|
|
|
1775
1783
|
private ensureIndex;
|
|
1776
1784
|
}
|
|
1777
1785
|
|
|
1778
|
-
export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, type ApiKeyResolver, AttachmentType, type AuditEntry, type BaseGraphConfig, type BaseGraphContext, GraphController as BaseGraphServiceController, UniversalGraphModule as BaseGraphServiceModule, type BaseGraphState, BuilderRegistryService, Callback, CallbackACL, CallbackAuditAction, CallbackAuditor, type CallbackContext, CallbackController, type CallbackEntry, type CallbackHandler, type CallbackMetadata, CallbackMetrics, type CallbackPatch, type CallbackPatchHandler, CallbackPatchService, CallbackRateLimiter, type CallbackRecord, CallbackRegistry, type CallbackRequest, type CallbackResult, CallbackStore, CallbackTokenGuard, type CallbackUser, type ChannelState, type ChartType, ChatFeature, type ChatModelCreator, type ChatModelOrRunnable, type ChatModelWithTools, type CitationValue, type CompiledGraphFor, type CustomDocument, DEFAULT_ATTACHMENT_THRESHOLD, DEFAULT_ROUTER_URL, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExecuteToolWithAttachmentsParams, type ExecuteToolWithAttachmentsResult, type ExtendedCallbackContext, type ExtendedCallbackHandler, ExternalGraphBuilder, FileBasedDiscovery, FileTokenStore, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IContentBlock, type IContentChain, type IDeletionInfo, type IGenericGraphType, type IGraphAttachment, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, type IGraphLogger, type IGraphManifest, type IGraphMetadata, type IGraphMetadataRegistry, type IGraphRequestPayload, type IGraphResponsePayload, type IGraphRunnableConfig, type IGraphService, type IGraphServiceRegistry, type IGraphSettingsRepository, type IGraphTraceEvent, type IGraphTracer, type IGraphTypeMetadata, type IGraphTypeRegistry, type ILangGraphConfig, type IModelInitializer, type IOAuthTokenStore, type IReasoningChain, type IReasoningStep, type IStoredMessageContent, type ISystemToolCredentials, type IToolCall, type IToolCatalog, type IToolConfigOption, type IToolExecutionContext, type ITracingEvent, type IUsageMetrics, type IUsageRecorder, type IdempotencyConfig, type IdempotencyEntry, IdempotencyManager, IdempotencyStatus, type KnowledgeBaseInfo, type LLMCallRecord, type LLMConfig, type LLModel, LangGraphEngine, type MappedChannels, McpConverter, type McpRuntimeClient, McpRuntimeHttpClient, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type MongoDBConfig, MongoTokenStore, type OAuthProviderConfig, type OAuthProviderDef, OAuthTokenManager, type OAuthTokenManagerOptions, type OAuthTokens, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, type ServiceDiscoveryProvider, SmartCallbackRouter, StaticDiscovery, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, type ToolConfig, type ToolExecutionResult, type TraceApiCallResult, type TracingLevel, UIDispatchController, type UIDispatchDto, UIEndpoint, type UIEndpointClassMetadata, type UIEndpointMethodMetadata, UIEndpointsDiscoveryService, UniversalCallbackService, UniversalGraphModule, type UniversalGraphModuleOptions, UniversalGraphService, type VersionResolution, type VersionResolutionOptions, type VersionRoute, VersionedGraphService, type VersioningConfig, VoyageAIRerank, type VoyageAIRerankConfig, WebPatchHandler, WithCallbacks, WithEndpoints, WithUIEndpoints, _internals, bootstrap, buildOAuthAuthorizationUrl, buildOpenAIModelConfig, clearAttachmentDataStore, createEndpointDescriptors, createGraphAttachment, createMongoClientAdapter, createStaticMessage, decryptTokens, dispatchAttachments, encryptTokens, executeToolWithAttachments, findCallbackMethod, findEndpointMethod, generateAttachmentSummary, generateModelCacheKey, getAttachmentData, getCallbackMetadata, getEndpointMetadata, getOAuthProvider, getOAuthProviderNames, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, hashToolsConfig, isReasoningModel, loadOAuthProviders, normalizeToolConfigs, registerFinanceExampleCallback, registerUIEndpointsFromClass, resolveOAuthProviderConfig, resolveRouterURL, sanitizeTraceData, storeAttachmentData, traceApiCall };
|
|
1786
|
+
export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, type ApiKeyResolver, AttachmentType, type AuditEntry, type BaseGraphConfig, type BaseGraphContext, GraphController as BaseGraphServiceController, UniversalGraphModule as BaseGraphServiceModule, type BaseGraphState, BuilderRegistryService, Callback, CallbackACL, CallbackAuditAction, CallbackAuditor, type CallbackContext, CallbackController, type CallbackEntry, type CallbackHandler, type CallbackMetadata, CallbackMetrics, type CallbackPatch, type CallbackPatchHandler, CallbackPatchService, CallbackRateLimiter, type CallbackRecord, CallbackRegistry, type CallbackRequest, type CallbackResult, CallbackStore, CallbackTokenGuard, type CallbackUser, type ChannelState, type ChartType, ChatFeature, type ChatModelCreator, type ChatModelOrRunnable, type ChatModelWithTools, type CitationValue, type CompiledGraphFor, type CustomDocument, DEFAULT_ATTACHMENT_THRESHOLD, DEFAULT_ROUTER_URL, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExecuteToolWithAttachmentsParams, type ExecuteToolWithAttachmentsResult, type ExtendedCallbackContext, type ExtendedCallbackHandler, ExternalGraphBuilder, FileBasedDiscovery, FileTokenStore, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IContentBlock, type IContentChain, type IDeletionInfo, type IGenericGraphType, type IGraphAttachment, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, type IGraphLogger, type IGraphManifest, type IGraphMetadata, type IGraphMetadataRegistry, type IGraphRequestPayload, type IGraphResponsePayload, type IGraphRunnableConfig, type IGraphService, type IGraphServiceRegistry, type IGraphSettingsRepository, type IGraphTraceEvent, type IGraphTracer, type IGraphTypeMetadata, type IGraphTypeRegistry, type ILangGraphConfig, type IModelInitializer, type IOAuthTokenStore, type IReasoningChain, type IReasoningStep, type IStoredMessageContent, type ISystemToolCredentials, type IToolCall, type IToolCatalog, type IToolConfigOption, type IToolExecutionContext, type ITracingEvent, type IUsageMetrics, type IUsageRecorder, type IdempotencyConfig, type IdempotencyEntry, IdempotencyManager, IdempotencyStatus, type KnowledgeBaseInfo, type LLMCallRecord, type LLMConfig, type LLModel, LangGraphEngine, type MappedChannels, McpConverter, type McpRuntimeClient, McpRuntimeHttpClient, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type MongoDBConfig, MongoTokenStore, type OAuthProviderConfig, type OAuthProviderDef, OAuthTokenManager, type OAuthTokenManagerOptions, type OAuthTokens, type PostgresConfig, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, type ServiceDiscoveryProvider, SmartCallbackRouter, StaticDiscovery, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, type ToolConfig, type ToolExecutionResult, type TraceApiCallResult, type TracingLevel, UIDispatchController, type UIDispatchDto, UIEndpoint, type UIEndpointClassMetadata, type UIEndpointMethodMetadata, UIEndpointsDiscoveryService, UniversalCallbackService, UniversalGraphModule, type UniversalGraphModuleOptions, UniversalGraphService, type VersionResolution, type VersionResolutionOptions, type VersionRoute, VersionedGraphService, type VersioningConfig, VoyageAIRerank, type VoyageAIRerankConfig, WebPatchHandler, WithCallbacks, WithEndpoints, WithUIEndpoints, _internals, bootstrap, buildOAuthAuthorizationUrl, buildOpenAIModelConfig, clearAttachmentDataStore, createEndpointDescriptors, createGraphAttachment, createMongoClientAdapter, createStaticMessage, decryptTokens, dispatchAttachments, encryptTokens, executeToolWithAttachments, findCallbackMethod, findEndpointMethod, generateAttachmentSummary, generateModelCacheKey, getAttachmentData, getCallbackMetadata, getEndpointMetadata, getOAuthProvider, getOAuthProviderNames, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, hashToolsConfig, isReasoningModel, loadOAuthProviders, normalizeToolConfigs, registerFinanceExampleCallback, registerUIEndpointsFromClass, resolveOAuthProviderConfig, resolveRouterURL, sanitizeTraceData, storeAttachmentData, traceApiCall };
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as path2 from 'path';
|
|
|
6
6
|
import * as os from 'os';
|
|
7
7
|
import { NestFactory, MetadataScanner, ModuleRef, DiscoveryModule } from '@nestjs/core';
|
|
8
8
|
import * as net from 'net';
|
|
9
|
-
import {
|
|
9
|
+
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
10
10
|
import mongoose from 'mongoose';
|
|
11
11
|
import { MongoDBSaver } from '@langchain/langgraph-checkpoint-mongodb';
|
|
12
12
|
import * as crypto from 'crypto';
|
|
@@ -307,11 +307,6 @@ function registerUIEndpointsFromClass(endpointRegistry, EndpointClass, instance)
|
|
|
307
307
|
if (methodsMetadata.length === 0) {
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
|
-
console.log("DEBUG: registerUIEndpointsFromClass", {
|
|
311
|
-
hasInstance: !!instance,
|
|
312
|
-
willCreateNew: !instance,
|
|
313
|
-
className: EndpointClass.name
|
|
314
|
-
});
|
|
315
310
|
const endpointInstance = instance || new EndpointClass();
|
|
316
311
|
const descriptors = methodsMetadata.map((meta) => ({
|
|
317
312
|
name: meta.endpointName,
|
|
@@ -373,11 +368,6 @@ var init_ui_endpoints_discovery = __esm({
|
|
|
373
368
|
}
|
|
374
369
|
if (hasUIEndpoints(metatype)) {
|
|
375
370
|
this.logger.debug(`Found UI endpoints class: ${metatype.name}`);
|
|
376
|
-
console.log("DEBUG: Discovery found instance", {
|
|
377
|
-
className: metatype.name,
|
|
378
|
-
hasInstance: !!instance,
|
|
379
|
-
instanceType: typeof instance
|
|
380
|
-
});
|
|
381
371
|
registerUIEndpointsFromClass(
|
|
382
372
|
this.endpointRegistry,
|
|
383
373
|
metatype,
|
|
@@ -1296,10 +1286,37 @@ var AbstractGraphBuilder = class {
|
|
|
1296
1286
|
}
|
|
1297
1287
|
/**
|
|
1298
1288
|
* Prepare config for graph execution
|
|
1299
|
-
*
|
|
1289
|
+
* Automatically sets checkpoint_ns and checkpoint_id if not present
|
|
1300
1290
|
*/
|
|
1301
1291
|
async preparePayload(payload) {
|
|
1302
|
-
const
|
|
1292
|
+
const checkpoint_ns = payload.config.configurable.checkpoint_ns || this.graphType;
|
|
1293
|
+
const checkpoint_id = payload.config.configurable.checkpoint_id || payload.config.configurable.thread_id;
|
|
1294
|
+
this.logger.debug({
|
|
1295
|
+
message: "[SDK] preparePayload - setting checkpoint config",
|
|
1296
|
+
checkpoint_ns,
|
|
1297
|
+
checkpoint_id,
|
|
1298
|
+
thread_id: payload.config.configurable.thread_id,
|
|
1299
|
+
graphType: this.graphType
|
|
1300
|
+
});
|
|
1301
|
+
const payloadWithCheckpoint = {
|
|
1302
|
+
...payload,
|
|
1303
|
+
config: {
|
|
1304
|
+
...payload.config,
|
|
1305
|
+
configurable: {
|
|
1306
|
+
...payload.config.configurable,
|
|
1307
|
+
checkpoint_ns,
|
|
1308
|
+
checkpoint_id
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1312
|
+
const finalPayload = await this.customizeConfig(payloadWithCheckpoint);
|
|
1313
|
+
this.logger.debug({
|
|
1314
|
+
message: "[SDK] preparePayload - final config",
|
|
1315
|
+
has_checkpoint_ns: !!finalPayload.config.configurable.checkpoint_ns,
|
|
1316
|
+
has_checkpoint_id: !!finalPayload.config.configurable.checkpoint_id,
|
|
1317
|
+
checkpoint_ns: finalPayload.config.configurable.checkpoint_ns,
|
|
1318
|
+
checkpoint_id: finalPayload.config.configurable.checkpoint_id
|
|
1319
|
+
});
|
|
1303
1320
|
return finalPayload;
|
|
1304
1321
|
}
|
|
1305
1322
|
/**
|
|
@@ -1373,11 +1390,6 @@ var AbstractGraphBuilder = class {
|
|
|
1373
1390
|
return null;
|
|
1374
1391
|
}
|
|
1375
1392
|
}
|
|
1376
|
-
/**
|
|
1377
|
-
* Validate graph manifest
|
|
1378
|
-
*/
|
|
1379
|
-
validateManifest(manifest) {
|
|
1380
|
-
}
|
|
1381
1393
|
/**
|
|
1382
1394
|
* Get graph metadata (from manifest or decorator)
|
|
1383
1395
|
*/
|
|
@@ -1475,9 +1487,7 @@ var UniversalGraphService = class {
|
|
|
1475
1487
|
* Returns graph types supported by the service
|
|
1476
1488
|
*/
|
|
1477
1489
|
async getSupportedGraphTypes() {
|
|
1478
|
-
return this.builders.map((builder) =>
|
|
1479
|
-
return builder.graphType;
|
|
1480
|
-
});
|
|
1490
|
+
return this.builders.map((builder) => builder.graphType);
|
|
1481
1491
|
}
|
|
1482
1492
|
/**
|
|
1483
1493
|
* Generate answer without streaming
|
|
@@ -1754,12 +1764,10 @@ UniversalGraphService = __decorateClass([
|
|
|
1754
1764
|
], UniversalGraphService);
|
|
1755
1765
|
function setupRedisMock() {
|
|
1756
1766
|
if (process.env.NODE_ENV === "development" && !process.env.KUBERNETES_SERVICE_HOST) {
|
|
1757
|
-
console.log("[REDIS_MOCK] Intercepting ioredis requires for development");
|
|
1758
1767
|
const Module2 = __require("module");
|
|
1759
1768
|
const originalRequire = Module2.prototype.require;
|
|
1760
1769
|
Module2.prototype.require = function(...args) {
|
|
1761
1770
|
if (args[0] === "ioredis") {
|
|
1762
|
-
console.log("[REDIS_MOCK] Redirecting ioredis to ioredis-mock");
|
|
1763
1771
|
return originalRequire.apply(this, ["ioredis-mock"]);
|
|
1764
1772
|
}
|
|
1765
1773
|
return originalRequire.apply(this, args);
|
|
@@ -5541,17 +5549,16 @@ function createMetaBuilder(config, versionedGraphService, moduleRef) {
|
|
|
5541
5549
|
const resolution = await versionedGraphService.resolveVersion(graphType, {
|
|
5542
5550
|
strict: false
|
|
5543
5551
|
});
|
|
5552
|
+
let versionedBuilder;
|
|
5544
5553
|
try {
|
|
5545
|
-
|
|
5554
|
+
versionedBuilder = moduleRef.get(resolution.builderClass, {
|
|
5546
5555
|
strict: false
|
|
5547
5556
|
});
|
|
5548
|
-
return versionedBuilder.buildGraph(payload);
|
|
5549
5557
|
} catch (error) {
|
|
5550
|
-
|
|
5551
|
-
resolution.builderClass
|
|
5552
|
-
);
|
|
5553
|
-
return versionedBuilder.buildGraph(payload);
|
|
5558
|
+
versionedBuilder = await moduleRef.create(resolution.builderClass);
|
|
5554
5559
|
}
|
|
5560
|
+
const preparedPayload = await versionedBuilder.preparePayload(payload);
|
|
5561
|
+
return versionedBuilder.buildGraph(preparedPayload);
|
|
5555
5562
|
}
|
|
5556
5563
|
async preparePayload(payload) {
|
|
5557
5564
|
const graphType = payload.config?.configurable?.graphSettings?.graphType;
|
|
@@ -5590,6 +5597,82 @@ function createMetaBuilder(config, versionedGraphService, moduleRef) {
|
|
|
5590
5597
|
Object.defineProperty(VersionRouter, "name", { value: className });
|
|
5591
5598
|
return VersionRouter;
|
|
5592
5599
|
}
|
|
5600
|
+
function buildCheckpointerProviders(options) {
|
|
5601
|
+
const logger2 = new Logger("UniversalGraphModule");
|
|
5602
|
+
if (options.postgres !== void 0) {
|
|
5603
|
+
return [
|
|
5604
|
+
{
|
|
5605
|
+
provide: "CHECKPOINTER",
|
|
5606
|
+
useFactory: async () => {
|
|
5607
|
+
const { PostgresSaver } = await import(
|
|
5608
|
+
// Dynamic import keeps the package optional at build time
|
|
5609
|
+
'@langchain/langgraph-checkpoint-postgres'
|
|
5610
|
+
);
|
|
5611
|
+
const connString = options.postgres.connectionString ?? process.env.DATABASE_URL;
|
|
5612
|
+
if (!connString) {
|
|
5613
|
+
throw new Error(
|
|
5614
|
+
"[UniversalGraphModule] Postgres checkpointer: provide postgres.connectionString or set the DATABASE_URL environment variable."
|
|
5615
|
+
);
|
|
5616
|
+
}
|
|
5617
|
+
logger2.log(
|
|
5618
|
+
`Checkpointer: PostgreSQL (${connString.replace(/:[^:@]+@/, ":***@")})`
|
|
5619
|
+
);
|
|
5620
|
+
const saver = PostgresSaver.fromConnString(connString, {
|
|
5621
|
+
...options.postgres.schema ? { schema: options.postgres.schema } : {}
|
|
5622
|
+
});
|
|
5623
|
+
await saver.setup();
|
|
5624
|
+
return saver;
|
|
5625
|
+
}
|
|
5626
|
+
}
|
|
5627
|
+
];
|
|
5628
|
+
}
|
|
5629
|
+
if (options.mongodb !== void 0) {
|
|
5630
|
+
return [
|
|
5631
|
+
{
|
|
5632
|
+
provide: "MONGO_CONNECTION",
|
|
5633
|
+
useFactory: async (configService) => {
|
|
5634
|
+
const mongoUri = options.mongodb?.uri || configService.get("MONGODB_URI") || process.env.MONGODB_URI;
|
|
5635
|
+
const dbName = options.mongodb?.dbName || configService.get("MONGO_DB_NAME") || process.env.MONGO_DB_NAME;
|
|
5636
|
+
if (!mongoUri) {
|
|
5637
|
+
throw new Error(
|
|
5638
|
+
"[UniversalGraphModule] MongoDB checkpointer: provide mongodb.uri or set the MONGODB_URI environment variable."
|
|
5639
|
+
);
|
|
5640
|
+
}
|
|
5641
|
+
logger2.log(`Checkpointer: MongoDB (${mongoUri.substring(0, 50)}...)`);
|
|
5642
|
+
await mongoose.connect(mongoUri, { dbName });
|
|
5643
|
+
return mongoose.connection;
|
|
5644
|
+
},
|
|
5645
|
+
inject: [ConfigService]
|
|
5646
|
+
},
|
|
5647
|
+
{
|
|
5648
|
+
provide: "CHECKPOINTER",
|
|
5649
|
+
useFactory: async (connection, configService) => {
|
|
5650
|
+
const dbName = options.mongodb?.dbName || configService.get("MONGO_DB_NAME") || process.env.MONGO_DB_NAME;
|
|
5651
|
+
const mongoClient = createMongoClientAdapter(connection.getClient());
|
|
5652
|
+
return new MongoDBSaver({
|
|
5653
|
+
client: mongoClient,
|
|
5654
|
+
dbName,
|
|
5655
|
+
checkpointCollectionName: options.mongodb?.checkpointCollectionName ?? "checkpoints",
|
|
5656
|
+
checkpointWritesCollectionName: options.mongodb?.checkpointWritesCollectionName ?? "checkpoint_writes"
|
|
5657
|
+
});
|
|
5658
|
+
},
|
|
5659
|
+
inject: ["MONGO_CONNECTION", ConfigService]
|
|
5660
|
+
}
|
|
5661
|
+
];
|
|
5662
|
+
}
|
|
5663
|
+
return [
|
|
5664
|
+
{
|
|
5665
|
+
provide: "CHECKPOINTER",
|
|
5666
|
+
useFactory: async () => {
|
|
5667
|
+
const { MemorySaver } = await import('@langchain/langgraph');
|
|
5668
|
+
logger2.warn(
|
|
5669
|
+
"Checkpointer: MemorySaver (in-process, no persistence). Configure postgres or mongodb in UniversalGraphModule.forRoot() for production."
|
|
5670
|
+
);
|
|
5671
|
+
return new MemorySaver();
|
|
5672
|
+
}
|
|
5673
|
+
}
|
|
5674
|
+
];
|
|
5675
|
+
}
|
|
5593
5676
|
var UniversalGraphModule = class {
|
|
5594
5677
|
static forRoot(options) {
|
|
5595
5678
|
const providers = [
|
|
@@ -5610,12 +5693,24 @@ var UniversalGraphModule = class {
|
|
|
5610
5693
|
GraphEngineFactory,
|
|
5611
5694
|
VersionedGraphService,
|
|
5612
5695
|
UniversalGraphService,
|
|
5613
|
-
// Callback infrastructure
|
|
5696
|
+
// Callback infrastructure — Redis or in-memory fallback
|
|
5614
5697
|
{
|
|
5615
5698
|
provide: "REDIS_CLIENT",
|
|
5616
5699
|
useFactory: () => {
|
|
5617
|
-
const
|
|
5618
|
-
|
|
5700
|
+
const redisUrl = options.redis?.url ?? process.env.REDIS_URL;
|
|
5701
|
+
if (redisUrl) {
|
|
5702
|
+
const Redis = __require("ioredis");
|
|
5703
|
+
const logger2 = new Logger("UniversalGraphModule");
|
|
5704
|
+
logger2.log(
|
|
5705
|
+
`Callbacks: Redis (${redisUrl.replace(/:[^:@]+@/, ":***@")})`
|
|
5706
|
+
);
|
|
5707
|
+
return new Redis(redisUrl);
|
|
5708
|
+
}
|
|
5709
|
+
const IORedisMock = __require("ioredis-mock");
|
|
5710
|
+
new Logger("UniversalGraphModule").warn(
|
|
5711
|
+
"Callbacks: in-memory store (single-instance only). Set redis.url or REDIS_URL for production."
|
|
5712
|
+
);
|
|
5713
|
+
return new IORedisMock();
|
|
5619
5714
|
}
|
|
5620
5715
|
},
|
|
5621
5716
|
{
|
|
@@ -5709,58 +5804,9 @@ var UniversalGraphModule = class {
|
|
|
5709
5804
|
},
|
|
5710
5805
|
inject: [CallbackRegistry]
|
|
5711
5806
|
},
|
|
5712
|
-
//
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
provide: "MONGO_CONNECTION",
|
|
5716
|
-
useFactory: async (configService) => {
|
|
5717
|
-
const logger2 = new Logger("UniversalGraphModule");
|
|
5718
|
-
const mongoUri = options.mongodb?.uri || configService.get("MONGODB_URI") || process.env.MONGODB_URI;
|
|
5719
|
-
const dbName = options.mongodb?.dbName || configService.get("MONGO_DB_NAME") || process.env.MONGO_DB_NAME;
|
|
5720
|
-
if (!mongoUri) {
|
|
5721
|
-
throw new Error(
|
|
5722
|
-
"MONGODB_URI is not defined in options, config, or environment"
|
|
5723
|
-
);
|
|
5724
|
-
}
|
|
5725
|
-
logger2.log(
|
|
5726
|
-
`Connecting to MongoDB: ${mongoUri?.substring(0, 50) + "..."}`
|
|
5727
|
-
);
|
|
5728
|
-
try {
|
|
5729
|
-
await mongoose.connect(mongoUri, { dbName });
|
|
5730
|
-
logger2.log(
|
|
5731
|
-
`Successfully connected to MongoDB (db: ${dbName})`
|
|
5732
|
-
);
|
|
5733
|
-
return mongoose.connection;
|
|
5734
|
-
} catch (error) {
|
|
5735
|
-
logger2.error("Failed to connect to MongoDB", error);
|
|
5736
|
-
throw error;
|
|
5737
|
-
}
|
|
5738
|
-
},
|
|
5739
|
-
inject: [ConfigService]
|
|
5740
|
-
},
|
|
5741
|
-
// MongoDB checkpointer
|
|
5742
|
-
{
|
|
5743
|
-
provide: "CHECKPOINTER",
|
|
5744
|
-
useFactory: async (connection, configService) => {
|
|
5745
|
-
const logger2 = new Logger("UniversalGraphModule");
|
|
5746
|
-
const dbName = options.mongodb?.dbName || configService.get("MONGO_DB_NAME") || process.env.MONGO_DB_NAME;
|
|
5747
|
-
const checkpointCollectionName = options.mongodb?.checkpointCollectionName || "checkpoints";
|
|
5748
|
-
const checkpointWritesCollectionName = options.mongodb?.checkpointWritesCollectionName || "checkpoint_writes";
|
|
5749
|
-
logger2.log(
|
|
5750
|
-
`Creating CHECKPOINTER with collections: ${checkpointCollectionName}, ${checkpointWritesCollectionName}`
|
|
5751
|
-
);
|
|
5752
|
-
const mongooseClient = connection.getClient();
|
|
5753
|
-
const mongoClient = createMongoClientAdapter(mongooseClient);
|
|
5754
|
-
return new MongoDBSaver({
|
|
5755
|
-
client: mongoClient,
|
|
5756
|
-
dbName,
|
|
5757
|
-
checkpointCollectionName,
|
|
5758
|
-
checkpointWritesCollectionName
|
|
5759
|
-
});
|
|
5760
|
-
},
|
|
5761
|
-
inject: ["MONGO_CONNECTION", ConfigService]
|
|
5762
|
-
}
|
|
5763
|
-
] : [],
|
|
5807
|
+
// ── Checkpointer ────────────────────────────────────────────────────
|
|
5808
|
+
// Priority: postgres > mongodb > memory (in-process, no persistence)
|
|
5809
|
+
...buildCheckpointerProviders(options),
|
|
5764
5810
|
{
|
|
5765
5811
|
provide: "GRAPH_ENGINE",
|
|
5766
5812
|
useFactory: (langGraphEngine) => langGraphEngine,
|
|
@@ -5785,12 +5831,10 @@ var UniversalGraphModule = class {
|
|
|
5785
5831
|
{
|
|
5786
5832
|
provide: "VERSIONING_INITIALIZER",
|
|
5787
5833
|
useFactory: (builderRegistry, versionedGraphService, configs, moduleRef) => {
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
configs?.length || 0
|
|
5834
|
+
const initLogger = new Logger("UniversalGraphModule");
|
|
5835
|
+
initLogger.debug(
|
|
5836
|
+
`Initializing versioning for ${configs?.length || 0} graph type(s)`
|
|
5791
5837
|
);
|
|
5792
|
-
console.log("\u{1F527} ModuleRef available:", !!moduleRef);
|
|
5793
|
-
console.log("\u{1F527} BuilderRegistry available:", !!builderRegistry);
|
|
5794
5838
|
configs.forEach(
|
|
5795
5839
|
(config) => versionedGraphService.registerVersioning(config)
|
|
5796
5840
|
);
|
|
@@ -5802,9 +5846,8 @@ var UniversalGraphModule = class {
|
|
|
5802
5846
|
moduleRef
|
|
5803
5847
|
);
|
|
5804
5848
|
const versionRouter = new VersionRouterClass();
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
config.baseGraphType
|
|
5849
|
+
initLogger.debug(
|
|
5850
|
+
`Registered VersionRouter for ${config.baseGraphType}`
|
|
5808
5851
|
);
|
|
5809
5852
|
builderRegistry.registerBuilder(versionRouter);
|
|
5810
5853
|
} else {
|
|
@@ -5825,10 +5868,8 @@ var UniversalGraphModule = class {
|
|
|
5825
5868
|
}
|
|
5826
5869
|
}
|
|
5827
5870
|
const simpleRouter = new SimpleVersionRouter();
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
config.baseGraphType,
|
|
5831
|
-
"(no ModuleRef)"
|
|
5871
|
+
initLogger.warn(
|
|
5872
|
+
`Registered SimpleRouter for ${config.baseGraphType} (no ModuleRef)`
|
|
5832
5873
|
);
|
|
5833
5874
|
builderRegistry.registerBuilder(simpleRouter);
|
|
5834
5875
|
}
|
|
@@ -5852,6 +5893,7 @@ var UniversalGraphModule = class {
|
|
|
5852
5893
|
exports: [
|
|
5853
5894
|
"GRAPH_SERVICE",
|
|
5854
5895
|
"GRAPH_ENGINE",
|
|
5896
|
+
"CHECKPOINTER",
|
|
5855
5897
|
UniversalGraphService,
|
|
5856
5898
|
BuilderRegistryService,
|
|
5857
5899
|
VersionedGraphService,
|
|
@@ -7101,28 +7143,11 @@ var ModelInitializer = class _ModelInitializer {
|
|
|
7101
7143
|
);
|
|
7102
7144
|
}
|
|
7103
7145
|
const config = await response.json();
|
|
7104
|
-
console.debug(
|
|
7105
|
-
`ModelInitializer.fetchFromApi - API response for ${modelId}:`,
|
|
7106
|
-
{
|
|
7107
|
-
url,
|
|
7108
|
-
statusCode: response.status,
|
|
7109
|
-
configKeys: Object.keys(config),
|
|
7110
|
-
modelType: config.modelType,
|
|
7111
|
-
hasModelType: !!config.modelType,
|
|
7112
|
-
fullConfig: config
|
|
7113
|
-
}
|
|
7114
|
-
);
|
|
7115
7146
|
const result = {
|
|
7116
7147
|
...config,
|
|
7117
7148
|
modelType: config.modelType || "chat" /* CHAT */
|
|
7118
7149
|
// Fallback for compatibility
|
|
7119
7150
|
};
|
|
7120
|
-
console.debug(`ModelInitializer.fetchFromApi - final result:`, {
|
|
7121
|
-
modelId,
|
|
7122
|
-
resultModelType: result.modelType,
|
|
7123
|
-
usedFallback: !config.modelType,
|
|
7124
|
-
resultKeys: Object.keys(result)
|
|
7125
|
-
});
|
|
7126
7151
|
return result;
|
|
7127
7152
|
}
|
|
7128
7153
|
};
|