caplets 0.7.0 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "caplets",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Progressive disclosure gateway for MCP servers.",
5
5
  "keywords": [
6
6
  "caplets",
@@ -697,6 +697,280 @@
697
697
  "required": ["endpointUrl", "auth"],
698
698
  "additionalProperties": false,
699
699
  "description": "GraphQL endpoint backend configuration for this Caplet."
700
+ },
701
+ "httpApi": {
702
+ "type": "object",
703
+ "properties": {
704
+ "baseUrl": {
705
+ "type": "string",
706
+ "minLength": 1,
707
+ "pattern": "^(?![a-zA-Z][a-zA-Z0-9+.-]*:\\/\\/[^/?#]*@)[^?#]*$",
708
+ "description": "Base URL for HTTP action requests.",
709
+ "format": "uri"
710
+ },
711
+ "auth": {
712
+ "oneOf": [
713
+ {
714
+ "type": "object",
715
+ "properties": {
716
+ "type": {
717
+ "type": "string",
718
+ "const": "none"
719
+ }
720
+ },
721
+ "required": ["type"],
722
+ "additionalProperties": false
723
+ },
724
+ {
725
+ "type": "object",
726
+ "properties": {
727
+ "type": {
728
+ "type": "string",
729
+ "const": "bearer"
730
+ },
731
+ "token": {
732
+ "type": "string",
733
+ "minLength": 1
734
+ }
735
+ },
736
+ "required": ["type", "token"],
737
+ "additionalProperties": false
738
+ },
739
+ {
740
+ "type": "object",
741
+ "properties": {
742
+ "type": {
743
+ "type": "string",
744
+ "const": "headers"
745
+ },
746
+ "headers": {
747
+ "type": "object",
748
+ "propertyNames": {
749
+ "type": "string"
750
+ },
751
+ "additionalProperties": {
752
+ "type": "string",
753
+ "minLength": 1
754
+ }
755
+ }
756
+ },
757
+ "required": ["type", "headers"],
758
+ "additionalProperties": false
759
+ },
760
+ {
761
+ "type": "object",
762
+ "properties": {
763
+ "type": {
764
+ "type": "string",
765
+ "const": "oauth2"
766
+ },
767
+ "authorizationUrl": {
768
+ "type": "string",
769
+ "minLength": 1
770
+ },
771
+ "tokenUrl": {
772
+ "type": "string",
773
+ "minLength": 1
774
+ },
775
+ "issuer": {
776
+ "type": "string",
777
+ "minLength": 1
778
+ },
779
+ "resourceMetadataUrl": {
780
+ "type": "string",
781
+ "minLength": 1
782
+ },
783
+ "authorizationServerMetadataUrl": {
784
+ "type": "string",
785
+ "minLength": 1
786
+ },
787
+ "openidConfigurationUrl": {
788
+ "type": "string",
789
+ "minLength": 1
790
+ },
791
+ "clientId": {
792
+ "type": "string",
793
+ "minLength": 1
794
+ },
795
+ "clientSecret": {
796
+ "type": "string",
797
+ "minLength": 1
798
+ },
799
+ "scopes": {
800
+ "type": "array",
801
+ "items": {
802
+ "type": "string",
803
+ "minLength": 1
804
+ }
805
+ },
806
+ "redirectUri": {
807
+ "type": "string",
808
+ "minLength": 1
809
+ }
810
+ },
811
+ "required": ["type"],
812
+ "additionalProperties": false
813
+ },
814
+ {
815
+ "type": "object",
816
+ "properties": {
817
+ "type": {
818
+ "type": "string",
819
+ "const": "oidc"
820
+ },
821
+ "authorizationUrl": {
822
+ "type": "string",
823
+ "minLength": 1
824
+ },
825
+ "tokenUrl": {
826
+ "type": "string",
827
+ "minLength": 1
828
+ },
829
+ "issuer": {
830
+ "type": "string",
831
+ "minLength": 1
832
+ },
833
+ "resourceMetadataUrl": {
834
+ "type": "string",
835
+ "minLength": 1
836
+ },
837
+ "authorizationServerMetadataUrl": {
838
+ "type": "string",
839
+ "minLength": 1
840
+ },
841
+ "openidConfigurationUrl": {
842
+ "type": "string",
843
+ "minLength": 1
844
+ },
845
+ "clientId": {
846
+ "type": "string",
847
+ "minLength": 1
848
+ },
849
+ "clientSecret": {
850
+ "type": "string",
851
+ "minLength": 1
852
+ },
853
+ "scopes": {
854
+ "type": "array",
855
+ "items": {
856
+ "type": "string",
857
+ "minLength": 1
858
+ }
859
+ },
860
+ "redirectUri": {
861
+ "type": "string",
862
+ "minLength": 1
863
+ }
864
+ },
865
+ "required": ["type"],
866
+ "additionalProperties": false
867
+ }
868
+ ],
869
+ "description": "Explicit HTTP API request auth config. Use {\"type\":\"none\"} for public APIs."
870
+ },
871
+ "actions": {
872
+ "type": "object",
873
+ "propertyNames": {
874
+ "type": "string",
875
+ "pattern": "^[a-zA-Z0-9_-]{1,64}$"
876
+ },
877
+ "additionalProperties": {
878
+ "type": "object",
879
+ "properties": {
880
+ "method": {
881
+ "type": "string",
882
+ "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"],
883
+ "description": "HTTP method used for this action."
884
+ },
885
+ "path": {
886
+ "type": "string",
887
+ "minLength": 1,
888
+ "pattern": "^\\/",
889
+ "description": "URL path appended to the HTTP API baseUrl."
890
+ },
891
+ "description": {
892
+ "description": "Action capability description.",
893
+ "type": "string",
894
+ "minLength": 1
895
+ },
896
+ "inputSchema": {
897
+ "description": "JSON Schema for call_tool arguments.",
898
+ "type": "object",
899
+ "propertyNames": {
900
+ "type": "string"
901
+ },
902
+ "additionalProperties": {}
903
+ },
904
+ "query": {
905
+ "description": "Query parameter mapping.",
906
+ "type": "object",
907
+ "propertyNames": {
908
+ "type": "string"
909
+ },
910
+ "additionalProperties": {
911
+ "anyOf": [
912
+ {
913
+ "type": "string"
914
+ },
915
+ {
916
+ "type": "number"
917
+ },
918
+ {
919
+ "type": "boolean"
920
+ }
921
+ ]
922
+ }
923
+ },
924
+ "headers": {
925
+ "description": "Request header mapping.",
926
+ "type": "object",
927
+ "propertyNames": {
928
+ "type": "string"
929
+ },
930
+ "additionalProperties": {
931
+ "anyOf": [
932
+ {
933
+ "type": "string"
934
+ },
935
+ {
936
+ "type": "number"
937
+ },
938
+ {
939
+ "type": "boolean"
940
+ }
941
+ ]
942
+ }
943
+ },
944
+ "jsonBody": {
945
+ "description": "JSON request body mapping."
946
+ }
947
+ },
948
+ "required": ["method", "path"],
949
+ "additionalProperties": false
950
+ },
951
+ "description": "Configured HTTP actions keyed by stable tool name.",
952
+ "minProperties": 1
953
+ },
954
+ "requestTimeoutMs": {
955
+ "description": "Timeout in milliseconds for HTTP action requests.",
956
+ "type": "integer",
957
+ "exclusiveMinimum": 0,
958
+ "maximum": 9007199254740991
959
+ },
960
+ "maxResponseBytes": {
961
+ "description": "Maximum HTTP action response body bytes to read.",
962
+ "type": "integer",
963
+ "exclusiveMinimum": 0,
964
+ "maximum": 9007199254740991
965
+ },
966
+ "disabled": {
967
+ "description": "When true, omit this Caplet from discovery.",
968
+ "type": "boolean"
969
+ }
970
+ },
971
+ "required": ["baseUrl", "auth", "actions"],
972
+ "additionalProperties": false,
973
+ "description": "HTTP API backend configuration for this Caplet."
700
974
  }
701
975
  },
702
976
  "required": ["name", "description"],
@@ -788,6 +788,308 @@
788
788
  "required": ["name", "description", "endpointUrl", "auth"],
789
789
  "additionalProperties": false
790
790
  }
791
+ },
792
+ "httpApis": {
793
+ "default": {},
794
+ "description": "HTTP APIs keyed by stable Caplet ID.",
795
+ "type": "object",
796
+ "propertyNames": {
797
+ "type": "string",
798
+ "pattern": "^[a-zA-Z0-9_-]{1,64}$"
799
+ },
800
+ "additionalProperties": {
801
+ "type": "object",
802
+ "properties": {
803
+ "name": {
804
+ "type": "string",
805
+ "minLength": 1,
806
+ "maxLength": 80,
807
+ "description": "Human-readable HTTP API display name."
808
+ },
809
+ "description": {
810
+ "type": "string",
811
+ "description": "Capability description shown to agents before HTTP actions are disclosed."
812
+ },
813
+ "baseUrl": {
814
+ "type": "string",
815
+ "pattern": "^(?![a-zA-Z][a-zA-Z0-9+.-]*:\\/\\/[^/?#]*@)[^?#]*$",
816
+ "description": "Base URL for HTTP action requests.",
817
+ "format": "uri"
818
+ },
819
+ "auth": {
820
+ "oneOf": [
821
+ {
822
+ "type": "object",
823
+ "properties": {
824
+ "type": {
825
+ "type": "string",
826
+ "const": "none"
827
+ }
828
+ },
829
+ "required": ["type"],
830
+ "additionalProperties": false
831
+ },
832
+ {
833
+ "type": "object",
834
+ "properties": {
835
+ "type": {
836
+ "type": "string",
837
+ "const": "bearer"
838
+ },
839
+ "token": {
840
+ "type": "string",
841
+ "minLength": 1
842
+ }
843
+ },
844
+ "required": ["type", "token"],
845
+ "additionalProperties": false
846
+ },
847
+ {
848
+ "type": "object",
849
+ "properties": {
850
+ "type": {
851
+ "type": "string",
852
+ "const": "headers"
853
+ },
854
+ "headers": {
855
+ "type": "object",
856
+ "propertyNames": {
857
+ "type": "string"
858
+ },
859
+ "additionalProperties": {
860
+ "type": "string",
861
+ "minLength": 1
862
+ }
863
+ }
864
+ },
865
+ "required": ["type", "headers"],
866
+ "additionalProperties": false
867
+ },
868
+ {
869
+ "type": "object",
870
+ "properties": {
871
+ "type": {
872
+ "type": "string",
873
+ "const": "oauth2"
874
+ },
875
+ "authorizationUrl": {
876
+ "type": "string",
877
+ "format": "uri"
878
+ },
879
+ "tokenUrl": {
880
+ "type": "string",
881
+ "format": "uri"
882
+ },
883
+ "issuer": {
884
+ "type": "string",
885
+ "format": "uri"
886
+ },
887
+ "resourceMetadataUrl": {
888
+ "type": "string",
889
+ "format": "uri"
890
+ },
891
+ "authorizationServerMetadataUrl": {
892
+ "type": "string",
893
+ "format": "uri"
894
+ },
895
+ "openidConfigurationUrl": {
896
+ "type": "string",
897
+ "format": "uri"
898
+ },
899
+ "clientId": {
900
+ "type": "string",
901
+ "minLength": 1
902
+ },
903
+ "clientSecret": {
904
+ "type": "string",
905
+ "minLength": 1
906
+ },
907
+ "scopes": {
908
+ "type": "array",
909
+ "items": {
910
+ "type": "string",
911
+ "minLength": 1
912
+ }
913
+ },
914
+ "redirectUri": {
915
+ "type": "string",
916
+ "format": "uri"
917
+ }
918
+ },
919
+ "required": ["type"],
920
+ "additionalProperties": false
921
+ },
922
+ {
923
+ "type": "object",
924
+ "properties": {
925
+ "type": {
926
+ "type": "string",
927
+ "const": "oidc"
928
+ },
929
+ "authorizationUrl": {
930
+ "type": "string",
931
+ "format": "uri"
932
+ },
933
+ "tokenUrl": {
934
+ "type": "string",
935
+ "format": "uri"
936
+ },
937
+ "issuer": {
938
+ "type": "string",
939
+ "format": "uri"
940
+ },
941
+ "resourceMetadataUrl": {
942
+ "type": "string",
943
+ "format": "uri"
944
+ },
945
+ "authorizationServerMetadataUrl": {
946
+ "type": "string",
947
+ "format": "uri"
948
+ },
949
+ "openidConfigurationUrl": {
950
+ "type": "string",
951
+ "format": "uri"
952
+ },
953
+ "clientId": {
954
+ "type": "string",
955
+ "minLength": 1
956
+ },
957
+ "clientSecret": {
958
+ "type": "string",
959
+ "minLength": 1
960
+ },
961
+ "scopes": {
962
+ "type": "array",
963
+ "items": {
964
+ "type": "string",
965
+ "minLength": 1
966
+ }
967
+ },
968
+ "redirectUri": {
969
+ "type": "string",
970
+ "format": "uri"
971
+ }
972
+ },
973
+ "required": ["type"],
974
+ "additionalProperties": false
975
+ }
976
+ ],
977
+ "description": "Explicit HTTP API request auth config. Use {\"type\":\"none\"} for public APIs."
978
+ },
979
+ "actions": {
980
+ "type": "object",
981
+ "propertyNames": {
982
+ "type": "string",
983
+ "pattern": "^[a-zA-Z0-9_-]{1,64}$"
984
+ },
985
+ "additionalProperties": {
986
+ "type": "object",
987
+ "properties": {
988
+ "method": {
989
+ "type": "string",
990
+ "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"],
991
+ "description": "HTTP method used for this action."
992
+ },
993
+ "path": {
994
+ "type": "string",
995
+ "minLength": 1,
996
+ "pattern": "^\\/",
997
+ "description": "URL path appended to the HTTP API baseUrl."
998
+ },
999
+ "description": {
1000
+ "description": "Action capability description.",
1001
+ "type": "string",
1002
+ "minLength": 1
1003
+ },
1004
+ "inputSchema": {
1005
+ "description": "JSON Schema for call_tool arguments.",
1006
+ "type": "object",
1007
+ "propertyNames": {
1008
+ "type": "string"
1009
+ },
1010
+ "additionalProperties": {}
1011
+ },
1012
+ "query": {
1013
+ "description": "Query parameter mapping.",
1014
+ "type": "object",
1015
+ "propertyNames": {
1016
+ "type": "string"
1017
+ },
1018
+ "additionalProperties": {
1019
+ "anyOf": [
1020
+ {
1021
+ "type": "string"
1022
+ },
1023
+ {
1024
+ "type": "number"
1025
+ },
1026
+ {
1027
+ "type": "boolean"
1028
+ }
1029
+ ]
1030
+ }
1031
+ },
1032
+ "headers": {
1033
+ "description": "Request header mapping.",
1034
+ "type": "object",
1035
+ "propertyNames": {
1036
+ "type": "string"
1037
+ },
1038
+ "additionalProperties": {
1039
+ "anyOf": [
1040
+ {
1041
+ "type": "string"
1042
+ },
1043
+ {
1044
+ "type": "number"
1045
+ },
1046
+ {
1047
+ "type": "boolean"
1048
+ }
1049
+ ]
1050
+ }
1051
+ },
1052
+ "jsonBody": {
1053
+ "description": "JSON request body mapping."
1054
+ }
1055
+ },
1056
+ "required": ["method", "path"],
1057
+ "additionalProperties": false
1058
+ },
1059
+ "description": "Configured HTTP actions keyed by stable tool name.",
1060
+ "minProperties": 1
1061
+ },
1062
+ "tags": {
1063
+ "type": "array",
1064
+ "items": {
1065
+ "type": "string",
1066
+ "minLength": 1,
1067
+ "maxLength": 80
1068
+ }
1069
+ },
1070
+ "requestTimeoutMs": {
1071
+ "default": 60000,
1072
+ "description": "Timeout in milliseconds for HTTP action requests.",
1073
+ "type": "integer",
1074
+ "exclusiveMinimum": 0,
1075
+ "maximum": 9007199254740991
1076
+ },
1077
+ "maxResponseBytes": {
1078
+ "default": 1000000,
1079
+ "description": "Maximum HTTP action response body bytes to read.",
1080
+ "type": "integer",
1081
+ "exclusiveMinimum": 0,
1082
+ "maximum": 9007199254740991
1083
+ },
1084
+ "disabled": {
1085
+ "default": false,
1086
+ "description": "When true, omit this HTTP API Caplet.",
1087
+ "type": "boolean"
1088
+ }
1089
+ },
1090
+ "required": ["name", "description", "baseUrl", "auth", "actions"],
1091
+ "additionalProperties": false
1092
+ }
791
1093
  }
792
1094
  },
793
1095
  "additionalProperties": false