Skip to content

Commit ca93cdb

Browse files
committed
feat: extend local package tools with additional packages
1 parent 6dd5039 commit ca93cdb

File tree

7 files changed

+422
-22
lines changed

7 files changed

+422
-22
lines changed

src/__tests__/__snapshots__/server.test.ts.snap

Lines changed: 196 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ exports[`runServer should attempt to run server, use default tools: console 1`]
231231
"Registered tool: componentSchemas",
232232
],
233233
[
234-
"Registered tool: getAvailableModulesTool",
234+
"Registered tool: getAvailableModules",
235235
],
236236
[
237237
"Registered tool: getComponentSourceCode",
@@ -685,10 +685,90 @@ exports[`runServer should attempt to run server, use default tools: console 1`]
685685
[Function],
686686
],
687687
[
688-
"getAvailableModulesTool",
688+
"getAvailableModules",
689689
{
690690
"description": "Retrieves a list of available Patternfly react-core modules in the current environment.",
691-
"inputSchema": {},
691+
"inputSchema": {
692+
"packageName": ZodDefault {
693+
"_def": {
694+
"defaultValue": [Function],
695+
"description": "Name of the patternfly package to get modules for",
696+
"errorMap": [Function],
697+
"innerType": ZodEnum {
698+
"_def": {
699+
"description": "Name of the patternfly package to get modules for",
700+
"typeName": "ZodEnum",
701+
"values": [
702+
"@patternfly/react-core",
703+
"@patternfly/react-icons",
704+
"@patternfly/react-table",
705+
"@patternfly/react-data-view",
706+
"@patternfly/react-component-groups",
707+
],
708+
},
709+
"and": [Function],
710+
"array": [Function],
711+
"brand": [Function],
712+
"catch": [Function],
713+
"default": [Function],
714+
"describe": [Function],
715+
"isNullable": [Function],
716+
"isOptional": [Function],
717+
"nullable": [Function],
718+
"nullish": [Function],
719+
"optional": [Function],
720+
"or": [Function],
721+
"parse": [Function],
722+
"parseAsync": [Function],
723+
"pipe": [Function],
724+
"promise": [Function],
725+
"readonly": [Function],
726+
"refine": [Function],
727+
"refinement": [Function],
728+
"safeParse": [Function],
729+
"safeParseAsync": [Function],
730+
"spa": [Function],
731+
"superRefine": [Function],
732+
"transform": [Function],
733+
"~standard": {
734+
"validate": [Function],
735+
"vendor": "zod",
736+
"version": 1,
737+
},
738+
},
739+
"typeName": "ZodDefault",
740+
},
741+
"and": [Function],
742+
"array": [Function],
743+
"brand": [Function],
744+
"catch": [Function],
745+
"default": [Function],
746+
"describe": [Function],
747+
"isNullable": [Function],
748+
"isOptional": [Function],
749+
"nullable": [Function],
750+
"nullish": [Function],
751+
"optional": [Function],
752+
"or": [Function],
753+
"parse": [Function],
754+
"parseAsync": [Function],
755+
"pipe": [Function],
756+
"promise": [Function],
757+
"readonly": [Function],
758+
"refine": [Function],
759+
"refinement": [Function],
760+
"safeParse": [Function],
761+
"safeParseAsync": [Function],
762+
"spa": [Function],
763+
"superRefine": [Function],
764+
"transform": [Function],
765+
"~standard": {
766+
"validate": [Function],
767+
"vendor": "zod",
768+
"version": 1,
769+
},
770+
},
771+
},
692772
},
693773
[Function],
694774
],
@@ -734,6 +814,119 @@ exports[`runServer should attempt to run server, use default tools: console 1`]
734814
"version": 1,
735815
},
736816
},
817+
"packageName": ZodDefault {
818+
"_def": {
819+
"defaultValue": [Function],
820+
"description": "Name of the patternfly package to get component from",
821+
"errorMap": [Function],
822+
"innerType": ZodOptional {
823+
"_def": {
824+
"description": "Name of the patternfly package to get component from",
825+
"errorMap": [Function],
826+
"innerType": ZodEnum {
827+
"_def": {
828+
"typeName": "ZodEnum",
829+
"values": [
830+
"@patternfly/react-core",
831+
"@patternfly/react-table",
832+
"@patternfly/react-data-view",
833+
"@patternfly/react-component-groups",
834+
],
835+
},
836+
"and": [Function],
837+
"array": [Function],
838+
"brand": [Function],
839+
"catch": [Function],
840+
"default": [Function],
841+
"describe": [Function],
842+
"isNullable": [Function],
843+
"isOptional": [Function],
844+
"nullable": [Function],
845+
"nullish": [Function],
846+
"optional": [Function],
847+
"or": [Function],
848+
"parse": [Function],
849+
"parseAsync": [Function],
850+
"pipe": [Function],
851+
"promise": [Function],
852+
"readonly": [Function],
853+
"refine": [Function],
854+
"refinement": [Function],
855+
"safeParse": [Function],
856+
"safeParseAsync": [Function],
857+
"spa": [Function],
858+
"superRefine": [Function],
859+
"transform": [Function],
860+
"~standard": {
861+
"validate": [Function],
862+
"vendor": "zod",
863+
"version": 1,
864+
},
865+
},
866+
"typeName": "ZodOptional",
867+
},
868+
"and": [Function],
869+
"array": [Function],
870+
"brand": [Function],
871+
"catch": [Function],
872+
"default": [Function],
873+
"describe": [Function],
874+
"isNullable": [Function],
875+
"isOptional": [Function],
876+
"nullable": [Function],
877+
"nullish": [Function],
878+
"optional": [Function],
879+
"or": [Function],
880+
"parse": [Function],
881+
"parseAsync": [Function],
882+
"pipe": [Function],
883+
"promise": [Function],
884+
"readonly": [Function],
885+
"refine": [Function],
886+
"refinement": [Function],
887+
"safeParse": [Function],
888+
"safeParseAsync": [Function],
889+
"spa": [Function],
890+
"superRefine": [Function],
891+
"transform": [Function],
892+
"~standard": {
893+
"validate": [Function],
894+
"vendor": "zod",
895+
"version": 1,
896+
},
897+
},
898+
"typeName": "ZodDefault",
899+
},
900+
"and": [Function],
901+
"array": [Function],
902+
"brand": [Function],
903+
"catch": [Function],
904+
"default": [Function],
905+
"describe": [Function],
906+
"isNullable": [Function],
907+
"isOptional": [Function],
908+
"nullable": [Function],
909+
"nullish": [Function],
910+
"optional": [Function],
911+
"or": [Function],
912+
"parse": [Function],
913+
"parseAsync": [Function],
914+
"pipe": [Function],
915+
"promise": [Function],
916+
"readonly": [Function],
917+
"refine": [Function],
918+
"refinement": [Function],
919+
"safeParse": [Function],
920+
"safeParseAsync": [Function],
921+
"spa": [Function],
922+
"superRefine": [Function],
923+
"transform": [Function],
924+
"~standard": {
925+
"validate": [Function],
926+
"vendor": "zod",
927+
"version": 1,
928+
},
929+
},
737930
},
738931
},
739932
[Function],

src/__tests__/__snapshots__/tool.getAvailableModules.test.ts.snap

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,90 @@
22

33
exports[`getAvailableModulesTool should have a consistent return structure: structure 1`] = `
44
[
5-
"getAvailableModulesTool",
5+
"getAvailableModules",
66
{
77
"description": "Retrieves a list of available Patternfly react-core modules in the current environment.",
8-
"inputSchema": {},
8+
"inputSchema": {
9+
"packageName": ZodDefault {
10+
"_def": {
11+
"defaultValue": [Function],
12+
"description": "Name of the patternfly package to get modules for",
13+
"errorMap": [Function],
14+
"innerType": ZodEnum {
15+
"_def": {
16+
"description": "Name of the patternfly package to get modules for",
17+
"typeName": "ZodEnum",
18+
"values": [
19+
"@patternfly/react-core",
20+
"@patternfly/react-icons",
21+
"@patternfly/react-table",
22+
"@patternfly/react-data-view",
23+
"@patternfly/react-component-groups",
24+
],
25+
},
26+
"and": [Function],
27+
"array": [Function],
28+
"brand": [Function],
29+
"catch": [Function],
30+
"default": [Function],
31+
"describe": [Function],
32+
"isNullable": [Function],
33+
"isOptional": [Function],
34+
"nullable": [Function],
35+
"nullish": [Function],
36+
"optional": [Function],
37+
"or": [Function],
38+
"parse": [Function],
39+
"parseAsync": [Function],
40+
"pipe": [Function],
41+
"promise": [Function],
42+
"readonly": [Function],
43+
"refine": [Function],
44+
"refinement": [Function],
45+
"safeParse": [Function],
46+
"safeParseAsync": [Function],
47+
"spa": [Function],
48+
"superRefine": [Function],
49+
"transform": [Function],
50+
"~standard": {
51+
"validate": [Function],
52+
"vendor": "zod",
53+
"version": 1,
54+
},
55+
},
56+
"typeName": "ZodDefault",
57+
},
58+
"and": [Function],
59+
"array": [Function],
60+
"brand": [Function],
61+
"catch": [Function],
62+
"default": [Function],
63+
"describe": [Function],
64+
"isNullable": [Function],
65+
"isOptional": [Function],
66+
"nullable": [Function],
67+
"nullish": [Function],
68+
"optional": [Function],
69+
"or": [Function],
70+
"parse": [Function],
71+
"parseAsync": [Function],
72+
"pipe": [Function],
73+
"promise": [Function],
74+
"readonly": [Function],
75+
"refine": [Function],
76+
"refinement": [Function],
77+
"safeParse": [Function],
78+
"safeParseAsync": [Function],
79+
"spa": [Function],
80+
"superRefine": [Function],
81+
"transform": [Function],
82+
"~standard": {
83+
"validate": [Function],
84+
"vendor": "zod",
85+
"version": 1,
86+
},
87+
},
88+
},
989
},
1090
[Function],
1191
]

0 commit comments

Comments
 (0)