@agentforge/tools 0.12.5 → 0.13.0

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,10 @@
1
1
  import * as _agentforge_core from '@agentforge/core';
2
2
  import { LogLevel, HumanRequestPriority } from '@agentforge/core';
3
3
  import { z } from 'zod';
4
+ import { SQL } from 'drizzle-orm';
5
+ import { EventEmitter } from 'events';
6
+ import { Readable } from 'node:stream';
7
+ import { Session } from 'neo4j-driver';
4
8
 
5
9
  /**
6
10
  * HTTP Tools Types
@@ -293,8 +297,7 @@ declare function createScraperTools(config?: ScraperToolsConfig): _agentforge_co
293
297
  /**
294
298
  * HTML parser tools configuration
295
299
  */
296
- interface HtmlParserToolsConfig {
297
- }
300
+ type HtmlParserToolsConfig = Record<string, never>;
298
301
  /**
299
302
  * HTML parser input schema
300
303
  */
@@ -570,8 +573,7 @@ interface UrlValidationResult {
570
573
  /**
571
574
  * URL validator tools configuration
572
575
  */
573
- interface UrlValidatorToolsConfig {
574
- }
576
+ type UrlValidatorToolsConfig = Record<string, never>;
575
577
  /**
576
578
  * URL validator input schema
577
579
  */
@@ -1096,10 +1098,68 @@ interface SlackClientConfig {
1096
1098
  /**
1097
1099
  * Default Slack tools using environment variables
1098
1100
  */
1099
- declare const sendSlackMessage: _agentforge_core.Tool<unknown, unknown>;
1100
- declare const notifySlack: _agentforge_core.Tool<unknown, unknown>;
1101
- declare const getSlackChannels: _agentforge_core.Tool<unknown, unknown>;
1102
- declare const getSlackMessages: _agentforge_core.Tool<unknown, unknown>;
1101
+ declare const sendSlackMessage: _agentforge_core.Tool<{
1102
+ message: string;
1103
+ channel: string;
1104
+ }, {
1105
+ success: boolean;
1106
+ data?: {
1107
+ channel: string | undefined;
1108
+ message: string;
1109
+ timestamp: string | undefined;
1110
+ message_id: string | undefined;
1111
+ } | undefined;
1112
+ error?: string;
1113
+ }>;
1114
+ declare const notifySlack: _agentforge_core.Tool<{
1115
+ message: string;
1116
+ channel: string;
1117
+ mentions?: string[] | undefined;
1118
+ }, {
1119
+ success: boolean;
1120
+ data?: {
1121
+ channel: string | undefined;
1122
+ message: string;
1123
+ mentions: string[];
1124
+ timestamp: string | undefined;
1125
+ notification_id: string | undefined;
1126
+ } | undefined;
1127
+ error?: string;
1128
+ }>;
1129
+ declare const getSlackChannels: _agentforge_core.Tool<{
1130
+ include_private?: boolean | undefined;
1131
+ }, {
1132
+ success: boolean;
1133
+ data?: {
1134
+ count: number;
1135
+ channels: {
1136
+ id: string | undefined;
1137
+ name: string | undefined;
1138
+ is_private: boolean;
1139
+ num_members: number;
1140
+ }[];
1141
+ } | undefined;
1142
+ error?: string;
1143
+ }>;
1144
+ declare const getSlackMessages: _agentforge_core.Tool<{
1145
+ channel: string;
1146
+ limit?: number | undefined;
1147
+ }, {
1148
+ success: boolean;
1149
+ data?: {
1150
+ channel: string;
1151
+ count: number;
1152
+ messages: {
1153
+ user: string;
1154
+ text: string;
1155
+ timestamp: string | undefined;
1156
+ thread_ts: string | undefined;
1157
+ type: string | undefined;
1158
+ subtype: string | undefined;
1159
+ }[];
1160
+ } | undefined;
1161
+ error?: string;
1162
+ }>;
1103
1163
  /**
1104
1164
  * Export all Slack tools
1105
1165
  *
@@ -1107,7 +1167,65 @@ declare const getSlackMessages: _agentforge_core.Tool<unknown, unknown>;
1107
1167
  * - 2 write tools: send-slack-message, notify-slack
1108
1168
  * - 2 read tools: get-slack-channels, get-slack-messages
1109
1169
  */
1110
- declare const slackTools: _agentforge_core.Tool<unknown, unknown>[];
1170
+ declare const slackTools: (_agentforge_core.Tool<{
1171
+ message: string;
1172
+ channel: string;
1173
+ }, {
1174
+ success: boolean;
1175
+ data?: {
1176
+ channel: string | undefined;
1177
+ message: string;
1178
+ timestamp: string | undefined;
1179
+ message_id: string | undefined;
1180
+ } | undefined;
1181
+ error?: string;
1182
+ }> | _agentforge_core.Tool<{
1183
+ message: string;
1184
+ channel: string;
1185
+ mentions?: string[] | undefined;
1186
+ }, {
1187
+ success: boolean;
1188
+ data?: {
1189
+ channel: string | undefined;
1190
+ message: string;
1191
+ mentions: string[];
1192
+ timestamp: string | undefined;
1193
+ notification_id: string | undefined;
1194
+ } | undefined;
1195
+ error?: string;
1196
+ }> | _agentforge_core.Tool<{
1197
+ include_private?: boolean | undefined;
1198
+ }, {
1199
+ success: boolean;
1200
+ data?: {
1201
+ count: number;
1202
+ channels: {
1203
+ id: string | undefined;
1204
+ name: string | undefined;
1205
+ is_private: boolean;
1206
+ num_members: number;
1207
+ }[];
1208
+ } | undefined;
1209
+ error?: string;
1210
+ }> | _agentforge_core.Tool<{
1211
+ channel: string;
1212
+ limit?: number | undefined;
1213
+ }, {
1214
+ success: boolean;
1215
+ data?: {
1216
+ channel: string;
1217
+ count: number;
1218
+ messages: {
1219
+ user: string;
1220
+ text: string;
1221
+ timestamp: string | undefined;
1222
+ thread_ts: string | undefined;
1223
+ type: string | undefined;
1224
+ subtype: string | undefined;
1225
+ }[];
1226
+ } | undefined;
1227
+ error?: string;
1228
+ }>)[];
1111
1229
  /**
1112
1230
  * Create Slack tools with custom configuration
1113
1231
  *
@@ -1145,10 +1263,68 @@ declare const slackTools: _agentforge_core.Tool<unknown, unknown>[];
1145
1263
  * ```
1146
1264
  */
1147
1265
  declare function createSlackTools(config?: SlackToolsConfig): {
1148
- sendMessage: _agentforge_core.Tool<unknown, unknown>;
1149
- notify: _agentforge_core.Tool<unknown, unknown>;
1150
- getChannels: _agentforge_core.Tool<unknown, unknown>;
1151
- getMessages: _agentforge_core.Tool<unknown, unknown>;
1266
+ sendMessage: _agentforge_core.Tool<{
1267
+ message: string;
1268
+ channel: string;
1269
+ }, {
1270
+ success: boolean;
1271
+ data?: {
1272
+ channel: string | undefined;
1273
+ message: string;
1274
+ timestamp: string | undefined;
1275
+ message_id: string | undefined;
1276
+ } | undefined;
1277
+ error?: string;
1278
+ }>;
1279
+ notify: _agentforge_core.Tool<{
1280
+ message: string;
1281
+ channel: string;
1282
+ mentions?: string[] | undefined;
1283
+ }, {
1284
+ success: boolean;
1285
+ data?: {
1286
+ channel: string | undefined;
1287
+ message: string;
1288
+ mentions: string[];
1289
+ timestamp: string | undefined;
1290
+ notification_id: string | undefined;
1291
+ } | undefined;
1292
+ error?: string;
1293
+ }>;
1294
+ getChannels: _agentforge_core.Tool<{
1295
+ include_private?: boolean | undefined;
1296
+ }, {
1297
+ success: boolean;
1298
+ data?: {
1299
+ count: number;
1300
+ channels: {
1301
+ id: string | undefined;
1302
+ name: string | undefined;
1303
+ is_private: boolean;
1304
+ num_members: number;
1305
+ }[];
1306
+ } | undefined;
1307
+ error?: string;
1308
+ }>;
1309
+ getMessages: _agentforge_core.Tool<{
1310
+ channel: string;
1311
+ limit?: number | undefined;
1312
+ }, {
1313
+ success: boolean;
1314
+ data?: {
1315
+ channel: string;
1316
+ count: number;
1317
+ messages: {
1318
+ user: string;
1319
+ text: string;
1320
+ timestamp: string | undefined;
1321
+ thread_ts: string | undefined;
1322
+ type: string | undefined;
1323
+ subtype: string | undefined;
1324
+ }[];
1325
+ } | undefined;
1326
+ error?: string;
1327
+ }>;
1152
1328
  };
1153
1329
 
1154
1330
  /**
@@ -1192,13 +1368,35 @@ interface ConfluenceAuth {
1192
1368
  /**
1193
1369
  * Default Confluence tools using environment variables
1194
1370
  */
1195
- declare const searchConfluence: _agentforge_core.Tool<unknown, unknown>;
1196
- declare const getConfluencePage: _agentforge_core.Tool<unknown, unknown>;
1197
- declare const listConfluenceSpaces: _agentforge_core.Tool<unknown, unknown>;
1198
- declare const getSpacePages: _agentforge_core.Tool<unknown, unknown>;
1199
- declare const createConfluencePage: _agentforge_core.Tool<unknown, unknown>;
1200
- declare const updateConfluencePage: _agentforge_core.Tool<unknown, unknown>;
1201
- declare const archiveConfluencePage: _agentforge_core.Tool<unknown, unknown>;
1371
+ declare const searchConfluence: _agentforge_core.Tool<{
1372
+ query: string;
1373
+ limit?: number | undefined;
1374
+ }, string>;
1375
+ declare const getConfluencePage: _agentforge_core.Tool<{
1376
+ page_id: string;
1377
+ }, string>;
1378
+ declare const listConfluenceSpaces: _agentforge_core.Tool<{
1379
+ limit?: number | undefined;
1380
+ }, string>;
1381
+ declare const getSpacePages: _agentforge_core.Tool<{
1382
+ space_key: string;
1383
+ limit?: number | undefined;
1384
+ }, string>;
1385
+ declare const createConfluencePage: _agentforge_core.Tool<{
1386
+ title: string;
1387
+ content: string;
1388
+ space_key: string;
1389
+ parent_page_id?: string | undefined;
1390
+ }, string>;
1391
+ declare const updateConfluencePage: _agentforge_core.Tool<{
1392
+ title: string;
1393
+ content: string;
1394
+ page_id: string;
1395
+ }, string>;
1396
+ declare const archiveConfluencePage: _agentforge_core.Tool<{
1397
+ page_id: string;
1398
+ reason?: string | undefined;
1399
+ }, string>;
1202
1400
  /**
1203
1401
  * Export all Confluence tools
1204
1402
  *
@@ -1206,7 +1404,29 @@ declare const archiveConfluencePage: _agentforge_core.Tool<unknown, unknown>;
1206
1404
  * - 4 read tools: search, get-page, list-spaces, get-space-pages
1207
1405
  * - 3 write tools: create-page, update-page, archive-page
1208
1406
  */
1209
- declare const confluenceTools: _agentforge_core.Tool<unknown, unknown>[];
1407
+ declare const confluenceTools: (_agentforge_core.Tool<{
1408
+ query: string;
1409
+ limit?: number | undefined;
1410
+ }, string> | _agentforge_core.Tool<{
1411
+ page_id: string;
1412
+ }, string> | _agentforge_core.Tool<{
1413
+ limit?: number | undefined;
1414
+ }, string> | _agentforge_core.Tool<{
1415
+ space_key: string;
1416
+ limit?: number | undefined;
1417
+ }, string> | _agentforge_core.Tool<{
1418
+ title: string;
1419
+ content: string;
1420
+ space_key: string;
1421
+ parent_page_id?: string | undefined;
1422
+ }, string> | _agentforge_core.Tool<{
1423
+ title: string;
1424
+ content: string;
1425
+ page_id: string;
1426
+ }, string> | _agentforge_core.Tool<{
1427
+ page_id: string;
1428
+ reason?: string | undefined;
1429
+ }, string>)[];
1210
1430
  /**
1211
1431
  * Create Confluence tools with custom configuration
1212
1432
  *
@@ -1240,13 +1460,35 @@ declare const confluenceTools: _agentforge_core.Tool<unknown, unknown>[];
1240
1460
  * ```
1241
1461
  */
1242
1462
  declare function createConfluenceTools(config?: ConfluenceToolsConfig): {
1243
- searchConfluence: _agentforge_core.Tool<unknown, unknown>;
1244
- getConfluencePage: _agentforge_core.Tool<unknown, unknown>;
1245
- listConfluenceSpaces: _agentforge_core.Tool<unknown, unknown>;
1246
- getSpacePages: _agentforge_core.Tool<unknown, unknown>;
1247
- createConfluencePage: _agentforge_core.Tool<unknown, unknown>;
1248
- updateConfluencePage: _agentforge_core.Tool<unknown, unknown>;
1249
- archiveConfluencePage: _agentforge_core.Tool<unknown, unknown>;
1463
+ searchConfluence: _agentforge_core.Tool<{
1464
+ query: string;
1465
+ limit?: number | undefined;
1466
+ }, string>;
1467
+ getConfluencePage: _agentforge_core.Tool<{
1468
+ page_id: string;
1469
+ }, string>;
1470
+ listConfluenceSpaces: _agentforge_core.Tool<{
1471
+ limit?: number | undefined;
1472
+ }, string>;
1473
+ getSpacePages: _agentforge_core.Tool<{
1474
+ space_key: string;
1475
+ limit?: number | undefined;
1476
+ }, string>;
1477
+ createConfluencePage: _agentforge_core.Tool<{
1478
+ title: string;
1479
+ content: string;
1480
+ space_key: string;
1481
+ parent_page_id?: string | undefined;
1482
+ }, string>;
1483
+ updateConfluencePage: _agentforge_core.Tool<{
1484
+ title: string;
1485
+ content: string;
1486
+ page_id: string;
1487
+ }, string>;
1488
+ archiveConfluencePage: _agentforge_core.Tool<{
1489
+ page_id: string;
1490
+ reason?: string | undefined;
1491
+ }, string>;
1250
1492
  };
1251
1493
 
1252
1494
  /**
@@ -2390,8 +2632,7 @@ declare const objectOmitSchema: z.ZodObject<{
2390
2632
  /**
2391
2633
  * Transformer tools configuration
2392
2634
  */
2393
- interface TransformerToolsConfig {
2394
- }
2635
+ type TransformerToolsConfig = Record<string, never>;
2395
2636
 
2396
2637
  /**
2397
2638
  * Array Filter Tool
@@ -2411,202 +2652,3678 @@ declare function createArrayFilterTool(): _agentforge_core.Tool<{
2411
2652
  }>;
2412
2653
 
2413
2654
  /**
2414
- * Array Map Tool
2655
+ * Array Map Tool
2656
+ */
2657
+ /**
2658
+ * Create array map tool
2659
+ */
2660
+ declare function createArrayMapTool(): _agentforge_core.Tool<{
2661
+ array: any[];
2662
+ properties: string[];
2663
+ }, {
2664
+ mapped: any[];
2665
+ count: number;
2666
+ }>;
2667
+
2668
+ /**
2669
+ * Array Sort Tool
2670
+ */
2671
+ /**
2672
+ * Create array sort tool
2673
+ */
2674
+ declare function createArraySortTool(): _agentforge_core.Tool<{
2675
+ array: any[];
2676
+ property: string;
2677
+ order?: "asc" | "desc" | undefined;
2678
+ }, {
2679
+ sorted: any[];
2680
+ count: number;
2681
+ }>;
2682
+
2683
+ /**
2684
+ * Array Group By Tool
2685
+ */
2686
+ /**
2687
+ * Create array group by tool
2688
+ */
2689
+ declare function createArrayGroupByTool(): _agentforge_core.Tool<{
2690
+ array: any[];
2691
+ property: string;
2692
+ }, {
2693
+ groups: Record<string, any[]>;
2694
+ groupCount: number;
2695
+ totalItems: number;
2696
+ }>;
2697
+
2698
+ /**
2699
+ * Object Pick Tool
2700
+ */
2701
+ /**
2702
+ * Create object pick tool
2703
+ */
2704
+ declare function createObjectPickTool(): _agentforge_core.Tool<{
2705
+ object: Record<string, any>;
2706
+ properties: string[];
2707
+ }, Record<string, any>>;
2708
+
2709
+ /**
2710
+ * Object Omit Tool
2711
+ */
2712
+ /**
2713
+ * Create object omit tool
2714
+ */
2715
+ declare function createObjectOmitTool(): _agentforge_core.Tool<{
2716
+ object: Record<string, any>;
2717
+ properties: string[];
2718
+ }, Record<string, any>>;
2719
+
2720
+ /**
2721
+ * Default array filter tool instance
2722
+ */
2723
+ declare const arrayFilter: _agentforge_core.Tool<{
2724
+ array: any[];
2725
+ property: string;
2726
+ operator: "equals" | "not-equals" | "greater-than" | "less-than" | "contains" | "starts-with" | "ends-with";
2727
+ value?: any;
2728
+ }, {
2729
+ filtered: any[];
2730
+ originalCount: number;
2731
+ filteredCount: number;
2732
+ }>;
2733
+ /**
2734
+ * Default array map tool instance
2735
+ */
2736
+ declare const arrayMap: _agentforge_core.Tool<{
2737
+ array: any[];
2738
+ properties: string[];
2739
+ }, {
2740
+ mapped: any[];
2741
+ count: number;
2742
+ }>;
2743
+ /**
2744
+ * Default array sort tool instance
2745
+ */
2746
+ declare const arraySort: _agentforge_core.Tool<{
2747
+ array: any[];
2748
+ property: string;
2749
+ order?: "asc" | "desc" | undefined;
2750
+ }, {
2751
+ sorted: any[];
2752
+ count: number;
2753
+ }>;
2754
+ /**
2755
+ * Default array group by tool instance
2756
+ */
2757
+ declare const arrayGroupBy: _agentforge_core.Tool<{
2758
+ array: any[];
2759
+ property: string;
2760
+ }, {
2761
+ groups: Record<string, any[]>;
2762
+ groupCount: number;
2763
+ totalItems: number;
2764
+ }>;
2765
+ /**
2766
+ * Default object pick tool instance
2767
+ */
2768
+ declare const objectPick: _agentforge_core.Tool<{
2769
+ object: Record<string, any>;
2770
+ properties: string[];
2771
+ }, Record<string, any>>;
2772
+ /**
2773
+ * Default object omit tool instance
2774
+ */
2775
+ declare const objectOmit: _agentforge_core.Tool<{
2776
+ object: Record<string, any>;
2777
+ properties: string[];
2778
+ }, Record<string, any>>;
2779
+ /**
2780
+ * All transformer tools
2781
+ */
2782
+ declare const transformerTools: (_agentforge_core.Tool<{
2783
+ array: any[];
2784
+ property: string;
2785
+ operator: "equals" | "not-equals" | "greater-than" | "less-than" | "contains" | "starts-with" | "ends-with";
2786
+ value?: any;
2787
+ }, {
2788
+ filtered: any[];
2789
+ originalCount: number;
2790
+ filteredCount: number;
2791
+ }> | _agentforge_core.Tool<{
2792
+ array: any[];
2793
+ properties: string[];
2794
+ }, {
2795
+ mapped: any[];
2796
+ count: number;
2797
+ }> | _agentforge_core.Tool<{
2798
+ array: any[];
2799
+ property: string;
2800
+ order?: "asc" | "desc" | undefined;
2801
+ }, {
2802
+ sorted: any[];
2803
+ count: number;
2804
+ }> | _agentforge_core.Tool<{
2805
+ array: any[];
2806
+ property: string;
2807
+ }, {
2808
+ groups: Record<string, any[]>;
2809
+ groupCount: number;
2810
+ totalItems: number;
2811
+ }> | _agentforge_core.Tool<{
2812
+ object: Record<string, any>;
2813
+ properties: string[];
2814
+ }, Record<string, any>>)[];
2815
+ /**
2816
+ * Create transformer tools with custom configuration
2817
+ */
2818
+ declare function createTransformerTools(config?: TransformerToolsConfig): (_agentforge_core.Tool<{
2819
+ array: any[];
2820
+ property: string;
2821
+ operator: "equals" | "not-equals" | "greater-than" | "less-than" | "contains" | "starts-with" | "ends-with";
2822
+ value?: any;
2823
+ }, {
2824
+ filtered: any[];
2825
+ originalCount: number;
2826
+ filteredCount: number;
2827
+ }> | _agentforge_core.Tool<{
2828
+ array: any[];
2829
+ properties: string[];
2830
+ }, {
2831
+ mapped: any[];
2832
+ count: number;
2833
+ }> | _agentforge_core.Tool<{
2834
+ array: any[];
2835
+ property: string;
2836
+ order?: "asc" | "desc" | undefined;
2837
+ }, {
2838
+ sorted: any[];
2839
+ count: number;
2840
+ }> | _agentforge_core.Tool<{
2841
+ array: any[];
2842
+ property: string;
2843
+ }, {
2844
+ groups: Record<string, any[]>;
2845
+ groupCount: number;
2846
+ totalItems: number;
2847
+ }> | _agentforge_core.Tool<{
2848
+ object: Record<string, any>;
2849
+ properties: string[];
2850
+ }, Record<string, any>>)[];
2851
+
2852
+ /**
2853
+ * Neo4j Tools Types
2854
+ *
2855
+ * Type definitions and schemas for Neo4j graph database tools.
2856
+ */
2857
+
2858
+ /**
2859
+ * Neo4j connection configuration
2860
+ */
2861
+ interface Neo4jConfig {
2862
+ uri: string;
2863
+ username: string;
2864
+ password: string;
2865
+ database?: string;
2866
+ maxConnectionPoolSize?: number;
2867
+ connectionTimeout?: number;
2868
+ }
2869
+ /**
2870
+ * Neo4j query schema
2871
+ */
2872
+ declare const neo4jQuerySchema: z.ZodObject<{
2873
+ cypher: z.ZodString;
2874
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2875
+ database: z.ZodOptional<z.ZodString>;
2876
+ }, "strip", z.ZodTypeAny, {
2877
+ cypher: string;
2878
+ parameters?: Record<string, any> | undefined;
2879
+ database?: string | undefined;
2880
+ }, {
2881
+ cypher: string;
2882
+ parameters?: Record<string, any> | undefined;
2883
+ database?: string | undefined;
2884
+ }>;
2885
+ /**
2886
+ * Neo4j get schema input schema
2887
+ */
2888
+ declare const neo4jGetSchemaSchema: z.ZodObject<{
2889
+ database: z.ZodOptional<z.ZodString>;
2890
+ }, "strip", z.ZodTypeAny, {
2891
+ database?: string | undefined;
2892
+ }, {
2893
+ database?: string | undefined;
2894
+ }>;
2895
+ /**
2896
+ * Neo4j find nodes schema
2897
+ */
2898
+ declare const neo4jFindNodesSchema: z.ZodObject<{
2899
+ label: z.ZodString;
2900
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2901
+ limit: z.ZodDefault<z.ZodNumber>;
2902
+ database: z.ZodOptional<z.ZodString>;
2903
+ }, "strip", z.ZodTypeAny, {
2904
+ limit: number;
2905
+ label: string;
2906
+ properties?: Record<string, any> | undefined;
2907
+ database?: string | undefined;
2908
+ }, {
2909
+ label: string;
2910
+ limit?: number | undefined;
2911
+ properties?: Record<string, any> | undefined;
2912
+ database?: string | undefined;
2913
+ }>;
2914
+ /**
2915
+ * Neo4j traverse schema
2916
+ */
2917
+ declare const neo4jTraverseSchema: z.ZodObject<{
2918
+ startNodeId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
2919
+ relationshipType: z.ZodOptional<z.ZodString>;
2920
+ direction: z.ZodDefault<z.ZodEnum<["outgoing", "incoming", "both"]>>;
2921
+ maxDepth: z.ZodDefault<z.ZodNumber>;
2922
+ limit: z.ZodDefault<z.ZodNumber>;
2923
+ database: z.ZodOptional<z.ZodString>;
2924
+ }, "strip", z.ZodTypeAny, {
2925
+ limit: number;
2926
+ startNodeId: string | number;
2927
+ direction: "outgoing" | "incoming" | "both";
2928
+ maxDepth: number;
2929
+ database?: string | undefined;
2930
+ relationshipType?: string | undefined;
2931
+ }, {
2932
+ startNodeId: string | number;
2933
+ limit?: number | undefined;
2934
+ database?: string | undefined;
2935
+ relationshipType?: string | undefined;
2936
+ direction?: "outgoing" | "incoming" | "both" | undefined;
2937
+ maxDepth?: number | undefined;
2938
+ }>;
2939
+ /**
2940
+ * Neo4j vector search schema
2941
+ */
2942
+ declare const neo4jVectorSearchSchema: z.ZodObject<{
2943
+ indexName: z.ZodString;
2944
+ queryVector: z.ZodArray<z.ZodNumber, "many">;
2945
+ limit: z.ZodDefault<z.ZodNumber>;
2946
+ database: z.ZodOptional<z.ZodString>;
2947
+ }, "strip", z.ZodTypeAny, {
2948
+ limit: number;
2949
+ indexName: string;
2950
+ queryVector: number[];
2951
+ database?: string | undefined;
2952
+ }, {
2953
+ indexName: string;
2954
+ queryVector: number[];
2955
+ limit?: number | undefined;
2956
+ database?: string | undefined;
2957
+ }>;
2958
+ /**
2959
+ * Neo4j vector search with embedding schema
2960
+ */
2961
+ declare const neo4jVectorSearchWithEmbeddingSchema: z.ZodObject<{
2962
+ indexName: z.ZodString;
2963
+ queryText: z.ZodString;
2964
+ limit: z.ZodDefault<z.ZodNumber>;
2965
+ model: z.ZodOptional<z.ZodString>;
2966
+ database: z.ZodOptional<z.ZodString>;
2967
+ }, "strip", z.ZodTypeAny, {
2968
+ limit: number;
2969
+ indexName: string;
2970
+ queryText: string;
2971
+ database?: string | undefined;
2972
+ model?: string | undefined;
2973
+ }, {
2974
+ indexName: string;
2975
+ queryText: string;
2976
+ limit?: number | undefined;
2977
+ database?: string | undefined;
2978
+ model?: string | undefined;
2979
+ }>;
2980
+ /**
2981
+ * Neo4j create node with embedding schema
2982
+ */
2983
+ declare const neo4jCreateNodeWithEmbeddingSchema: z.ZodObject<{
2984
+ label: z.ZodString;
2985
+ properties: z.ZodRecord<z.ZodString, z.ZodAny>;
2986
+ textProperty: z.ZodString;
2987
+ embeddingProperty: z.ZodDefault<z.ZodString>;
2988
+ model: z.ZodOptional<z.ZodString>;
2989
+ database: z.ZodOptional<z.ZodString>;
2990
+ }, "strip", z.ZodTypeAny, {
2991
+ properties: Record<string, any>;
2992
+ label: string;
2993
+ textProperty: string;
2994
+ embeddingProperty: string;
2995
+ database?: string | undefined;
2996
+ model?: string | undefined;
2997
+ }, {
2998
+ properties: Record<string, any>;
2999
+ label: string;
3000
+ textProperty: string;
3001
+ database?: string | undefined;
3002
+ model?: string | undefined;
3003
+ embeddingProperty?: string | undefined;
3004
+ }>;
3005
+ /**
3006
+ * Neo4j node result
3007
+ */
3008
+ interface Neo4jNode {
3009
+ identity: string | number;
3010
+ labels: string[];
3011
+ properties: Record<string, any>;
3012
+ }
3013
+ /**
3014
+ * Neo4j relationship result
3015
+ */
3016
+ interface Neo4jRelationship {
3017
+ identity: string | number;
3018
+ type: string;
3019
+ start: string | number;
3020
+ end: string | number;
3021
+ properties: Record<string, any>;
3022
+ }
3023
+ /**
3024
+ * Neo4j path result
3025
+ */
3026
+ interface Neo4jPath {
3027
+ start: Neo4jNode;
3028
+ end: Neo4jNode;
3029
+ segments: Array<{
3030
+ start: Neo4jNode;
3031
+ relationship: Neo4jRelationship;
3032
+ end: Neo4jNode;
3033
+ }>;
3034
+ length: number;
3035
+ }
3036
+ /**
3037
+ * Neo4j schema information
3038
+ */
3039
+ interface Neo4jSchema {
3040
+ nodeLabels: string[];
3041
+ relationshipTypes: string[];
3042
+ propertyKeys: string[];
3043
+ constraints: Array<{
3044
+ label?: string;
3045
+ type: string;
3046
+ properties: string[];
3047
+ }>;
3048
+ indexes: Array<{
3049
+ label?: string;
3050
+ type: string;
3051
+ properties: string[];
3052
+ }>;
3053
+ }
3054
+ /**
3055
+ * Neo4j tools configuration
3056
+ */
3057
+ interface Neo4jToolsConfig {
3058
+ uri?: string;
3059
+ username?: string;
3060
+ password?: string;
3061
+ database?: string;
3062
+ maxConnectionPoolSize?: number;
3063
+ connectionTimeout?: number;
3064
+ }
3065
+
3066
+ /**
3067
+ * Neo4j Connection Pool Management
3068
+ *
3069
+ * Manages Neo4j driver connections with pooling and health checks.
3070
+ */
3071
+
3072
+ /**
3073
+ * Neo4j connection pool singleton
3074
+ */
3075
+ declare class Neo4jConnectionPool {
3076
+ private driver;
3077
+ private config;
3078
+ /**
3079
+ * Initialize the connection pool
3080
+ */
3081
+ initialize(config: Neo4jConfig): Promise<void>;
3082
+ /**
3083
+ * Verify connectivity to Neo4j
3084
+ */
3085
+ verifyConnectivity(): Promise<void>;
3086
+ /**
3087
+ * Get a session for executing queries
3088
+ */
3089
+ getSession(database?: string): Session;
3090
+ /**
3091
+ * Execute a query with automatic session management
3092
+ */
3093
+ executeQuery<T = any>(cypher: string, parameters?: Record<string, any>, database?: string): Promise<T[]>;
3094
+ /**
3095
+ * Execute a read query
3096
+ */
3097
+ executeReadQuery<T = any>(cypher: string, parameters?: Record<string, any>, database?: string): Promise<T[]>;
3098
+ /**
3099
+ * Execute a write query
3100
+ */
3101
+ executeWriteQuery<T = any>(cypher: string, parameters?: Record<string, any>, database?: string): Promise<T[]>;
3102
+ /**
3103
+ * Check if driver is initialized
3104
+ */
3105
+ isInitialized(): boolean;
3106
+ /**
3107
+ * Get current configuration
3108
+ */
3109
+ getConfig(): Neo4jConfig | null;
3110
+ /**
3111
+ * Close the connection pool
3112
+ */
3113
+ close(): Promise<void>;
3114
+ }
3115
+ /**
3116
+ * Global connection pool instance
3117
+ */
3118
+ declare const neo4jPool: Neo4jConnectionPool;
3119
+ /**
3120
+ * Initialize Neo4j connection from environment variables
3121
+ */
3122
+ declare function initializeFromEnv(): Promise<void>;
3123
+
3124
+ /**
3125
+ * Embedding Generation Types
3126
+ *
3127
+ * Types and interfaces for embedding generation providers
3128
+ */
3129
+ /**
3130
+ * Supported embedding providers
3131
+ */
3132
+ type EmbeddingProvider = 'openai' | 'cohere' | 'huggingface' | 'voyage' | 'ollama';
3133
+ /**
3134
+ * Configuration for embedding generation
3135
+ */
3136
+ interface EmbeddingConfig {
3137
+ provider: EmbeddingProvider;
3138
+ model: string;
3139
+ apiKey: string;
3140
+ dimensions?: number;
3141
+ }
3142
+ /**
3143
+ * Result from embedding generation
3144
+ */
3145
+ interface EmbeddingResult {
3146
+ embedding: number[];
3147
+ model: string;
3148
+ dimensions: number;
3149
+ usage?: {
3150
+ promptTokens: number;
3151
+ totalTokens: number;
3152
+ };
3153
+ }
3154
+ /**
3155
+ * Batch embedding result
3156
+ */
3157
+ interface BatchEmbeddingResult {
3158
+ embeddings: number[][];
3159
+ model: string;
3160
+ dimensions: number;
3161
+ usage?: {
3162
+ promptTokens: number;
3163
+ totalTokens: number;
3164
+ };
3165
+ }
3166
+ /**
3167
+ * Base interface for embedding providers
3168
+ */
3169
+ interface IEmbeddingProvider {
3170
+ readonly name: EmbeddingProvider;
3171
+ readonly defaultModel: string;
3172
+ /**
3173
+ * Check if provider is available (API key configured)
3174
+ */
3175
+ isAvailable(): boolean;
3176
+ /**
3177
+ * Generate embedding for a single text
3178
+ */
3179
+ generateEmbedding(text: string, model?: string): Promise<EmbeddingResult>;
3180
+ /**
3181
+ * Generate embeddings for multiple texts (batch)
3182
+ */
3183
+ generateBatchEmbeddings(texts: string[], model?: string): Promise<BatchEmbeddingResult>;
3184
+ }
3185
+ /**
3186
+ * Retry configuration for embedding API calls
3187
+ */
3188
+ interface EmbeddingRetryConfig {
3189
+ maxRetries: number;
3190
+ initialDelay: number;
3191
+ maxDelay: number;
3192
+ backoffMultiplier: number;
3193
+ }
3194
+
3195
+ /**
3196
+ * Embedding Utilities
3197
+ *
3198
+ * Utility functions for embedding generation
3199
+ */
3200
+
3201
+ /**
3202
+ * Default retry configuration for embedding API calls
3203
+ */
3204
+ declare const DEFAULT_RETRY_CONFIG: EmbeddingRetryConfig;
3205
+ /**
3206
+ * Check if error is retryable (network errors, timeouts, 5xx errors, rate limits)
3207
+ */
3208
+ declare function isRetryableError(error: any): boolean;
3209
+ /**
3210
+ * Retry an async function with exponential backoff
3211
+ */
3212
+ declare function retryWithBackoff<T>(fn: () => Promise<T>, config?: EmbeddingRetryConfig): Promise<T>;
3213
+ /**
3214
+ * Get OpenAI API key from environment
3215
+ */
3216
+ declare function getOpenAIApiKey(): string | undefined;
3217
+ /**
3218
+ * Get Cohere API key from environment
3219
+ */
3220
+ declare function getCohereApiKey(): string | undefined;
3221
+ /**
3222
+ * Get HuggingFace API key from environment
3223
+ */
3224
+ declare function getHuggingFaceApiKey(): string | undefined;
3225
+ /**
3226
+ * Get Voyage AI API key from environment
3227
+ */
3228
+ declare function getVoyageApiKey(): string | undefined;
3229
+ /**
3230
+ * Get Ollama base URL from environment (defaults to localhost)
3231
+ */
3232
+ declare function getOllamaBaseUrl(): string;
3233
+ /**
3234
+ * Get embedding provider from environment (defaults to 'openai')
3235
+ */
3236
+ declare function getEmbeddingProvider(): string;
3237
+ /**
3238
+ * Get embedding model from environment
3239
+ */
3240
+ declare function getEmbeddingModel(): string | undefined;
3241
+ /**
3242
+ * Validate text for embedding generation
3243
+ */
3244
+ declare function validateText(text: string): void;
3245
+ /**
3246
+ * Validate batch of texts
3247
+ */
3248
+ declare function validateBatch(texts: string[]): void;
3249
+
3250
+ /**
3251
+ * Embedding Manager
3252
+ *
3253
+ * Manages embedding generation across different providers
3254
+ */
3255
+
3256
+ /**
3257
+ * Singleton embedding manager
3258
+ */
3259
+ declare class EmbeddingManager {
3260
+ private provider;
3261
+ private config;
3262
+ /**
3263
+ * Initialize with configuration
3264
+ */
3265
+ initialize(config: EmbeddingConfig): void;
3266
+ /**
3267
+ * Initialize from environment variables
3268
+ */
3269
+ initializeFromEnv(): void;
3270
+ /**
3271
+ * Check if manager is initialized
3272
+ */
3273
+ isInitialized(): boolean;
3274
+ /**
3275
+ * Get current provider
3276
+ */
3277
+ getProvider(): IEmbeddingProvider;
3278
+ /**
3279
+ * Get current configuration
3280
+ */
3281
+ getConfig(): EmbeddingConfig;
3282
+ /**
3283
+ * Generate embedding for a single text
3284
+ */
3285
+ generateEmbedding(text: string, model?: string): Promise<EmbeddingResult>;
3286
+ /**
3287
+ * Generate embeddings for multiple texts (batch)
3288
+ */
3289
+ generateBatchEmbeddings(texts: string[], model?: string): Promise<BatchEmbeddingResult>;
3290
+ /**
3291
+ * Get default model for a provider
3292
+ */
3293
+ private getDefaultModel;
3294
+ /**
3295
+ * Create a provider instance
3296
+ */
3297
+ private createProvider;
3298
+ /**
3299
+ * Reset the manager (for testing)
3300
+ */
3301
+ reset(): void;
3302
+ }
3303
+ /**
3304
+ * Singleton instance
3305
+ */
3306
+ declare const embeddingManager: EmbeddingManager;
3307
+ /**
3308
+ * Initialize embedding manager from environment variables
3309
+ */
3310
+ declare function initializeEmbeddings(): void;
3311
+ /**
3312
+ * Initialize embedding manager with custom configuration
3313
+ */
3314
+ declare function initializeEmbeddingsWithConfig(config: EmbeddingConfig): void;
3315
+ /**
3316
+ * Generate embedding for a single text
3317
+ */
3318
+ declare function generateEmbedding(text: string, model?: string): Promise<EmbeddingResult>;
3319
+ /**
3320
+ * Generate embeddings for multiple texts (batch)
3321
+ */
3322
+ declare function generateBatchEmbeddings(texts: string[], model?: string): Promise<BatchEmbeddingResult>;
3323
+
3324
+ /**
3325
+ * OpenAI Embedding Provider
3326
+ *
3327
+ * Generate embeddings using OpenAI's embedding models.
3328
+ * Requires OPENAI_API_KEY environment variable.
3329
+ * Get your API key at: https://platform.openai.com/api-keys
3330
+ */
3331
+
3332
+ /**
3333
+ * OpenAI embedding provider implementation
3334
+ */
3335
+ declare class OpenAIEmbeddingProvider implements IEmbeddingProvider {
3336
+ readonly name: "openai";
3337
+ readonly defaultModel = "text-embedding-3-small";
3338
+ private apiKey;
3339
+ private readonly baseURL;
3340
+ constructor(apiKey?: string);
3341
+ /**
3342
+ * Check if OpenAI is available (API key is set)
3343
+ */
3344
+ isAvailable(): boolean;
3345
+ /**
3346
+ * Generate embedding for a single text
3347
+ */
3348
+ generateEmbedding(text: string, model?: string): Promise<EmbeddingResult>;
3349
+ /**
3350
+ * Generate embeddings for multiple texts (batch)
3351
+ */
3352
+ generateBatchEmbeddings(texts: string[], model?: string): Promise<BatchEmbeddingResult>;
3353
+ }
3354
+
3355
+ /**
3356
+ * Neo4j Query Tool
3357
+ *
3358
+ * Execute arbitrary Cypher queries against Neo4j database.
3359
+ */
3360
+ /**
3361
+ * Create Neo4j query tool
3362
+ */
3363
+ declare function createNeo4jQueryTool(): _agentforge_core.Tool<{
3364
+ cypher: string;
3365
+ parameters?: Record<string, any> | undefined;
3366
+ database?: string | undefined;
3367
+ }, {
3368
+ success: boolean;
3369
+ error: string;
3370
+ data?: undefined;
3371
+ recordCount?: undefined;
3372
+ summary?: undefined;
3373
+ query?: undefined;
3374
+ } | {
3375
+ success: boolean;
3376
+ data: any[];
3377
+ recordCount: number;
3378
+ summary: {
3379
+ query: string;
3380
+ parameters: Record<string, any> | undefined;
3381
+ counters: {
3382
+ nodesCreated: number;
3383
+ nodesDeleted: number;
3384
+ relationshipsCreated: number;
3385
+ relationshipsDeleted: number;
3386
+ propertiesSet: number;
3387
+ };
3388
+ };
3389
+ error?: undefined;
3390
+ query?: undefined;
3391
+ } | {
3392
+ success: boolean;
3393
+ error: string;
3394
+ query: string;
3395
+ data?: undefined;
3396
+ recordCount?: undefined;
3397
+ summary?: undefined;
3398
+ }>;
3399
+
3400
+ /**
3401
+ * Neo4j Get Schema Tool
3402
+ *
3403
+ * Introspect the Neo4j graph schema to understand structure.
3404
+ */
3405
+ /**
3406
+ * Create Neo4j get schema tool
3407
+ */
3408
+ declare function createNeo4jGetSchemaTool(): _agentforge_core.Tool<{
3409
+ database?: string | undefined;
3410
+ }, {
3411
+ success: boolean;
3412
+ error: string;
3413
+ schema?: undefined;
3414
+ summary?: undefined;
3415
+ } | {
3416
+ success: boolean;
3417
+ schema: {
3418
+ nodeLabels: any[];
3419
+ relationshipTypes: any[];
3420
+ propertyKeys: any[];
3421
+ constraints: {
3422
+ name: any;
3423
+ type: any;
3424
+ entityType: any;
3425
+ labelsOrTypes: any;
3426
+ properties: any;
3427
+ }[];
3428
+ indexes: {
3429
+ name: any;
3430
+ type: any;
3431
+ entityType: any;
3432
+ labelsOrTypes: any;
3433
+ properties: any;
3434
+ }[];
3435
+ };
3436
+ summary: {
3437
+ totalLabels: number;
3438
+ totalRelationshipTypes: number;
3439
+ totalPropertyKeys: number;
3440
+ totalConstraints: number;
3441
+ totalIndexes: number;
3442
+ };
3443
+ error?: undefined;
3444
+ }>;
3445
+
3446
+ /**
3447
+ * Neo4j Find Nodes Tool
3448
+ *
3449
+ * Find nodes by label and properties.
3450
+ */
3451
+ /**
3452
+ * Create Neo4j find nodes tool
3453
+ */
3454
+ declare function createNeo4jFindNodesTool(): _agentforge_core.Tool<{
3455
+ label: string;
3456
+ limit?: number | undefined;
3457
+ properties?: Record<string, any> | undefined;
3458
+ database?: string | undefined;
3459
+ }, {
3460
+ success: boolean;
3461
+ error: string;
3462
+ nodes?: undefined;
3463
+ count?: undefined;
3464
+ query?: undefined;
3465
+ } | {
3466
+ success: boolean;
3467
+ nodes: any[];
3468
+ count: number;
3469
+ query: {
3470
+ label: string;
3471
+ properties: Record<string, any> | undefined;
3472
+ limit: number | undefined;
3473
+ };
3474
+ error?: undefined;
3475
+ } | {
3476
+ success: boolean;
3477
+ error: string;
3478
+ query: {
3479
+ label: string;
3480
+ properties: Record<string, any> | undefined;
3481
+ limit?: undefined;
3482
+ };
3483
+ nodes?: undefined;
3484
+ count?: undefined;
3485
+ }>;
3486
+
3487
+ /**
3488
+ * Neo4j Traverse Tool
3489
+ *
3490
+ * Traverse the graph from a starting node following relationships.
3491
+ */
3492
+ /**
3493
+ * Create Neo4j traverse tool
3494
+ */
3495
+ declare function createNeo4jTraverseTool(): _agentforge_core.Tool<{
3496
+ startNodeId: string | number;
3497
+ limit?: number | undefined;
3498
+ database?: string | undefined;
3499
+ relationshipType?: string | undefined;
3500
+ direction?: "outgoing" | "incoming" | "both" | undefined;
3501
+ maxDepth?: number | undefined;
3502
+ }, {
3503
+ success: boolean;
3504
+ error: string;
3505
+ paths?: undefined;
3506
+ count?: undefined;
3507
+ query?: undefined;
3508
+ } | {
3509
+ success: boolean;
3510
+ paths: {
3511
+ start: any;
3512
+ end: any;
3513
+ relationships: any;
3514
+ depth: any;
3515
+ }[];
3516
+ count: number;
3517
+ query: {
3518
+ startNodeId: string | number;
3519
+ relationshipType: string | undefined;
3520
+ direction: "outgoing" | "incoming" | "both" | undefined;
3521
+ maxDepth: number | undefined;
3522
+ };
3523
+ error?: undefined;
3524
+ } | {
3525
+ success: boolean;
3526
+ error: string;
3527
+ query: {
3528
+ startNodeId: string | number;
3529
+ relationshipType: string | undefined;
3530
+ direction: "outgoing" | "incoming" | "both" | undefined;
3531
+ maxDepth?: undefined;
3532
+ };
3533
+ paths?: undefined;
3534
+ count?: undefined;
3535
+ }>;
3536
+
3537
+ /**
3538
+ * Neo4j Vector Search Tool
3539
+ *
3540
+ * Perform semantic search using vector indexes for GraphRAG applications.
3541
+ */
3542
+ /**
3543
+ * Create Neo4j vector search tool
3544
+ */
3545
+ declare function createNeo4jVectorSearchTool(): _agentforge_core.Tool<{
3546
+ indexName: string;
3547
+ queryVector: number[];
3548
+ limit?: number | undefined;
3549
+ database?: string | undefined;
3550
+ }, {
3551
+ success: boolean;
3552
+ error: string;
3553
+ results?: undefined;
3554
+ count?: undefined;
3555
+ query?: undefined;
3556
+ } | {
3557
+ success: boolean;
3558
+ results: {
3559
+ node: any;
3560
+ score: any;
3561
+ }[];
3562
+ count: number;
3563
+ query: {
3564
+ indexName: string;
3565
+ vectorDimension: number;
3566
+ limit: number | undefined;
3567
+ };
3568
+ error?: undefined;
3569
+ } | {
3570
+ success: boolean;
3571
+ error: string;
3572
+ query: {
3573
+ indexName: string;
3574
+ vectorDimension: number;
3575
+ limit?: undefined;
3576
+ };
3577
+ results?: undefined;
3578
+ count?: undefined;
3579
+ }>;
3580
+
3581
+ /**
3582
+ * Neo4j Vector Search with Embedding Tool
3583
+ *
3584
+ * Perform semantic search by automatically generating embeddings from text.
3585
+ * This tool combines embedding generation with vector search for easier GraphRAG.
3586
+ */
3587
+ /**
3588
+ * Create Neo4j vector search with embedding tool
3589
+ */
3590
+ declare function createNeo4jVectorSearchWithEmbeddingTool(): _agentforge_core.Tool<{
3591
+ indexName: string;
3592
+ queryText: string;
3593
+ limit?: number | undefined;
3594
+ database?: string | undefined;
3595
+ model?: string | undefined;
3596
+ }, {
3597
+ success: boolean;
3598
+ error: string;
3599
+ results?: undefined;
3600
+ count?: undefined;
3601
+ query?: undefined;
3602
+ embedding?: undefined;
3603
+ } | {
3604
+ success: boolean;
3605
+ results: {
3606
+ node: any;
3607
+ score: any;
3608
+ }[];
3609
+ count: number;
3610
+ query: {
3611
+ text: string;
3612
+ indexName: string;
3613
+ embeddingModel: string;
3614
+ vectorDimension: number;
3615
+ limit: number | undefined;
3616
+ };
3617
+ embedding: {
3618
+ model: string;
3619
+ dimensions: number;
3620
+ usage: {
3621
+ promptTokens: number;
3622
+ totalTokens: number;
3623
+ } | undefined;
3624
+ };
3625
+ error?: undefined;
3626
+ } | {
3627
+ success: boolean;
3628
+ error: string;
3629
+ query: {
3630
+ text: string;
3631
+ indexName: string;
3632
+ embeddingModel?: undefined;
3633
+ vectorDimension?: undefined;
3634
+ limit?: undefined;
3635
+ };
3636
+ results?: undefined;
3637
+ count?: undefined;
3638
+ embedding?: undefined;
3639
+ }>;
3640
+
3641
+ /**
3642
+ * Neo4j Create Node with Embedding Tool
3643
+ *
3644
+ * Create a node with automatic embedding generation from text content.
3645
+ * This tool simplifies GraphRAG setup by handling embedding generation automatically.
3646
+ */
3647
+ /**
3648
+ * Create Neo4j create node with embedding tool
3649
+ */
3650
+ declare function createNeo4jCreateNodeWithEmbeddingTool(): _agentforge_core.Tool<{
3651
+ properties: Record<string, any>;
3652
+ label: string;
3653
+ textProperty: string;
3654
+ database?: string | undefined;
3655
+ model?: string | undefined;
3656
+ embeddingProperty?: string | undefined;
3657
+ }, {
3658
+ success: boolean;
3659
+ error: string;
3660
+ node?: undefined;
3661
+ nodeId?: undefined;
3662
+ embedding?: undefined;
3663
+ message?: undefined;
3664
+ } | {
3665
+ success: boolean;
3666
+ node: any;
3667
+ nodeId: any;
3668
+ embedding: {
3669
+ model: string;
3670
+ dimensions: number;
3671
+ property: string;
3672
+ usage: {
3673
+ promptTokens: number;
3674
+ totalTokens: number;
3675
+ } | undefined;
3676
+ };
3677
+ message: string;
3678
+ error?: undefined;
3679
+ }>;
3680
+
3681
+ /**
3682
+ * Default Neo4j query tool instance
3683
+ */
3684
+ declare const neo4jQuery: _agentforge_core.Tool<{
3685
+ cypher: string;
3686
+ parameters?: Record<string, any> | undefined;
3687
+ database?: string | undefined;
3688
+ }, {
3689
+ success: boolean;
3690
+ error: string;
3691
+ data?: undefined;
3692
+ recordCount?: undefined;
3693
+ summary?: undefined;
3694
+ query?: undefined;
3695
+ } | {
3696
+ success: boolean;
3697
+ data: any[];
3698
+ recordCount: number;
3699
+ summary: {
3700
+ query: string;
3701
+ parameters: Record<string, any> | undefined;
3702
+ counters: {
3703
+ nodesCreated: number;
3704
+ nodesDeleted: number;
3705
+ relationshipsCreated: number;
3706
+ relationshipsDeleted: number;
3707
+ propertiesSet: number;
3708
+ };
3709
+ };
3710
+ error?: undefined;
3711
+ query?: undefined;
3712
+ } | {
3713
+ success: boolean;
3714
+ error: string;
3715
+ query: string;
3716
+ data?: undefined;
3717
+ recordCount?: undefined;
3718
+ summary?: undefined;
3719
+ }>;
3720
+ /**
3721
+ * Default Neo4j get schema tool instance
3722
+ */
3723
+ declare const neo4jGetSchema: _agentforge_core.Tool<{
3724
+ database?: string | undefined;
3725
+ }, {
3726
+ success: boolean;
3727
+ error: string;
3728
+ schema?: undefined;
3729
+ summary?: undefined;
3730
+ } | {
3731
+ success: boolean;
3732
+ schema: {
3733
+ nodeLabels: any[];
3734
+ relationshipTypes: any[];
3735
+ propertyKeys: any[];
3736
+ constraints: {
3737
+ name: any;
3738
+ type: any;
3739
+ entityType: any;
3740
+ labelsOrTypes: any;
3741
+ properties: any;
3742
+ }[];
3743
+ indexes: {
3744
+ name: any;
3745
+ type: any;
3746
+ entityType: any;
3747
+ labelsOrTypes: any;
3748
+ properties: any;
3749
+ }[];
3750
+ };
3751
+ summary: {
3752
+ totalLabels: number;
3753
+ totalRelationshipTypes: number;
3754
+ totalPropertyKeys: number;
3755
+ totalConstraints: number;
3756
+ totalIndexes: number;
3757
+ };
3758
+ error?: undefined;
3759
+ }>;
3760
+ /**
3761
+ * Default Neo4j find nodes tool instance
3762
+ */
3763
+ declare const neo4jFindNodes: _agentforge_core.Tool<{
3764
+ label: string;
3765
+ limit?: number | undefined;
3766
+ properties?: Record<string, any> | undefined;
3767
+ database?: string | undefined;
3768
+ }, {
3769
+ success: boolean;
3770
+ error: string;
3771
+ nodes?: undefined;
3772
+ count?: undefined;
3773
+ query?: undefined;
3774
+ } | {
3775
+ success: boolean;
3776
+ nodes: any[];
3777
+ count: number;
3778
+ query: {
3779
+ label: string;
3780
+ properties: Record<string, any> | undefined;
3781
+ limit: number | undefined;
3782
+ };
3783
+ error?: undefined;
3784
+ } | {
3785
+ success: boolean;
3786
+ error: string;
3787
+ query: {
3788
+ label: string;
3789
+ properties: Record<string, any> | undefined;
3790
+ limit?: undefined;
3791
+ };
3792
+ nodes?: undefined;
3793
+ count?: undefined;
3794
+ }>;
3795
+ /**
3796
+ * Default Neo4j traverse tool instance
3797
+ */
3798
+ declare const neo4jTraverse: _agentforge_core.Tool<{
3799
+ startNodeId: string | number;
3800
+ limit?: number | undefined;
3801
+ database?: string | undefined;
3802
+ relationshipType?: string | undefined;
3803
+ direction?: "outgoing" | "incoming" | "both" | undefined;
3804
+ maxDepth?: number | undefined;
3805
+ }, {
3806
+ success: boolean;
3807
+ error: string;
3808
+ paths?: undefined;
3809
+ count?: undefined;
3810
+ query?: undefined;
3811
+ } | {
3812
+ success: boolean;
3813
+ paths: {
3814
+ start: any;
3815
+ end: any;
3816
+ relationships: any;
3817
+ depth: any;
3818
+ }[];
3819
+ count: number;
3820
+ query: {
3821
+ startNodeId: string | number;
3822
+ relationshipType: string | undefined;
3823
+ direction: "outgoing" | "incoming" | "both" | undefined;
3824
+ maxDepth: number | undefined;
3825
+ };
3826
+ error?: undefined;
3827
+ } | {
3828
+ success: boolean;
3829
+ error: string;
3830
+ query: {
3831
+ startNodeId: string | number;
3832
+ relationshipType: string | undefined;
3833
+ direction: "outgoing" | "incoming" | "both" | undefined;
3834
+ maxDepth?: undefined;
3835
+ };
3836
+ paths?: undefined;
3837
+ count?: undefined;
3838
+ }>;
3839
+ /**
3840
+ * Default Neo4j vector search tool instance
3841
+ */
3842
+ declare const neo4jVectorSearch: _agentforge_core.Tool<{
3843
+ indexName: string;
3844
+ queryVector: number[];
3845
+ limit?: number | undefined;
3846
+ database?: string | undefined;
3847
+ }, {
3848
+ success: boolean;
3849
+ error: string;
3850
+ results?: undefined;
3851
+ count?: undefined;
3852
+ query?: undefined;
3853
+ } | {
3854
+ success: boolean;
3855
+ results: {
3856
+ node: any;
3857
+ score: any;
3858
+ }[];
3859
+ count: number;
3860
+ query: {
3861
+ indexName: string;
3862
+ vectorDimension: number;
3863
+ limit: number | undefined;
3864
+ };
3865
+ error?: undefined;
3866
+ } | {
3867
+ success: boolean;
3868
+ error: string;
3869
+ query: {
3870
+ indexName: string;
3871
+ vectorDimension: number;
3872
+ limit?: undefined;
3873
+ };
3874
+ results?: undefined;
3875
+ count?: undefined;
3876
+ }>;
3877
+ /**
3878
+ * Default Neo4j vector search with embedding tool instance
3879
+ */
3880
+ declare const neo4jVectorSearchWithEmbedding: _agentforge_core.Tool<{
3881
+ indexName: string;
3882
+ queryText: string;
3883
+ limit?: number | undefined;
3884
+ database?: string | undefined;
3885
+ model?: string | undefined;
3886
+ }, {
3887
+ success: boolean;
3888
+ error: string;
3889
+ results?: undefined;
3890
+ count?: undefined;
3891
+ query?: undefined;
3892
+ embedding?: undefined;
3893
+ } | {
3894
+ success: boolean;
3895
+ results: {
3896
+ node: any;
3897
+ score: any;
3898
+ }[];
3899
+ count: number;
3900
+ query: {
3901
+ text: string;
3902
+ indexName: string;
3903
+ embeddingModel: string;
3904
+ vectorDimension: number;
3905
+ limit: number | undefined;
3906
+ };
3907
+ embedding: {
3908
+ model: string;
3909
+ dimensions: number;
3910
+ usage: {
3911
+ promptTokens: number;
3912
+ totalTokens: number;
3913
+ } | undefined;
3914
+ };
3915
+ error?: undefined;
3916
+ } | {
3917
+ success: boolean;
3918
+ error: string;
3919
+ query: {
3920
+ text: string;
3921
+ indexName: string;
3922
+ embeddingModel?: undefined;
3923
+ vectorDimension?: undefined;
3924
+ limit?: undefined;
3925
+ };
3926
+ results?: undefined;
3927
+ count?: undefined;
3928
+ embedding?: undefined;
3929
+ }>;
3930
+ /**
3931
+ * Default Neo4j create node with embedding tool instance
3932
+ */
3933
+ declare const neo4jCreateNodeWithEmbedding: _agentforge_core.Tool<{
3934
+ properties: Record<string, any>;
3935
+ label: string;
3936
+ textProperty: string;
3937
+ database?: string | undefined;
3938
+ model?: string | undefined;
3939
+ embeddingProperty?: string | undefined;
3940
+ }, {
3941
+ success: boolean;
3942
+ error: string;
3943
+ node?: undefined;
3944
+ nodeId?: undefined;
3945
+ embedding?: undefined;
3946
+ message?: undefined;
3947
+ } | {
3948
+ success: boolean;
3949
+ node: any;
3950
+ nodeId: any;
3951
+ embedding: {
3952
+ model: string;
3953
+ dimensions: number;
3954
+ property: string;
3955
+ usage: {
3956
+ promptTokens: number;
3957
+ totalTokens: number;
3958
+ } | undefined;
3959
+ };
3960
+ message: string;
3961
+ error?: undefined;
3962
+ }>;
3963
+ /**
3964
+ * All Neo4j tools (including embedding-enabled tools)
3965
+ */
3966
+ declare const neo4jTools: (_agentforge_core.Tool<{
3967
+ cypher: string;
3968
+ parameters?: Record<string, any> | undefined;
3969
+ database?: string | undefined;
3970
+ }, {
3971
+ success: boolean;
3972
+ error: string;
3973
+ data?: undefined;
3974
+ recordCount?: undefined;
3975
+ summary?: undefined;
3976
+ query?: undefined;
3977
+ } | {
3978
+ success: boolean;
3979
+ data: any[];
3980
+ recordCount: number;
3981
+ summary: {
3982
+ query: string;
3983
+ parameters: Record<string, any> | undefined;
3984
+ counters: {
3985
+ nodesCreated: number;
3986
+ nodesDeleted: number;
3987
+ relationshipsCreated: number;
3988
+ relationshipsDeleted: number;
3989
+ propertiesSet: number;
3990
+ };
3991
+ };
3992
+ error?: undefined;
3993
+ query?: undefined;
3994
+ } | {
3995
+ success: boolean;
3996
+ error: string;
3997
+ query: string;
3998
+ data?: undefined;
3999
+ recordCount?: undefined;
4000
+ summary?: undefined;
4001
+ }> | _agentforge_core.Tool<{
4002
+ database?: string | undefined;
4003
+ }, {
4004
+ success: boolean;
4005
+ error: string;
4006
+ schema?: undefined;
4007
+ summary?: undefined;
4008
+ } | {
4009
+ success: boolean;
4010
+ schema: {
4011
+ nodeLabels: any[];
4012
+ relationshipTypes: any[];
4013
+ propertyKeys: any[];
4014
+ constraints: {
4015
+ name: any;
4016
+ type: any;
4017
+ entityType: any;
4018
+ labelsOrTypes: any;
4019
+ properties: any;
4020
+ }[];
4021
+ indexes: {
4022
+ name: any;
4023
+ type: any;
4024
+ entityType: any;
4025
+ labelsOrTypes: any;
4026
+ properties: any;
4027
+ }[];
4028
+ };
4029
+ summary: {
4030
+ totalLabels: number;
4031
+ totalRelationshipTypes: number;
4032
+ totalPropertyKeys: number;
4033
+ totalConstraints: number;
4034
+ totalIndexes: number;
4035
+ };
4036
+ error?: undefined;
4037
+ }> | _agentforge_core.Tool<{
4038
+ label: string;
4039
+ limit?: number | undefined;
4040
+ properties?: Record<string, any> | undefined;
4041
+ database?: string | undefined;
4042
+ }, {
4043
+ success: boolean;
4044
+ error: string;
4045
+ nodes?: undefined;
4046
+ count?: undefined;
4047
+ query?: undefined;
4048
+ } | {
4049
+ success: boolean;
4050
+ nodes: any[];
4051
+ count: number;
4052
+ query: {
4053
+ label: string;
4054
+ properties: Record<string, any> | undefined;
4055
+ limit: number | undefined;
4056
+ };
4057
+ error?: undefined;
4058
+ } | {
4059
+ success: boolean;
4060
+ error: string;
4061
+ query: {
4062
+ label: string;
4063
+ properties: Record<string, any> | undefined;
4064
+ limit?: undefined;
4065
+ };
4066
+ nodes?: undefined;
4067
+ count?: undefined;
4068
+ }> | _agentforge_core.Tool<{
4069
+ startNodeId: string | number;
4070
+ limit?: number | undefined;
4071
+ database?: string | undefined;
4072
+ relationshipType?: string | undefined;
4073
+ direction?: "outgoing" | "incoming" | "both" | undefined;
4074
+ maxDepth?: number | undefined;
4075
+ }, {
4076
+ success: boolean;
4077
+ error: string;
4078
+ paths?: undefined;
4079
+ count?: undefined;
4080
+ query?: undefined;
4081
+ } | {
4082
+ success: boolean;
4083
+ paths: {
4084
+ start: any;
4085
+ end: any;
4086
+ relationships: any;
4087
+ depth: any;
4088
+ }[];
4089
+ count: number;
4090
+ query: {
4091
+ startNodeId: string | number;
4092
+ relationshipType: string | undefined;
4093
+ direction: "outgoing" | "incoming" | "both" | undefined;
4094
+ maxDepth: number | undefined;
4095
+ };
4096
+ error?: undefined;
4097
+ } | {
4098
+ success: boolean;
4099
+ error: string;
4100
+ query: {
4101
+ startNodeId: string | number;
4102
+ relationshipType: string | undefined;
4103
+ direction: "outgoing" | "incoming" | "both" | undefined;
4104
+ maxDepth?: undefined;
4105
+ };
4106
+ paths?: undefined;
4107
+ count?: undefined;
4108
+ }> | _agentforge_core.Tool<{
4109
+ indexName: string;
4110
+ queryVector: number[];
4111
+ limit?: number | undefined;
4112
+ database?: string | undefined;
4113
+ }, {
4114
+ success: boolean;
4115
+ error: string;
4116
+ results?: undefined;
4117
+ count?: undefined;
4118
+ query?: undefined;
4119
+ } | {
4120
+ success: boolean;
4121
+ results: {
4122
+ node: any;
4123
+ score: any;
4124
+ }[];
4125
+ count: number;
4126
+ query: {
4127
+ indexName: string;
4128
+ vectorDimension: number;
4129
+ limit: number | undefined;
4130
+ };
4131
+ error?: undefined;
4132
+ } | {
4133
+ success: boolean;
4134
+ error: string;
4135
+ query: {
4136
+ indexName: string;
4137
+ vectorDimension: number;
4138
+ limit?: undefined;
4139
+ };
4140
+ results?: undefined;
4141
+ count?: undefined;
4142
+ }> | _agentforge_core.Tool<{
4143
+ indexName: string;
4144
+ queryText: string;
4145
+ limit?: number | undefined;
4146
+ database?: string | undefined;
4147
+ model?: string | undefined;
4148
+ }, {
4149
+ success: boolean;
4150
+ error: string;
4151
+ results?: undefined;
4152
+ count?: undefined;
4153
+ query?: undefined;
4154
+ embedding?: undefined;
4155
+ } | {
4156
+ success: boolean;
4157
+ results: {
4158
+ node: any;
4159
+ score: any;
4160
+ }[];
4161
+ count: number;
4162
+ query: {
4163
+ text: string;
4164
+ indexName: string;
4165
+ embeddingModel: string;
4166
+ vectorDimension: number;
4167
+ limit: number | undefined;
4168
+ };
4169
+ embedding: {
4170
+ model: string;
4171
+ dimensions: number;
4172
+ usage: {
4173
+ promptTokens: number;
4174
+ totalTokens: number;
4175
+ } | undefined;
4176
+ };
4177
+ error?: undefined;
4178
+ } | {
4179
+ success: boolean;
4180
+ error: string;
4181
+ query: {
4182
+ text: string;
4183
+ indexName: string;
4184
+ embeddingModel?: undefined;
4185
+ vectorDimension?: undefined;
4186
+ limit?: undefined;
4187
+ };
4188
+ results?: undefined;
4189
+ count?: undefined;
4190
+ embedding?: undefined;
4191
+ }> | _agentforge_core.Tool<{
4192
+ properties: Record<string, any>;
4193
+ label: string;
4194
+ textProperty: string;
4195
+ database?: string | undefined;
4196
+ model?: string | undefined;
4197
+ embeddingProperty?: string | undefined;
4198
+ }, {
4199
+ success: boolean;
4200
+ error: string;
4201
+ node?: undefined;
4202
+ nodeId?: undefined;
4203
+ embedding?: undefined;
4204
+ message?: undefined;
4205
+ } | {
4206
+ success: boolean;
4207
+ node: any;
4208
+ nodeId: any;
4209
+ embedding: {
4210
+ model: string;
4211
+ dimensions: number;
4212
+ property: string;
4213
+ usage: {
4214
+ promptTokens: number;
4215
+ totalTokens: number;
4216
+ } | undefined;
4217
+ };
4218
+ message: string;
4219
+ error?: undefined;
4220
+ }>)[];
4221
+ /**
4222
+ * Core Neo4j tools (without embedding features)
4223
+ */
4224
+ declare const neo4jCoreTools: (_agentforge_core.Tool<{
4225
+ cypher: string;
4226
+ parameters?: Record<string, any> | undefined;
4227
+ database?: string | undefined;
4228
+ }, {
4229
+ success: boolean;
4230
+ error: string;
4231
+ data?: undefined;
4232
+ recordCount?: undefined;
4233
+ summary?: undefined;
4234
+ query?: undefined;
4235
+ } | {
4236
+ success: boolean;
4237
+ data: any[];
4238
+ recordCount: number;
4239
+ summary: {
4240
+ query: string;
4241
+ parameters: Record<string, any> | undefined;
4242
+ counters: {
4243
+ nodesCreated: number;
4244
+ nodesDeleted: number;
4245
+ relationshipsCreated: number;
4246
+ relationshipsDeleted: number;
4247
+ propertiesSet: number;
4248
+ };
4249
+ };
4250
+ error?: undefined;
4251
+ query?: undefined;
4252
+ } | {
4253
+ success: boolean;
4254
+ error: string;
4255
+ query: string;
4256
+ data?: undefined;
4257
+ recordCount?: undefined;
4258
+ summary?: undefined;
4259
+ }> | _agentforge_core.Tool<{
4260
+ database?: string | undefined;
4261
+ }, {
4262
+ success: boolean;
4263
+ error: string;
4264
+ schema?: undefined;
4265
+ summary?: undefined;
4266
+ } | {
4267
+ success: boolean;
4268
+ schema: {
4269
+ nodeLabels: any[];
4270
+ relationshipTypes: any[];
4271
+ propertyKeys: any[];
4272
+ constraints: {
4273
+ name: any;
4274
+ type: any;
4275
+ entityType: any;
4276
+ labelsOrTypes: any;
4277
+ properties: any;
4278
+ }[];
4279
+ indexes: {
4280
+ name: any;
4281
+ type: any;
4282
+ entityType: any;
4283
+ labelsOrTypes: any;
4284
+ properties: any;
4285
+ }[];
4286
+ };
4287
+ summary: {
4288
+ totalLabels: number;
4289
+ totalRelationshipTypes: number;
4290
+ totalPropertyKeys: number;
4291
+ totalConstraints: number;
4292
+ totalIndexes: number;
4293
+ };
4294
+ error?: undefined;
4295
+ }> | _agentforge_core.Tool<{
4296
+ label: string;
4297
+ limit?: number | undefined;
4298
+ properties?: Record<string, any> | undefined;
4299
+ database?: string | undefined;
4300
+ }, {
4301
+ success: boolean;
4302
+ error: string;
4303
+ nodes?: undefined;
4304
+ count?: undefined;
4305
+ query?: undefined;
4306
+ } | {
4307
+ success: boolean;
4308
+ nodes: any[];
4309
+ count: number;
4310
+ query: {
4311
+ label: string;
4312
+ properties: Record<string, any> | undefined;
4313
+ limit: number | undefined;
4314
+ };
4315
+ error?: undefined;
4316
+ } | {
4317
+ success: boolean;
4318
+ error: string;
4319
+ query: {
4320
+ label: string;
4321
+ properties: Record<string, any> | undefined;
4322
+ limit?: undefined;
4323
+ };
4324
+ nodes?: undefined;
4325
+ count?: undefined;
4326
+ }> | _agentforge_core.Tool<{
4327
+ startNodeId: string | number;
4328
+ limit?: number | undefined;
4329
+ database?: string | undefined;
4330
+ relationshipType?: string | undefined;
4331
+ direction?: "outgoing" | "incoming" | "both" | undefined;
4332
+ maxDepth?: number | undefined;
4333
+ }, {
4334
+ success: boolean;
4335
+ error: string;
4336
+ paths?: undefined;
4337
+ count?: undefined;
4338
+ query?: undefined;
4339
+ } | {
4340
+ success: boolean;
4341
+ paths: {
4342
+ start: any;
4343
+ end: any;
4344
+ relationships: any;
4345
+ depth: any;
4346
+ }[];
4347
+ count: number;
4348
+ query: {
4349
+ startNodeId: string | number;
4350
+ relationshipType: string | undefined;
4351
+ direction: "outgoing" | "incoming" | "both" | undefined;
4352
+ maxDepth: number | undefined;
4353
+ };
4354
+ error?: undefined;
4355
+ } | {
4356
+ success: boolean;
4357
+ error: string;
4358
+ query: {
4359
+ startNodeId: string | number;
4360
+ relationshipType: string | undefined;
4361
+ direction: "outgoing" | "incoming" | "both" | undefined;
4362
+ maxDepth?: undefined;
4363
+ };
4364
+ paths?: undefined;
4365
+ count?: undefined;
4366
+ }> | _agentforge_core.Tool<{
4367
+ indexName: string;
4368
+ queryVector: number[];
4369
+ limit?: number | undefined;
4370
+ database?: string | undefined;
4371
+ }, {
4372
+ success: boolean;
4373
+ error: string;
4374
+ results?: undefined;
4375
+ count?: undefined;
4376
+ query?: undefined;
4377
+ } | {
4378
+ success: boolean;
4379
+ results: {
4380
+ node: any;
4381
+ score: any;
4382
+ }[];
4383
+ count: number;
4384
+ query: {
4385
+ indexName: string;
4386
+ vectorDimension: number;
4387
+ limit: number | undefined;
4388
+ };
4389
+ error?: undefined;
4390
+ } | {
4391
+ success: boolean;
4392
+ error: string;
4393
+ query: {
4394
+ indexName: string;
4395
+ vectorDimension: number;
4396
+ limit?: undefined;
4397
+ };
4398
+ results?: undefined;
4399
+ count?: undefined;
4400
+ }>)[];
4401
+ /**
4402
+ * Create Neo4j tools with custom configuration
4403
+ */
4404
+ declare function createNeo4jTools(config?: Neo4jToolsConfig, includeEmbeddingTools?: boolean): (_agentforge_core.Tool<{
4405
+ cypher: string;
4406
+ parameters?: Record<string, any> | undefined;
4407
+ database?: string | undefined;
4408
+ }, {
4409
+ success: boolean;
4410
+ error: string;
4411
+ data?: undefined;
4412
+ recordCount?: undefined;
4413
+ summary?: undefined;
4414
+ query?: undefined;
4415
+ } | {
4416
+ success: boolean;
4417
+ data: any[];
4418
+ recordCount: number;
4419
+ summary: {
4420
+ query: string;
4421
+ parameters: Record<string, any> | undefined;
4422
+ counters: {
4423
+ nodesCreated: number;
4424
+ nodesDeleted: number;
4425
+ relationshipsCreated: number;
4426
+ relationshipsDeleted: number;
4427
+ propertiesSet: number;
4428
+ };
4429
+ };
4430
+ error?: undefined;
4431
+ query?: undefined;
4432
+ } | {
4433
+ success: boolean;
4434
+ error: string;
4435
+ query: string;
4436
+ data?: undefined;
4437
+ recordCount?: undefined;
4438
+ summary?: undefined;
4439
+ }> | _agentforge_core.Tool<{
4440
+ database?: string | undefined;
4441
+ }, {
4442
+ success: boolean;
4443
+ error: string;
4444
+ schema?: undefined;
4445
+ summary?: undefined;
4446
+ } | {
4447
+ success: boolean;
4448
+ schema: {
4449
+ nodeLabels: any[];
4450
+ relationshipTypes: any[];
4451
+ propertyKeys: any[];
4452
+ constraints: {
4453
+ name: any;
4454
+ type: any;
4455
+ entityType: any;
4456
+ labelsOrTypes: any;
4457
+ properties: any;
4458
+ }[];
4459
+ indexes: {
4460
+ name: any;
4461
+ type: any;
4462
+ entityType: any;
4463
+ labelsOrTypes: any;
4464
+ properties: any;
4465
+ }[];
4466
+ };
4467
+ summary: {
4468
+ totalLabels: number;
4469
+ totalRelationshipTypes: number;
4470
+ totalPropertyKeys: number;
4471
+ totalConstraints: number;
4472
+ totalIndexes: number;
4473
+ };
4474
+ error?: undefined;
4475
+ }> | _agentforge_core.Tool<{
4476
+ label: string;
4477
+ limit?: number | undefined;
4478
+ properties?: Record<string, any> | undefined;
4479
+ database?: string | undefined;
4480
+ }, {
4481
+ success: boolean;
4482
+ error: string;
4483
+ nodes?: undefined;
4484
+ count?: undefined;
4485
+ query?: undefined;
4486
+ } | {
4487
+ success: boolean;
4488
+ nodes: any[];
4489
+ count: number;
4490
+ query: {
4491
+ label: string;
4492
+ properties: Record<string, any> | undefined;
4493
+ limit: number | undefined;
4494
+ };
4495
+ error?: undefined;
4496
+ } | {
4497
+ success: boolean;
4498
+ error: string;
4499
+ query: {
4500
+ label: string;
4501
+ properties: Record<string, any> | undefined;
4502
+ limit?: undefined;
4503
+ };
4504
+ nodes?: undefined;
4505
+ count?: undefined;
4506
+ }> | _agentforge_core.Tool<{
4507
+ startNodeId: string | number;
4508
+ limit?: number | undefined;
4509
+ database?: string | undefined;
4510
+ relationshipType?: string | undefined;
4511
+ direction?: "outgoing" | "incoming" | "both" | undefined;
4512
+ maxDepth?: number | undefined;
4513
+ }, {
4514
+ success: boolean;
4515
+ error: string;
4516
+ paths?: undefined;
4517
+ count?: undefined;
4518
+ query?: undefined;
4519
+ } | {
4520
+ success: boolean;
4521
+ paths: {
4522
+ start: any;
4523
+ end: any;
4524
+ relationships: any;
4525
+ depth: any;
4526
+ }[];
4527
+ count: number;
4528
+ query: {
4529
+ startNodeId: string | number;
4530
+ relationshipType: string | undefined;
4531
+ direction: "outgoing" | "incoming" | "both" | undefined;
4532
+ maxDepth: number | undefined;
4533
+ };
4534
+ error?: undefined;
4535
+ } | {
4536
+ success: boolean;
4537
+ error: string;
4538
+ query: {
4539
+ startNodeId: string | number;
4540
+ relationshipType: string | undefined;
4541
+ direction: "outgoing" | "incoming" | "both" | undefined;
4542
+ maxDepth?: undefined;
4543
+ };
4544
+ paths?: undefined;
4545
+ count?: undefined;
4546
+ }> | _agentforge_core.Tool<{
4547
+ indexName: string;
4548
+ queryVector: number[];
4549
+ limit?: number | undefined;
4550
+ database?: string | undefined;
4551
+ }, {
4552
+ success: boolean;
4553
+ error: string;
4554
+ results?: undefined;
4555
+ count?: undefined;
4556
+ query?: undefined;
4557
+ } | {
4558
+ success: boolean;
4559
+ results: {
4560
+ node: any;
4561
+ score: any;
4562
+ }[];
4563
+ count: number;
4564
+ query: {
4565
+ indexName: string;
4566
+ vectorDimension: number;
4567
+ limit: number | undefined;
4568
+ };
4569
+ error?: undefined;
4570
+ } | {
4571
+ success: boolean;
4572
+ error: string;
4573
+ query: {
4574
+ indexName: string;
4575
+ vectorDimension: number;
4576
+ limit?: undefined;
4577
+ };
4578
+ results?: undefined;
4579
+ count?: undefined;
4580
+ }> | _agentforge_core.Tool<{
4581
+ indexName: string;
4582
+ queryText: string;
4583
+ limit?: number | undefined;
4584
+ database?: string | undefined;
4585
+ model?: string | undefined;
4586
+ }, {
4587
+ success: boolean;
4588
+ error: string;
4589
+ results?: undefined;
4590
+ count?: undefined;
4591
+ query?: undefined;
4592
+ embedding?: undefined;
4593
+ } | {
4594
+ success: boolean;
4595
+ results: {
4596
+ node: any;
4597
+ score: any;
4598
+ }[];
4599
+ count: number;
4600
+ query: {
4601
+ text: string;
4602
+ indexName: string;
4603
+ embeddingModel: string;
4604
+ vectorDimension: number;
4605
+ limit: number | undefined;
4606
+ };
4607
+ embedding: {
4608
+ model: string;
4609
+ dimensions: number;
4610
+ usage: {
4611
+ promptTokens: number;
4612
+ totalTokens: number;
4613
+ } | undefined;
4614
+ };
4615
+ error?: undefined;
4616
+ } | {
4617
+ success: boolean;
4618
+ error: string;
4619
+ query: {
4620
+ text: string;
4621
+ indexName: string;
4622
+ embeddingModel?: undefined;
4623
+ vectorDimension?: undefined;
4624
+ limit?: undefined;
4625
+ };
4626
+ results?: undefined;
4627
+ count?: undefined;
4628
+ embedding?: undefined;
4629
+ }> | _agentforge_core.Tool<{
4630
+ properties: Record<string, any>;
4631
+ label: string;
4632
+ textProperty: string;
4633
+ database?: string | undefined;
4634
+ model?: string | undefined;
4635
+ embeddingProperty?: string | undefined;
4636
+ }, {
4637
+ success: boolean;
4638
+ error: string;
4639
+ node?: undefined;
4640
+ nodeId?: undefined;
4641
+ embedding?: undefined;
4642
+ message?: undefined;
4643
+ } | {
4644
+ success: boolean;
4645
+ node: any;
4646
+ nodeId: any;
4647
+ embedding: {
4648
+ model: string;
4649
+ dimensions: number;
4650
+ property: string;
4651
+ usage: {
4652
+ promptTokens: number;
4653
+ totalTokens: number;
4654
+ } | undefined;
4655
+ };
4656
+ message: string;
4657
+ error?: undefined;
4658
+ }>)[];
4659
+ /**
4660
+ * Initialize Neo4j tools from environment variables
4661
+ *
4662
+ * Required environment variables:
4663
+ * - NEO4J_URI: Neo4j connection URI (e.g., bolt://localhost:7687)
4664
+ * - NEO4J_USER: Neo4j username
4665
+ * - NEO4J_PASSWORD: Neo4j password
4666
+ *
4667
+ * Optional environment variables:
4668
+ * - NEO4J_DATABASE: Database name (defaults to 'neo4j')
4669
+ *
4670
+ * For embedding-enabled tools, also set:
4671
+ * - OPENAI_API_KEY: OpenAI API key for embedding generation
4672
+ * - EMBEDDING_MODEL: Embedding model to use (defaults to 'text-embedding-3-small')
4673
+ * - EMBEDDING_PROVIDER: Embedding provider (defaults to 'openai')
4674
+ */
4675
+ declare function initializeNeo4jTools(): Promise<void>;
4676
+
4677
+ /**
4678
+ * Shared types for relational database operations
4679
+ * @module types
4680
+ */
4681
+
4682
+ /**
4683
+ * Supported database vendors
4684
+ */
4685
+ type DatabaseVendor = 'postgresql' | 'mysql' | 'sqlite';
4686
+ /**
4687
+ * Database connection configuration
4688
+ */
4689
+ interface DatabaseConfig {
4690
+ /** Database vendor type */
4691
+ vendor: DatabaseVendor;
4692
+ /** Connection string or configuration object */
4693
+ connection: string | Record<string, unknown>;
4694
+ /** Optional connection pool configuration */
4695
+ pool?: {
4696
+ min?: number;
4697
+ max?: number;
4698
+ idleTimeoutMillis?: number;
4699
+ };
4700
+ }
4701
+ /**
4702
+ * Database connection interface
4703
+ *
4704
+ * NOTE: The execute() signature was changed from execute(sql: string, params?: unknown)
4705
+ * to execute(query: SQL) in ST-02001 to align with Drizzle's type-safe SQL template design.
4706
+ * This is a breaking change but provides better type safety and prevents SQL injection.
4707
+ * Parameter binding is now handled by buildParameterizedQuery() before calling execute().
4708
+ */
4709
+ interface DatabaseConnection {
4710
+ /** Execute a Drizzle SQL query */
4711
+ execute(query: SQL): Promise<unknown>;
4712
+ /** Close the connection */
4713
+ close(): Promise<void>;
4714
+ /** Check if connection is healthy */
4715
+ isHealthy(): Promise<boolean>;
4716
+ }
4717
+ /**
4718
+ * Query result metadata
4719
+ */
4720
+ interface QueryMetadata {
4721
+ /** Number of rows affected */
4722
+ rowCount?: number;
4723
+ /** Execution time in milliseconds */
4724
+ executionTime?: number;
4725
+ /** Additional vendor-specific metadata */
4726
+ [key: string]: unknown;
4727
+ }
4728
+ /**
4729
+ * Query result with data and metadata
4730
+ */
4731
+ interface QueryResult<T = unknown> {
4732
+ /** Query result data */
4733
+ data: T[];
4734
+ /** Query metadata */
4735
+ metadata: QueryMetadata;
4736
+ }
4737
+
4738
+ /**
4739
+ * Runtime peer dependency checker for database drivers
4740
+ * @module utils/peer-dependency-checker
4741
+ */
4742
+
4743
+ /**
4744
+ * Error thrown when a required peer dependency is missing
4745
+ */
4746
+ declare class MissingPeerDependencyError extends Error {
4747
+ readonly vendor: DatabaseVendor;
4748
+ readonly packageName: string;
4749
+ constructor(vendor: DatabaseVendor, packageName: string);
4750
+ }
4751
+ /**
4752
+ * Check if the required peer dependency for a database vendor is installed
4753
+ * @param vendor - Database vendor to check
4754
+ * @throws {MissingPeerDependencyError} If the required peer dependency is not installed
4755
+ */
4756
+ declare function checkPeerDependency(vendor: DatabaseVendor): void;
4757
+ /**
4758
+ * Get the required peer dependency package name for a database vendor
4759
+ * @param vendor - Database vendor
4760
+ * @returns Package name of the required peer dependency
4761
+ */
4762
+ declare function getPeerDependencyName(vendor: DatabaseVendor): string;
4763
+ /**
4764
+ * Get installation instructions for a database vendor
4765
+ * @param vendor - Database vendor
4766
+ * @returns Installation command for the required peer dependency
4767
+ */
4768
+ declare function getInstallationInstructions(vendor: DatabaseVendor): string;
4769
+
4770
+ /**
4771
+ * Query execution types for relational databases
4772
+ * @module query/types
4773
+ */
4774
+
4775
+ /**
4776
+ * Query parameters for parameterized SQL execution
4777
+ *
4778
+ * Parameters can be provided as:
4779
+ * - An array for positional parameters (e.g., [value1, value2])
4780
+ * - An object for named parameters (e.g., { name: 'John', age: 30 })
4781
+ */
4782
+ type QueryParams = unknown[] | Record<string, unknown>;
4783
+ /**
4784
+ * Query execution input
4785
+ */
4786
+ interface QueryInput {
4787
+ /** SQL query string */
4788
+ sql: string;
4789
+ /** Query parameters for parameter binding */
4790
+ params?: QueryParams;
4791
+ /** Database vendor */
4792
+ vendor: DatabaseVendor;
4793
+ }
4794
+ /**
4795
+ * Query execution result
4796
+ */
4797
+ interface QueryExecutionResult {
4798
+ /** Query result rows */
4799
+ rows: unknown[];
4800
+ /** Number of rows affected (for INSERT/UPDATE/DELETE) */
4801
+ rowCount: number;
4802
+ /** Execution time in milliseconds */
4803
+ executionTime: number;
4804
+ }
4805
+ /**
4806
+ * Minimal SQL executor abstraction.
4807
+ * Used by ConnectionManager and transaction contexts.
4808
+ */
4809
+ interface SqlExecutor {
4810
+ execute(query: SQL): Promise<unknown>;
4811
+ }
4812
+
4813
+ /**
4814
+ * Connection configuration types for relational databases
4815
+ * @module connection/types
4816
+ */
4817
+
4818
+ /**
4819
+ * Connection pool configuration options
4820
+ *
4821
+ * These options control how the connection pool manages database connections.
4822
+ * Different vendors may support different subsets of these options.
4823
+ *
4824
+ * Note: Some options are vendor-specific and may be ignored by certain drivers.
4825
+ * See vendor-specific documentation for supported options.
4826
+ */
4827
+ interface PoolConfig {
4828
+ /** Maximum number of connections in the pool (default: vendor-specific) */
4829
+ max?: number;
4830
+ /** Maximum time (ms) to wait for a connection from the pool before timing out */
4831
+ acquireTimeoutMillis?: number;
4832
+ /** Time (ms) a connection can remain idle before being closed (default: vendor-specific) */
4833
+ idleTimeoutMillis?: number;
4834
+ }
4835
+ /**
4836
+ * PostgreSQL-specific connection configuration
4837
+ */
4838
+ interface PostgreSQLConnectionConfig {
4839
+ /** Connection string (e.g., postgresql://user:password@host:port/database) */
4840
+ connectionString?: string;
4841
+ /** Host address */
4842
+ host?: string;
4843
+ /** Port number (default: 5432) */
4844
+ port?: number;
4845
+ /** Database name */
4846
+ database?: string;
4847
+ /** Username */
4848
+ user?: string;
4849
+ /** Password */
4850
+ password?: string;
4851
+ /** Enable SSL */
4852
+ ssl?: boolean | Record<string, unknown>;
4853
+ /** Connection timeout in milliseconds */
4854
+ connectionTimeoutMillis?: number;
4855
+ /** Connection pool configuration */
4856
+ pool?: PoolConfig;
4857
+ /** Additional pg-specific options */
4858
+ [key: string]: unknown;
4859
+ }
4860
+ /**
4861
+ * MySQL-specific connection configuration
4862
+ *
4863
+ * Note: mysql2.createPool accepts connection strings directly as a parameter,
4864
+ * not as a property of the config object. Use the ConnectionConfig discriminated
4865
+ * union type which allows either a config object OR a string.
4866
+ */
4867
+ interface MySQLConnectionConfig {
4868
+ /** Host address */
4869
+ host?: string;
4870
+ /** Port number (default: 3306) */
4871
+ port?: number;
4872
+ /** Database name */
4873
+ database?: string;
4874
+ /** Username */
4875
+ user?: string;
4876
+ /** Password */
4877
+ password?: string;
4878
+ /** Enable SSL */
4879
+ ssl?: boolean | Record<string, unknown>;
4880
+ /** Connection timeout in milliseconds */
4881
+ connectTimeout?: number;
4882
+ /** Connection pool configuration */
4883
+ pool?: PoolConfig;
4884
+ /** Additional mysql2-specific options */
4885
+ [key: string]: unknown;
4886
+ }
4887
+ /**
4888
+ * SQLite-specific connection configuration
4889
+ *
4890
+ * Note: SQLite typically uses a single connection with serialized access rather than a
4891
+ * traditional multi-connection pool. The `pool` configuration is accepted for API
4892
+ * consistency and future extensions, but it may not affect runtime behavior for SQLite.
4893
+ */
4894
+ interface SQLiteConnectionConfig {
4895
+ /** Database file path or ':memory:' for in-memory database */
4896
+ url: string;
4897
+ /**
4898
+ * Connection pool configuration.
4899
+ *
4900
+ * For SQLite this is primarily for API compatibility with other vendors and may be
4901
+ * ignored by the underlying driver.
4902
+ */
4903
+ pool?: PoolConfig;
4904
+ /** Additional better-sqlite3-specific options */
4905
+ [key: string]: unknown;
4906
+ }
4907
+ /**
4908
+ * Union type for vendor-specific connection configurations
4909
+ */
4910
+ type VendorConnectionConfig = PostgreSQLConnectionConfig | MySQLConnectionConfig | SQLiteConnectionConfig;
4911
+ /**
4912
+ * Connection configuration for ConnectionManager
4913
+ *
4914
+ * Uses a discriminated union to ensure that the connection string format
4915
+ * matches the selected database vendor at compile time.
4916
+ */
4917
+ type ConnectionConfig = {
4918
+ /** PostgreSQL database vendor */
4919
+ vendor: Extract<DatabaseVendor, 'postgresql'>;
4920
+ /**
4921
+ * PostgreSQL-specific connection configuration or connection string.
4922
+ * When using a string, it should be a PostgreSQL URL
4923
+ * (e.g., "postgresql://user:password@host:port/database").
4924
+ */
4925
+ connection: PostgreSQLConnectionConfig | string;
4926
+ } | {
4927
+ /** MySQL database vendor */
4928
+ vendor: Extract<DatabaseVendor, 'mysql'>;
4929
+ /**
4930
+ * MySQL-specific connection configuration or connection string.
4931
+ * When using a string, it should be a MySQL URL
4932
+ * (e.g., "mysql://user:password@host:port/database").
4933
+ */
4934
+ connection: MySQLConnectionConfig | string;
4935
+ } | {
4936
+ /** SQLite database vendor */
4937
+ vendor: Extract<DatabaseVendor, 'sqlite'>;
4938
+ /**
4939
+ * SQLite-specific connection configuration or location.
4940
+ * Can be a file path, ':memory:' for in-memory database, or a config object.
4941
+ */
4942
+ connection: SQLiteConnectionConfig | string;
4943
+ };
4944
+
4945
+ /**
4946
+ * Connection manager for relational databases using Drizzle ORM
4947
+ * @module connection/connection-manager
4948
+ */
4949
+
4950
+ /**
4951
+ * Connection state enum
4952
+ */
4953
+ declare enum ConnectionState {
4954
+ DISCONNECTED = "disconnected",
4955
+ CONNECTING = "connecting",
4956
+ CONNECTED = "connected",
4957
+ RECONNECTING = "reconnecting",
4958
+ ERROR = "error"
4959
+ }
4960
+ /**
4961
+ * Connection lifecycle events
4962
+ */
4963
+ type ConnectionEvent = 'connected' | 'disconnected' | 'error' | 'reconnecting';
4964
+ /**
4965
+ * Reconnection configuration
4966
+ */
4967
+ interface ReconnectionConfig {
4968
+ /** Enable automatic reconnection on connection loss */
4969
+ enabled: boolean;
4970
+ /** Maximum number of reconnection attempts (0 = infinite) */
4971
+ maxAttempts: number;
4972
+ /** Base delay in milliseconds for exponential backoff */
4973
+ baseDelayMs: number;
4974
+ /** Maximum delay in milliseconds between reconnection attempts */
4975
+ maxDelayMs: number;
4976
+ }
4977
+ /**
4978
+ * Connection manager that handles database connections for PostgreSQL, MySQL, and SQLite
4979
+ * using Drizzle ORM with lifecycle management and automatic reconnection
4980
+ */
4981
+ declare class ConnectionManager extends EventEmitter implements DatabaseConnection {
4982
+ private vendor;
4983
+ private db;
4984
+ private client;
4985
+ private config;
4986
+ private state;
4987
+ private reconnectionConfig;
4988
+ private reconnectionAttempts;
4989
+ private reconnectionTimer;
4990
+ private connectPromise;
4991
+ private connectionGeneration;
4992
+ /**
4993
+ * Create a new ConnectionManager instance
4994
+ * @param config - Connection configuration
4995
+ * @param reconnectionConfig - Optional reconnection configuration
4996
+ */
4997
+ constructor(config: ConnectionConfig, reconnectionConfig?: Partial<ReconnectionConfig>);
4998
+ /**
4999
+ * Connect to the database
5000
+ * Initializes the connection and sets up automatic reconnection if configured
5001
+ * @throws {Error} If connection fails or configuration is invalid
5002
+ */
5003
+ connect(): Promise<void>;
5004
+ /**
5005
+ * Disconnect from the database
5006
+ * Closes the connection and cancels any pending reconnection attempts
5007
+ *
5008
+ * Note: Event listeners are NOT removed by this method. If you need to dispose
5009
+ * of the ConnectionManager instance entirely, call dispose() instead.
5010
+ */
5011
+ disconnect(): Promise<void>;
5012
+ /**
5013
+ * Dispose of the ConnectionManager instance
5014
+ * Disconnects and removes all event listeners
5015
+ * Call this when you're done with the ConnectionManager and won't reuse it
5016
+ */
5017
+ dispose(): Promise<void>;
5018
+ /**
5019
+ * Check if the connection is currently connected
5020
+ * @returns true if connected, false otherwise
5021
+ */
5022
+ isConnected(): boolean;
5023
+ /**
5024
+ * Get the current connection state
5025
+ * @returns Current connection state
5026
+ */
5027
+ getState(): ConnectionState;
5028
+ /**
5029
+ * Get the configured database vendor.
5030
+ */
5031
+ getVendor(): DatabaseVendor;
5032
+ /**
5033
+ * Initialize the database connection
5034
+ *
5035
+ * This method is public to maintain compatibility with the DatabaseConnection interface
5036
+ * and existing code (e.g., relational-query.ts). For new code, prefer using connect()
5037
+ * which provides lifecycle management and automatic reconnection.
5038
+ *
5039
+ * @throws {Error} If connection fails or configuration is invalid
5040
+ */
5041
+ initialize(): Promise<void>;
5042
+ /**
5043
+ * Set the connection state and log the change
5044
+ * @param newState - New connection state
5045
+ * @private
5046
+ */
5047
+ private setState;
5048
+ /**
5049
+ * Schedule a reconnection attempt with exponential backoff
5050
+ * @private
5051
+ */
5052
+ private scheduleReconnection;
5053
+ /**
5054
+ * Initialize PostgreSQL connection using Drizzle ORM with node-postgres
5055
+ *
5056
+ * Applies pool configuration options to pg.Pool for connection management.
5057
+ */
5058
+ private initializePostgreSQL;
5059
+ /**
5060
+ * Initialize MySQL connection using Drizzle ORM with mysql2
5061
+ *
5062
+ * Applies pool configuration options to mysql2.createPool for connection management.
5063
+ */
5064
+ private initializeMySQL;
5065
+ /**
5066
+ * Initialize SQLite connection using Drizzle ORM with better-sqlite3
5067
+ *
5068
+ * Note: SQLite uses a single connection. Pool configuration is logged but not applied
5069
+ * as SQLite handles concurrent access through its internal locking mechanism.
5070
+ */
5071
+ private initializeSQLite;
5072
+ /**
5073
+ * Determine whether an error thrown by drizzle-orm's better-sqlite3 adapter
5074
+ * `.all()` indicates the statement does not return data (i.e. it is DML/DDL,
5075
+ * not a SELECT).
5076
+ *
5077
+ * The adapter may surface this as either a native `SqliteError` or a
5078
+ * `TypeError` depending on the drizzle-orm / better-sqlite3 version, so we
5079
+ * accept both types while still requiring the distinctive message substring
5080
+ * to avoid false positives from unrelated errors.
5081
+ */
5082
+ private isSqliteNonQueryError;
5083
+ /**
5084
+ * Execute a SQL query
5085
+ *
5086
+ * Executes a parameterized SQL query using Drizzle's SQL template objects.
5087
+ * This method provides safe parameter binding to prevent SQL injection.
5088
+ *
5089
+ * @param query - Drizzle SQL template object with parameter binding
5090
+ * @returns Query result
5091
+ *
5092
+ * @example
5093
+ * ```typescript
5094
+ * import { sql } from 'drizzle-orm';
5095
+ *
5096
+ * const result = await manager.execute(
5097
+ * sql`SELECT * FROM users WHERE id = ${userId}`
5098
+ * );
5099
+ * ```
5100
+ */
5101
+ execute(query: SQL): Promise<unknown>;
5102
+ /**
5103
+ * Execute a callback with a single dedicated database connection/session.
5104
+ *
5105
+ * This is required for multi-statement transactions so all statements run on
5106
+ * the same underlying connection.
5107
+ */
5108
+ executeInConnection<T>(callback: (execute: (query: SQL) => Promise<unknown>) => Promise<T>): Promise<T>;
5109
+ /**
5110
+ * Get connection pool metrics
5111
+ *
5112
+ * Returns information about the current state of the connection pool.
5113
+ * For SQLite, returns basic connection status since it uses a single connection.
5114
+ *
5115
+ * @returns Pool metrics including total, active, idle, and waiting connections
5116
+ */
5117
+ getPoolMetrics(): {
5118
+ totalCount: number;
5119
+ activeCount: number;
5120
+ idleCount: number;
5121
+ waitingCount: number;
5122
+ };
5123
+ /**
5124
+ * Close the database connection
5125
+ *
5126
+ * This method is public to maintain compatibility with the DatabaseConnection interface
5127
+ * and existing code (e.g., relational-query.ts). For new code, prefer using disconnect()
5128
+ * for connection lifecycle management. Note that disconnect() does NOT clean up event
5129
+ * listeners; call dispose() if you need full cleanup including listener removal.
5130
+ *
5131
+ * Note: This method coordinates with in-flight connect()/initialize() operations
5132
+ * and cancels pending reconnection timers to prevent unexpected reconnections.
5133
+ */
5134
+ close(): Promise<void>;
5135
+ /**
5136
+ * Clean up resources when a connection is cancelled during initialization
5137
+ * This prevents connection leaks when disconnect() is called while initialize() is in-flight
5138
+ */
5139
+ private cleanupCancelledConnection;
5140
+ /**
5141
+ * Check if the connection is healthy
5142
+ * @returns true if connection is healthy, false otherwise
5143
+ */
5144
+ isHealthy(): Promise<boolean>;
5145
+ }
5146
+
5147
+ /**
5148
+ * Transaction helpers for relational databases.
5149
+ * @module query/transaction
5150
+ */
5151
+
5152
+ /**
5153
+ * SQL transaction isolation level.
5154
+ *
5155
+ * Determines the visibility of changes made by concurrent transactions.
5156
+ * Supported by PostgreSQL and MySQL. SQLite supports `'read uncommitted'`
5157
+ * via `PRAGMA read_uncommitted = 1`; other levels are silently ignored
5158
+ * (SQLite uses serializable semantics by default).
5159
+ */
5160
+ type TransactionIsolationLevel = 'read uncommitted' | 'read committed' | 'repeatable read' | 'serializable';
5161
+ /**
5162
+ * Options for configuring a database transaction.
5163
+ *
5164
+ * @property isolationLevel - SQL isolation level for the transaction
5165
+ * @property timeoutMs - Maximum duration in milliseconds before the transaction is rolled back
5166
+ */
5167
+ interface TransactionOptions {
5168
+ isolationLevel?: TransactionIsolationLevel;
5169
+ timeoutMs?: number;
5170
+ }
5171
+ /**
5172
+ * Active transaction handle with savepoint support.
5173
+ *
5174
+ * Extends {@link SqlExecutor} so queries can be executed within the transaction.
5175
+ * The transaction is automatically rolled back if an error occurs and is not
5176
+ * explicitly committed.
5177
+ *
5178
+ * @property id - Unique identifier for this transaction
5179
+ * @property vendor - Database vendor this transaction belongs to
5180
+ */
5181
+ interface TransactionContext extends SqlExecutor {
5182
+ id: string;
5183
+ vendor: DatabaseVendor;
5184
+ /** Whether the transaction is still active (not committed or rolled back). */
5185
+ isActive(): boolean;
5186
+ /** Commit all changes made within this transaction. */
5187
+ commit(): Promise<void>;
5188
+ /** Roll back all changes made within this transaction. */
5189
+ rollback(): Promise<void>;
5190
+ /** Create a savepoint within this transaction. Returns the savepoint name. */
5191
+ createSavepoint(name?: string): Promise<string>;
5192
+ /** Roll back to a previously created savepoint. */
5193
+ rollbackToSavepoint(name: string): Promise<void>;
5194
+ /** Release a savepoint, making its changes permanent within the transaction. */
5195
+ releaseSavepoint(name: string): Promise<void>;
5196
+ /** Execute an operation within a nested savepoint, with automatic rollback on failure. */
5197
+ withSavepoint<T>(operation: (transaction: TransactionContext) => Promise<T>, name?: string): Promise<T>;
5198
+ }
5199
+ /**
5200
+ * Execute a callback inside a database transaction.
5201
+ *
5202
+ * Automatically commits on success and rolls back on failure.
5203
+ */
5204
+ declare function withTransaction<T>(manager: ConnectionManager, operation: (transaction: TransactionContext) => Promise<T>, options?: TransactionOptions): Promise<T>;
5205
+
5206
+ /**
5207
+ * Query executor for relational databases using Drizzle ORM
5208
+ * @module query/query-executor
5209
+ */
5210
+
5211
+ /**
5212
+ * Execution context for raw SQL queries.
5213
+ *
5214
+ * @property transaction - Optional active transaction to execute within
5215
+ */
5216
+ interface QueryExecutionContext {
5217
+ transaction?: TransactionContext;
5218
+ }
5219
+ /**
5220
+ * Execute a parameterized SQL query
5221
+ *
5222
+ * This function executes a SQL query with proper parameter binding to prevent
5223
+ * SQL injection. It supports SELECT, INSERT, UPDATE, DELETE, and other SQL statements.
5224
+ *
5225
+ * @param manager - ConnectionManager instance with initialized database connection
5226
+ * @param input - Query input with SQL string, parameters, and options
5227
+ * @returns Query execution result with rows, row count, and execution time
5228
+ * @throws {Error} If database is not initialized or query execution fails
5229
+ */
5230
+ declare function executeQuery(manager: ConnectionManager, input: QueryInput, context?: QueryExecutionContext): Promise<QueryExecutionResult>;
5231
+
5232
+ /**
5233
+ * Query builder helpers for relational CRUD operations.
5234
+ * @module query/query-builder
5235
+ */
5236
+
5237
+ /**
5238
+ * Supported scalar values for INSERT payloads.
5239
+ */
5240
+ type InsertValue = string | number | boolean | null;
5241
+ /**
5242
+ * One INSERT row payload.
5243
+ */
5244
+ type InsertRow = Record<string, InsertValue>;
5245
+ /**
5246
+ * INSERT payload input shape.
5247
+ */
5248
+ type InsertData = InsertRow | InsertRow[];
5249
+ /**
5250
+ * INSERT RETURNING behavior.
5251
+ */
5252
+ type InsertReturningMode = 'none' | 'id' | 'row';
5253
+ /**
5254
+ * INSERT RETURNING configuration.
5255
+ */
5256
+ interface InsertReturningOptions {
5257
+ mode?: InsertReturningMode;
5258
+ idColumn?: string;
5259
+ }
5260
+ /**
5261
+ * Builder input for INSERT queries.
5262
+ */
5263
+ interface InsertQueryInput {
5264
+ table: string;
5265
+ data: InsertData;
5266
+ returning?: InsertReturningOptions;
5267
+ vendor: DatabaseVendor;
5268
+ }
5269
+ /**
5270
+ * Built INSERT query with normalized metadata used by execution layer.
5271
+ */
5272
+ interface BuiltInsertQuery {
5273
+ query: SQL | SQL[];
5274
+ rows: InsertRow[];
5275
+ returningMode: InsertReturningMode;
5276
+ idColumn: string;
5277
+ supportsReturning: boolean;
5278
+ }
5279
+ /**
5280
+ * Build a safe parameterized INSERT query from structured input.
5281
+ */
5282
+ declare function buildInsertQuery(input: InsertQueryInput): BuiltInsertQuery;
5283
+ /**
5284
+ * Supported scalar values for UPDATE payloads.
5285
+ */
5286
+ type UpdateValue = InsertValue;
5287
+ /**
5288
+ * UPDATE payload shape.
5289
+ */
5290
+ type UpdateData = Record<string, UpdateValue>;
5291
+ /**
5292
+ * WHERE operator types for UPDATE conditions.
5293
+ */
5294
+ type UpdateWhereOperator = 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'like' | 'in' | 'notIn' | 'isNull' | 'isNotNull';
5295
+ /**
5296
+ * WHERE condition for UPDATE queries.
5297
+ */
5298
+ interface UpdateWhereCondition {
5299
+ column: string;
5300
+ operator: UpdateWhereOperator;
5301
+ value?: string | number | boolean | null | Array<string | number>;
5302
+ }
5303
+ /**
5304
+ * Optional optimistic lock condition appended to WHERE.
5305
+ */
5306
+ interface UpdateOptimisticLock {
5307
+ column: string;
5308
+ expectedValue: string | number;
5309
+ }
5310
+ /**
5311
+ * Builder input for UPDATE queries.
5312
+ */
5313
+ interface UpdateQueryInput {
5314
+ table: string;
5315
+ data: UpdateData;
5316
+ where?: UpdateWhereCondition[];
5317
+ allowFullTableUpdate?: boolean;
5318
+ optimisticLock?: UpdateOptimisticLock;
5319
+ vendor: DatabaseVendor;
5320
+ }
5321
+ /**
5322
+ * Built UPDATE query with normalized metadata used by execution layer.
5323
+ */
5324
+ interface BuiltUpdateQuery {
5325
+ query: SQL;
5326
+ whereApplied: boolean;
5327
+ usesOptimisticLock: boolean;
5328
+ }
5329
+ /**
5330
+ * WHERE condition for DELETE queries.
5331
+ */
5332
+ interface DeleteWhereCondition {
5333
+ column: string;
5334
+ operator: UpdateWhereOperator;
5335
+ value?: string | number | boolean | null | Array<string | number>;
5336
+ }
5337
+ /**
5338
+ * Soft-delete configuration.
5339
+ */
5340
+ interface DeleteSoftDeleteOptions {
5341
+ column?: string;
5342
+ value?: string | number;
5343
+ }
5344
+ /**
5345
+ * Builder input for DELETE queries.
5346
+ */
5347
+ interface DeleteQueryInput {
5348
+ table: string;
5349
+ where?: DeleteWhereCondition[];
5350
+ allowFullTableDelete?: boolean;
5351
+ softDelete?: DeleteSoftDeleteOptions;
5352
+ vendor: DatabaseVendor;
5353
+ }
5354
+ /**
5355
+ * Built DELETE query with normalized metadata used by execution layer.
5356
+ */
5357
+ interface BuiltDeleteQuery {
5358
+ query: SQL;
5359
+ whereApplied: boolean;
5360
+ usesSoftDelete: boolean;
5361
+ softDeleteColumn?: string;
5362
+ }
5363
+ /**
5364
+ * Build a safe parameterized UPDATE query from structured input.
5365
+ */
5366
+ declare function buildUpdateQuery(input: UpdateQueryInput): BuiltUpdateQuery;
5367
+ /**
5368
+ * Build a safe parameterized DELETE query from structured input.
5369
+ */
5370
+ declare function buildDeleteQuery(input: DeleteQueryInput): BuiltDeleteQuery;
5371
+ /**
5372
+ * ORDER BY direction for SELECT queries.
5373
+ */
5374
+ type SelectOrderDirection = 'asc' | 'desc';
5375
+ /**
5376
+ * ORDER BY clause for SELECT queries.
5377
+ */
5378
+ interface SelectOrderBy {
5379
+ column: string;
5380
+ direction: SelectOrderDirection;
5381
+ }
5382
+ /**
5383
+ * WHERE condition for SELECT queries.
5384
+ */
5385
+ interface SelectWhereCondition {
5386
+ column: string;
5387
+ operator: UpdateWhereOperator;
5388
+ value?: string | number | boolean | null | Array<string | number>;
5389
+ }
5390
+ /**
5391
+ * Builder input for SELECT queries.
5392
+ */
5393
+ interface SelectQueryInput {
5394
+ table: string;
5395
+ columns?: string[];
5396
+ where?: SelectWhereCondition[];
5397
+ orderBy?: SelectOrderBy[];
5398
+ limit?: number;
5399
+ offset?: number;
5400
+ vendor: DatabaseVendor;
5401
+ }
5402
+ /**
5403
+ * Build a safe parameterized SELECT query from structured input.
5404
+ */
5405
+ declare function buildSelectQuery(input: SelectQueryInput): SQL;
5406
+
5407
+ /**
5408
+ * Generic batch execution helpers for relational operations.
5409
+ * @module query/batch-executor
5410
+ */
5411
+ /** Default number of items processed per batch chunk. */
5412
+ declare const DEFAULT_BATCH_SIZE = 100;
5413
+ /** Maximum allowed batch size to prevent memory exhaustion. */
5414
+ declare const MAX_BATCH_SIZE = 5000;
5415
+ /**
5416
+ * Progress payload emitted after each processed batch.
5417
+ */
5418
+ interface BatchProgressUpdate {
5419
+ operation: string;
5420
+ batchIndex: number;
5421
+ totalBatches: number;
5422
+ batchSize: number;
5423
+ processedItems: number;
5424
+ totalItems: number;
5425
+ successfulItems: number;
5426
+ failedItems: number;
5427
+ lastBatchSucceeded: boolean;
5428
+ }
5429
+ /**
5430
+ * Recorded batch failure metadata.
5431
+ */
5432
+ interface BatchFailureDetail {
5433
+ operation: string;
5434
+ batchIndex: number;
5435
+ batchSize: number;
5436
+ attempts: number;
5437
+ error: string;
5438
+ }
5439
+ /**
5440
+ * Runtime options for batched execution.
5441
+ */
5442
+ interface BatchExecutionOptions {
5443
+ batchSize?: number;
5444
+ continueOnError?: boolean;
5445
+ maxRetries?: number;
5446
+ retryDelayMs?: number;
5447
+ onProgress?: (progress: BatchProgressUpdate) => Promise<void> | void;
5448
+ }
5449
+ /**
5450
+ * Task descriptor for generic batched execution.
5451
+ */
5452
+ interface BatchExecutionTask<TItem, TResult> {
5453
+ operation: string;
5454
+ items: TItem[];
5455
+ executeBatch: (batchItems: TItem[], batchIndex: number) => Promise<TResult>;
5456
+ getBatchSuccessCount?: (result: TResult, batchItems: TItem[]) => number;
5457
+ }
5458
+ /**
5459
+ * Batched execution summary.
5460
+ */
5461
+ interface BatchExecutionResult<TResult> {
5462
+ results: TResult[];
5463
+ totalItems: number;
5464
+ processedItems: number;
5465
+ successfulItems: number;
5466
+ failedItems: number;
5467
+ totalBatches: number;
5468
+ retries: number;
5469
+ partialSuccess: boolean;
5470
+ executionTime: number;
5471
+ failures: BatchFailureDetail[];
5472
+ }
5473
+ /**
5474
+ * Synthetic benchmark output comparing individual and batched processing.
5475
+ */
5476
+ interface BatchBenchmarkResult {
5477
+ itemCount: number;
5478
+ batchSize: number;
5479
+ batchCount: number;
5480
+ individualExecutionTime: number;
5481
+ batchedExecutionTime: number;
5482
+ timeSavedMs: number;
5483
+ speedupRatio: number;
5484
+ speedupPercent: number;
5485
+ }
5486
+ /**
5487
+ * Execute operation items in batches with retry and progress callbacks.
5488
+ */
5489
+ declare function executeBatchedTask<TItem, TResult>(task: BatchExecutionTask<TItem, TResult>, options?: BatchExecutionOptions): Promise<BatchExecutionResult<TResult>>;
5490
+ /**
5491
+ * Benchmark individual vs batched execution.
5492
+ *
5493
+ * Note: callers should run this only for idempotent or isolated workloads.
5494
+ */
5495
+ declare function benchmarkBatchExecution<TItem, TIndividualResult, TBatchResult>(params: {
5496
+ items: TItem[];
5497
+ batchSize?: number;
5498
+ runIndividual: (item: TItem, index: number) => Promise<TIndividualResult>;
5499
+ runBatch: (batchItems: TItem[], batchIndex: number) => Promise<TBatchResult>;
5500
+ }): Promise<BatchBenchmarkResult>;
5501
+
5502
+ /**
5503
+ * Streaming SELECT executor for large result sets.
5504
+ * @module query/stream-executor
5505
+ */
5506
+
5507
+ /** Default number of rows fetched per streaming chunk. */
5508
+ declare const DEFAULT_CHUNK_SIZE = 100;
5509
+ /**
5510
+ * Memory usage information captured during streaming execution.
5511
+ */
5512
+ interface StreamingMemoryUsage$1 {
5513
+ startHeapUsed: number;
5514
+ peakHeapUsed: number;
5515
+ endHeapUsed: number;
5516
+ deltaHeapUsed: number;
5517
+ }
5518
+ /**
5519
+ * One streamed chunk payload.
5520
+ */
5521
+ interface StreamingSelectChunk {
5522
+ chunkIndex: number;
5523
+ offset: number;
5524
+ rows: unknown[];
5525
+ }
5526
+ /**
5527
+ * Streaming execution options.
5528
+ */
5529
+ interface StreamingSelectOptions {
5530
+ chunkSize?: number;
5531
+ maxRows?: number;
5532
+ sampleSize?: number;
5533
+ collectAllRows?: boolean;
5534
+ signal?: AbortSignal;
5535
+ onChunk?: (chunk: StreamingSelectChunk) => Promise<void> | void;
5536
+ }
5537
+ /**
5538
+ * Streaming execution result.
5539
+ */
5540
+ interface StreamingSelectResult {
5541
+ rows: unknown[];
5542
+ rowCount: number;
5543
+ chunkCount: number;
5544
+ executionTime: number;
5545
+ cancelled: boolean;
5546
+ memoryUsage: StreamingMemoryUsage$1;
5547
+ }
5548
+ /**
5549
+ * Optional benchmark result comparing regular vs streaming SELECT execution.
5550
+ */
5551
+ interface StreamingBenchmarkResult {
5552
+ nonStreamingExecutionTime: number;
5553
+ nonStreamingPeakHeapUsed: number;
5554
+ streamingExecutionTime: number;
5555
+ streamingPeakHeapUsed: number;
5556
+ memorySavedBytes: number;
5557
+ memorySavedPercent: number;
5558
+ }
5559
+ /**
5560
+ * Yield SELECT rows chunk-by-chunk using LIMIT/OFFSET pagination.
5561
+ *
5562
+ * NOTE:
5563
+ * OFFSET-based pagination can degrade on very large offsets because many SQL
5564
+ * engines must scan/skip intermediate rows. For very large datasets, prefer
5565
+ * keyset/cursor pagination when available.
5566
+ */
5567
+ declare function streamSelectChunks(executor: SqlExecutor, input: SelectQueryInput, options?: StreamingSelectOptions): AsyncGenerator<StreamingSelectChunk>;
5568
+ /**
5569
+ * Create a Node.js Readable stream that emits SELECT chunks in object mode.
5570
+ */
5571
+ declare function createSelectReadableStream(executor: SqlExecutor, input: SelectQueryInput, options?: StreamingSelectOptions): Readable;
5572
+ /**
5573
+ * Execute a SELECT query in streaming mode while tracking memory usage.
5574
+ */
5575
+ declare function executeStreamingSelect(executor: SqlExecutor, input: SelectQueryInput, options?: StreamingSelectOptions): Promise<StreamingSelectResult>;
5576
+ /**
5577
+ * Benchmark memory usage of regular SELECT execution vs streaming execution.
5578
+ *
5579
+ * NOTE:
5580
+ * This benchmark intentionally executes the SELECT query twice (one regular,
5581
+ * one streaming). Use only with side-effect-free queries.
5582
+ */
5583
+ declare function benchmarkStreamingSelectMemory(executor: SqlExecutor, input: SelectQueryInput, options?: StreamingSelectOptions): Promise<StreamingBenchmarkResult>;
5584
+
5585
+ /**
5586
+ * Type definitions for relational schema introspection.
5587
+ * @module schema/types
5588
+ */
5589
+
5590
+ /**
5591
+ * Foreign key definition for a table column.
5592
+ */
5593
+ interface ForeignKeySchema {
5594
+ name?: string;
5595
+ column: string;
5596
+ referencedTable: string;
5597
+ referencedColumn: string;
5598
+ referencedSchema?: string;
5599
+ }
5600
+ /**
5601
+ * Index definition for a table.
5602
+ */
5603
+ interface IndexSchema {
5604
+ name: string;
5605
+ columns: string[];
5606
+ isUnique: boolean;
5607
+ }
5608
+ /**
5609
+ * Column definition for a table.
5610
+ */
5611
+ interface ColumnSchema {
5612
+ name: string;
5613
+ type: string;
5614
+ isNullable: boolean;
5615
+ defaultValue: unknown;
5616
+ isPrimaryKey: boolean;
5617
+ }
5618
+ /**
5619
+ * Table schema definition.
5620
+ */
5621
+ interface TableSchema {
5622
+ name: string;
5623
+ schema?: string;
5624
+ columns: ColumnSchema[];
5625
+ primaryKey: string[];
5626
+ foreignKeys: ForeignKeySchema[];
5627
+ indexes: IndexSchema[];
5628
+ }
5629
+ /**
5630
+ * Introspected database schema.
5631
+ */
5632
+ interface DatabaseSchema {
5633
+ vendor: DatabaseVendor;
5634
+ tables: TableSchema[];
5635
+ generatedAt: string;
5636
+ }
5637
+ /**
5638
+ * Runtime options for schema introspection.
5639
+ */
5640
+ interface SchemaInspectOptions {
5641
+ tables?: string[];
5642
+ bypassCache?: boolean;
5643
+ }
5644
+ /**
5645
+ * Schema inspector configuration.
5646
+ */
5647
+ interface SchemaInspectorConfig {
5648
+ cacheTtlMs?: number;
5649
+ cacheKey?: string;
5650
+ }
5651
+
5652
+ /**
5653
+ * Schema inspector for relational databases.
5654
+ * @module schema/schema-inspector
5655
+ */
5656
+
5657
+ /**
5658
+ * Inspects database schemas across PostgreSQL, MySQL, and SQLite.
5659
+ *
5660
+ * Retrieves table, column, index, and foreign key metadata with built-in
5661
+ * caching support. Use {@link SchemaInspector.clearCache} to invalidate
5662
+ * cached schemas.
5663
+ */
5664
+ declare class SchemaInspector {
5665
+ private readonly manager;
5666
+ private readonly vendor;
5667
+ private readonly cacheTtlMs;
5668
+ private readonly cacheKey?;
5669
+ /**
5670
+ * Create a new SchemaInspector.
5671
+ *
5672
+ * @param manager - ConnectionManager instance for database access
5673
+ * @param vendor - Database vendor ('postgresql' | 'mysql' | 'sqlite')
5674
+ * @param config - Optional configuration for cache TTL and cache key
5675
+ */
5676
+ constructor(manager: ConnectionManager, vendor: DatabaseVendor, config?: SchemaInspectorConfig);
5677
+ /**
5678
+ * Clear cached schema data.
5679
+ *
5680
+ * @param cacheKey - Specific cache key to clear. If omitted, clears all cached schemas.
5681
+ */
5682
+ static clearCache(cacheKey?: string): void;
5683
+ /** Invalidate this inspector's cached schema, if any. */
5684
+ invalidateCache(): void;
5685
+ /**
5686
+ * Inspect the database schema and return structured metadata.
5687
+ *
5688
+ * Results are cached when a `cacheKey` was provided at construction time.
5689
+ *
5690
+ * @param options - Optional table filters and cache bypass flag
5691
+ * @returns Structured schema with tables, columns, indexes, and foreign keys
5692
+ */
5693
+ inspect(options?: SchemaInspectOptions): Promise<DatabaseSchema>;
5694
+ private inspectFromDatabase;
5695
+ private runQueryRows;
5696
+ private createTableMap;
5697
+ private getTableFromRow;
5698
+ private inspectPostgreSQL;
5699
+ private inspectMySQL;
5700
+ private inspectSQLite;
5701
+ private applyIndexRows;
5702
+ }
5703
+
5704
+ /**
5705
+ * Schema metadata validation utilities.
5706
+ *
5707
+ * Validates table existence, column existence, and column types
5708
+ * against an introspected {@link DatabaseSchema}.
5709
+ *
5710
+ * @module schema/schema-validator
5711
+ */
5712
+
5713
+ /**
5714
+ * Result of a schema validation check.
5715
+ */
5716
+ interface ValidationResult {
5717
+ /** Whether the validation passed */
5718
+ valid: boolean;
5719
+ /** Error messages (empty when valid) */
5720
+ errors: string[];
5721
+ }
5722
+ /**
5723
+ * Validate that a table exists in the database schema.
5724
+ *
5725
+ * Supports both plain table names (`users`) and schema-qualified names (`public.users`).
5726
+ *
5727
+ * @param schema - The introspected database schema
5728
+ * @param tableName - Table name to check (plain or schema-qualified)
5729
+ * @returns Validation result
5730
+ */
5731
+ declare function validateTableExists(schema: DatabaseSchema, tableName: string): ValidationResult;
5732
+ /**
5733
+ * Validate that one or more columns exist in a table.
5734
+ *
5735
+ * @param schema - The introspected database schema
5736
+ * @param tableName - Table that should contain the columns
5737
+ * @param columnNames - Column names to verify
5738
+ * @returns Validation result
5739
+ */
5740
+ declare function validateColumnsExist(schema: DatabaseSchema, tableName: string, columnNames: string[]): ValidationResult;
5741
+ /**
5742
+ * Validate that columns in a table match expected types.
5743
+ *
5744
+ * Type matching is case-insensitive and uses substring containment:
5745
+ * a match succeeds when either string contains the other. For example
5746
+ * `varchar` matches `varchar(255)` (the actual type contains the expected
5747
+ * string), but `varchar` does **not** match `character varying` because
5748
+ * neither is a substring of the other.
5749
+ *
5750
+ * @param schema - The introspected database schema
5751
+ * @param tableName - Table to validate against
5752
+ * @param expectedTypes - Map of column name → expected type substring
5753
+ * @returns Validation result
5754
+ */
5755
+ declare function validateColumnTypes(schema: DatabaseSchema, tableName: string, expectedTypes: Record<string, string>): ValidationResult;
5756
+
5757
+ /**
5758
+ * Database type → TypeScript type mapper.
5759
+ *
5760
+ * Maps vendor-specific SQL column types to their closest TypeScript
5761
+ * equivalents. Used for code generation hints, documentation, and
5762
+ * schema-aware validation utilities.
5763
+ *
5764
+ * @module schema/type-mapper
5765
+ */
5766
+
5767
+ /**
5768
+ * TypeScript type representation for a mapped database column.
5769
+ */
5770
+ interface MappedType {
5771
+ /** The TypeScript type string (e.g. `string`, `number`, `boolean`) */
5772
+ tsType: string;
5773
+ /** Whether the column is nullable (adds `| null`) */
5774
+ nullable: boolean;
5775
+ /** The original database type string */
5776
+ dbType: string;
5777
+ /** Optional notes about precision loss, range, etc. */
5778
+ notes?: string;
5779
+ }
5780
+ /**
5781
+ * Map a single database column type to its TypeScript equivalent.
5782
+ *
5783
+ * Normalises the input type to lower-case and strips size suffixes
5784
+ * (e.g. `varchar(255)` → `varchar`) before looking up the mapping.
5785
+ *
5786
+ * @param vendor - Database vendor
5787
+ * @param dbType - The raw column type string from the database
5788
+ * @param nullable - Whether the column is nullable
5789
+ * @returns The mapped TypeScript type information
5790
+ */
5791
+ declare function mapColumnType(vendor: DatabaseVendor, dbType: string, nullable?: boolean): MappedType;
5792
+ /**
5793
+ * Map all columns in a database schema to TypeScript types.
5794
+ *
5795
+ * Returns a nested map: `tableName → columnName → MappedType`.
5796
+ *
5797
+ * @param vendor - Database vendor
5798
+ * @param columns - Array of columns with their metadata
5799
+ * @returns Nested map from table to column to mapped type
5800
+ */
5801
+ declare function mapSchemaTypes(vendor: DatabaseVendor, columns: Array<{
5802
+ table: string;
5803
+ name: string;
5804
+ type: string;
5805
+ nullable: boolean;
5806
+ }>): Map<string, Map<string, MappedType>>;
5807
+ /**
5808
+ * Get the full type map for a vendor (useful for documentation / tooling).
5809
+ *
5810
+ * @param vendor - Database vendor
5811
+ * @returns Read-only copy of the vendor's type mapping table
5812
+ */
5813
+ declare function getVendorTypeMap(vendor: DatabaseVendor): Readonly<Record<string, string>>;
5814
+
5815
+ /**
5816
+ * Schema diff and serialisation utilities.
5817
+ *
5818
+ * Compare two {@link DatabaseSchema} instances and produce a structured
5819
+ * diff report. Also provide JSON export / import for snapshot testing
5820
+ * and cross-environment schema comparison.
5821
+ *
5822
+ * @module schema/schema-diff
5823
+ */
5824
+
5825
+ /** Describes a difference for a single column. */
5826
+ interface ColumnDiff {
5827
+ column: string;
5828
+ type: 'added' | 'removed' | 'changed';
5829
+ /** Present when type is `changed` */
5830
+ changes?: Array<{
5831
+ property: string;
5832
+ before: unknown;
5833
+ after: unknown;
5834
+ }>;
5835
+ }
5836
+ /** Describes a difference for a single table. */
5837
+ interface TableDiff {
5838
+ table: string;
5839
+ type: 'added' | 'removed' | 'changed';
5840
+ /** Present when type is `changed` — per-column changes */
5841
+ columns?: ColumnDiff[];
5842
+ /** Present when type is `changed` — primary-key changes */
5843
+ primaryKeyChanged?: {
5844
+ before: string[];
5845
+ after: string[];
5846
+ };
5847
+ }
5848
+ /** Full diff report between two schemas. */
5849
+ interface SchemaDiffResult {
5850
+ /** Whether the schemas are identical */
5851
+ identical: boolean;
5852
+ /** Per-table differences */
5853
+ tables: TableDiff[];
5854
+ /** Summary counts */
5855
+ summary: {
5856
+ tablesAdded: number;
5857
+ tablesRemoved: number;
5858
+ tablesChanged: number;
5859
+ columnsAdded: number;
5860
+ columnsRemoved: number;
5861
+ columnsChanged: number;
5862
+ };
5863
+ }
5864
+ /**
5865
+ * Compare two database schemas and return a structured diff report.
5866
+ *
5867
+ * The comparison is name-based and case-insensitive. Schema-qualified
5868
+ * names are supported (e.g. `public.users`).
5869
+ *
5870
+ * @param before - The baseline schema
5871
+ * @param after - The schema to compare against the baseline
5872
+ * @returns A structured diff report
5873
+ */
5874
+ declare function diffSchemas(before: DatabaseSchema, after: DatabaseSchema): SchemaDiffResult;
5875
+ /**
5876
+ * Export a {@link DatabaseSchema} to a JSON string.
5877
+ *
5878
+ * The output is deterministic (keys sorted, 2-space indent) so that it
5879
+ * can be used for snapshot testing.
5880
+ *
5881
+ * @param schema - The schema to serialise
5882
+ * @returns Pretty-printed JSON string
5883
+ */
5884
+ declare function exportSchemaToJson(schema: DatabaseSchema): string;
5885
+ /**
5886
+ * Import a {@link DatabaseSchema} from a JSON string.
5887
+ *
5888
+ * Performs basic structural validation to ensure the parsed object has the
5889
+ * required shape.
5890
+ *
5891
+ * @param json - JSON string produced by {@link exportSchemaToJson}
5892
+ * @returns Parsed database schema
5893
+ * @throws Error when the JSON is not a valid DatabaseSchema
5894
+ */
5895
+ declare function importSchemaFromJson(json: string): DatabaseSchema;
5896
+
5897
+ /**
5898
+ * Relational Query Tool - Execute raw SQL queries with parameter binding
5899
+ * @module tools/relational-query
2415
5900
  */
2416
5901
  /**
2417
- * Create array map tool
5902
+ * Relational Query Tool
5903
+ *
5904
+ * Executes raw SQL queries against relational databases (PostgreSQL, MySQL, SQLite)
5905
+ * with proper parameter binding to prevent SQL injection.
5906
+ *
5907
+ * Features:
5908
+ * - Supports SELECT, INSERT, UPDATE, DELETE, and other SQL statements
5909
+ * - Parameter binding prevents SQL injection
5910
+ * - Supports positional ($1, ?) and named (:name) parameters
5911
+ * - Result formatting to JSON
5912
+ * - Error handling with sanitized messages
5913
+ *
5914
+ * @example
5915
+ * ```typescript
5916
+ * // SELECT with positional parameters
5917
+ * const result = await relationalQuery.invoke({
5918
+ * sql: 'SELECT * FROM users WHERE id = $1',
5919
+ * params: [42],
5920
+ * vendor: 'postgresql',
5921
+ * connectionString: 'postgresql://user:pass@localhost:5432/mydb'
5922
+ * });
5923
+ *
5924
+ * // INSERT with named parameters
5925
+ * const result = await relationalQuery.invoke({
5926
+ * sql: 'INSERT INTO users (name, email) VALUES (:name, :email)',
5927
+ * params: { name: 'John Doe', email: 'john@example.com' },
5928
+ * vendor: 'postgresql',
5929
+ * connectionString: 'postgresql://user:pass@localhost:5432/mydb'
5930
+ * });
5931
+ * ```
2418
5932
  */
2419
- declare function createArrayMapTool(): _agentforge_core.Tool<{
2420
- array: any[];
2421
- properties: string[];
5933
+ declare const relationalQuery: _agentforge_core.Tool<{
5934
+ connectionString: string;
5935
+ vendor: "postgresql" | "mysql" | "sqlite";
5936
+ sql: string;
5937
+ params?: unknown[] | Record<string, unknown> | undefined;
2422
5938
  }, {
2423
- mapped: any[];
2424
- count: number;
5939
+ success: boolean;
5940
+ rows: unknown[];
5941
+ rowCount: number;
5942
+ executionTime: number;
5943
+ error?: undefined;
5944
+ } | {
5945
+ success: boolean;
5946
+ error: string;
5947
+ rows: never[];
5948
+ rowCount: number;
5949
+ executionTime?: undefined;
2425
5950
  }>;
2426
5951
 
2427
5952
  /**
2428
- * Array Sort Tool
5953
+ * Type definitions for relational SELECT operations
5954
+ * @module tools/relational-select/types
2429
5955
  */
5956
+
5957
+ /** Re-export of streaming memory usage type from the query layer. */
5958
+ type StreamingMemoryUsage = StreamingMemoryUsage$1;
2430
5959
  /**
2431
- * Create array sort tool
5960
+ * Optional streaming benchmark metadata.
2432
5961
  */
2433
- declare function createArraySortTool(): _agentforge_core.Tool<{
2434
- array: any[];
2435
- property: string;
2436
- order?: "asc" | "desc" | undefined;
2437
- }, {
2438
- sorted: any[];
2439
- count: number;
2440
- }>;
2441
-
5962
+ type StreamingBenchmarkMetadata = StreamingBenchmarkResult;
2442
5963
  /**
2443
- * Array Group By Tool
5964
+ * Streaming execution metadata.
2444
5965
  */
5966
+ interface StreamingMetadata {
5967
+ enabled: true;
5968
+ chunkSize: number;
5969
+ chunkCount: number;
5970
+ sampledRowCount: number;
5971
+ streamedRowCount: number;
5972
+ cancelled: boolean;
5973
+ memoryUsage: StreamingMemoryUsage;
5974
+ benchmark?: StreamingBenchmarkMetadata;
5975
+ }
2445
5976
  /**
2446
- * Create array group by tool
5977
+ * Tool success response
2447
5978
  */
2448
- declare function createArrayGroupByTool(): _agentforge_core.Tool<{
2449
- array: any[];
2450
- property: string;
2451
- }, {
2452
- groups: Record<string, any[]>;
2453
- groupCount: number;
2454
- totalItems: number;
2455
- }>;
2456
-
5979
+ interface SelectSuccessResponse {
5980
+ success: true;
5981
+ rows: unknown[];
5982
+ rowCount: number;
5983
+ executionTime: number;
5984
+ streaming?: StreamingMetadata;
5985
+ }
2457
5986
  /**
2458
- * Object Pick Tool
5987
+ * Tool error response
2459
5988
  */
5989
+ interface SelectErrorResponse {
5990
+ success: false;
5991
+ error: string;
5992
+ rows: [];
5993
+ rowCount: 0;
5994
+ }
2460
5995
  /**
2461
- * Create object pick tool
5996
+ * Tool response (success or error)
2462
5997
  */
2463
- declare function createObjectPickTool(): _agentforge_core.Tool<{
2464
- object: Record<string, any>;
2465
- properties: string[];
2466
- }, Record<string, any>>;
5998
+ type SelectResponse = SelectSuccessResponse | SelectErrorResponse;
2467
5999
 
2468
6000
  /**
2469
- * Object Omit Tool
6001
+ * Relational SELECT Tool
6002
+ *
6003
+ * Execute type-safe SELECT queries using Drizzle ORM query builder.
6004
+ *
6005
+ * Features:
6006
+ * - Type-safe column selection
6007
+ * - WHERE conditions with multiple operators
6008
+ * - ORDER BY with ascending/descending
6009
+ * - LIMIT and OFFSET for pagination
6010
+ * - Optional chunked streaming mode for large result sets
6011
+ * - Result formatting to JSON
6012
+ * - Error handling with clear messages
6013
+ *
6014
+ * @example
6015
+ * ```typescript
6016
+ * // SELECT with WHERE and ORDER BY
6017
+ * const result = await relationalSelect.invoke({
6018
+ * table: 'users',
6019
+ * columns: ['id', 'name', 'email'],
6020
+ * where: [
6021
+ * { column: 'status', operator: 'eq', value: 'active' },
6022
+ * { column: 'age', operator: 'gte', value: 18 }
6023
+ * ],
6024
+ * orderBy: [{ column: 'name', direction: 'asc' }],
6025
+ * limit: 10,
6026
+ * vendor: 'postgresql',
6027
+ * connectionString: 'postgresql://user:pass@localhost:5432/mydb'
6028
+ * });
6029
+ * ```
2470
6030
  */
6031
+ declare const relationalSelect: _agentforge_core.Tool<{
6032
+ table: string;
6033
+ connectionString: string;
6034
+ vendor: "postgresql" | "mysql" | "sqlite";
6035
+ limit?: number | undefined;
6036
+ columns?: string[] | undefined;
6037
+ where?: {
6038
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "like" | "in" | "notIn" | "isNull" | "isNotNull";
6039
+ column: string;
6040
+ value?: string | number | boolean | (string | number)[] | null | undefined;
6041
+ }[] | undefined;
6042
+ orderBy?: {
6043
+ direction: "asc" | "desc";
6044
+ column: string;
6045
+ }[] | undefined;
6046
+ offset?: number | undefined;
6047
+ streaming?: {
6048
+ enabled?: boolean | undefined;
6049
+ maxRows?: number | undefined;
6050
+ chunkSize?: number | undefined;
6051
+ sampleSize?: number | undefined;
6052
+ benchmark?: boolean | undefined;
6053
+ } | undefined;
6054
+ }, SelectResponse>;
6055
+
2471
6056
  /**
2472
- * Create object omit tool
6057
+ * Type definitions for relational INSERT operations
6058
+ * @module tools/relational-insert/types
2473
6059
  */
2474
- declare function createObjectOmitTool(): _agentforge_core.Tool<{
2475
- object: Record<string, any>;
2476
- properties: string[];
2477
- }, Record<string, any>>;
2478
6060
 
2479
6061
  /**
2480
- * Default array filter tool instance
6062
+ * Batch metadata returned by INSERT execution when batch mode is active.
2481
6063
  */
2482
- declare const arrayFilter: _agentforge_core.Tool<{
2483
- array: any[];
2484
- property: string;
2485
- operator: "equals" | "not-equals" | "greater-than" | "less-than" | "contains" | "starts-with" | "ends-with";
2486
- value?: any;
2487
- }, {
2488
- filtered: any[];
2489
- originalCount: number;
2490
- filteredCount: number;
2491
- }>;
6064
+ interface InsertBatchMetadata {
6065
+ enabled: boolean;
6066
+ batchSize: number;
6067
+ totalItems: number;
6068
+ processedItems: number;
6069
+ successfulItems: number;
6070
+ failedItems: number;
6071
+ totalBatches: number;
6072
+ retries: number;
6073
+ partialSuccess: boolean;
6074
+ failures: BatchFailureDetail[];
6075
+ benchmark?: BatchBenchmarkResult;
6076
+ }
2492
6077
  /**
2493
- * Default array map tool instance
6078
+ * Tool success response.
2494
6079
  */
2495
- declare const arrayMap: _agentforge_core.Tool<{
2496
- array: any[];
2497
- properties: string[];
2498
- }, {
2499
- mapped: any[];
2500
- count: number;
2501
- }>;
6080
+ interface InsertSuccessResponse {
6081
+ success: true;
6082
+ rowCount: number;
6083
+ insertedIds: Array<number | string>;
6084
+ rows: unknown[];
6085
+ executionTime: number;
6086
+ batch?: InsertBatchMetadata;
6087
+ }
2502
6088
  /**
2503
- * Default array sort tool instance
6089
+ * Tool error response.
2504
6090
  */
2505
- declare const arraySort: _agentforge_core.Tool<{
2506
- array: any[];
2507
- property: string;
2508
- order?: "asc" | "desc" | undefined;
2509
- }, {
2510
- sorted: any[];
2511
- count: number;
2512
- }>;
6091
+ interface InsertErrorResponse {
6092
+ success: false;
6093
+ error: string;
6094
+ rowCount: 0;
6095
+ insertedIds: [];
6096
+ rows: [];
6097
+ }
2513
6098
  /**
2514
- * Default array group by tool instance
6099
+ * Tool response (success or error).
2515
6100
  */
2516
- declare const arrayGroupBy: _agentforge_core.Tool<{
2517
- array: any[];
2518
- property: string;
2519
- }, {
2520
- groups: Record<string, any[]>;
2521
- groupCount: number;
6101
+ type InsertResponse = InsertSuccessResponse | InsertErrorResponse;
6102
+
6103
+ /**
6104
+ * Relational INSERT Tool
6105
+ *
6106
+ * Execute type-safe INSERT queries using Drizzle ORM query builder.
6107
+ */
6108
+ declare const relationalInsert: _agentforge_core.Tool<{
6109
+ data: Record<string, string | number | boolean | null> | Record<string, string | number | boolean | null>[];
6110
+ table: string;
6111
+ connectionString: string;
6112
+ vendor: "postgresql" | "mysql" | "sqlite";
6113
+ batch?: {
6114
+ enabled?: boolean | undefined;
6115
+ batchSize?: number | undefined;
6116
+ maxRetries?: number | undefined;
6117
+ retryDelayMs?: number | undefined;
6118
+ continueOnError?: boolean | undefined;
6119
+ benchmark?: boolean | undefined;
6120
+ } | undefined;
6121
+ returning?: {
6122
+ mode?: "row" | "none" | "id" | undefined;
6123
+ idColumn?: string | undefined;
6124
+ } | undefined;
6125
+ }, InsertResponse>;
6126
+
6127
+ /**
6128
+ * Type definitions for relational UPDATE operations
6129
+ * @module tools/relational-update/types
6130
+ */
6131
+
6132
+ /**
6133
+ * Batch metadata returned by UPDATE execution when batch mode is active.
6134
+ */
6135
+ interface UpdateBatchMetadata {
6136
+ enabled: boolean;
6137
+ batchSize: number;
2522
6138
  totalItems: number;
2523
- }>;
6139
+ processedItems: number;
6140
+ successfulItems: number;
6141
+ failedItems: number;
6142
+ totalBatches: number;
6143
+ retries: number;
6144
+ partialSuccess: boolean;
6145
+ failures: BatchFailureDetail[];
6146
+ benchmark?: BatchBenchmarkResult;
6147
+ }
2524
6148
  /**
2525
- * Default object pick tool instance
6149
+ * Tool success response.
2526
6150
  */
2527
- declare const objectPick: _agentforge_core.Tool<{
2528
- object: Record<string, any>;
2529
- properties: string[];
2530
- }, Record<string, any>>;
6151
+ interface UpdateSuccessResponse {
6152
+ success: true;
6153
+ rowCount: number;
6154
+ executionTime: number;
6155
+ batch?: UpdateBatchMetadata;
6156
+ }
2531
6157
  /**
2532
- * Default object omit tool instance
6158
+ * Tool error response.
2533
6159
  */
2534
- declare const objectOmit: _agentforge_core.Tool<{
2535
- object: Record<string, any>;
2536
- properties: string[];
2537
- }, Record<string, any>>;
6160
+ interface UpdateErrorResponse {
6161
+ success: false;
6162
+ error: string;
6163
+ rowCount: 0;
6164
+ }
2538
6165
  /**
2539
- * All transformer tools
6166
+ * Tool response (success or error).
2540
6167
  */
2541
- declare const transformerTools: (_agentforge_core.Tool<{
2542
- array: any[];
2543
- property: string;
2544
- operator: "equals" | "not-equals" | "greater-than" | "less-than" | "contains" | "starts-with" | "ends-with";
2545
- value?: any;
2546
- }, {
2547
- filtered: any[];
2548
- originalCount: number;
2549
- filteredCount: number;
2550
- }> | _agentforge_core.Tool<{
2551
- array: any[];
2552
- properties: string[];
2553
- }, {
2554
- mapped: any[];
2555
- count: number;
2556
- }> | _agentforge_core.Tool<{
2557
- array: any[];
2558
- property: string;
2559
- order?: "asc" | "desc" | undefined;
2560
- }, {
2561
- sorted: any[];
2562
- count: number;
2563
- }> | _agentforge_core.Tool<{
2564
- array: any[];
2565
- property: string;
2566
- }, {
2567
- groups: Record<string, any[]>;
2568
- groupCount: number;
6168
+ type UpdateResponse = UpdateSuccessResponse | UpdateErrorResponse;
6169
+
6170
+ /**
6171
+ * Relational UPDATE Tool
6172
+ *
6173
+ * Execute type-safe UPDATE queries using Drizzle ORM query builder.
6174
+ */
6175
+ declare const relationalUpdate: _agentforge_core.Tool<{
6176
+ table: string;
6177
+ connectionString: string;
6178
+ vendor: "postgresql" | "mysql" | "sqlite";
6179
+ data?: Record<string, string | number | boolean | null> | undefined;
6180
+ where?: {
6181
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "like" | "in" | "notIn" | "isNull" | "isNotNull";
6182
+ column: string;
6183
+ value?: string | number | boolean | (string | number)[] | null | undefined;
6184
+ }[] | undefined;
6185
+ batch?: {
6186
+ enabled?: boolean | undefined;
6187
+ batchSize?: number | undefined;
6188
+ maxRetries?: number | undefined;
6189
+ retryDelayMs?: number | undefined;
6190
+ continueOnError?: boolean | undefined;
6191
+ benchmark?: boolean | undefined;
6192
+ } | undefined;
6193
+ allowFullTableUpdate?: boolean | undefined;
6194
+ optimisticLock?: {
6195
+ column: string;
6196
+ expectedValue: string | number;
6197
+ } | undefined;
6198
+ operations?: {
6199
+ data: Record<string, string | number | boolean | null>;
6200
+ where?: {
6201
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "like" | "in" | "notIn" | "isNull" | "isNotNull";
6202
+ column: string;
6203
+ value?: string | number | boolean | (string | number)[] | null | undefined;
6204
+ }[] | undefined;
6205
+ allowFullTableUpdate?: boolean | undefined;
6206
+ optimisticLock?: {
6207
+ column: string;
6208
+ expectedValue: string | number;
6209
+ } | undefined;
6210
+ }[] | undefined;
6211
+ }, UpdateResponse>;
6212
+
6213
+ /**
6214
+ * Type definitions for relational DELETE operations
6215
+ * @module tools/relational-delete/types
6216
+ */
6217
+
6218
+ /** Metadata returned after a batched DELETE operation completes. */
6219
+ interface DeleteBatchMetadata {
6220
+ enabled: boolean;
6221
+ batchSize: number;
2569
6222
  totalItems: number;
2570
- }> | _agentforge_core.Tool<{
2571
- object: Record<string, any>;
2572
- properties: string[];
2573
- }, Record<string, any>>)[];
6223
+ processedItems: number;
6224
+ successfulItems: number;
6225
+ failedItems: number;
6226
+ totalBatches: number;
6227
+ retries: number;
6228
+ partialSuccess: boolean;
6229
+ failures: BatchFailureDetail[];
6230
+ benchmark?: BatchBenchmarkResult;
6231
+ }
6232
+ /** Successful DELETE response returned to the caller. */
6233
+ interface DeleteSuccessResponse {
6234
+ success: true;
6235
+ rowCount: number;
6236
+ executionTime: number;
6237
+ softDeleted: boolean;
6238
+ batch?: DeleteBatchMetadata;
6239
+ }
6240
+ /** Error DELETE response returned when the operation fails. */
6241
+ interface DeleteErrorResponse {
6242
+ success: false;
6243
+ error: string;
6244
+ rowCount: 0;
6245
+ softDeleted: false;
6246
+ }
6247
+ /** Union type representing either a successful or failed DELETE response. */
6248
+ type DeleteResponse = DeleteSuccessResponse | DeleteErrorResponse;
6249
+
2574
6250
  /**
2575
- * Create transformer tools with custom configuration
6251
+ * LangGraph tool for type-safe DELETE queries with single and batched operation support.
6252
+ *
6253
+ * Supports WHERE conditions, full-table-delete protection, soft-delete mode,
6254
+ * batch operations with retry logic, and optional cascade hints.
6255
+ */
6256
+ declare const relationalDelete: _agentforge_core.Tool<{
6257
+ table: string;
6258
+ connectionString: string;
6259
+ vendor: "postgresql" | "mysql" | "sqlite";
6260
+ where?: {
6261
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "like" | "in" | "notIn" | "isNull" | "isNotNull";
6262
+ column: string;
6263
+ value?: string | number | boolean | (string | number)[] | null | undefined;
6264
+ }[] | undefined;
6265
+ batch?: {
6266
+ enabled?: boolean | undefined;
6267
+ batchSize?: number | undefined;
6268
+ maxRetries?: number | undefined;
6269
+ retryDelayMs?: number | undefined;
6270
+ continueOnError?: boolean | undefined;
6271
+ benchmark?: boolean | undefined;
6272
+ } | undefined;
6273
+ operations?: {
6274
+ where?: {
6275
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "like" | "in" | "notIn" | "isNull" | "isNotNull";
6276
+ column: string;
6277
+ value?: string | number | boolean | (string | number)[] | null | undefined;
6278
+ }[] | undefined;
6279
+ allowFullTableDelete?: boolean | undefined;
6280
+ cascade?: boolean | undefined;
6281
+ softDelete?: {
6282
+ value?: string | number | undefined;
6283
+ column?: string | undefined;
6284
+ } | undefined;
6285
+ }[] | undefined;
6286
+ allowFullTableDelete?: boolean | undefined;
6287
+ cascade?: boolean | undefined;
6288
+ softDelete?: {
6289
+ value?: string | number | undefined;
6290
+ column?: string | undefined;
6291
+ } | undefined;
6292
+ }, DeleteResponse>;
6293
+
6294
+ /**
6295
+ * Relational Get Schema Tool
6296
+ * @module tools/relational-get-schema
2576
6297
  */
2577
- declare function createTransformerTools(config?: TransformerToolsConfig): (_agentforge_core.Tool<{
2578
- array: any[];
2579
- property: string;
2580
- operator: "equals" | "not-equals" | "greater-than" | "less-than" | "contains" | "starts-with" | "ends-with";
2581
- value?: any;
2582
- }, {
2583
- filtered: any[];
2584
- originalCount: number;
2585
- filteredCount: number;
2586
- }> | _agentforge_core.Tool<{
2587
- array: any[];
2588
- properties: string[];
2589
- }, {
2590
- mapped: any[];
2591
- count: number;
2592
- }> | _agentforge_core.Tool<{
2593
- array: any[];
2594
- property: string;
2595
- order?: "asc" | "desc" | undefined;
2596
- }, {
2597
- sorted: any[];
2598
- count: number;
2599
- }> | _agentforge_core.Tool<{
2600
- array: any[];
2601
- property: string;
2602
- }, {
2603
- groups: Record<string, any[]>;
2604
- groupCount: number;
2605
- totalItems: number;
2606
- }> | _agentforge_core.Tool<{
2607
- object: Record<string, any>;
2608
- properties: string[];
2609
- }, Record<string, any>>)[];
6298
+ /**
6299
+ * Relational Get Schema Tool
6300
+ *
6301
+ * Introspects database schema metadata including tables, columns, primary keys,
6302
+ * foreign keys, and indexes for PostgreSQL, MySQL, and SQLite.
6303
+ */
6304
+ declare const relationalGetSchema: _agentforge_core.Tool<{
6305
+ connectionString: string;
6306
+ vendor: "postgresql" | "mysql" | "sqlite";
6307
+ database?: string | undefined;
6308
+ tables?: string[] | undefined;
6309
+ cacheTtlMs?: number | undefined;
6310
+ refreshCache?: boolean | undefined;
6311
+ }, {
6312
+ success: boolean;
6313
+ schema: DatabaseSchema;
6314
+ summary: {
6315
+ tableCount: number;
6316
+ columnCount: number;
6317
+ foreignKeyCount: number;
6318
+ indexCount: number;
6319
+ };
6320
+ error?: undefined;
6321
+ } | {
6322
+ success: boolean;
6323
+ error: string;
6324
+ schema: null;
6325
+ summary?: undefined;
6326
+ }>;
2610
6327
 
2611
6328
  /**
2612
6329
  * File Operations Types
@@ -3381,8 +7098,7 @@ declare const pathNormalizeSchema: z.ZodObject<{
3381
7098
  /**
3382
7099
  * Path utilities configuration
3383
7100
  */
3384
- interface PathUtilitiesConfig {
3385
- }
7101
+ type PathUtilitiesConfig = Record<string, never>;
3386
7102
 
3387
7103
  /**
3388
7104
  * Path Join Tool
@@ -3747,8 +7463,7 @@ declare const DateComparisonSchema: z.ZodObject<{
3747
7463
  /**
3748
7464
  * Configuration for date/time tools
3749
7465
  */
3750
- interface DateTimeConfig {
3751
- }
7466
+ type DateTimeConfig = Record<string, never>;
3752
7467
  type CurrentDateTimeInput = z.infer<typeof CurrentDateTimeSchema>;
3753
7468
  type DateFormatterInput = z.infer<typeof DateFormatterSchema>;
3754
7469
  type DateArithmeticInput = z.infer<typeof DateArithmeticSchema>;
@@ -4152,11 +7867,11 @@ declare const StringTrimSchema: z.ZodObject<{
4152
7867
  characters: z.ZodOptional<z.ZodString>;
4153
7868
  }, "strip", z.ZodTypeAny, {
4154
7869
  text: string;
4155
- mode: "both" | "start" | "end";
7870
+ mode: "both" | "end" | "start";
4156
7871
  characters?: string | undefined;
4157
7872
  }, {
4158
7873
  text: string;
4159
- mode?: "both" | "start" | "end" | undefined;
7874
+ mode?: "both" | "end" | "start" | undefined;
4160
7875
  characters?: string | undefined;
4161
7876
  }>;
4162
7877
  /**
@@ -4239,8 +7954,7 @@ declare const StringLengthSchema: z.ZodObject<{
4239
7954
  /**
4240
7955
  * Configuration for string utility tools
4241
7956
  */
4242
- interface StringUtilitiesConfig {
4243
- }
7957
+ type StringUtilitiesConfig = Record<string, never>;
4244
7958
  type StringCaseConverterInput = z.infer<typeof StringCaseConverterSchema>;
4245
7959
  type StringTrimInput = z.infer<typeof StringTrimSchema>;
4246
7960
  type StringReplaceInput = z.infer<typeof StringReplaceSchema>;
@@ -4272,7 +7986,7 @@ declare function createStringCaseConverterTool(): _agentforge_core.Tool<{
4272
7986
  */
4273
7987
  declare function createStringTrimTool(): _agentforge_core.Tool<{
4274
7988
  text: string;
4275
- mode?: "both" | "start" | "end" | undefined;
7989
+ mode?: "both" | "end" | "start" | undefined;
4276
7990
  characters?: string | undefined;
4277
7991
  }, {
4278
7992
  original: string;
@@ -4369,7 +8083,7 @@ declare const stringCaseConverter: _agentforge_core.Tool<{
4369
8083
  }>;
4370
8084
  declare const stringTrim: _agentforge_core.Tool<{
4371
8085
  text: string;
4372
- mode?: "both" | "start" | "end" | undefined;
8086
+ mode?: "both" | "end" | "start" | undefined;
4373
8087
  characters?: string | undefined;
4374
8088
  }, {
4375
8089
  original: string;
@@ -4429,7 +8143,7 @@ declare const stringUtilityTools: (_agentforge_core.Tool<{
4429
8143
  targetCase: "title" | "lowercase" | "uppercase" | "camel" | "snake" | "kebab" | "pascal";
4430
8144
  }> | _agentforge_core.Tool<{
4431
8145
  text: string;
4432
- mode?: "both" | "start" | "end" | undefined;
8146
+ mode?: "both" | "end" | "start" | undefined;
4433
8147
  characters?: string | undefined;
4434
8148
  }, {
4435
8149
  original: string;
@@ -4487,7 +8201,7 @@ declare function createStringUtilityTools(config?: StringUtilitiesConfig): (_age
4487
8201
  targetCase: "title" | "lowercase" | "uppercase" | "camel" | "snake" | "kebab" | "pascal";
4488
8202
  }> | _agentforge_core.Tool<{
4489
8203
  text: string;
4490
- mode?: "both" | "start" | "end" | undefined;
8204
+ mode?: "both" | "end" | "start" | undefined;
4491
8205
  characters?: string | undefined;
4492
8206
  }, {
4493
8207
  original: string;
@@ -4576,12 +8290,12 @@ declare const RandomNumberSchema: z.ZodObject<{
4576
8290
  integer: z.ZodDefault<z.ZodBoolean>;
4577
8291
  }, "strip", z.ZodTypeAny, {
4578
8292
  integer: boolean;
4579
- min: number;
4580
8293
  max: number;
8294
+ min: number;
4581
8295
  }, {
4582
8296
  integer?: boolean | undefined;
4583
- min?: number | undefined;
4584
8297
  max?: number | undefined;
8298
+ min?: number | undefined;
4585
8299
  }>;
4586
8300
  /**
4587
8301
  * Schema for statistics tool
@@ -4596,8 +8310,7 @@ declare const StatisticsSchema: z.ZodObject<{
4596
8310
  /**
4597
8311
  * Configuration for math operations tools
4598
8312
  */
4599
- interface MathOperationsConfig {
4600
- }
8313
+ type MathOperationsConfig = Record<string, never>;
4601
8314
  type CalculatorInput = z.infer<typeof CalculatorSchema>;
4602
8315
  type MathFunctionsInput = z.infer<typeof MathFunctionsSchema>;
4603
8316
  type RandomNumberInput = z.infer<typeof RandomNumberSchema>;
@@ -4660,8 +8373,8 @@ declare function createMathFunctionsTool(): _agentforge_core.Tool<{
4660
8373
  */
4661
8374
  declare function createRandomNumberTool(): _agentforge_core.Tool<{
4662
8375
  integer?: boolean | undefined;
4663
- min?: number | undefined;
4664
8376
  max?: number | undefined;
8377
+ min?: number | undefined;
4665
8378
  }, {
4666
8379
  result: number;
4667
8380
  min: number;
@@ -4738,8 +8451,8 @@ declare const mathFunctions: _agentforge_core.Tool<{
4738
8451
  }>;
4739
8452
  declare const randomNumber: _agentforge_core.Tool<{
4740
8453
  integer?: boolean | undefined;
4741
- min?: number | undefined;
4742
8454
  max?: number | undefined;
8455
+ min?: number | undefined;
4743
8456
  }, {
4744
8457
  result: number;
4745
8458
  min: number;
@@ -4806,8 +8519,8 @@ declare const mathOperationTools: (_agentforge_core.Tool<{
4806
8519
  error?: undefined;
4807
8520
  }> | _agentforge_core.Tool<{
4808
8521
  integer?: boolean | undefined;
4809
- min?: number | undefined;
4810
8522
  max?: number | undefined;
8523
+ min?: number | undefined;
4811
8524
  }, {
4812
8525
  result: number;
4813
8526
  min: number;
@@ -4876,8 +8589,8 @@ declare function createMathOperationTools(config?: MathOperationsConfig): (_agen
4876
8589
  error?: undefined;
4877
8590
  }> | _agentforge_core.Tool<{
4878
8591
  integer?: boolean | undefined;
4879
- min?: number | undefined;
4880
8592
  max?: number | undefined;
8593
+ min?: number | undefined;
4881
8594
  }, {
4882
8595
  result: number;
4883
8596
  min: number;
@@ -4982,8 +8695,7 @@ declare const UuidValidatorSchema: z.ZodObject<{
4982
8695
  /**
4983
8696
  * Configuration for validation tools
4984
8697
  */
4985
- interface ValidationConfig {
4986
- }
8698
+ type ValidationConfig = Record<string, never>;
4987
8699
  type EmailValidatorInput = z.infer<typeof EmailValidatorSchema>;
4988
8700
  type UrlValidatorSimpleInput = z.infer<typeof UrlValidatorSimpleSchema>;
4989
8701
  type PhoneValidatorInput = z.infer<typeof PhoneValidatorSchema>;
@@ -5369,4 +9081,4 @@ declare const askHumanTool: _agentforge_core.Tool<{
5369
9081
  suggestions?: string[] | undefined;
5370
9082
  }, AskHumanOutput>;
5371
9083
 
5372
- export { type AskHumanInput, AskHumanInputSchema, type AskHumanOutput, type CalculatorInput, CalculatorSchema, type ConfluenceAuth, type ConfluenceToolsConfig, type CreditCardValidatorInput, CreditCardValidatorSchema, type CsvToolsConfig, type CurrentDateTimeInput, CurrentDateTimeSchema, type DateArithmeticInput, DateArithmeticSchema, type DateComparisonInput, DateComparisonSchema, type DateDifferenceInput, DateDifferenceSchema, type DateFormatterInput, DateFormatterSchema, type DateTimeConfig, type DirectoryOperationsConfig, DuckDuckGoProvider, type EmailValidatorInput, EmailValidatorSchema, type FileOperationsConfig, type HtmlParserToolsConfig, HttpMethod, type HttpResponse, type HttpToolsConfig, type IpValidatorInput, IpValidatorSchema, type JsonToolsConfig, type MathFunctionsInput, MathFunctionsSchema, type MathOperationsConfig, type PathUtilitiesConfig, type PhoneValidatorInput, PhoneValidatorSchema, type RandomNumberInput, RandomNumberSchema, type RetryConfig, type ScraperResult, type ScraperToolsConfig, type SearchProvider, type SearchResult, SerperProvider, type SlackClientConfig, type SlackToolsConfig, type StatisticsInput, StatisticsSchema, type StringCaseConverterInput, StringCaseConverterSchema, type StringJoinInput, StringJoinSchema, type StringLengthInput, StringLengthSchema, type StringReplaceInput, StringReplaceSchema, type StringSplitInput, StringSplitSchema, type StringSubstringInput, StringSubstringSchema, type StringTrimInput, StringTrimSchema, type StringUtilitiesConfig, type TransformerToolsConfig, type UrlValidationResult, type UrlValidatorSimpleInput, UrlValidatorSimpleSchema, type UrlValidatorToolsConfig, type UuidValidatorInput, UuidValidatorSchema, type ValidationConfig, type WebSearchInput, type WebSearchOutput, type XmlToolsConfig, archiveConfluencePage, arrayFilter, arrayFilterSchema, arrayGroupBy, arrayGroupBySchema, arrayMap, arrayMapSchema, arraySort, arraySortSchema, askHumanTool, calculator, confluenceTools, createArrayFilterTool, createArrayGroupByTool, createArrayMapTool, createArraySortTool, createAskHumanTool, createCalculatorTool, createConfluencePage, createConfluenceTools, createCreditCardValidatorTool, createCsvGeneratorTool, createCsvParserTool, createCsvToJsonTool, createCsvTools, createCurrentDateTimeTool, createDateArithmeticTool, createDateComparisonTool, createDateDifferenceTool, createDateFormatterTool, createDateTimeTools, createDirectoryCreateTool, createDirectoryDeleteTool, createDirectoryListTool, createDirectoryOperationTools, createDuckDuckGoProvider, createEmailValidatorTool, createExtractImagesTool, createExtractLinksTool, createFileAppendTool, createFileDeleteTool, createFileExistsTool, createFileOperationTools, createFileReaderTool, createFileSearchTool, createFileWriterTool, createHtmlParserTool, createHtmlParserTools, createHttpTools, createIpValidatorTool, createJsonMergeTool, createJsonParserTool, createJsonQueryTool, createJsonStringifyTool, createJsonToCsvTool, createJsonToXmlTool, createJsonTools, createJsonValidatorTool, createMathFunctionsTool, createMathOperationTools, createObjectOmitTool, createObjectPickTool, createPathBasenameTool, createPathDirnameTool, createPathExtensionTool, createPathJoinTool, createPathNormalizeTool, createPathParseTool, createPathRelativeTool, createPathResolveTool, createPathUtilityTools, createPhoneValidatorTool, createRandomNumberTool, createScraperTools, createSerperProvider, createSlackTools, createStatisticsTool, createStringCaseConverterTool, createStringJoinTool, createStringLengthTool, createStringReplaceTool, createStringSplitTool, createStringSubstringTool, createStringTrimTool, createStringUtilityTools, createTransformerTools, createUrlBuilderTool, createUrlQueryParserTool, createUrlValidatorSimpleTool, createUrlValidatorTool, createUrlValidatorTools, createUuidValidatorTool, createValidationTools, createWebScraperTool, createXmlGeneratorTool, createXmlParserTool, createXmlToJsonTool, createXmlTools, creditCardValidator, csvGenerator, csvGeneratorSchema, csvParser, csvParserSchema, csvToJson, csvToJsonSchema, csvTools, currentDateTime, dateArithmetic, dateComparison, dateDifference, dateFormatter, dateTimeTools, directoryCreate, directoryCreateSchema, directoryDelete, directoryDeleteSchema, directoryList, directoryListSchema, directoryOperationTools, emailValidator, extractImages, extractImagesSchema, extractLinks, extractLinksSchema, fileAppend, fileAppendSchema, fileDelete, fileDeleteSchema, fileExists, fileExistsSchema, fileOperationTools, fileReader, fileReaderSchema, fileSearch, fileSearchSchema, fileWriter, fileWriterSchema, getConfluencePage, getSlackChannels, getSlackMessages, getSpacePages, htmlParser, htmlParserSchema, htmlParserTools, httpClient, httpGet, httpGetSchema, httpPost, httpPostSchema, httpRequestSchema, httpTools, ipValidator, jsonMerge, jsonMergeSchema, jsonParser, jsonParserSchema, jsonQuery, jsonQuerySchema, jsonStringify, jsonStringifySchema, jsonToCsv, jsonToCsvSchema, jsonToXml, jsonToXmlSchema, jsonTools, jsonValidator, jsonValidatorSchema, listConfluenceSpaces, mathFunctions, mathOperationTools, notifySlack, objectOmit, objectOmitSchema, objectPick, objectPickSchema, pathBasename, pathBasenameSchema, pathDirname, pathDirnameSchema, pathExtension, pathExtensionSchema, pathJoin, pathJoinSchema, pathNormalize, pathNormalizeSchema, pathParse, pathParseSchema, pathRelative, pathRelativeSchema, pathResolve, pathResolveSchema, pathUtilityTools, phoneValidator, randomNumber, scraperTools, searchConfluence, searchResultSchema, sendSlackMessage, slackTools, statistics, stringCaseConverter, stringJoin, stringLength, stringReplace, stringSplit, stringSubstring, stringTrim, stringUtilityTools, transformerTools, updateConfluencePage, urlBuilder, urlBuilderSchema, urlQueryParser, urlQueryParserSchema, urlValidator, urlValidatorSchema, urlValidatorSimple, urlValidatorTools, uuidValidator, validationTools, webScraper, webScraperSchema, webSearch, webSearchOutputSchema, webSearchSchema, xmlGenerator, xmlGeneratorSchema, xmlParser, xmlParserSchema, xmlToJson, xmlToJsonSchema, xmlTools };
9084
+ export { type AskHumanInput, AskHumanInputSchema, type AskHumanOutput, type BatchBenchmarkResult, type BatchEmbeddingResult, type BatchExecutionOptions, type BatchExecutionResult, type BatchExecutionTask, type BatchFailureDetail, type BatchProgressUpdate, type BuiltDeleteQuery, type BuiltInsertQuery, type BuiltUpdateQuery, type CalculatorInput, CalculatorSchema, type ColumnDiff, type ColumnSchema, type ConfluenceAuth, type ConfluenceToolsConfig, type ConnectionConfig, type ConnectionEvent, ConnectionManager, ConnectionState, type CreditCardValidatorInput, CreditCardValidatorSchema, type CsvToolsConfig, type CurrentDateTimeInput, CurrentDateTimeSchema, DEFAULT_BATCH_SIZE, DEFAULT_CHUNK_SIZE, DEFAULT_RETRY_CONFIG, type DatabaseConfig, type DatabaseConnection, type DatabaseSchema, type DatabaseVendor, type DateArithmeticInput, DateArithmeticSchema, type DateComparisonInput, DateComparisonSchema, type DateDifferenceInput, DateDifferenceSchema, type DateFormatterInput, DateFormatterSchema, type DateTimeConfig, type DeleteQueryInput, type DeleteSoftDeleteOptions, type DeleteWhereCondition, type DirectoryOperationsConfig, DuckDuckGoProvider, type EmailValidatorInput, EmailValidatorSchema, type EmbeddingConfig, EmbeddingManager, type EmbeddingProvider, type EmbeddingResult, type EmbeddingRetryConfig, type FileOperationsConfig, type ForeignKeySchema, type HtmlParserToolsConfig, HttpMethod, type HttpResponse, type HttpToolsConfig, type IEmbeddingProvider, type IndexSchema, type InsertData, type InsertQueryInput, type InsertReturningMode, type InsertReturningOptions, type InsertRow, type InsertValue, type IpValidatorInput, IpValidatorSchema, type JsonToolsConfig, MAX_BATCH_SIZE, type MappedType, type MathFunctionsInput, MathFunctionsSchema, type MathOperationsConfig, MissingPeerDependencyError, type MySQLConnectionConfig, type Neo4jConfig, type Neo4jNode, type Neo4jPath, type Neo4jRelationship, type Neo4jSchema, type Neo4jToolsConfig, OpenAIEmbeddingProvider, type PathUtilitiesConfig, type PhoneValidatorInput, PhoneValidatorSchema, type PoolConfig, type PostgreSQLConnectionConfig, type QueryExecutionResult, type QueryInput, type QueryMetadata, type QueryParams, type QueryResult, type RandomNumberInput, RandomNumberSchema, type ReconnectionConfig, type RetryConfig, type SQLiteConnectionConfig, type SchemaDiffResult, type SchemaInspectOptions, SchemaInspector, type SchemaInspectorConfig, type ScraperResult, type ScraperToolsConfig, type SearchProvider, type SearchResult, type SelectOrderBy, type SelectOrderDirection, type SelectQueryInput, type SelectWhereCondition, SerperProvider, type SlackClientConfig, type SlackToolsConfig, type SqlExecutor, type StatisticsInput, StatisticsSchema, type StreamingBenchmarkResult, type StreamingMemoryUsage$1 as StreamingMemoryUsage, type StreamingSelectChunk, type StreamingSelectOptions, type StreamingSelectResult, type StringCaseConverterInput, StringCaseConverterSchema, type StringJoinInput, StringJoinSchema, type StringLengthInput, StringLengthSchema, type StringReplaceInput, StringReplaceSchema, type StringSplitInput, StringSplitSchema, type StringSubstringInput, StringSubstringSchema, type StringTrimInput, StringTrimSchema, type StringUtilitiesConfig, type TableDiff, type TableSchema, type TransactionContext, type TransactionIsolationLevel, type TransactionOptions, type TransformerToolsConfig, type UpdateData, type UpdateOptimisticLock, type UpdateQueryInput, type UpdateValue, type UpdateWhereCondition, type UpdateWhereOperator, type UrlValidationResult, type UrlValidatorSimpleInput, UrlValidatorSimpleSchema, type UrlValidatorToolsConfig, type UuidValidatorInput, UuidValidatorSchema, type ValidationConfig, type ValidationResult, type VendorConnectionConfig, type WebSearchInput, type WebSearchOutput, type XmlToolsConfig, archiveConfluencePage, arrayFilter, arrayFilterSchema, arrayGroupBy, arrayGroupBySchema, arrayMap, arrayMapSchema, arraySort, arraySortSchema, askHumanTool, benchmarkBatchExecution, benchmarkStreamingSelectMemory, buildDeleteQuery, buildInsertQuery, buildSelectQuery, buildUpdateQuery, calculator, checkPeerDependency, confluenceTools, createArrayFilterTool, createArrayGroupByTool, createArrayMapTool, createArraySortTool, createAskHumanTool, createCalculatorTool, createConfluencePage, createConfluenceTools, createCreditCardValidatorTool, createCsvGeneratorTool, createCsvParserTool, createCsvToJsonTool, createCsvTools, createCurrentDateTimeTool, createDateArithmeticTool, createDateComparisonTool, createDateDifferenceTool, createDateFormatterTool, createDateTimeTools, createDirectoryCreateTool, createDirectoryDeleteTool, createDirectoryListTool, createDirectoryOperationTools, createDuckDuckGoProvider, createEmailValidatorTool, createExtractImagesTool, createExtractLinksTool, createFileAppendTool, createFileDeleteTool, createFileExistsTool, createFileOperationTools, createFileReaderTool, createFileSearchTool, createFileWriterTool, createHtmlParserTool, createHtmlParserTools, createHttpTools, createIpValidatorTool, createJsonMergeTool, createJsonParserTool, createJsonQueryTool, createJsonStringifyTool, createJsonToCsvTool, createJsonToXmlTool, createJsonTools, createJsonValidatorTool, createMathFunctionsTool, createMathOperationTools, createNeo4jCreateNodeWithEmbeddingTool, createNeo4jFindNodesTool, createNeo4jGetSchemaTool, createNeo4jQueryTool, createNeo4jTools, createNeo4jTraverseTool, createNeo4jVectorSearchTool, createNeo4jVectorSearchWithEmbeddingTool, createObjectOmitTool, createObjectPickTool, createPathBasenameTool, createPathDirnameTool, createPathExtensionTool, createPathJoinTool, createPathNormalizeTool, createPathParseTool, createPathRelativeTool, createPathResolveTool, createPathUtilityTools, createPhoneValidatorTool, createRandomNumberTool, createScraperTools, createSelectReadableStream, createSerperProvider, createSlackTools, createStatisticsTool, createStringCaseConverterTool, createStringJoinTool, createStringLengthTool, createStringReplaceTool, createStringSplitTool, createStringSubstringTool, createStringTrimTool, createStringUtilityTools, createTransformerTools, createUrlBuilderTool, createUrlQueryParserTool, createUrlValidatorSimpleTool, createUrlValidatorTool, createUrlValidatorTools, createUuidValidatorTool, createValidationTools, createWebScraperTool, createXmlGeneratorTool, createXmlParserTool, createXmlToJsonTool, createXmlTools, creditCardValidator, csvGenerator, csvGeneratorSchema, csvParser, csvParserSchema, csvToJson, csvToJsonSchema, csvTools, currentDateTime, dateArithmetic, dateComparison, dateDifference, dateFormatter, dateTimeTools, diffSchemas, directoryCreate, directoryCreateSchema, directoryDelete, directoryDeleteSchema, directoryList, directoryListSchema, directoryOperationTools, emailValidator, embeddingManager, executeBatchedTask, executeQuery, executeStreamingSelect, exportSchemaToJson, extractImages, extractImagesSchema, extractLinks, extractLinksSchema, fileAppend, fileAppendSchema, fileDelete, fileDeleteSchema, fileExists, fileExistsSchema, fileOperationTools, fileReader, fileReaderSchema, fileSearch, fileSearchSchema, fileWriter, fileWriterSchema, generateBatchEmbeddings, generateEmbedding, getCohereApiKey, getConfluencePage, getEmbeddingModel, getEmbeddingProvider, getHuggingFaceApiKey, getInstallationInstructions, getOllamaBaseUrl, getOpenAIApiKey, getPeerDependencyName, getSlackChannels, getSlackMessages, getSpacePages, getVendorTypeMap, getVoyageApiKey, htmlParser, htmlParserSchema, htmlParserTools, httpClient, httpGet, httpGetSchema, httpPost, httpPostSchema, httpRequestSchema, httpTools, importSchemaFromJson, initializeEmbeddings, initializeEmbeddingsWithConfig, initializeFromEnv, initializeNeo4jTools, ipValidator, isRetryableError, jsonMerge, jsonMergeSchema, jsonParser, jsonParserSchema, jsonQuery, jsonQuerySchema, jsonStringify, jsonStringifySchema, jsonToCsv, jsonToCsvSchema, jsonToXml, jsonToXmlSchema, jsonTools, jsonValidator, jsonValidatorSchema, listConfluenceSpaces, mapColumnType, mapSchemaTypes, mathFunctions, mathOperationTools, neo4jCoreTools, neo4jCreateNodeWithEmbedding, neo4jCreateNodeWithEmbeddingSchema, neo4jFindNodes, neo4jFindNodesSchema, neo4jGetSchema, neo4jGetSchemaSchema, neo4jPool, neo4jQuery, neo4jQuerySchema, neo4jTools, neo4jTraverse, neo4jTraverseSchema, neo4jVectorSearch, neo4jVectorSearchSchema, neo4jVectorSearchWithEmbedding, neo4jVectorSearchWithEmbeddingSchema, notifySlack, objectOmit, objectOmitSchema, objectPick, objectPickSchema, pathBasename, pathBasenameSchema, pathDirname, pathDirnameSchema, pathExtension, pathExtensionSchema, pathJoin, pathJoinSchema, pathNormalize, pathNormalizeSchema, pathParse, pathParseSchema, pathRelative, pathRelativeSchema, pathResolve, pathResolveSchema, pathUtilityTools, phoneValidator, randomNumber, relationalDelete, relationalGetSchema, relationalInsert, relationalQuery, relationalSelect, relationalUpdate, retryWithBackoff, scraperTools, searchConfluence, searchResultSchema, sendSlackMessage, slackTools, statistics, streamSelectChunks, stringCaseConverter, stringJoin, stringLength, stringReplace, stringSplit, stringSubstring, stringTrim, stringUtilityTools, transformerTools, updateConfluencePage, urlBuilder, urlBuilderSchema, urlQueryParser, urlQueryParserSchema, urlValidator, urlValidatorSchema, urlValidatorSimple, urlValidatorTools, uuidValidator, validateBatch, validateColumnTypes, validateColumnsExist, validateTableExists, validateText, validationTools, webScraper, webScraperSchema, webSearch, webSearchOutputSchema, webSearchSchema, withTransaction, xmlGenerator, xmlGeneratorSchema, xmlParser, xmlParserSchema, xmlToJson, xmlToJsonSchema, xmlTools };