@juspay/neurolink 7.8.0 → 7.10.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +22 -5
  2. package/README.md +22 -7
  3. package/dist/agent/directTools.d.ts +23 -843
  4. package/dist/agent/directTools.js +1 -3
  5. package/dist/cli/commands/mcp.js +66 -27
  6. package/dist/cli/commands/ollama.js +7 -3
  7. package/dist/cli/commands/sagemaker.js +145 -144
  8. package/dist/cli/factories/commandFactory.js +10 -6
  9. package/dist/core/dynamicModels.js +6 -0
  10. package/dist/core/types.d.ts +15 -4
  11. package/dist/core/types.js +23 -3
  12. package/dist/factories/providerFactory.js +10 -1
  13. package/dist/factories/providerRegistry.js +1 -1
  14. package/dist/lib/agent/directTools.d.ts +23 -843
  15. package/dist/lib/agent/directTools.js +1 -3
  16. package/dist/lib/core/dynamicModels.js +6 -0
  17. package/dist/lib/core/types.d.ts +15 -4
  18. package/dist/lib/core/types.js +23 -3
  19. package/dist/lib/factories/providerFactory.js +10 -1
  20. package/dist/lib/factories/providerRegistry.js +1 -1
  21. package/dist/lib/neurolink.d.ts +15 -0
  22. package/dist/lib/neurolink.js +73 -1
  23. package/dist/lib/providers/googleVertex.d.ts +4 -0
  24. package/dist/lib/providers/googleVertex.js +44 -3
  25. package/dist/lib/providers/sagemaker/client.js +2 -2
  26. package/dist/lib/sdk/toolRegistration.d.ts +1 -1
  27. package/dist/lib/sdk/toolRegistration.js +13 -5
  28. package/dist/lib/utils/providerHealth.js +20 -5
  29. package/dist/mcp/servers/agent/directToolsServer.js +0 -1
  30. package/dist/mcp/servers/aiProviders/aiCoreServer.js +0 -1
  31. package/dist/models/modelResolver.js +0 -1
  32. package/dist/neurolink.d.ts +15 -0
  33. package/dist/neurolink.js +73 -1
  34. package/dist/providers/amazonBedrock.js +2 -2
  35. package/dist/providers/anthropic.js +2 -2
  36. package/dist/providers/anthropicBaseProvider.js +2 -2
  37. package/dist/providers/googleAiStudio.js +2 -3
  38. package/dist/providers/googleVertex.d.ts +4 -0
  39. package/dist/providers/googleVertex.js +44 -3
  40. package/dist/providers/litellm.js +4 -4
  41. package/dist/providers/ollama.js +1 -2
  42. package/dist/providers/openAI.js +2 -2
  43. package/dist/providers/openaiCompatible.js +1 -2
  44. package/dist/providers/sagemaker/client.js +2 -2
  45. package/dist/providers/sagemaker/errors.js +1 -1
  46. package/dist/providers/sagemaker/language-model.js +1 -1
  47. package/dist/sdk/toolRegistration.d.ts +1 -1
  48. package/dist/sdk/toolRegistration.js +13 -6
  49. package/dist/telemetry/telemetryService.js +0 -2
  50. package/dist/types/tools.js +0 -1
  51. package/dist/utils/providerHealth.js +20 -5
  52. package/package.json +43 -5
@@ -348,851 +348,31 @@ export declare const directAgentTools: {
348
348
  };
349
349
  };
350
350
  /**
351
- * Get a subset of tools for specific use cases
351
+ * Type aliases for specific tool categories
352
352
  */
353
- export declare function getToolsForCategory(category?: "basic" | "filesystem" | "utility" | "all"): {
354
- getCurrentTime: import("ai").Tool<z.ZodObject<{
355
- timezone: z.ZodOptional<z.ZodString>;
356
- }, "strip", z.ZodTypeAny, {
357
- timezone?: string | undefined;
358
- }, {
359
- timezone?: string | undefined;
360
- }>, {
361
- success: boolean;
362
- time: string;
363
- timezone: string;
364
- iso: string;
365
- timestamp?: undefined;
366
- error?: undefined;
367
- } | {
368
- success: boolean;
369
- time: string;
370
- iso: string;
371
- timestamp: number;
372
- timezone?: undefined;
373
- error?: undefined;
374
- } | {
375
- success: boolean;
376
- error: string;
377
- time?: undefined;
378
- timezone?: undefined;
379
- iso?: undefined;
380
- timestamp?: undefined;
381
- }> & {
382
- execute: (args: {
383
- timezone?: string | undefined;
384
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
385
- success: boolean;
386
- time: string;
387
- timezone: string;
388
- iso: string;
389
- timestamp?: undefined;
390
- error?: undefined;
391
- } | {
392
- success: boolean;
393
- time: string;
394
- iso: string;
395
- timestamp: number;
396
- timezone?: undefined;
397
- error?: undefined;
398
- } | {
399
- success: boolean;
400
- error: string;
401
- time?: undefined;
402
- timezone?: undefined;
403
- iso?: undefined;
404
- timestamp?: undefined;
405
- }>;
406
- };
407
- readFile: import("ai").Tool<z.ZodObject<{
408
- path: z.ZodString;
409
- }, "strip", z.ZodTypeAny, {
410
- path: string;
411
- }, {
412
- path: string;
413
- }>, {
414
- success: boolean;
415
- error: string;
416
- content?: undefined;
417
- size?: undefined;
418
- path?: undefined;
419
- lastModified?: undefined;
420
- } | {
421
- success: boolean;
422
- content: string;
423
- size: number;
424
- path: string;
425
- lastModified: string;
426
- error?: undefined;
427
- } | {
428
- success: boolean;
429
- error: string;
430
- path: string;
431
- content?: undefined;
432
- size?: undefined;
433
- lastModified?: undefined;
434
- }> & {
435
- execute: (args: {
436
- path: string;
437
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
438
- success: boolean;
439
- error: string;
440
- content?: undefined;
441
- size?: undefined;
442
- path?: undefined;
443
- lastModified?: undefined;
444
- } | {
445
- success: boolean;
446
- content: string;
447
- size: number;
448
- path: string;
449
- lastModified: string;
450
- error?: undefined;
451
- } | {
452
- success: boolean;
453
- error: string;
454
- path: string;
455
- content?: undefined;
456
- size?: undefined;
457
- lastModified?: undefined;
458
- }>;
459
- };
460
- listDirectory: import("ai").Tool<z.ZodObject<{
461
- path: z.ZodString;
462
- includeHidden: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
463
- }, "strip", z.ZodTypeAny, {
464
- path: string;
465
- includeHidden: boolean;
466
- }, {
467
- path: string;
468
- includeHidden?: boolean | undefined;
469
- }>, {
470
- success: boolean;
471
- path: string;
472
- items: {
473
- name: string;
474
- type: string;
475
- size: number | undefined;
476
- lastModified: string;
477
- }[];
478
- count: number;
479
- error?: undefined;
480
- } | {
481
- success: boolean;
482
- error: string;
483
- path: string;
484
- items?: undefined;
485
- count?: undefined;
486
- }> & {
487
- execute: (args: {
488
- path: string;
489
- includeHidden: boolean;
490
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
491
- success: boolean;
492
- path: string;
493
- items: {
494
- name: string;
495
- type: string;
496
- size: number | undefined;
497
- lastModified: string;
498
- }[];
499
- count: number;
500
- error?: undefined;
501
- } | {
502
- success: boolean;
503
- error: string;
504
- path: string;
505
- items?: undefined;
506
- count?: undefined;
507
- }>;
508
- };
509
- calculateMath: import("ai").Tool<z.ZodObject<{
510
- expression: z.ZodString;
511
- precision: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
512
- }, "strip", z.ZodTypeAny, {
513
- expression: string;
514
- precision: number;
515
- }, {
516
- expression: string;
517
- precision?: number | undefined;
518
- }>, {
519
- success: boolean;
520
- error: string;
521
- expression?: undefined;
522
- result?: undefined;
523
- type?: undefined;
524
- } | {
525
- success: boolean;
526
- expression: string;
527
- result: any;
528
- type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
529
- error?: undefined;
530
- } | {
531
- success: boolean;
532
- error: string;
533
- expression: string;
534
- result?: undefined;
535
- type?: undefined;
536
- }> & {
537
- execute: (args: {
538
- expression: string;
539
- precision: number;
540
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
541
- success: boolean;
542
- error: string;
543
- expression?: undefined;
544
- result?: undefined;
545
- type?: undefined;
546
- } | {
547
- success: boolean;
548
- expression: string;
549
- result: any;
550
- type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
551
- error?: undefined;
552
- } | {
553
- success: boolean;
554
- error: string;
555
- expression: string;
556
- result?: undefined;
557
- type?: undefined;
558
- }>;
559
- };
560
- writeFile: import("ai").Tool<z.ZodObject<{
561
- path: z.ZodString;
562
- content: z.ZodString;
563
- mode: z.ZodDefault<z.ZodEnum<["create", "overwrite", "append"]>>;
564
- }, "strip", z.ZodTypeAny, {
565
- path: string;
566
- content: string;
567
- mode: "create" | "overwrite" | "append";
568
- }, {
569
- path: string;
570
- content: string;
571
- mode?: "create" | "overwrite" | "append" | undefined;
572
- }>, {
573
- success: boolean;
574
- error: string;
575
- path?: undefined;
576
- mode?: undefined;
577
- size?: undefined;
578
- written?: undefined;
579
- } | {
580
- success: boolean;
581
- path: string;
582
- mode: "create" | "overwrite" | "append";
583
- size: number;
584
- written: number;
585
- error?: undefined;
586
- } | {
587
- success: boolean;
588
- error: string;
589
- path: string;
590
- mode?: undefined;
591
- size?: undefined;
592
- written?: undefined;
593
- }> & {
594
- execute: (args: {
595
- path: string;
596
- content: string;
597
- mode: "create" | "overwrite" | "append";
598
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
599
- success: boolean;
600
- error: string;
601
- path?: undefined;
602
- mode?: undefined;
603
- size?: undefined;
604
- written?: undefined;
605
- } | {
606
- success: boolean;
607
- path: string;
608
- mode: "create" | "overwrite" | "append";
609
- size: number;
610
- written: number;
611
- error?: undefined;
612
- } | {
613
- success: boolean;
614
- error: string;
615
- path: string;
616
- mode?: undefined;
617
- size?: undefined;
618
- written?: undefined;
619
- }>;
620
- };
621
- searchFiles: import("ai").Tool<z.ZodObject<{
622
- directory: z.ZodString;
623
- pattern: z.ZodString;
624
- recursive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
625
- }, "strip", z.ZodTypeAny, {
626
- directory: string;
627
- pattern: string;
628
- recursive: boolean;
629
- }, {
630
- directory: string;
631
- pattern: string;
632
- recursive?: boolean | undefined;
633
- }>, {
634
- success: boolean;
635
- error: string;
636
- directory?: undefined;
637
- pattern?: undefined;
638
- matches?: undefined;
639
- count?: undefined;
640
- } | {
641
- success: boolean;
642
- directory: string;
643
- pattern: string;
644
- matches: {
645
- name: string;
646
- path: string;
647
- size: number;
648
- lastModified: string;
649
- }[];
650
- count: number;
651
- error?: undefined;
652
- } | {
653
- success: boolean;
654
- error: string;
655
- directory: string;
656
- pattern: string;
657
- matches?: undefined;
658
- count?: undefined;
659
- }> & {
660
- execute: (args: {
661
- directory: string;
662
- pattern: string;
663
- recursive: boolean;
664
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
665
- success: boolean;
666
- error: string;
667
- directory?: undefined;
668
- pattern?: undefined;
669
- matches?: undefined;
670
- count?: undefined;
671
- } | {
672
- success: boolean;
673
- directory: string;
674
- pattern: string;
675
- matches: {
676
- name: string;
677
- path: string;
678
- size: number;
679
- lastModified: string;
680
- }[];
681
- count: number;
682
- error?: undefined;
683
- } | {
684
- success: boolean;
685
- error: string;
686
- directory: string;
687
- pattern: string;
688
- matches?: undefined;
689
- count?: undefined;
690
- }>;
691
- };
692
- } | {
693
- getCurrentTime: import("ai").Tool<z.ZodObject<{
694
- timezone: z.ZodOptional<z.ZodString>;
695
- }, "strip", z.ZodTypeAny, {
696
- timezone?: string | undefined;
697
- }, {
698
- timezone?: string | undefined;
699
- }>, {
700
- success: boolean;
701
- time: string;
702
- timezone: string;
703
- iso: string;
704
- timestamp?: undefined;
705
- error?: undefined;
706
- } | {
707
- success: boolean;
708
- time: string;
709
- iso: string;
710
- timestamp: number;
711
- timezone?: undefined;
712
- error?: undefined;
713
- } | {
714
- success: boolean;
715
- error: string;
716
- time?: undefined;
717
- timezone?: undefined;
718
- iso?: undefined;
719
- timestamp?: undefined;
720
- }> & {
721
- execute: (args: {
722
- timezone?: string | undefined;
723
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
724
- success: boolean;
725
- time: string;
726
- timezone: string;
727
- iso: string;
728
- timestamp?: undefined;
729
- error?: undefined;
730
- } | {
731
- success: boolean;
732
- time: string;
733
- iso: string;
734
- timestamp: number;
735
- timezone?: undefined;
736
- error?: undefined;
737
- } | {
738
- success: boolean;
739
- error: string;
740
- time?: undefined;
741
- timezone?: undefined;
742
- iso?: undefined;
743
- timestamp?: undefined;
744
- }>;
745
- };
746
- calculateMath: import("ai").Tool<z.ZodObject<{
747
- expression: z.ZodString;
748
- precision: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
749
- }, "strip", z.ZodTypeAny, {
750
- expression: string;
751
- precision: number;
752
- }, {
753
- expression: string;
754
- precision?: number | undefined;
755
- }>, {
756
- success: boolean;
757
- error: string;
758
- expression?: undefined;
759
- result?: undefined;
760
- type?: undefined;
761
- } | {
762
- success: boolean;
763
- expression: string;
764
- result: any;
765
- type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
766
- error?: undefined;
767
- } | {
768
- success: boolean;
769
- error: string;
770
- expression: string;
771
- result?: undefined;
772
- type?: undefined;
773
- }> & {
774
- execute: (args: {
775
- expression: string;
776
- precision: number;
777
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
778
- success: boolean;
779
- error: string;
780
- expression?: undefined;
781
- result?: undefined;
782
- type?: undefined;
783
- } | {
784
- success: boolean;
785
- expression: string;
786
- result: any;
787
- type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
788
- error?: undefined;
789
- } | {
790
- success: boolean;
791
- error: string;
792
- expression: string;
793
- result?: undefined;
794
- type?: undefined;
795
- }>;
796
- };
797
- readFile?: undefined;
798
- listDirectory?: undefined;
799
- writeFile?: undefined;
800
- searchFiles?: undefined;
801
- } | {
802
- readFile: import("ai").Tool<z.ZodObject<{
803
- path: z.ZodString;
804
- }, "strip", z.ZodTypeAny, {
805
- path: string;
806
- }, {
807
- path: string;
808
- }>, {
809
- success: boolean;
810
- error: string;
811
- content?: undefined;
812
- size?: undefined;
813
- path?: undefined;
814
- lastModified?: undefined;
815
- } | {
816
- success: boolean;
817
- content: string;
818
- size: number;
819
- path: string;
820
- lastModified: string;
821
- error?: undefined;
822
- } | {
823
- success: boolean;
824
- error: string;
825
- path: string;
826
- content?: undefined;
827
- size?: undefined;
828
- lastModified?: undefined;
829
- }> & {
830
- execute: (args: {
831
- path: string;
832
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
833
- success: boolean;
834
- error: string;
835
- content?: undefined;
836
- size?: undefined;
837
- path?: undefined;
838
- lastModified?: undefined;
839
- } | {
840
- success: boolean;
841
- content: string;
842
- size: number;
843
- path: string;
844
- lastModified: string;
845
- error?: undefined;
846
- } | {
847
- success: boolean;
848
- error: string;
849
- path: string;
850
- content?: undefined;
851
- size?: undefined;
852
- lastModified?: undefined;
853
- }>;
854
- };
855
- listDirectory: import("ai").Tool<z.ZodObject<{
856
- path: z.ZodString;
857
- includeHidden: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
858
- }, "strip", z.ZodTypeAny, {
859
- path: string;
860
- includeHidden: boolean;
861
- }, {
862
- path: string;
863
- includeHidden?: boolean | undefined;
864
- }>, {
865
- success: boolean;
866
- path: string;
867
- items: {
868
- name: string;
869
- type: string;
870
- size: number | undefined;
871
- lastModified: string;
872
- }[];
873
- count: number;
874
- error?: undefined;
875
- } | {
876
- success: boolean;
877
- error: string;
878
- path: string;
879
- items?: undefined;
880
- count?: undefined;
881
- }> & {
882
- execute: (args: {
883
- path: string;
884
- includeHidden: boolean;
885
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
886
- success: boolean;
887
- path: string;
888
- items: {
889
- name: string;
890
- type: string;
891
- size: number | undefined;
892
- lastModified: string;
893
- }[];
894
- count: number;
895
- error?: undefined;
896
- } | {
897
- success: boolean;
898
- error: string;
899
- path: string;
900
- items?: undefined;
901
- count?: undefined;
902
- }>;
903
- };
904
- writeFile: import("ai").Tool<z.ZodObject<{
905
- path: z.ZodString;
906
- content: z.ZodString;
907
- mode: z.ZodDefault<z.ZodEnum<["create", "overwrite", "append"]>>;
908
- }, "strip", z.ZodTypeAny, {
909
- path: string;
910
- content: string;
911
- mode: "create" | "overwrite" | "append";
912
- }, {
913
- path: string;
914
- content: string;
915
- mode?: "create" | "overwrite" | "append" | undefined;
916
- }>, {
917
- success: boolean;
918
- error: string;
919
- path?: undefined;
920
- mode?: undefined;
921
- size?: undefined;
922
- written?: undefined;
923
- } | {
924
- success: boolean;
925
- path: string;
926
- mode: "create" | "overwrite" | "append";
927
- size: number;
928
- written: number;
929
- error?: undefined;
930
- } | {
931
- success: boolean;
932
- error: string;
933
- path: string;
934
- mode?: undefined;
935
- size?: undefined;
936
- written?: undefined;
937
- }> & {
938
- execute: (args: {
939
- path: string;
940
- content: string;
941
- mode: "create" | "overwrite" | "append";
942
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
943
- success: boolean;
944
- error: string;
945
- path?: undefined;
946
- mode?: undefined;
947
- size?: undefined;
948
- written?: undefined;
949
- } | {
950
- success: boolean;
951
- path: string;
952
- mode: "create" | "overwrite" | "append";
953
- size: number;
954
- written: number;
955
- error?: undefined;
956
- } | {
957
- success: boolean;
958
- error: string;
959
- path: string;
960
- mode?: undefined;
961
- size?: undefined;
962
- written?: undefined;
963
- }>;
964
- };
965
- searchFiles: import("ai").Tool<z.ZodObject<{
966
- directory: z.ZodString;
967
- pattern: z.ZodString;
968
- recursive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
969
- }, "strip", z.ZodTypeAny, {
970
- directory: string;
971
- pattern: string;
972
- recursive: boolean;
973
- }, {
974
- directory: string;
975
- pattern: string;
976
- recursive?: boolean | undefined;
977
- }>, {
978
- success: boolean;
979
- error: string;
980
- directory?: undefined;
981
- pattern?: undefined;
982
- matches?: undefined;
983
- count?: undefined;
984
- } | {
985
- success: boolean;
986
- directory: string;
987
- pattern: string;
988
- matches: {
989
- name: string;
990
- path: string;
991
- size: number;
992
- lastModified: string;
993
- }[];
994
- count: number;
995
- error?: undefined;
996
- } | {
997
- success: boolean;
998
- error: string;
999
- directory: string;
1000
- pattern: string;
1001
- matches?: undefined;
1002
- count?: undefined;
1003
- }> & {
1004
- execute: (args: {
1005
- directory: string;
1006
- pattern: string;
1007
- recursive: boolean;
1008
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
1009
- success: boolean;
1010
- error: string;
1011
- directory?: undefined;
1012
- pattern?: undefined;
1013
- matches?: undefined;
1014
- count?: undefined;
1015
- } | {
1016
- success: boolean;
1017
- directory: string;
1018
- pattern: string;
1019
- matches: {
1020
- name: string;
1021
- path: string;
1022
- size: number;
1023
- lastModified: string;
1024
- }[];
1025
- count: number;
1026
- error?: undefined;
1027
- } | {
1028
- success: boolean;
1029
- error: string;
1030
- directory: string;
1031
- pattern: string;
1032
- matches?: undefined;
1033
- count?: undefined;
1034
- }>;
1035
- };
1036
- getCurrentTime?: undefined;
1037
- calculateMath?: undefined;
1038
- } | {
1039
- getCurrentTime: import("ai").Tool<z.ZodObject<{
1040
- timezone: z.ZodOptional<z.ZodString>;
1041
- }, "strip", z.ZodTypeAny, {
1042
- timezone?: string | undefined;
1043
- }, {
1044
- timezone?: string | undefined;
1045
- }>, {
1046
- success: boolean;
1047
- time: string;
1048
- timezone: string;
1049
- iso: string;
1050
- timestamp?: undefined;
1051
- error?: undefined;
1052
- } | {
1053
- success: boolean;
1054
- time: string;
1055
- iso: string;
1056
- timestamp: number;
1057
- timezone?: undefined;
1058
- error?: undefined;
1059
- } | {
1060
- success: boolean;
1061
- error: string;
1062
- time?: undefined;
1063
- timezone?: undefined;
1064
- iso?: undefined;
1065
- timestamp?: undefined;
1066
- }> & {
1067
- execute: (args: {
1068
- timezone?: string | undefined;
1069
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
1070
- success: boolean;
1071
- time: string;
1072
- timezone: string;
1073
- iso: string;
1074
- timestamp?: undefined;
1075
- error?: undefined;
1076
- } | {
1077
- success: boolean;
1078
- time: string;
1079
- iso: string;
1080
- timestamp: number;
1081
- timezone?: undefined;
1082
- error?: undefined;
1083
- } | {
1084
- success: boolean;
1085
- error: string;
1086
- time?: undefined;
1087
- timezone?: undefined;
1088
- iso?: undefined;
1089
- timestamp?: undefined;
1090
- }>;
1091
- };
1092
- calculateMath: import("ai").Tool<z.ZodObject<{
1093
- expression: z.ZodString;
1094
- precision: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1095
- }, "strip", z.ZodTypeAny, {
1096
- expression: string;
1097
- precision: number;
1098
- }, {
1099
- expression: string;
1100
- precision?: number | undefined;
1101
- }>, {
1102
- success: boolean;
1103
- error: string;
1104
- expression?: undefined;
1105
- result?: undefined;
1106
- type?: undefined;
1107
- } | {
1108
- success: boolean;
1109
- expression: string;
1110
- result: any;
1111
- type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
1112
- error?: undefined;
1113
- } | {
1114
- success: boolean;
1115
- error: string;
1116
- expression: string;
1117
- result?: undefined;
1118
- type?: undefined;
1119
- }> & {
1120
- execute: (args: {
1121
- expression: string;
1122
- precision: number;
1123
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
1124
- success: boolean;
1125
- error: string;
1126
- expression?: undefined;
1127
- result?: undefined;
1128
- type?: undefined;
1129
- } | {
1130
- success: boolean;
1131
- expression: string;
1132
- result: any;
1133
- type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
1134
- error?: undefined;
1135
- } | {
1136
- success: boolean;
1137
- error: string;
1138
- expression: string;
1139
- result?: undefined;
1140
- type?: undefined;
1141
- }>;
1142
- };
1143
- listDirectory: import("ai").Tool<z.ZodObject<{
1144
- path: z.ZodString;
1145
- includeHidden: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1146
- }, "strip", z.ZodTypeAny, {
1147
- path: string;
1148
- includeHidden: boolean;
1149
- }, {
1150
- path: string;
1151
- includeHidden?: boolean | undefined;
1152
- }>, {
1153
- success: boolean;
1154
- path: string;
1155
- items: {
1156
- name: string;
1157
- type: string;
1158
- size: number | undefined;
1159
- lastModified: string;
1160
- }[];
1161
- count: number;
1162
- error?: undefined;
1163
- } | {
1164
- success: boolean;
1165
- error: string;
1166
- path: string;
1167
- items?: undefined;
1168
- count?: undefined;
1169
- }> & {
1170
- execute: (args: {
1171
- path: string;
1172
- includeHidden: boolean;
1173
- }, options: import("ai").ToolExecutionOptions) => PromiseLike<{
1174
- success: boolean;
1175
- path: string;
1176
- items: {
1177
- name: string;
1178
- type: string;
1179
- size: number | undefined;
1180
- lastModified: string;
1181
- }[];
1182
- count: number;
1183
- error?: undefined;
1184
- } | {
1185
- success: boolean;
1186
- error: string;
1187
- path: string;
1188
- items?: undefined;
1189
- count?: undefined;
1190
- }>;
1191
- };
1192
- readFile?: undefined;
1193
- writeFile?: undefined;
1194
- searchFiles?: undefined;
353
+ export type BasicToolsMap = {
354
+ getCurrentTime: typeof directAgentTools.getCurrentTime;
355
+ calculateMath: typeof directAgentTools.calculateMath;
1195
356
  };
357
+ export type FilesystemToolsMap = {
358
+ readFile: typeof directAgentTools.readFile;
359
+ listDirectory: typeof directAgentTools.listDirectory;
360
+ writeFile: typeof directAgentTools.writeFile;
361
+ searchFiles: typeof directAgentTools.searchFiles;
362
+ };
363
+ export type UtilityToolsMap = {
364
+ getCurrentTime: typeof directAgentTools.getCurrentTime;
365
+ calculateMath: typeof directAgentTools.calculateMath;
366
+ listDirectory: typeof directAgentTools.listDirectory;
367
+ };
368
+ export type AllToolsMap = typeof directAgentTools;
369
+ /**
370
+ * Get a subset of tools for specific use cases with improved type safety
371
+ */
372
+ export declare function getToolsForCategory(category: "basic"): BasicToolsMap;
373
+ export declare function getToolsForCategory(category: "filesystem"): FilesystemToolsMap;
374
+ export declare function getToolsForCategory(category: "utility"): UtilityToolsMap;
375
+ export declare function getToolsForCategory(category: "all"): AllToolsMap;
1196
376
  /**
1197
377
  * Get tool names for validation
1198
378
  */