Skip to content

Commit 403756a

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

File tree

6 files changed

+414
-19
lines changed

6 files changed

+414
-19
lines changed

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

Lines changed: 194 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,89 @@ 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+
],
707+
},
708+
"and": [Function],
709+
"array": [Function],
710+
"brand": [Function],
711+
"catch": [Function],
712+
"default": [Function],
713+
"describe": [Function],
714+
"isNullable": [Function],
715+
"isOptional": [Function],
716+
"nullable": [Function],
717+
"nullish": [Function],
718+
"optional": [Function],
719+
"or": [Function],
720+
"parse": [Function],
721+
"parseAsync": [Function],
722+
"pipe": [Function],
723+
"promise": [Function],
724+
"readonly": [Function],
725+
"refine": [Function],
726+
"refinement": [Function],
727+
"safeParse": [Function],
728+
"safeParseAsync": [Function],
729+
"spa": [Function],
730+
"superRefine": [Function],
731+
"transform": [Function],
732+
"~standard": {
733+
"validate": [Function],
734+
"vendor": "zod",
735+
"version": 1,
736+
},
737+
},
738+
"typeName": "ZodDefault",
739+
},
740+
"and": [Function],
741+
"array": [Function],
742+
"brand": [Function],
743+
"catch": [Function],
744+
"default": [Function],
745+
"describe": [Function],
746+
"isNullable": [Function],
747+
"isOptional": [Function],
748+
"nullable": [Function],
749+
"nullish": [Function],
750+
"optional": [Function],
751+
"or": [Function],
752+
"parse": [Function],
753+
"parseAsync": [Function],
754+
"pipe": [Function],
755+
"promise": [Function],
756+
"readonly": [Function],
757+
"refine": [Function],
758+
"refinement": [Function],
759+
"safeParse": [Function],
760+
"safeParseAsync": [Function],
761+
"spa": [Function],
762+
"superRefine": [Function],
763+
"transform": [Function],
764+
"~standard": {
765+
"validate": [Function],
766+
"vendor": "zod",
767+
"version": 1,
768+
},
769+
},
770+
},
692771
},
693772
[Function],
694773
],
@@ -734,6 +813,118 @@ exports[`runServer should attempt to run server, use default tools: console 1`]
734813
"version": 1,
735814
},
736815
},
816+
"packageName": ZodDefault {
817+
"_def": {
818+
"defaultValue": [Function],
819+
"description": "Name of the patternfly package to get component from",
820+
"errorMap": [Function],
821+
"innerType": ZodOptional {
822+
"_def": {
823+
"description": "Name of the patternfly package to get component from",
824+
"errorMap": [Function],
825+
"innerType": ZodEnum {
826+
"_def": {
827+
"typeName": "ZodEnum",
828+
"values": [
829+
"@patternfly/react-core",
830+
"@patternfly/react-table",
831+
"@patternfly/react-data-view",
832+
],
833+
},
834+
"and": [Function],
835+
"array": [Function],
836+
"brand": [Function],
837+
"catch": [Function],
838+
"default": [Function],
839+
"describe": [Function],
840+
"isNullable": [Function],
841+
"isOptional": [Function],
842+
"nullable": [Function],
843+
"nullish": [Function],
844+
"optional": [Function],
845+
"or": [Function],
846+
"parse": [Function],
847+
"parseAsync": [Function],
848+
"pipe": [Function],
849+
"promise": [Function],
850+
"readonly": [Function],
851+
"refine": [Function],
852+
"refinement": [Function],
853+
"safeParse": [Function],
854+
"safeParseAsync": [Function],
855+
"spa": [Function],
856+
"superRefine": [Function],
857+
"transform": [Function],
858+
"~standard": {
859+
"validate": [Function],
860+
"vendor": "zod",
861+
"version": 1,
862+
},
863+
},
864+
"typeName": "ZodOptional",
865+
},
866+
"and": [Function],
867+
"array": [Function],
868+
"brand": [Function],
869+
"catch": [Function],
870+
"default": [Function],
871+
"describe": [Function],
872+
"isNullable": [Function],
873+
"isOptional": [Function],
874+
"nullable": [Function],
875+
"nullish": [Function],
876+
"optional": [Function],
877+
"or": [Function],
878+
"parse": [Function],
879+
"parseAsync": [Function],
880+
"pipe": [Function],
881+
"promise": [Function],
882+
"readonly": [Function],
883+
"refine": [Function],
884+
"refinement": [Function],
885+
"safeParse": [Function],
886+
"safeParseAsync": [Function],
887+
"spa": [Function],
888+
"superRefine": [Function],
889+
"transform": [Function],
890+
"~standard": {
891+
"validate": [Function],
892+
"vendor": "zod",
893+
"version": 1,
894+
},
895+
},
896+
"typeName": "ZodDefault",
897+
},
898+
"and": [Function],
899+
"array": [Function],
900+
"brand": [Function],
901+
"catch": [Function],
902+
"default": [Function],
903+
"describe": [Function],
904+
"isNullable": [Function],
905+
"isOptional": [Function],
906+
"nullable": [Function],
907+
"nullish": [Function],
908+
"optional": [Function],
909+
"or": [Function],
910+
"parse": [Function],
911+
"parseAsync": [Function],
912+
"pipe": [Function],
913+
"promise": [Function],
914+
"readonly": [Function],
915+
"refine": [Function],
916+
"refinement": [Function],
917+
"safeParse": [Function],
918+
"safeParseAsync": [Function],
919+
"spa": [Function],
920+
"superRefine": [Function],
921+
"transform": [Function],
922+
"~standard": {
923+
"validate": [Function],
924+
"vendor": "zod",
925+
"version": 1,
926+
},
927+
},
737928
},
738929
},
739930
[Function],

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

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,89 @@
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+
],
24+
},
25+
"and": [Function],
26+
"array": [Function],
27+
"brand": [Function],
28+
"catch": [Function],
29+
"default": [Function],
30+
"describe": [Function],
31+
"isNullable": [Function],
32+
"isOptional": [Function],
33+
"nullable": [Function],
34+
"nullish": [Function],
35+
"optional": [Function],
36+
"or": [Function],
37+
"parse": [Function],
38+
"parseAsync": [Function],
39+
"pipe": [Function],
40+
"promise": [Function],
41+
"readonly": [Function],
42+
"refine": [Function],
43+
"refinement": [Function],
44+
"safeParse": [Function],
45+
"safeParseAsync": [Function],
46+
"spa": [Function],
47+
"superRefine": [Function],
48+
"transform": [Function],
49+
"~standard": {
50+
"validate": [Function],
51+
"vendor": "zod",
52+
"version": 1,
53+
},
54+
},
55+
"typeName": "ZodDefault",
56+
},
57+
"and": [Function],
58+
"array": [Function],
59+
"brand": [Function],
60+
"catch": [Function],
61+
"default": [Function],
62+
"describe": [Function],
63+
"isNullable": [Function],
64+
"isOptional": [Function],
65+
"nullable": [Function],
66+
"nullish": [Function],
67+
"optional": [Function],
68+
"or": [Function],
69+
"parse": [Function],
70+
"parseAsync": [Function],
71+
"pipe": [Function],
72+
"promise": [Function],
73+
"readonly": [Function],
74+
"refine": [Function],
75+
"refinement": [Function],
76+
"safeParse": [Function],
77+
"safeParseAsync": [Function],
78+
"spa": [Function],
79+
"superRefine": [Function],
80+
"transform": [Function],
81+
"~standard": {
82+
"validate": [Function],
83+
"vendor": "zod",
84+
"version": 1,
85+
},
86+
},
87+
},
988
},
1089
[Function],
1190
]

0 commit comments

Comments
 (0)