@agentforge/tools 0.1.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.
@@ -0,0 +1,1145 @@
1
+ import * as _agentforge_core from '@agentforge/core';
2
+
3
+ /**
4
+ * HTTP Client Tool
5
+ *
6
+ * Make HTTP requests with support for GET, POST, PUT, DELETE, PATCH methods.
7
+ */
8
+ /**
9
+ * HTTP response type
10
+ */
11
+ interface HttpResponse {
12
+ status: number;
13
+ statusText: string;
14
+ headers: Record<string, string>;
15
+ data: any;
16
+ url: string;
17
+ method: string;
18
+ }
19
+ /**
20
+ * Create HTTP client tool
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const result = await httpClient.execute({
25
+ * url: 'https://api.example.com/data',
26
+ * method: 'GET',
27
+ * headers: { 'Authorization': 'Bearer token' }
28
+ * });
29
+ * ```
30
+ */
31
+ declare const httpClient: _agentforge_core.Tool<{
32
+ url: string;
33
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
34
+ params?: Record<string, string> | undefined;
35
+ headers?: Record<string, string> | undefined;
36
+ body?: any;
37
+ timeout?: number | undefined;
38
+ }, HttpResponse>;
39
+ /**
40
+ * Create a simple GET request tool
41
+ */
42
+ declare const httpGet: _agentforge_core.Tool<{
43
+ url: string;
44
+ params?: Record<string, string> | undefined;
45
+ headers?: Record<string, string> | undefined;
46
+ }, any>;
47
+ /**
48
+ * Create a simple POST request tool
49
+ */
50
+ declare const httpPost: _agentforge_core.Tool<{
51
+ url: string;
52
+ headers?: Record<string, string> | undefined;
53
+ body?: any;
54
+ }, any>;
55
+
56
+ /**
57
+ * Web Scraper Tool
58
+ *
59
+ * Scrape and extract data from web pages using CSS selectors.
60
+ */
61
+ /**
62
+ * Scraper result type
63
+ */
64
+ interface ScraperResult {
65
+ url: string;
66
+ title?: string;
67
+ text?: string;
68
+ html?: string;
69
+ links?: string[];
70
+ images?: string[];
71
+ metadata?: Record<string, string>;
72
+ selected?: any;
73
+ }
74
+ /**
75
+ * Web scraper tool
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const result = await webScraper.execute({
80
+ * url: 'https://example.com',
81
+ * selector: 'article h1',
82
+ * extractText: true
83
+ * });
84
+ * ```
85
+ */
86
+ declare const webScraper: _agentforge_core.Tool<{
87
+ url: string;
88
+ timeout?: number | undefined;
89
+ selector?: string | undefined;
90
+ extractText?: boolean | undefined;
91
+ extractHtml?: boolean | undefined;
92
+ extractLinks?: boolean | undefined;
93
+ extractImages?: boolean | undefined;
94
+ extractMetadata?: boolean | undefined;
95
+ }, ScraperResult>;
96
+
97
+ /**
98
+ * HTML Parser Tool
99
+ *
100
+ * Parse HTML content and extract data using CSS selectors.
101
+ */
102
+ /**
103
+ * HTML parser tool
104
+ *
105
+ * @example
106
+ * ```ts
107
+ * const result = await htmlParser.execute({
108
+ * html: '<div class="content"><h1>Title</h1><p>Text</p></div>',
109
+ * selector: '.content h1'
110
+ * });
111
+ * ```
112
+ */
113
+ declare const htmlParser: _agentforge_core.Tool<{
114
+ html: string;
115
+ selector: string;
116
+ extractText?: boolean | undefined;
117
+ extractHtml?: boolean | undefined;
118
+ extractAttributes?: string[] | undefined;
119
+ }, {
120
+ count: number;
121
+ results: any[];
122
+ }>;
123
+ /**
124
+ * Extract links from HTML
125
+ */
126
+ declare const extractLinks: _agentforge_core.Tool<{
127
+ html: string;
128
+ baseUrl?: string | undefined;
129
+ }, {
130
+ count: number;
131
+ links: {
132
+ text: string;
133
+ href: string;
134
+ title?: string;
135
+ }[];
136
+ }>;
137
+ /**
138
+ * Extract images from HTML
139
+ */
140
+ declare const extractImages: _agentforge_core.Tool<{
141
+ html: string;
142
+ baseUrl?: string | undefined;
143
+ }, {
144
+ count: number;
145
+ images: {
146
+ src: string;
147
+ alt?: string;
148
+ title?: string;
149
+ width?: string;
150
+ height?: string;
151
+ }[];
152
+ }>;
153
+
154
+ /**
155
+ * URL Validator and Parser Tool
156
+ *
157
+ * Validate, parse, and manipulate URLs.
158
+ */
159
+ /**
160
+ * URL validation result
161
+ */
162
+ interface UrlValidationResult {
163
+ valid: boolean;
164
+ url?: string;
165
+ protocol?: string;
166
+ hostname?: string;
167
+ port?: string;
168
+ pathname?: string;
169
+ search?: string;
170
+ hash?: string;
171
+ origin?: string;
172
+ error?: string;
173
+ }
174
+ /**
175
+ * URL validator tool
176
+ *
177
+ * @example
178
+ * ```ts
179
+ * const result = await urlValidator.execute({
180
+ * url: 'https://example.com/path?query=value#hash'
181
+ * });
182
+ * ```
183
+ */
184
+ declare const urlValidator: _agentforge_core.Tool<{
185
+ url: string;
186
+ }, UrlValidationResult>;
187
+ /**
188
+ * URL builder tool
189
+ */
190
+ declare const urlBuilder: _agentforge_core.Tool<{
191
+ hostname: string;
192
+ protocol?: string | undefined;
193
+ port?: string | undefined;
194
+ pathname?: string | undefined;
195
+ query?: Record<string, string> | undefined;
196
+ hash?: string | undefined;
197
+ }, {
198
+ url: string;
199
+ components: {
200
+ protocol: string;
201
+ hostname: string;
202
+ port: string;
203
+ pathname: string;
204
+ search: string;
205
+ hash: string;
206
+ origin: string;
207
+ };
208
+ }>;
209
+ /**
210
+ * URL query parser tool
211
+ */
212
+ declare const urlQueryParser: _agentforge_core.Tool<{
213
+ input: string;
214
+ }, {
215
+ params: Record<string, string | string[]>;
216
+ count: number;
217
+ }>;
218
+
219
+ /**
220
+ * JSON Processor Tool
221
+ *
222
+ * Parse, validate, transform, and query JSON data.
223
+ */
224
+ /**
225
+ * JSON parser tool
226
+ */
227
+ declare const jsonParser: _agentforge_core.Tool<{
228
+ json: string;
229
+ strict?: boolean | undefined;
230
+ }, {
231
+ success: boolean;
232
+ data: any;
233
+ type: string;
234
+ error?: undefined;
235
+ } | {
236
+ success: boolean;
237
+ error: string;
238
+ data?: undefined;
239
+ type?: undefined;
240
+ }>;
241
+ /**
242
+ * JSON stringifier tool
243
+ */
244
+ declare const jsonStringify: _agentforge_core.Tool<{
245
+ data?: any;
246
+ pretty?: boolean | undefined;
247
+ indent?: number | undefined;
248
+ }, {
249
+ success: boolean;
250
+ json: string;
251
+ length: number;
252
+ error?: undefined;
253
+ } | {
254
+ success: boolean;
255
+ error: string;
256
+ json?: undefined;
257
+ length?: undefined;
258
+ }>;
259
+ /**
260
+ * JSON query tool (using JSONPath-like syntax)
261
+ */
262
+ declare const jsonQuery: _agentforge_core.Tool<{
263
+ path: string;
264
+ data?: any;
265
+ }, {
266
+ success: boolean;
267
+ error: string;
268
+ value?: undefined;
269
+ type?: undefined;
270
+ } | {
271
+ success: boolean;
272
+ value: any;
273
+ type: string;
274
+ error?: undefined;
275
+ }>;
276
+ /**
277
+ * JSON validator tool
278
+ */
279
+ declare const jsonValidator: _agentforge_core.Tool<{
280
+ json: string;
281
+ }, {
282
+ valid: boolean;
283
+ message: string;
284
+ error?: undefined;
285
+ } | {
286
+ valid: boolean;
287
+ error: string;
288
+ message?: undefined;
289
+ }>;
290
+ /**
291
+ * JSON merge tool
292
+ */
293
+ declare const jsonMerge: _agentforge_core.Tool<{
294
+ objects: any[];
295
+ deep?: boolean | undefined;
296
+ }, any>;
297
+
298
+ /**
299
+ * CSV Parser Tool
300
+ *
301
+ * Parse and generate CSV data.
302
+ */
303
+ /**
304
+ * CSV parser tool
305
+ */
306
+ declare const csvParser: _agentforge_core.Tool<{
307
+ csv: string;
308
+ delimiter?: string | undefined;
309
+ hasHeaders?: boolean | undefined;
310
+ skipEmptyLines?: boolean | undefined;
311
+ trim?: boolean | undefined;
312
+ }, {
313
+ success: boolean;
314
+ data: any;
315
+ rowCount: any;
316
+ columnCount: number;
317
+ error?: undefined;
318
+ } | {
319
+ success: boolean;
320
+ error: string;
321
+ data?: undefined;
322
+ rowCount?: undefined;
323
+ columnCount?: undefined;
324
+ }>;
325
+ /**
326
+ * CSV generator tool
327
+ */
328
+ declare const csvGenerator: _agentforge_core.Tool<{
329
+ data: Record<string, any>[];
330
+ delimiter?: string | undefined;
331
+ includeHeaders?: boolean | undefined;
332
+ columns?: string[] | undefined;
333
+ }, {
334
+ success: boolean;
335
+ csv: string;
336
+ rowCount: number;
337
+ error?: undefined;
338
+ } | {
339
+ success: boolean;
340
+ error: string;
341
+ csv?: undefined;
342
+ rowCount?: undefined;
343
+ }>;
344
+ /**
345
+ * CSV to JSON converter
346
+ */
347
+ declare const csvToJson: _agentforge_core.Tool<{
348
+ csv: string;
349
+ pretty?: boolean | undefined;
350
+ delimiter?: string | undefined;
351
+ }, {
352
+ success: boolean;
353
+ json: string;
354
+ recordCount: any;
355
+ error?: undefined;
356
+ } | {
357
+ success: boolean;
358
+ error: string;
359
+ json?: undefined;
360
+ recordCount?: undefined;
361
+ }>;
362
+ /**
363
+ * JSON to CSV converter
364
+ */
365
+ declare const jsonToCsv: _agentforge_core.Tool<{
366
+ json: string;
367
+ delimiter?: string | undefined;
368
+ }, {
369
+ success: boolean;
370
+ error: string;
371
+ csv?: undefined;
372
+ rowCount?: undefined;
373
+ } | {
374
+ success: boolean;
375
+ csv: string;
376
+ rowCount: number;
377
+ error?: undefined;
378
+ }>;
379
+
380
+ /**
381
+ * XML Parser Tool
382
+ *
383
+ * Parse and generate XML data.
384
+ */
385
+ /**
386
+ * XML parser tool
387
+ */
388
+ declare const xmlParser: _agentforge_core.Tool<{
389
+ xml: string;
390
+ ignoreAttributes?: boolean | undefined;
391
+ parseAttributeValue?: boolean | undefined;
392
+ trimValues?: boolean | undefined;
393
+ }, {
394
+ success: boolean;
395
+ data: any;
396
+ error?: undefined;
397
+ } | {
398
+ success: boolean;
399
+ error: string;
400
+ data?: undefined;
401
+ }>;
402
+ /**
403
+ * XML generator tool
404
+ */
405
+ declare const xmlGenerator: _agentforge_core.Tool<{
406
+ data?: any;
407
+ format?: boolean | undefined;
408
+ rootName?: string | undefined;
409
+ indentSize?: number | undefined;
410
+ }, {
411
+ success: boolean;
412
+ xml: any;
413
+ error?: undefined;
414
+ } | {
415
+ success: boolean;
416
+ error: string;
417
+ xml?: undefined;
418
+ }>;
419
+ /**
420
+ * XML to JSON converter
421
+ */
422
+ declare const xmlToJson: _agentforge_core.Tool<{
423
+ xml: string;
424
+ pretty?: boolean | undefined;
425
+ ignoreAttributes?: boolean | undefined;
426
+ }, {
427
+ success: boolean;
428
+ json: string;
429
+ error?: undefined;
430
+ } | {
431
+ success: boolean;
432
+ error: string;
433
+ json?: undefined;
434
+ }>;
435
+ /**
436
+ * JSON to XML converter
437
+ */
438
+ declare const jsonToXml: _agentforge_core.Tool<{
439
+ json: string;
440
+ format?: boolean | undefined;
441
+ rootName?: string | undefined;
442
+ }, {
443
+ success: boolean;
444
+ xml: any;
445
+ error?: undefined;
446
+ } | {
447
+ success: boolean;
448
+ error: string;
449
+ xml?: undefined;
450
+ }>;
451
+
452
+ /**
453
+ * Data Transformer Tool
454
+ *
455
+ * Transform, filter, map, and manipulate data structures.
456
+ */
457
+ /**
458
+ * Array filter tool
459
+ */
460
+ declare const arrayFilter: _agentforge_core.Tool<{
461
+ array: any[];
462
+ property: string;
463
+ operator: "equals" | "not-equals" | "greater-than" | "less-than" | "contains" | "starts-with" | "ends-with";
464
+ value?: any;
465
+ }, {
466
+ filtered: any[];
467
+ originalCount: number;
468
+ filteredCount: number;
469
+ }>;
470
+ /**
471
+ * Array map tool
472
+ */
473
+ declare const arrayMap: _agentforge_core.Tool<{
474
+ array: any[];
475
+ properties: string[];
476
+ }, {
477
+ mapped: any[];
478
+ count: number;
479
+ }>;
480
+ /**
481
+ * Array sort tool
482
+ */
483
+ declare const arraySort: _agentforge_core.Tool<{
484
+ array: any[];
485
+ property: string;
486
+ order?: "asc" | "desc" | undefined;
487
+ }, {
488
+ sorted: any[];
489
+ count: number;
490
+ }>;
491
+ /**
492
+ * Array group by tool
493
+ */
494
+ declare const arrayGroupBy: _agentforge_core.Tool<{
495
+ array: any[];
496
+ property: string;
497
+ }, {
498
+ groups: Record<string, any[]>;
499
+ groupCount: number;
500
+ totalItems: number;
501
+ }>;
502
+ /**
503
+ * Object pick tool
504
+ */
505
+ declare const objectPick: _agentforge_core.Tool<{
506
+ object: Record<string, any>;
507
+ properties: string[];
508
+ }, Record<string, any>>;
509
+ /**
510
+ * Object omit tool
511
+ */
512
+ declare const objectOmit: _agentforge_core.Tool<{
513
+ object: Record<string, any>;
514
+ properties: string[];
515
+ }, Record<string, any>>;
516
+
517
+ /**
518
+ * File Operations Tools
519
+ *
520
+ * Tools for reading, writing, and manipulating files.
521
+ */
522
+ /**
523
+ * File reader tool
524
+ */
525
+ declare const fileReader: _agentforge_core.Tool<{
526
+ path: string;
527
+ encoding?: "ascii" | "binary" | "base64" | "hex" | "utf-8" | "utf8" | undefined;
528
+ }, {
529
+ success: boolean;
530
+ content: string;
531
+ size: number;
532
+ path: string;
533
+ encoding: "ascii" | "binary" | "base64" | "hex" | "utf-8" | "utf8" | undefined;
534
+ error?: undefined;
535
+ } | {
536
+ success: boolean;
537
+ error: string;
538
+ path: string;
539
+ content?: undefined;
540
+ size?: undefined;
541
+ encoding?: undefined;
542
+ }>;
543
+ /**
544
+ * File writer tool
545
+ */
546
+ declare const fileWriter: _agentforge_core.Tool<{
547
+ path: string;
548
+ content: string;
549
+ encoding?: "ascii" | "base64" | "hex" | "utf-8" | "utf8" | undefined;
550
+ createDirs?: boolean | undefined;
551
+ }, {
552
+ success: boolean;
553
+ path: string;
554
+ size: number;
555
+ encoding: "ascii" | "base64" | "hex" | "utf-8" | "utf8" | undefined;
556
+ error?: undefined;
557
+ } | {
558
+ success: boolean;
559
+ error: string;
560
+ path: string;
561
+ size?: undefined;
562
+ encoding?: undefined;
563
+ }>;
564
+ /**
565
+ * File append tool
566
+ */
567
+ declare const fileAppend: _agentforge_core.Tool<{
568
+ path: string;
569
+ content: string;
570
+ encoding?: "ascii" | "utf-8" | "utf8" | undefined;
571
+ }, {
572
+ success: boolean;
573
+ path: string;
574
+ size: number;
575
+ error?: undefined;
576
+ } | {
577
+ success: boolean;
578
+ error: string;
579
+ path: string;
580
+ size?: undefined;
581
+ }>;
582
+ /**
583
+ * File delete tool
584
+ */
585
+ declare const fileDelete: _agentforge_core.Tool<{
586
+ path: string;
587
+ }, {
588
+ success: boolean;
589
+ path: string;
590
+ message: string;
591
+ error?: undefined;
592
+ } | {
593
+ success: boolean;
594
+ error: string;
595
+ path: string;
596
+ message?: undefined;
597
+ }>;
598
+ /**
599
+ * File exists tool
600
+ */
601
+ declare const fileExists: _agentforge_core.Tool<{
602
+ path: string;
603
+ }, {
604
+ exists: boolean;
605
+ path: string;
606
+ isFile: boolean;
607
+ isDirectory: boolean;
608
+ size: number;
609
+ modified: string;
610
+ } | {
611
+ exists: boolean;
612
+ path: string;
613
+ isFile?: undefined;
614
+ isDirectory?: undefined;
615
+ size?: undefined;
616
+ modified?: undefined;
617
+ }>;
618
+
619
+ /**
620
+ * Directory Operations Tools
621
+ *
622
+ * Tools for working with directories and file listings.
623
+ */
624
+ /**
625
+ * Directory listing tool
626
+ */
627
+ declare const directoryList: _agentforge_core.Tool<{
628
+ path: string;
629
+ recursive?: boolean | undefined;
630
+ includeDetails?: boolean | undefined;
631
+ extension?: string | undefined;
632
+ }, {
633
+ success: boolean;
634
+ path: string;
635
+ files: any[];
636
+ count: number;
637
+ error?: undefined;
638
+ } | {
639
+ success: boolean;
640
+ error: string;
641
+ path: string;
642
+ files?: undefined;
643
+ count?: undefined;
644
+ }>;
645
+ /**
646
+ * Directory create tool
647
+ */
648
+ declare const directoryCreate: _agentforge_core.Tool<{
649
+ path: string;
650
+ recursive?: boolean | undefined;
651
+ }, {
652
+ success: boolean;
653
+ path: string;
654
+ message: string;
655
+ error?: undefined;
656
+ } | {
657
+ success: boolean;
658
+ error: string;
659
+ path: string;
660
+ message?: undefined;
661
+ }>;
662
+ /**
663
+ * Directory delete tool
664
+ */
665
+ declare const directoryDelete: _agentforge_core.Tool<{
666
+ path: string;
667
+ recursive?: boolean | undefined;
668
+ }, {
669
+ success: boolean;
670
+ path: string;
671
+ message: string;
672
+ error?: undefined;
673
+ } | {
674
+ success: boolean;
675
+ error: string;
676
+ path: string;
677
+ message?: undefined;
678
+ }>;
679
+ /**
680
+ * File search tool
681
+ */
682
+ declare const fileSearch: _agentforge_core.Tool<{
683
+ directory: string;
684
+ pattern: string;
685
+ recursive?: boolean | undefined;
686
+ caseSensitive?: boolean | undefined;
687
+ }, {
688
+ success: boolean;
689
+ directory: string;
690
+ pattern: string;
691
+ matches: string[];
692
+ count: number;
693
+ error?: undefined;
694
+ } | {
695
+ success: boolean;
696
+ error: string;
697
+ directory: string;
698
+ pattern?: undefined;
699
+ matches?: undefined;
700
+ count?: undefined;
701
+ }>;
702
+
703
+ /**
704
+ * Path Utilities Tools
705
+ *
706
+ * Tools for working with file paths.
707
+ */
708
+ /**
709
+ * Path join tool
710
+ */
711
+ declare const pathJoin: _agentforge_core.Tool<{
712
+ segments: string[];
713
+ }, {
714
+ path: string;
715
+ segments: string[];
716
+ }>;
717
+ /**
718
+ * Path resolve tool
719
+ */
720
+ declare const pathResolve: _agentforge_core.Tool<{
721
+ paths: string[];
722
+ }, {
723
+ path: string;
724
+ isAbsolute: boolean;
725
+ }>;
726
+ /**
727
+ * Path parse tool
728
+ */
729
+ declare const pathParse: _agentforge_core.Tool<{
730
+ path: string;
731
+ }, {
732
+ root: string;
733
+ dir: string;
734
+ base: string;
735
+ name: string;
736
+ ext: string;
737
+ isAbsolute: boolean;
738
+ }>;
739
+ /**
740
+ * Path basename tool
741
+ */
742
+ declare const pathBasename: _agentforge_core.Tool<{
743
+ path: string;
744
+ removeExtension?: boolean | undefined;
745
+ }, {
746
+ basename: string;
747
+ extension: string;
748
+ }>;
749
+ /**
750
+ * Path dirname tool
751
+ */
752
+ declare const pathDirname: _agentforge_core.Tool<{
753
+ path: string;
754
+ }, {
755
+ dirname: string;
756
+ basename: string;
757
+ }>;
758
+ /**
759
+ * Path extension tool
760
+ */
761
+ declare const pathExtension: _agentforge_core.Tool<{
762
+ path: string;
763
+ }, {
764
+ extension: string;
765
+ hasExtension: boolean;
766
+ filename: string;
767
+ }>;
768
+ /**
769
+ * Path relative tool
770
+ */
771
+ declare const pathRelative: _agentforge_core.Tool<{
772
+ from: string;
773
+ to: string;
774
+ }, {
775
+ relativePath: string;
776
+ from: string;
777
+ to: string;
778
+ }>;
779
+ /**
780
+ * Path normalize tool
781
+ */
782
+ declare const pathNormalize: _agentforge_core.Tool<{
783
+ path: string;
784
+ }, {
785
+ normalized: string;
786
+ original: string;
787
+ }>;
788
+
789
+ /**
790
+ * Date and Time Utility Tools
791
+ *
792
+ * Tools for working with dates, times, and timestamps.
793
+ */
794
+ /**
795
+ * Current date/time tool
796
+ */
797
+ declare const currentDateTime: _agentforge_core.Tool<{
798
+ format?: "custom" | "iso" | "unix" | undefined;
799
+ customFormat?: string | undefined;
800
+ timezone?: string | undefined;
801
+ }, {
802
+ formatted: string | number;
803
+ iso: string;
804
+ unix: number;
805
+ year: number;
806
+ month: number;
807
+ day: number;
808
+ hour: number;
809
+ minute: number;
810
+ second: number;
811
+ }>;
812
+ /**
813
+ * Date formatter tool
814
+ */
815
+ declare const dateFormatter: _agentforge_core.Tool<{
816
+ date: string;
817
+ outputFormat: string;
818
+ inputFormat?: string | undefined;
819
+ }, {
820
+ success: boolean;
821
+ error: string;
822
+ formatted?: undefined;
823
+ iso?: undefined;
824
+ } | {
825
+ success: boolean;
826
+ formatted: string;
827
+ iso: string;
828
+ error?: undefined;
829
+ }>;
830
+ /**
831
+ * Date arithmetic tool
832
+ */
833
+ declare const dateArithmetic: _agentforge_core.Tool<{
834
+ date: string;
835
+ operation: "add" | "subtract";
836
+ amount: number;
837
+ unit: "years" | "months" | "weeks" | "days" | "hours" | "minutes" | "seconds";
838
+ }, {
839
+ success: boolean;
840
+ error: string;
841
+ result?: undefined;
842
+ unix?: undefined;
843
+ } | {
844
+ success: boolean;
845
+ result: string;
846
+ unix: number;
847
+ error?: undefined;
848
+ }>;
849
+ /**
850
+ * Date difference tool
851
+ */
852
+ declare const dateDifference: _agentforge_core.Tool<{
853
+ startDate: string;
854
+ endDate: string;
855
+ unit?: "days" | "hours" | "minutes" | undefined;
856
+ }, {
857
+ success: boolean;
858
+ error: string;
859
+ difference?: undefined;
860
+ unit?: undefined;
861
+ startDate?: undefined;
862
+ endDate?: undefined;
863
+ } | {
864
+ success: boolean;
865
+ difference: number;
866
+ unit: "days" | "hours" | "minutes" | undefined;
867
+ startDate: string;
868
+ endDate: string;
869
+ error?: undefined;
870
+ }>;
871
+ /**
872
+ * Date comparison tool
873
+ */
874
+ declare const dateComparison: _agentforge_core.Tool<{
875
+ date1: string;
876
+ date2: string;
877
+ }, {
878
+ success: boolean;
879
+ error: string;
880
+ date1IsBefore?: undefined;
881
+ date1IsAfter?: undefined;
882
+ datesAreEqual?: undefined;
883
+ date1?: undefined;
884
+ date2?: undefined;
885
+ } | {
886
+ success: boolean;
887
+ date1IsBefore: boolean;
888
+ date1IsAfter: boolean;
889
+ datesAreEqual: boolean;
890
+ date1: string;
891
+ date2: string;
892
+ error?: undefined;
893
+ }>;
894
+
895
+ /**
896
+ * String Utility Tools
897
+ *
898
+ * Tools for string manipulation and transformation.
899
+ */
900
+ /**
901
+ * String case converter tool
902
+ */
903
+ declare const stringCaseConverter: _agentforge_core.Tool<{
904
+ text: string;
905
+ targetCase: "title" | "lowercase" | "uppercase" | "camel" | "snake" | "kebab" | "pascal";
906
+ }, {
907
+ original: string;
908
+ converted: string;
909
+ targetCase: "title" | "lowercase" | "uppercase" | "camel" | "snake" | "kebab" | "pascal";
910
+ }>;
911
+ /**
912
+ * String trim tool
913
+ */
914
+ declare const stringTrim: _agentforge_core.Tool<{
915
+ text: string;
916
+ mode?: "both" | "start" | "end" | undefined;
917
+ characters?: string | undefined;
918
+ }, {
919
+ original: string;
920
+ trimmed: string;
921
+ removed: number;
922
+ }>;
923
+ /**
924
+ * String replace tool
925
+ */
926
+ declare const stringReplace: _agentforge_core.Tool<{
927
+ text: string;
928
+ search: string;
929
+ replace: string;
930
+ global?: boolean | undefined;
931
+ caseInsensitive?: boolean | undefined;
932
+ }, {
933
+ original: string;
934
+ result: string;
935
+ replacements: number;
936
+ }>;
937
+ /**
938
+ * String split tool
939
+ */
940
+ declare const stringSplit: _agentforge_core.Tool<{
941
+ text: string;
942
+ delimiter: string;
943
+ limit?: number | undefined;
944
+ }, {
945
+ parts: string[];
946
+ count: number;
947
+ }>;
948
+ /**
949
+ * String join tool
950
+ */
951
+ declare const stringJoin: _agentforge_core.Tool<{
952
+ parts: string[];
953
+ separator?: string | undefined;
954
+ }, {
955
+ result: string;
956
+ partCount: number;
957
+ length: number;
958
+ }>;
959
+ /**
960
+ * String substring tool
961
+ */
962
+ declare const stringSubstring: _agentforge_core.Tool<{
963
+ text: string;
964
+ start: number;
965
+ end?: number | undefined;
966
+ }, {
967
+ result: string;
968
+ length: number;
969
+ start: number;
970
+ end: number;
971
+ }>;
972
+ /**
973
+ * String length tool
974
+ */
975
+ declare const stringLength: _agentforge_core.Tool<{
976
+ text: string;
977
+ }, {
978
+ characters: number;
979
+ words: number;
980
+ lines: number;
981
+ }>;
982
+
983
+ /**
984
+ * Math Operations Tools
985
+ *
986
+ * Tools for mathematical calculations and operations.
987
+ */
988
+ /**
989
+ * Calculator tool
990
+ */
991
+ declare const calculator: _agentforge_core.Tool<{
992
+ a: number;
993
+ b: number;
994
+ operation: "add" | "subtract" | "multiply" | "divide" | "power" | "modulo";
995
+ }, {
996
+ success: boolean;
997
+ error: string;
998
+ result?: undefined;
999
+ operation?: undefined;
1000
+ a?: undefined;
1001
+ b?: undefined;
1002
+ } | {
1003
+ success: boolean;
1004
+ result: number;
1005
+ operation: "add" | "subtract" | "multiply" | "divide" | "power" | "modulo";
1006
+ a: number;
1007
+ b: number;
1008
+ error?: undefined;
1009
+ }>;
1010
+ /**
1011
+ * Math functions tool
1012
+ */
1013
+ declare const mathFunctions: _agentforge_core.Tool<{
1014
+ function: "sqrt" | "abs" | "round" | "floor" | "ceil" | "sin" | "cos" | "tan" | "log" | "exp";
1015
+ value: number;
1016
+ }, {
1017
+ success: boolean;
1018
+ error: string;
1019
+ result?: undefined;
1020
+ function?: undefined;
1021
+ input?: undefined;
1022
+ } | {
1023
+ success: boolean;
1024
+ result: number;
1025
+ function: "sqrt" | "abs" | "round" | "floor" | "ceil" | "sin" | "cos" | "tan" | "log" | "exp";
1026
+ input: number;
1027
+ error?: undefined;
1028
+ }>;
1029
+ /**
1030
+ * Random number generator tool
1031
+ */
1032
+ declare const randomNumber: _agentforge_core.Tool<{
1033
+ integer?: boolean | undefined;
1034
+ min?: number | undefined;
1035
+ max?: number | undefined;
1036
+ }, {
1037
+ result: number;
1038
+ min: number;
1039
+ max: number;
1040
+ integer: boolean;
1041
+ }>;
1042
+ /**
1043
+ * Statistics tool
1044
+ */
1045
+ declare const statistics: _agentforge_core.Tool<{
1046
+ numbers: number[];
1047
+ }, {
1048
+ success: boolean;
1049
+ error: string;
1050
+ count?: undefined;
1051
+ sum?: undefined;
1052
+ average?: undefined;
1053
+ min?: undefined;
1054
+ max?: undefined;
1055
+ median?: undefined;
1056
+ standardDeviation?: undefined;
1057
+ variance?: undefined;
1058
+ } | {
1059
+ success: boolean;
1060
+ count: number;
1061
+ sum: number;
1062
+ average: number;
1063
+ min: number;
1064
+ max: number;
1065
+ median: number;
1066
+ standardDeviation: number;
1067
+ variance: number;
1068
+ error?: undefined;
1069
+ }>;
1070
+
1071
+ /**
1072
+ * Validation Utility Tools
1073
+ *
1074
+ * Tools for validating data formats and types.
1075
+ */
1076
+ /**
1077
+ * Email validator tool
1078
+ */
1079
+ declare const emailValidator: _agentforge_core.Tool<{
1080
+ email: string;
1081
+ }, {
1082
+ valid: boolean;
1083
+ email: string;
1084
+ message: string;
1085
+ }>;
1086
+ /**
1087
+ * URL validator tool (already exists in web tools, but adding here for completeness)
1088
+ */
1089
+ declare const urlValidatorSimple: _agentforge_core.Tool<{
1090
+ url: string;
1091
+ }, {
1092
+ valid: boolean;
1093
+ url: string;
1094
+ message: string;
1095
+ }>;
1096
+ /**
1097
+ * Phone number validator tool
1098
+ */
1099
+ declare const phoneValidator: _agentforge_core.Tool<{
1100
+ phone: string;
1101
+ strict?: boolean | undefined;
1102
+ }, {
1103
+ valid: boolean;
1104
+ phone: string;
1105
+ message: string;
1106
+ }>;
1107
+ /**
1108
+ * Credit card validator tool
1109
+ */
1110
+ declare const creditCardValidator: _agentforge_core.Tool<{
1111
+ cardNumber: string;
1112
+ }, {
1113
+ valid: boolean;
1114
+ message: string;
1115
+ cardNumber?: undefined;
1116
+ } | {
1117
+ valid: boolean;
1118
+ cardNumber: string;
1119
+ message: string;
1120
+ }>;
1121
+ /**
1122
+ * IP address validator tool
1123
+ */
1124
+ declare const ipValidator: _agentforge_core.Tool<{
1125
+ ip: string;
1126
+ version?: "v4" | "v6" | "any" | undefined;
1127
+ }, {
1128
+ valid: boolean;
1129
+ ip: string;
1130
+ version: string | undefined;
1131
+ message: string;
1132
+ }>;
1133
+ /**
1134
+ * UUID validator tool
1135
+ */
1136
+ declare const uuidValidator: _agentforge_core.Tool<{
1137
+ uuid: string;
1138
+ }, {
1139
+ valid: boolean;
1140
+ uuid: string;
1141
+ version: number | undefined;
1142
+ message: string;
1143
+ }>;
1144
+
1145
+ export { type HttpResponse, type ScraperResult, type UrlValidationResult, arrayFilter, arrayGroupBy, arrayMap, arraySort, calculator, creditCardValidator, csvGenerator, csvParser, csvToJson, currentDateTime, dateArithmetic, dateComparison, dateDifference, dateFormatter, directoryCreate, directoryDelete, directoryList, emailValidator, extractImages, extractLinks, fileAppend, fileDelete, fileExists, fileReader, fileSearch, fileWriter, htmlParser, httpClient, httpGet, httpPost, ipValidator, jsonMerge, jsonParser, jsonQuery, jsonStringify, jsonToCsv, jsonToXml, jsonValidator, mathFunctions, objectOmit, objectPick, pathBasename, pathDirname, pathExtension, pathJoin, pathNormalize, pathParse, pathRelative, pathResolve, phoneValidator, randomNumber, statistics, stringCaseConverter, stringJoin, stringLength, stringReplace, stringSplit, stringSubstring, stringTrim, urlBuilder, urlQueryParser, urlValidator, urlValidatorSimple, uuidValidator, webScraper, xmlGenerator, xmlParser, xmlToJson };