@flutchai/flutch-sdk 0.1.5 → 0.1.7

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
@@ -1,6 +1,6 @@
1
1
  import { JSONSchema7 } from 'json-schema';
2
2
  import * as _nestjs_common from '@nestjs/common';
3
- import { Logger, Type, CanActivate, ExecutionContext, DynamicModule } from '@nestjs/common';
3
+ import { OnModuleInit, Logger, Type, CanActivate, ExecutionContext, DynamicModule } from '@nestjs/common';
4
4
  import { ConfigService } from '@nestjs/config';
5
5
  import { HumanMessage } from '@langchain/core/messages';
6
6
  import { BaseChannel, CompiledStateGraph, LangGraphRunnableConfig } from '@langchain/langgraph';
@@ -95,12 +95,13 @@ declare function getUIEndpointMethodsMetadata(constructor: any): UIEndpointMetho
95
95
  declare function hasUIEndpoints(constructor: any): boolean;
96
96
  declare function registerUIEndpointsFromClass(endpointRegistry: any, EndpointClass: any, instance?: any): void;
97
97
 
98
- declare class UIEndpointsDiscoveryService {
98
+ declare class UIEndpointsDiscoveryService implements OnModuleInit {
99
99
  private readonly discoveryService;
100
100
  private readonly metadataScanner;
101
101
  private readonly endpointRegistry;
102
102
  private readonly logger;
103
103
  constructor(discoveryService: DiscoveryService, metadataScanner: MetadataScanner, endpointRegistry: EndpointRegistry);
104
+ onModuleInit(): Promise<void>;
104
105
  discoverUIEndpoints(): Promise<void>;
105
106
  private getUIEndpointMethodsCount;
106
107
  }
@@ -210,9 +211,13 @@ type CitationValue = {
210
211
 
211
212
  interface IReasoningStep {
212
213
  index: number;
213
- type: "text" | "tool_call" | "tool_result" | "thinking" | "tool_use";
214
+ type: "text" | "tool_use";
214
215
  text?: string;
215
216
  metadata?: Record<string, any>;
217
+ name?: string;
218
+ id?: string;
219
+ input?: string;
220
+ output?: string;
216
221
  }
217
222
  interface IReasoningChain {
218
223
  steps: IReasoningStep[];
@@ -579,8 +584,6 @@ interface IGraphCompiler {
579
584
  }
580
585
  type BaseGraphState = {};
581
586
  interface IGraphMetadata {
582
- userId: string;
583
- applicationId: string;
584
587
  workflowType: string;
585
588
  version: string;
586
589
  }
@@ -588,6 +591,8 @@ interface IGraphConfigurable<TGraphSettings = any> {
588
591
  thread_id?: string;
589
592
  metadata?: IGraphMetadata;
590
593
  graphSettings: TGraphSettings;
594
+ userId?: string;
595
+ agentId?: string;
591
596
  }
592
597
  type IGraphRunnableConfig<TGraphSettings = any> = LangGraphRunnableConfig<IGraphConfigurable<TGraphSettings>> & {
593
598
  configurable: IGraphConfigurable<TGraphSettings>;
@@ -1089,6 +1094,20 @@ declare function bootstrap(AppModule: any, options?: {
1089
1094
  globalPrefix?: string;
1090
1095
  }): Promise<_nestjs_common.INestApplication<any>>;
1091
1096
 
1097
+ interface ApiCallTracerOptions {
1098
+ maxStringLength?: number;
1099
+ maxDepth?: number;
1100
+ }
1101
+ declare const DEFAULT_TRACER_OPTIONS: Required<ApiCallTracerOptions>;
1102
+ interface TraceApiCallResult<TResult> {
1103
+ result: TResult;
1104
+ startedAt: number;
1105
+ completedAt: number;
1106
+ durationMs: number;
1107
+ }
1108
+ declare function traceApiCall<TResult>(execute: () => Promise<TResult>, options?: ApiCallTracerOptions): Promise<TraceApiCallResult<TResult>>;
1109
+ declare function sanitizeTraceData(value: unknown, depth?: number, seen?: WeakSet<object>, options?: ApiCallTracerOptions): unknown;
1110
+
1092
1111
  interface LLMCallRecord {
1093
1112
  modelId: string;
1094
1113
  promptTokens: number;
@@ -1105,11 +1124,14 @@ interface StreamAccumulator {
1105
1124
  traceEvents: IGraphTraceEvent[];
1106
1125
  traceStartedAt: number | null;
1107
1126
  traceCompletedAt: number | null;
1127
+ currentReasoningSteps: IReasoningStep[];
1128
+ currentToolUse: IReasoningStep | null;
1108
1129
  }
1109
1130
  declare class EventProcessor {
1110
1131
  private readonly logger;
1111
1132
  createAccumulator(): StreamAccumulator;
1112
1133
  private normalizeContentBlocks;
1134
+ private mapReasoningSteps;
1113
1135
  processEvent(acc: StreamAccumulator, event: any, onPartial?: (chunk: string) => void): void;
1114
1136
  getResult(acc: StreamAccumulator): {
1115
1137
  content: IStoredMessageContent;
@@ -1169,20 +1191,6 @@ declare class UniversalGraphModule {
1169
1191
  static forRoot(options: UniversalGraphModuleOptions): DynamicModule;
1170
1192
  }
1171
1193
 
1172
- interface ApiCallTracerOptions {
1173
- maxStringLength?: number;
1174
- maxDepth?: number;
1175
- }
1176
- declare const DEFAULT_TRACER_OPTIONS: Required<ApiCallTracerOptions>;
1177
- interface TraceApiCallResult<TResult> {
1178
- result: TResult;
1179
- startedAt: number;
1180
- completedAt: number;
1181
- durationMs: number;
1182
- }
1183
- declare function traceApiCall<TResult>(execute: () => Promise<TResult>, options?: ApiCallTracerOptions): Promise<TraceApiCallResult<TResult>>;
1184
- declare function sanitizeTraceData(value: unknown, depth?: number, seen?: WeakSet<object>, options?: ApiCallTracerOptions): unknown;
1185
-
1186
1194
  declare enum ModelProvider {
1187
1195
  FLUTCH = "flutch",
1188
1196
  FLUTCH_MISTRAL = "flutch-mistral",
@@ -1428,6 +1436,17 @@ declare class McpToolFilter {
1428
1436
  getAvailableToolNames(): Promise<string[]>;
1429
1437
  }
1430
1438
 
1439
+ declare class McpRuntimeHttpClient implements McpRuntimeClient {
1440
+ private readonly logger;
1441
+ private readonly httpClient;
1442
+ private readonly baseUrl;
1443
+ constructor(mcpRuntimeUrl?: string);
1444
+ getTools(): Promise<McpTool[]>;
1445
+ executeTool(name: string, args: any, context?: any): Promise<ToolExecutionResult>;
1446
+ getToolStats(): Promise<any>;
1447
+ isHealthy(): Promise<boolean>;
1448
+ }
1449
+
1431
1450
  declare enum RetrieverSearchType {
1432
1451
  Search = "search",
1433
1452
  MMR = "mmr",
@@ -1496,4 +1515,53 @@ declare class GraphTypeUtils {
1496
1515
  static compareVersions(a: string, b: string): number;
1497
1516
  }
1498
1517
 
1499
- export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, AttachmentType, type AuditEntry, 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 ChartType, ChatFeature, type ChatModelCreator, type CitationValue, type CompiledGraphFor, type ConcreteModels, type CustomDocument, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExtendedCallbackContext, type ExtendedCallbackHandler, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IDeletionInfo, type IGenericGraphType, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, 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 IModelInitializer, 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, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreator, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, SmartCallbackRouter, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, 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, bootstrap, createEndpointDescriptors, findCallbackMethod, findEndpointMethod, getCallbackMetadata, getEndpointMetadata, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, prepareModelWithTools, registerFinanceExampleCallback, registerUIEndpointsFromClass, sanitizeTraceData, traceApiCall };
1518
+ interface ServiceDiscoveryProvider {
1519
+ getServices(category: string): Promise<Array<{
1520
+ name: string;
1521
+ address: string;
1522
+ port: number;
1523
+ metadata: Record<string, any>;
1524
+ }>>;
1525
+ }
1526
+
1527
+ declare class FileBasedDiscovery implements ServiceDiscoveryProvider {
1528
+ private readonly logger;
1529
+ private readonly servicesDir;
1530
+ constructor();
1531
+ registerService(name: string, address: string, port: number, metadata: Record<string, any>, graphTypes?: string[]): Promise<void>;
1532
+ unregisterService(name: string): Promise<void>;
1533
+ getServices(graphType: string): Promise<Array<{
1534
+ name: string;
1535
+ address: string;
1536
+ port: number;
1537
+ metadata: Record<string, any>;
1538
+ }>>;
1539
+ findServiceByName(serviceName: string): Promise<{
1540
+ name: string;
1541
+ address: string;
1542
+ port: number;
1543
+ metadata: Record<string, any>;
1544
+ } | null>;
1545
+ private ensureServicesDirectory;
1546
+ private cleanupStaleServices;
1547
+ private isProcessAlive;
1548
+ }
1549
+
1550
+ declare class StaticDiscovery implements ServiceDiscoveryProvider {
1551
+ private readonly services;
1552
+ constructor(services: Array<{
1553
+ name: string;
1554
+ address: string;
1555
+ port: number;
1556
+ metadata: Record<string, any>;
1557
+ category?: string;
1558
+ }>);
1559
+ getServices(category: string): Promise<Array<{
1560
+ name: string;
1561
+ address: string;
1562
+ port: number;
1563
+ metadata: Record<string, any>;
1564
+ }>>;
1565
+ }
1566
+
1567
+ export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, AttachmentType, type AuditEntry, 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 ChartType, ChatFeature, type ChatModelCreator, type CitationValue, type CompiledGraphFor, type ConcreteModels, type CustomDocument, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExtendedCallbackContext, type ExtendedCallbackHandler, FileBasedDiscovery, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IDeletionInfo, type IGenericGraphType, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, 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 IModelInitializer, 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 ModelCreator, type ModelCreators, ModelInitializer, ModelProvider, ModelType, 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 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, bootstrap, createEndpointDescriptors, findCallbackMethod, findEndpointMethod, getCallbackMetadata, getEndpointMetadata, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, prepareModelWithTools, registerFinanceExampleCallback, registerUIEndpointsFromClass, sanitizeTraceData, traceApiCall };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { JSONSchema7 } from 'json-schema';
2
2
  import * as _nestjs_common from '@nestjs/common';
3
- import { Logger, Type, CanActivate, ExecutionContext, DynamicModule } from '@nestjs/common';
3
+ import { OnModuleInit, Logger, Type, CanActivate, ExecutionContext, DynamicModule } from '@nestjs/common';
4
4
  import { ConfigService } from '@nestjs/config';
5
5
  import { HumanMessage } from '@langchain/core/messages';
6
6
  import { BaseChannel, CompiledStateGraph, LangGraphRunnableConfig } from '@langchain/langgraph';
@@ -95,12 +95,13 @@ declare function getUIEndpointMethodsMetadata(constructor: any): UIEndpointMetho
95
95
  declare function hasUIEndpoints(constructor: any): boolean;
96
96
  declare function registerUIEndpointsFromClass(endpointRegistry: any, EndpointClass: any, instance?: any): void;
97
97
 
98
- declare class UIEndpointsDiscoveryService {
98
+ declare class UIEndpointsDiscoveryService implements OnModuleInit {
99
99
  private readonly discoveryService;
100
100
  private readonly metadataScanner;
101
101
  private readonly endpointRegistry;
102
102
  private readonly logger;
103
103
  constructor(discoveryService: DiscoveryService, metadataScanner: MetadataScanner, endpointRegistry: EndpointRegistry);
104
+ onModuleInit(): Promise<void>;
104
105
  discoverUIEndpoints(): Promise<void>;
105
106
  private getUIEndpointMethodsCount;
106
107
  }
@@ -210,9 +211,13 @@ type CitationValue = {
210
211
 
211
212
  interface IReasoningStep {
212
213
  index: number;
213
- type: "text" | "tool_call" | "tool_result" | "thinking" | "tool_use";
214
+ type: "text" | "tool_use";
214
215
  text?: string;
215
216
  metadata?: Record<string, any>;
217
+ name?: string;
218
+ id?: string;
219
+ input?: string;
220
+ output?: string;
216
221
  }
217
222
  interface IReasoningChain {
218
223
  steps: IReasoningStep[];
@@ -579,8 +584,6 @@ interface IGraphCompiler {
579
584
  }
580
585
  type BaseGraphState = {};
581
586
  interface IGraphMetadata {
582
- userId: string;
583
- applicationId: string;
584
587
  workflowType: string;
585
588
  version: string;
586
589
  }
@@ -588,6 +591,8 @@ interface IGraphConfigurable<TGraphSettings = any> {
588
591
  thread_id?: string;
589
592
  metadata?: IGraphMetadata;
590
593
  graphSettings: TGraphSettings;
594
+ userId?: string;
595
+ agentId?: string;
591
596
  }
592
597
  type IGraphRunnableConfig<TGraphSettings = any> = LangGraphRunnableConfig<IGraphConfigurable<TGraphSettings>> & {
593
598
  configurable: IGraphConfigurable<TGraphSettings>;
@@ -1089,6 +1094,20 @@ declare function bootstrap(AppModule: any, options?: {
1089
1094
  globalPrefix?: string;
1090
1095
  }): Promise<_nestjs_common.INestApplication<any>>;
1091
1096
 
1097
+ interface ApiCallTracerOptions {
1098
+ maxStringLength?: number;
1099
+ maxDepth?: number;
1100
+ }
1101
+ declare const DEFAULT_TRACER_OPTIONS: Required<ApiCallTracerOptions>;
1102
+ interface TraceApiCallResult<TResult> {
1103
+ result: TResult;
1104
+ startedAt: number;
1105
+ completedAt: number;
1106
+ durationMs: number;
1107
+ }
1108
+ declare function traceApiCall<TResult>(execute: () => Promise<TResult>, options?: ApiCallTracerOptions): Promise<TraceApiCallResult<TResult>>;
1109
+ declare function sanitizeTraceData(value: unknown, depth?: number, seen?: WeakSet<object>, options?: ApiCallTracerOptions): unknown;
1110
+
1092
1111
  interface LLMCallRecord {
1093
1112
  modelId: string;
1094
1113
  promptTokens: number;
@@ -1105,11 +1124,14 @@ interface StreamAccumulator {
1105
1124
  traceEvents: IGraphTraceEvent[];
1106
1125
  traceStartedAt: number | null;
1107
1126
  traceCompletedAt: number | null;
1127
+ currentReasoningSteps: IReasoningStep[];
1128
+ currentToolUse: IReasoningStep | null;
1108
1129
  }
1109
1130
  declare class EventProcessor {
1110
1131
  private readonly logger;
1111
1132
  createAccumulator(): StreamAccumulator;
1112
1133
  private normalizeContentBlocks;
1134
+ private mapReasoningSteps;
1113
1135
  processEvent(acc: StreamAccumulator, event: any, onPartial?: (chunk: string) => void): void;
1114
1136
  getResult(acc: StreamAccumulator): {
1115
1137
  content: IStoredMessageContent;
@@ -1169,20 +1191,6 @@ declare class UniversalGraphModule {
1169
1191
  static forRoot(options: UniversalGraphModuleOptions): DynamicModule;
1170
1192
  }
1171
1193
 
1172
- interface ApiCallTracerOptions {
1173
- maxStringLength?: number;
1174
- maxDepth?: number;
1175
- }
1176
- declare const DEFAULT_TRACER_OPTIONS: Required<ApiCallTracerOptions>;
1177
- interface TraceApiCallResult<TResult> {
1178
- result: TResult;
1179
- startedAt: number;
1180
- completedAt: number;
1181
- durationMs: number;
1182
- }
1183
- declare function traceApiCall<TResult>(execute: () => Promise<TResult>, options?: ApiCallTracerOptions): Promise<TraceApiCallResult<TResult>>;
1184
- declare function sanitizeTraceData(value: unknown, depth?: number, seen?: WeakSet<object>, options?: ApiCallTracerOptions): unknown;
1185
-
1186
1194
  declare enum ModelProvider {
1187
1195
  FLUTCH = "flutch",
1188
1196
  FLUTCH_MISTRAL = "flutch-mistral",
@@ -1428,6 +1436,17 @@ declare class McpToolFilter {
1428
1436
  getAvailableToolNames(): Promise<string[]>;
1429
1437
  }
1430
1438
 
1439
+ declare class McpRuntimeHttpClient implements McpRuntimeClient {
1440
+ private readonly logger;
1441
+ private readonly httpClient;
1442
+ private readonly baseUrl;
1443
+ constructor(mcpRuntimeUrl?: string);
1444
+ getTools(): Promise<McpTool[]>;
1445
+ executeTool(name: string, args: any, context?: any): Promise<ToolExecutionResult>;
1446
+ getToolStats(): Promise<any>;
1447
+ isHealthy(): Promise<boolean>;
1448
+ }
1449
+
1431
1450
  declare enum RetrieverSearchType {
1432
1451
  Search = "search",
1433
1452
  MMR = "mmr",
@@ -1496,4 +1515,53 @@ declare class GraphTypeUtils {
1496
1515
  static compareVersions(a: string, b: string): number;
1497
1516
  }
1498
1517
 
1499
- export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, AttachmentType, type AuditEntry, 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 ChartType, ChatFeature, type ChatModelCreator, type CitationValue, type CompiledGraphFor, type ConcreteModels, type CustomDocument, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExtendedCallbackContext, type ExtendedCallbackHandler, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IDeletionInfo, type IGenericGraphType, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, 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 IModelInitializer, 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, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreator, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, SmartCallbackRouter, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, 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, bootstrap, createEndpointDescriptors, findCallbackMethod, findEndpointMethod, getCallbackMetadata, getEndpointMetadata, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, prepareModelWithTools, registerFinanceExampleCallback, registerUIEndpointsFromClass, sanitizeTraceData, traceApiCall };
1518
+ interface ServiceDiscoveryProvider {
1519
+ getServices(category: string): Promise<Array<{
1520
+ name: string;
1521
+ address: string;
1522
+ port: number;
1523
+ metadata: Record<string, any>;
1524
+ }>>;
1525
+ }
1526
+
1527
+ declare class FileBasedDiscovery implements ServiceDiscoveryProvider {
1528
+ private readonly logger;
1529
+ private readonly servicesDir;
1530
+ constructor();
1531
+ registerService(name: string, address: string, port: number, metadata: Record<string, any>, graphTypes?: string[]): Promise<void>;
1532
+ unregisterService(name: string): Promise<void>;
1533
+ getServices(graphType: string): Promise<Array<{
1534
+ name: string;
1535
+ address: string;
1536
+ port: number;
1537
+ metadata: Record<string, any>;
1538
+ }>>;
1539
+ findServiceByName(serviceName: string): Promise<{
1540
+ name: string;
1541
+ address: string;
1542
+ port: number;
1543
+ metadata: Record<string, any>;
1544
+ } | null>;
1545
+ private ensureServicesDirectory;
1546
+ private cleanupStaleServices;
1547
+ private isProcessAlive;
1548
+ }
1549
+
1550
+ declare class StaticDiscovery implements ServiceDiscoveryProvider {
1551
+ private readonly services;
1552
+ constructor(services: Array<{
1553
+ name: string;
1554
+ address: string;
1555
+ port: number;
1556
+ metadata: Record<string, any>;
1557
+ category?: string;
1558
+ }>);
1559
+ getServices(category: string): Promise<Array<{
1560
+ name: string;
1561
+ address: string;
1562
+ port: number;
1563
+ metadata: Record<string, any>;
1564
+ }>>;
1565
+ }
1566
+
1567
+ export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, AttachmentType, type AuditEntry, 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 ChartType, ChatFeature, type ChatModelCreator, type CitationValue, type CompiledGraphFor, type ConcreteModels, type CustomDocument, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExtendedCallbackContext, type ExtendedCallbackHandler, FileBasedDiscovery, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IDeletionInfo, type IGenericGraphType, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, 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 IModelInitializer, 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 ModelCreator, type ModelCreators, ModelInitializer, ModelProvider, ModelType, 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 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, bootstrap, createEndpointDescriptors, findCallbackMethod, findEndpointMethod, getCallbackMetadata, getEndpointMetadata, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, prepareModelWithTools, registerFinanceExampleCallback, registerUIEndpointsFromClass, sanitizeTraceData, traceApiCall };