diff --git a/go.mod b/go.mod index ee4fb2ea..f4cc290a 100644 --- a/go.mod +++ b/go.mod @@ -18,6 +18,8 @@ require ( require ( github.com/BurntSushi/toml v1.6.0 // indirect github.com/apache/arrow-go/v18 v18.5.2 // indirect + github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/buger/jsonparser v1.1.2 // indirect github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/clipperhouse/displaywidth v0.10.0 // indirect github.com/clipperhouse/uax29/v2 v2.6.0 // indirect @@ -28,14 +30,22 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.22.5 // indirect github.com/go-openapi/jsonreference v0.21.5 // indirect + github.com/go-openapi/spec v0.22.4 // indirect github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/swag/conv v0.26.0 // indirect github.com/go-openapi/swag/jsonname v0.25.5 // indirect + github.com/go-openapi/swag/jsonutils v0.26.0 // indirect + github.com/go-openapi/swag/loading v0.26.0 // indirect + github.com/go-openapi/swag/stringutils v0.25.5 // indirect + github.com/go-openapi/swag/typeutils v0.26.0 // indirect + github.com/go-openapi/swag/yamlutils v0.26.0 // indirect github.com/goccy/go-json v0.10.5 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-querystring v1.2.0 // indirect + github.com/google/jsonschema-go v0.4.3 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grafana/otel-profiling-go v0.5.1 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.9 // indirect @@ -45,6 +55,7 @@ require ( github.com/huandu/go-clone v1.7.3 // indirect github.com/huandu/go-sqlbuilder v1.39.1 // indirect github.com/huandu/xstrings v1.4.0 // indirect + github.com/invopop/jsonschema v0.13.0 // indirect github.com/jaegertracing/jaeger-idl v0.6.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -54,6 +65,7 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/modelcontextprotocol/go-sdk v1.6.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -63,36 +75,41 @@ require ( github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/pierrec/lz4/v4 v4.1.25 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/segmentio/asm v1.1.3 // indirect + github.com/segmentio/encoding v0.5.4 // indirect github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 // indirect github.com/unknwon/com v1.0.1 // indirect github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a // indirect github.com/urfave/cli v1.22.17 // indirect + github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect + github.com/yosida95/uritemplate/v3 v3.0.2 // indirect github.com/zeebo/xxh3 v1.1.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0 // indirect - go.opentelemetry.io/contrib/propagators/jaeger v1.42.0 // indirect - go.opentelemetry.io/contrib/samplers/jaegerremote v0.36.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 // indirect + go.opentelemetry.io/contrib/propagators/jaeger v1.43.0 // indirect + go.opentelemetry.io/contrib/samplers/jaegerremote v0.37.0 // indirect go.opentelemetry.io/otel v1.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 // indirect go.opentelemetry.io/otel/metric v1.43.0 // indirect go.opentelemetry.io/otel/sdk v1.43.0 // indirect go.opentelemetry.io/otel/trace v1.43.0 // indirect - go.opentelemetry.io/proto/otlp v1.9.0 // indirect + go.opentelemetry.io/proto/otlp v1.10.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect - golang.org/x/mod v0.33.0 // indirect + golang.org/x/mod v0.34.0 // indirect golang.org/x/sync v0.20.0 // indirect - golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 // indirect - golang.org/x/tools v0.42.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 // indirect + golang.org/x/telemetry v0.0.0-20260311193753-579e4da9a98c // indirect + golang.org/x/tools v0.43.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 // indirect sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) require ( @@ -107,7 +124,7 @@ require ( github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-plugin v1.7.0 // indirect github.com/hashicorp/yamux v0.1.2 // indirect - github.com/magefile/mage v1.16.1 // indirect + github.com/magefile/mage v1.17.1 // indirect github.com/mattetti/filebuffer v1.0.1 // indirect github.com/mattn/go-runewidth v0.0.19 // indirect github.com/oklog/run v1.1.0 // indirect @@ -118,10 +135,12 @@ require ( github.com/prometheus/common v0.67.5 // indirect github.com/prometheus/procfs v0.16.1 // indirect github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 // indirect - golang.org/x/net v0.52.0 // indirect - golang.org/x/sys v0.42.0 // indirect - golang.org/x/text v0.35.0 // indirect + golang.org/x/net v0.53.0 // indirect + golang.org/x/sys v0.43.0 // indirect + golang.org/x/text v0.36.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect - google.golang.org/grpc v1.79.3 // indirect + google.golang.org/grpc v1.80.0 // indirect google.golang.org/protobuf v1.36.11 // indirect ) + +replace github.com/grafana/grafana-plugin-sdk-go => ../grafana-plugin-sdk-go diff --git a/go.sum b/go.sum index a80f9757..d289d51f 100644 --- a/go.sum +++ b/go.sum @@ -10,12 +10,16 @@ github.com/apache/thrift v0.22.0 h1:r7mTJdj51TMDe6RtcmNdQxgn9XcyfGDOzegMDRg47uc= github.com/apache/thrift v0.22.0/go.mod h1:1e7J/O1Ae6ZQMTYdy9xa3w9k+XHWPfRvdPyJeynQ+/g= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhPwqqXc4/vE0f7GvRjuAsbW+HOIe8KnA= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= +github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= +github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bradleyfalzon/ghinstallation/v2 v2.18.0 h1:WPqnN6NS9XvYlOgZQAIseN7Z1uAiE+UxgDKlW7FvFuU= github.com/bradleyfalzon/ghinstallation/v2 v2.18.0/go.mod h1:gpoSwwWc4biE49F7n+roCcpkEkZ1Qr9soZ2ESvMiouU= github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= +github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk= +github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -48,16 +52,50 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/analysis v0.24.3 h1:a1hrvMr8X0Xt69KP5uVTu5jH62DscmDifrLzNglAayk= +github.com/go-openapi/analysis v0.24.3/go.mod h1:Nc+dWJ/FxZbhSow5Yh3ozg5CLJioB+XXT6MdLvJUsUw= +github.com/go-openapi/errors v0.22.7 h1:JLFBGC0Apwdzw3484MmBqspjPbwa2SHvpDm0u5aGhUA= +github.com/go-openapi/errors v0.22.7/go.mod h1://QW6SD9OsWtH6gHllUCddOXDL0tk0ZGNYHwsw4sW3w= github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= github.com/go-openapi/jsonreference v0.21.5 h1:6uCGVXU/aNF13AQNggxfysJ+5ZcU4nEAe+pJyVWRdiE= github.com/go-openapi/jsonreference v0.21.5/go.mod h1:u25Bw85sX4E2jzFodh1FOKMTZLcfifd1Q+iKKOUxExw= +github.com/go-openapi/loads v0.23.3 h1:g5Xap1JfwKkUnZdn+S0L3SzBDpcTIYzZ5Qaag0YDkKQ= +github.com/go-openapi/loads v0.23.3/go.mod h1:NOH07zLajXo8y55hom0omlHWDVVvCwBM/S+csCK8LqA= +github.com/go-openapi/spec v0.22.4 h1:4pxGjipMKu0FzFiu/DPwN3CTBRlVM2yLf/YTWorYfDQ= +github.com/go-openapi/spec v0.22.4/go.mod h1:WQ6Ai0VPWMZgMT4XySjlRIE6GP1bGQOtEThn3gcWLtQ= +github.com/go-openapi/strfmt v0.26.1 h1:7zGCHji7zSYDC2tCXIusoxYQz/48jAf2q+sF6wXTG+c= +github.com/go-openapi/strfmt v0.26.1/go.mod h1:Zslk5VZPOISLwmWTMBIS7oiVFem1o1EI6zULY8Uer7Y= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/swag/conv v0.26.0 h1:5yGGsPYI1ZCva93U0AoKi/iZrNhaJEjr324YVsiD89I= +github.com/go-openapi/swag/conv v0.26.0/go.mod h1:tpAmIL7X58VPnHHiSO4uE3jBeRamGsFsfdDeDtb5ECE= +github.com/go-openapi/swag/fileutils v0.25.5 h1:B6JTdOcs2c0dBIs9HnkyTW+5gC+8NIhVBUwERkFhMWk= +github.com/go-openapi/swag/fileutils v0.25.5/go.mod h1:V3cT9UdMQIaH4WiTrUc9EPtVA4txS0TOmRURmhGF4kc= github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= -github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvAu+voFM= -github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/swag/jsonutils v0.26.0 h1:FawFML2iAXsPqmERscuMPIHmFsoP1tOqWkxBaKNMsnA= +github.com/go-openapi/swag/jsonutils v0.26.0/go.mod h1:2VmA0CJlyFqgawOaPI9psnjFDqzyivIqLYN34t9p91E= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.26.0 h1:apqeINu/ICHouqiRZbyFvuDge5jCmmLTqGQ9V95EaOM= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.26.0/go.mod h1:AyM6QT8uz5IdKxk5akv0y6u4QvcL9GWERt0Jx/F/R8Y= +github.com/go-openapi/swag/loading v0.26.0 h1:Apg6zaKhCJurpJer0DCxq99qwmhFddBhaMX7kilDcko= +github.com/go-openapi/swag/loading v0.26.0/go.mod h1:dBxQ/6V2uBaAQdevN18VELE6xSpJWZxLX4txe12JwDg= +github.com/go-openapi/swag/mangling v0.25.5 h1:hyrnvbQRS7vKePQPHHDso+k6CGn5ZBs5232UqWZmJZw= +github.com/go-openapi/swag/mangling v0.25.5/go.mod h1:6hadXM/o312N/h98RwByLg088U61TPGiltQn71Iw0NY= +github.com/go-openapi/swag/stringutils v0.25.5 h1:NVkoDOA8YBgtAR/zvCx5rhJKtZF3IzXcDdwOsYzrB6M= +github.com/go-openapi/swag/stringutils v0.25.5/go.mod h1:PKK8EZdu4QJq8iezt17HM8RXnLAzY7gW0O1KKarrZII= +github.com/go-openapi/swag/typeutils v0.26.0 h1:2kdEwdiNWy+JJdOvu5MA2IIg2SylWAFuuyQIKYybfq4= +github.com/go-openapi/swag/typeutils v0.26.0/go.mod h1:oovDuIUvTrEHVMqWilQzKzV4YlSKgyZmFh7AlfABNVE= +github.com/go-openapi/swag/yamlutils v0.26.0 h1:H7O8l/8NJJQ/oiReEN+oMpnGMyt8G0hl460nRZxhLMQ= +github.com/go-openapi/swag/yamlutils v0.26.0/go.mod h1:1evKEGAtP37Pkwcc7EWMF0hedX0/x3Rkvei2wtG/TbU= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.2 h1:5zRca5jw7lzVREKCZVNBpysDNBjj74rBh0N2BGQbSR0= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.2/go.mod h1:XVevPw5hUXuV+5AkI1u1PeAm27EQVrhXTTCPAF85LmE= +github.com/go-openapi/testify/v2 v2.4.2 h1:tiByHpvE9uHrrKjOszax7ZvKB7QOgizBWGBLuq0ePx4= +github.com/go-openapi/testify/v2 v2.4.2/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw= +github.com/go-openapi/validate v0.25.2 h1:12NsfLAwGegqbGWr2CnvT65X/Q2USJipmJ9b7xDJZz0= +github.com/go-openapi/validate v0.25.2/go.mod h1:Pgl1LpPPGFnZ+ys4/hTlDiRYQdI1ocKypgE+8Q8BLfY= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -66,6 +104,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= +github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= @@ -83,12 +123,12 @@ github.com/google/go-github/v84 v84.0.0/go.mod h1:WwYL1z1ajRdlaPszjVu/47x1L0PXuk github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0= +github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/grafana/grafana-plugin-sdk-go v0.291.1 h1:Z/zhv2EXiBE1oT/IGjE0CnN+MfW7zaCTJ7QB5eotjBU= -github.com/grafana/grafana-plugin-sdk-go v0.291.1/go.mod h1:qTjY9ymtF0ughH8xdXk8WNejJvwB2J2epeMBdauaIB0= github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= github.com/grafana/pyroscope-go/godeltaprof v0.1.9 h1:c1Us8i6eSmkW+Ez05d3co8kasnuOY813tbMN8i/a3Og= @@ -118,6 +158,8 @@ github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/influxdata/tdigest v0.0.1 h1:XpFptwYmnEKUqmkcDjrzffswZ3nvNeevbUSLPP/ZzIY= github.com/influxdata/tdigest v0.0.1/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= +github.com/invopop/jsonschema v0.13.0 h1:KvpoAJWEjR3uD9Kbm2HWJmqsEaHt8lBUpd0qHcIi21E= +github.com/invopop/jsonschema v0.13.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= github.com/jaegertracing/jaeger-idl v0.6.0 h1:LOVQfVby9ywdMPI9n3hMwKbyLVV3BL1XH2QqsP5KTMk= github.com/jaegertracing/jaeger-idl v0.6.0/go.mod h1:mpW0lZfG907/+o5w5OlnNnig7nHJGT3SfKmRqC42HGQ= github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= @@ -144,8 +186,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/magefile/mage v1.16.1 h1:j5UwkdA48xTlGs0Hcm1Q3sSAcxBorntQjiewDNMsqlo= -github.com/magefile/mage v1.16.1/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/magefile/mage v1.17.1 h1:F1d2lnLSlbQDM0Plq6Ac4NtaHxkxTK8t5nrMY9SkoNA= +github.com/magefile/mage v1.17.1/go.mod h1:Yj51kqllmsgFpvvSzgrZPK9WtluG3kUhFaBUVLo4feA= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattetti/filebuffer v1.0.1 h1:gG7pyfnSIZCxdoKq+cPa8T0hhYtD9NxCdI4D7PTjRLM= @@ -167,6 +209,8 @@ github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8D github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modelcontextprotocol/go-sdk v1.6.0 h1:PPLS3kn7WtOEnR+Af4X5H96SG0qSab8R/ZQT/HkhPkY= +github.com/modelcontextprotocol/go-sdk v1.6.0/go.mod h1:kzm3kzFL1/+AziGOE0nUs3gvPoNxMCvkxokMkuFapXQ= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -176,6 +220,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s= +github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 h1:zrbMGy9YXpIeTnGj4EljqMiZsIcE09mmF8XsD5AYOJc= github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6/go.mod h1:rEKTHC9roVVicUIfZK7DYrdIoM0EOr8mK1Hj5s3JjH0= github.com/olekukonko/errors v1.2.0 h1:10Zcn4GeV59t/EGqJc8fUjtFT/FuUh5bTMzZ1XwmCRo= @@ -208,6 +254,10 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7PQSMz9NShzorzCiG2fk9+xuCgLkPeCvMHYR2OWg= +github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= +github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= +github.com/segmentio/encoding v0.5.4 h1:OW1VRern8Nw6ITAtwSZ7Idrl3MXCFwXHPgqESYfvNt0= +github.com/segmentio/encoding v0.5.4/go.mod h1:HS1ZKa3kSN32ZHVZ7ZLPLXWvOVIiZtyJnO1gPH1sKt0= github.com/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed h1:KT7hI8vYXgU0s2qaMkrfq9tCA1w/iEPgfredVP+4Tzw= github.com/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed/go.mod h1:zqMwyHmnN/eDOZOdiTohqIUKUrTFX62PNlu7IJdu0q8= github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 h1:B1PEwpArrNp4dkQrfxh/abbBAOZBVp0ds+fBEOUOqOc= @@ -241,6 +291,10 @@ github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a/go.mod h1:1xEUf2abjfP9 github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.17 h1:SYzXoiPfQjHBbkYxbew5prZHS1TOLT3ierW8SYLqtVQ= github.com/urfave/cli v1.22.17/go.mod h1:b0ht0aqgH/6pBYzzxURyrM4xXNgsoT/n2ZzwQiEhNVo= +github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= +github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= +github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= +github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= @@ -249,23 +303,23 @@ github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 h1:yI1/OhfEPy7J9eoa6Sj051C7n5dvpj0QX8g4sRchg04= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0/go.mod h1:NoUCKYWK+3ecatC4HjkRktREheMeEtrXoQxrqYFeHSc= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0 h1:c9r/G1CSw4dPI1jaNNG9RnQP+q4SvZnHciDQJVIvchU= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0/go.mod h1:gO9smoZe9KnZcJCqcB0lMmQ4Z5VEifYmjMTpnwtTSuQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg= -go.opentelemetry.io/contrib/propagators/jaeger v1.42.0 h1:jP8unWI6q5kcb3gpGLjKDGaUa+JW+nHKWvpS/q+YuWA= -go.opentelemetry.io/contrib/propagators/jaeger v1.42.0/go.mod h1:xd89e/pUyPatUP1C4z1UknD9jHptESO99tWyvd4mWD4= -go.opentelemetry.io/contrib/samplers/jaegerremote v0.36.0 h1:h8kHGv9+VIiJbQ2Qx6BbORZwcvVnd0le/SFK8Vom0bA= -go.opentelemetry.io/contrib/samplers/jaegerremote v0.36.0/go.mod h1:tjrgaYHDx+1CmTk5YzNAUCbLX1ZrjrsogXBQHaVf7rI= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 h1:0Qx7VGBacMm9ZENQ7TnNObTYI4ShC+lHI16seduaxZo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0/go.mod h1:Sje3i3MjSPKTSPvVWCaL8ugBzJwik3u4smCjUeuupqg= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 h1:cuXaPAfIoJKsYjBjPSb2nKZEmgM43zVr25l37IxhKME= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0/go.mod h1:BuzhPofpCzlDi/Q/Xjg54M4/3oWqqyDe2Zeq7A2I0QE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 h1:CqXxU8VOmDefoh0+ztfGaymYbhdB/tT3zs79QaZTNGY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0/go.mod h1:BuhAPThV8PBHBvg8ZzZ/Ok3idOdhWIodywz2xEcRbJo= +go.opentelemetry.io/contrib/propagators/jaeger v1.43.0 h1:peiLMz1+aqJE+3L4mOVtR9wlmv+yh/JVYXCBjqmzJJE= +go.opentelemetry.io/contrib/propagators/jaeger v1.43.0/go.mod h1:Agvif+4A8p/3UtZzJ0MCcDEuQwgtrzM71DueU41DCs8= +go.opentelemetry.io/contrib/samplers/jaegerremote v0.37.0 h1:MPbz6oY3ZM1GuzCdqKU2TSsE7W71W6e578f/m2q9rHw= +go.opentelemetry.io/contrib/samplers/jaegerremote v0.37.0/go.mod h1:+JlICiUxqOsm1bu6zTvygwOl5b5DRO+u8A+IgnL2ONs= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0 h1:THuZiwpQZuHPul65w4WcwEnkX2QIuMT+UFoOrygtoJw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0/go.mod h1:J2pvYM5NGHofZ2/Ru6zw/TNWnEQp5crgyDeSrYpXkAw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0 h1:zWWrB1U6nqhS/k6zYB74CjRpuiitRtLLi68VcgmOEto= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0/go.mod h1:2qXPNBX1OVRC0IwOnfo1ljoid+RD0QK3443EaqVlsOU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bTWkw0ICGcOLCAI5l6zsD1j20k= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 h1:RAE+JPfvEmvy+0LzyUA25/SGawPwIUbZ6u0Wug54sLc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0/go.mod h1:AGmbycVGEsRx9mXMZ75CsOyhSP6MFIcj/6dnG+vhVjk= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= @@ -277,8 +331,8 @@ go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHS go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= -go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= -go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g= +go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= @@ -293,14 +347,14 @@ golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7 golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= -golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= +golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= -golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= +golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= +golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -319,21 +373,21 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= -golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 h1:bTLqdHv7xrGlFbvf5/TXNxy/iUwwdkjhqQTJDjW7aj0= -golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4/go.mod h1:g5NllXBEermZrmR51cJDQxmJUHUOfRAaNyWBM+R+548= +golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= +golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/telemetry v0.0.0-20260311193753-579e4da9a98c h1:6a8FdnNk6bTXBjR4AGKFgUKuo+7GnR3FX5L7CbveeZc= +golang.org/x/telemetry v0.0.0-20260311193753-579e4da9a98c/go.mod h1:TpUTTEp9frx7rTdLpC9gFG9kdI7zVLFTFFlqaH2Cncw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= -golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= +golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= +golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= -golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= +golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= +golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -344,12 +398,12 @@ gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJ gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 h1:JLQynH/LBHfCTSbDWl+py8C+Rg/k1OVH3xfcaiANuF0= -google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57/go.mod h1:kSJwQxqmFXeo79zOmbrALdflXQeAYcUbgS7PbpMknCY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 h1:ggcbiqK8WWh6l1dnltU4BgWGIGo+EVYxCaAPih/zQXQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= -google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= -google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 h1:VPWxll4HlMw1Vs/qXtN7BvhZqsS9cdAittCNvVENElA= +google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:7QBABkRtR8z+TEnmXTqIqwJLlzrZKVfAUm7tY3yGv0M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d h1:wT2n40TBqFY6wiwazVK9/iTWbsQrgk5ZfCSVFLO9LQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM= +google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -372,3 +426,5 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/pkg/main.go b/pkg/main.go index 5b4948a3..c189d828 100644 --- a/pkg/main.go +++ b/pkg/main.go @@ -5,6 +5,8 @@ import ( "github.com/grafana/grafana-plugin-sdk-go/backend" "github.com/grafana/grafana-plugin-sdk-go/backend/datasource" + "github.com/grafana/grafana-plugin-sdk-go/experimental/mcp" + "github.com/grafana/grafana-plugin-sdk-go/experimental/mcp/fromschema" "github.com/grafana/github-datasource/pkg/plugin" ) @@ -12,7 +14,40 @@ import ( const dsID = "grafana-github-datasource" func main() { - if err := datasource.Manage(dsID, plugin.NewDataSourceInstance, datasource.ManageOpts{}); err != nil { + schema, err := loadSchema() + if err != nil { + backend.Logger.Error("schema load failed", "err", err) + os.Exit(1) + } + + mcpServer := mcp.NewServer(mcp.ServerOpts{ + Name: dsID, + Version: "1.0.0", + Addr: "127.0.0.1:7401", + }) + + // build the instance manager once, bind to MCP, then pass to Manage. + im := datasource.NewInstanceManager(plugin.NewDataSourceInstance) + mgr := datasource.NewAutomanagementHandler(im) + + mcpServer.BindQueryDataHandler(mgr) + mcpServer.BindCallResourceHandler(mgr) + mcpServer.BindCheckHealthHandler(mgr) + + fromschema.RegisterQueryTools(mcpServer, schema) + fromschema.RegisterRouteTools(mcpServer, schema) + fromschema.RegisterQueryExamples(mcpServer, schema) + fromschema.RegisterHealthCheckTool(mcpServer) + + mcpServer.RegisterPrompt(mcp.Prompt{ + Name: "investigate-pull-requests", + Description: "Walk through investigating recent pull requests in a repository", + Template: "List the most recent pull requests for the configured repository, then summarise patterns in review activity over the last 7 days.", + }) + + if err := datasource.Manage(dsID, plugin.NewDataSourceInstance, datasource.ManageOpts{ + MCPServer: mcpServer, + }); err != nil { backend.Logger.Error(err.Error()) os.Exit(1) } diff --git a/pkg/models/query_test.go b/pkg/models/query_test.go new file mode 100644 index 00000000..aab719d4 --- /dev/null +++ b/pkg/models/query_test.go @@ -0,0 +1,327 @@ +package models + +import ( + "encoding/json" + "os" + "reflect" + "testing" + + "github.com/shurcooL/githubv4" + "github.com/stretchr/testify/require" + + data "github.com/grafana/grafana-plugin-sdk-go/experimental/apis/datasource/v0alpha1" + "github.com/grafana/grafana-plugin-sdk-go/experimental/pluginschema" + "github.com/grafana/grafana-plugin-sdk-go/experimental/schemabuilder" +) + +func TestSchemaDefinitions(t *testing.T) { + builder, err := schemabuilder.NewSchemaBuilder( + schemabuilder.BuilderOptions{ + PluginID: []string{"grafana-github-datasource"}, + ScanCode: []schemabuilder.CodePaths{{ + BasePackage: "github.com/grafana/github-datasource/pkg/models", + CodePath: "./", + }}, + }, + ) + + common := Query{ + Repository: "github-datasource", + Owner: "grafana", + } + + require.NoError(t, err) + err = builder.AddQueries([]schemabuilder.QueryTypeInfo{{ + GoType: reflect.TypeFor[*PullRequestsQuery](), + Discriminators: data.NewDiscriminators("queryType", QueryTypePullRequests), + Examples: []data.QueryExample{ + { + Name: "Simple", + SaveModel: data.AsUnstructured(PullRequestsQuery{ + Query: common, + Options: ListPullRequestsOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeCommits), + GoType: reflect.TypeFor[*CommitsQuery](), + Examples: []data.QueryExample{ + { + Name: "CommitsQuery", + SaveModel: data.AsUnstructured(CommitsQuery{ + Query: common, + Options: ListCommitsOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeTags), + GoType: reflect.TypeFor[*TagsQuery](), + Examples: []data.QueryExample{ + { + Name: "TagsQuery", + SaveModel: data.AsUnstructured(TagsQuery{ + Query: common, + Options: ListTagsOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeLabels), + GoType: reflect.TypeFor[*LabelsQuery](), + Examples: []data.QueryExample{ + { + Name: "LabelsQuery", + SaveModel: data.AsUnstructured(LabelsQuery{ + Query: common, + Options: ListLabelsOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeReleases), + GoType: reflect.TypeFor[*ReleasesQuery](), + Examples: []data.QueryExample{ + { + Name: "ReleasesQuery", + SaveModel: data.AsUnstructured(ReleasesQuery{ + Query: common, + Options: ListReleasesOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeContributors), + GoType: reflect.TypeFor[*ContributorsQuery](), + Examples: []data.QueryExample{ + { + Name: "ContributorsQuery", + SaveModel: data.AsUnstructured(ContributorsQuery{ + Query: common, + Options: ListContributorsOptions{Owner: "yesoreyeram"}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeRepositories), + GoType: reflect.TypeFor[*RepositoriesQuery](), + Examples: []data.QueryExample{ + { + Name: "RepositoriesQuery", + SaveModel: data.AsUnstructured(RepositoriesQuery{ + Query: Query{ + Owner: "yesoreyeram", + }, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeIssues), + GoType: reflect.TypeFor[*IssuesQuery](), + Examples: []data.QueryExample{ + { + Name: "IssuesQuery", + SaveModel: data.AsUnstructured(IssuesQuery{ + Query: common, + Options: ListIssuesOptions{ + Filters: &githubv4.IssueFilters{ + States: &[]githubv4.IssueState{ + githubv4.IssueStateOpen, + }, + }, + }, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypePackages), + GoType: reflect.TypeFor[*PackagesQuery](), + Examples: []data.QueryExample{ + { + Name: "PackagesQuery", + SaveModel: data.AsUnstructured(PackagesQuery{ + Query: common, + Options: ListPackagesOptions{ + PackageType: githubv4.PackageTypeDocker, + }, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeMilestones), + GoType: reflect.TypeFor[*MilestonesQuery](), + Examples: []data.QueryExample{ + { + Name: "MilestonesQuery", + SaveModel: data.AsUnstructured(MilestonesQuery{ + Query: common, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeVulnerabilities), + GoType: reflect.TypeFor[*VulnerabilityQuery](), + Examples: []data.QueryExample{ + { + Name: "VulnerabilityQuery", + SaveModel: data.AsUnstructured(VulnerabilityQuery{ + Query: common, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeStargazers), + GoType: reflect.TypeFor[*StargazersQuery](), + Examples: []data.QueryExample{ + { + Name: "StargazersQuery", + SaveModel: data.AsUnstructured(StargazersQuery{ + Query: common, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeWorkflows), + GoType: reflect.TypeFor[*WorkflowsQuery](), + Examples: []data.QueryExample{ + { + Name: "WorkflowsQuery", + SaveModel: data.AsUnstructured(WorkflowsQuery{ + Query: common, + Options: ListWorkflowsOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeWorkflowUsage), + GoType: reflect.TypeFor[*WorkflowUsageQuery](), + Examples: []data.QueryExample{ + { + Name: "WorkflowUsageQuery", + SaveModel: data.AsUnstructured(WorkflowUsageQuery{ + Query: common, + Options: WorkflowUsageOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeCodeScanning), + GoType: reflect.TypeFor[*CodeScanningQuery](), + Examples: []data.QueryExample{ + { + Name: "CodeScanningQuery", + SaveModel: data.AsUnstructured(CodeScanningQuery{ + Query: common, + Options: CodeScanningOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeCommitFiles), + GoType: reflect.TypeFor[*CommitFilesQuery](), + Examples: []data.QueryExample{ + { + Name: "CommitFilesQuery", + SaveModel: data.AsUnstructured(CommitFilesQuery{ + Query: common, + Options: CommitFilesOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypePullRequestReviews), + GoType: reflect.TypeFor[*PullRequestReviewsQuery](), + Examples: []data.QueryExample{ + { + Name: "PullRequestReviewsQuery", + SaveModel: data.AsUnstructured(PullRequestReviewsQuery{ + Query: common, + Options: ListPullRequestsOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypePullRequestFiles), + GoType: reflect.TypeFor[*PullRequestFilesQuery](), + Examples: []data.QueryExample{ + { + Name: "PullRequestFilesQuery", + SaveModel: data.AsUnstructured(PullRequestFilesQuery{ + Query: common, + Options: PullRequestFilesOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeWorkflowRuns), + GoType: reflect.TypeFor[*WorkflowRunsQuery](), + Examples: []data.QueryExample{ + { + Name: "WorkflowRunsQuery", + SaveModel: data.AsUnstructured(WorkflowRunsQuery{ + Query: common, + Options: WorkflowRunsOptions{}, + }), + }, + }, + }, { + Discriminators: data.NewDiscriminators("queryType", QueryTypeDeployments), + GoType: reflect.TypeFor[*DeploymentsQuery](), + Examples: []data.QueryExample{ + { + Name: "DeploymentsQuery", + SaveModel: data.AsUnstructured(DeploymentsQuery{ + Query: common, + Options: ListDeploymentsOptions{}, + }), + }, + }, + // }, schemabuilder.QueryTypeInfo{ + // Discriminators: data.NewDiscriminators("queryType", QueryTypeOrganizations), + // GoType: reflect.TypeFor[*OrganizationsQuery](), + // Examples: []data.QueryExample{ + // { + // Name: "OrganizationsQuery", + // SaveModel: data.AsUnstructured(OrganizationsQuery{}), + // }, + // }, + // }, schemabuilder.QueryTypeInfo{ + // Discriminators: data.NewDiscriminators("queryType", QueryTypeProjects), + // GoType: reflect.TypeFor[*ProjectsQuery](), + // Examples: []data.QueryExample{ + // { + // Name: "ProjectsQuery", + // SaveModel: data.AsUnstructured(ProjectsQuery{ + // Options: ProjectOptions{}, + // }), + // }, + // }, + // }, schemabuilder.QueryTypeInfo{ + // Discriminators: data.NewDiscriminators("queryType", QueryTypeGraphQL), + // GoType: reflect.TypeFor[*GraphQLQuery](), + // Examples: []data.QueryExample{ + // { + // Name: "GraphQLQuery", + // SaveModel: data.AsUnstructured(GraphQLQuery{ + // Query: common, + // Options: ListDeploymentsOptions{}, + // }), + // }, + // }, + }}) + + require.NoError(t, err) + + // load existing routes.json (manually authored) and register them with the + // builder so UpdateProviderFiles doesn't see them as removed and delete the + // file. routes.json is hand-authored, not generated from Go types. + if routesData, err := os.ReadFile("../schema/v0alpha1/routes.json"); err == nil { + var routes pluginschema.Routes + require.NoError(t, json.Unmarshal(routesData, &routes)) + require.NoError(t, builder.SetRoutes(&routes)) + } + + // update the query schemas resource + builder.UpdateProviderFiles(t, "v0alpha1", "../schema/") +} diff --git a/pkg/schema/v0alpha1/query.examples.json b/pkg/schema/v0alpha1/query.examples.json new file mode 100644 index 00000000..da677433 --- /dev/null +++ b/pkg/schema/v0alpha1/query.examples.json @@ -0,0 +1,259 @@ +{ + "examples": [ + { + "name": "Simple", + "queryType": "Pull_Requests", + "saveModel": { + "options": { + "owner": "", + "repository": "", + "timeField": 0 + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "CommitsQuery", + "queryType": "Commits", + "saveModel": { + "options": { + "gitRef": "", + "includeFiles": false, + "owner": "", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "TagsQuery", + "queryType": "Tags", + "saveModel": { + "options": { + "owner": "", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "LabelsQuery", + "queryType": "Labels", + "saveModel": { + "options": { + "owner": "", + "query": "", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "ReleasesQuery", + "queryType": "Releases", + "saveModel": { + "options": { + "owner": "", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "ContributorsQuery", + "queryType": "Contributors", + "saveModel": { + "options": { + "owner": "yesoreyeram", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "RepositoriesQuery", + "queryType": "Repositories", + "saveModel": { + "owner": "yesoreyeram", + "repository": "" + } + }, + { + "name": "IssuesQuery", + "queryType": "Issues", + "saveModel": { + "options": { + "filters": { + "states": [ + "OPEN" + ] + }, + "owner": "", + "repository": "", + "timeField": 0 + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "PackagesQuery", + "queryType": "Packages", + "saveModel": { + "options": { + "names": "", + "owner": "", + "packageType": "DOCKER", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "MilestonesQuery", + "queryType": "Milestones", + "saveModel": { + "options": { + "owner": "", + "query": "", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "VulnerabilityQuery", + "queryType": "Vulnerabilities", + "saveModel": { + "options": { + "owner": "", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "StargazersQuery", + "queryType": "Stargazers", + "saveModel": { + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "WorkflowsQuery", + "queryType": "Workflows", + "saveModel": { + "options": { + "owner": "", + "repository": "", + "timeField": 0 + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "WorkflowUsageQuery", + "queryType": "Workflow_Usage", + "saveModel": { + "options": { + "branch": "", + "owner": "", + "repository": "", + "workflow": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "CodeScanningQuery", + "queryType": "Code_Scanning", + "saveModel": { + "options": { + "gitRef": "", + "owner": "", + "repository": "", + "state": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "CommitFilesQuery", + "queryType": "Commit_Files", + "saveModel": { + "options": { + "commitSha": "", + "owner": "", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "PullRequestReviewsQuery", + "queryType": "Pull_Request_Reviews", + "saveModel": { + "options": { + "owner": "", + "repository": "", + "timeField": 0 + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "PullRequestFilesQuery", + "queryType": "Pull_Request_Files", + "saveModel": { + "options": { + "owner": "", + "prNumber": 0, + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "WorkflowRunsQuery", + "queryType": "Workflow_Runs", + "saveModel": { + "options": { + "branch": "", + "owner": "", + "repository": "", + "workflow": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + }, + { + "name": "DeploymentsQuery", + "queryType": "Deployments", + "saveModel": { + "options": { + "owner": "", + "repository": "" + }, + "owner": "grafana", + "repository": "github-datasource" + } + } + ] +} \ No newline at end of file diff --git a/pkg/schema/v0alpha1/query.types.json b/pkg/schema/v0alpha1/query.types.json new file mode 100644 index 00000000..7d235bd7 --- /dev/null +++ b/pkg/schema/v0alpha1/query.types.json @@ -0,0 +1,1158 @@ +{ + "kind": "QueryTypeDefinitionList", + "apiVersion": "datasource.grafana.app/v0alpha1", + "metadata": { + "resourceVersion": "1777970210999" + }, + "items": [ + { + "metadata": { + "name": "Pull_Requests", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Pull_Requests" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "PullRequestsQuery is used when querying for GitHub Pull Requests", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "query": { + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + }, + "timeField": { + "description": "TimeField defines what time field to filter by", + "type": "integer" + } + }, + "required": [ + "repository", + "owner", + "timeField" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Commits", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Commits" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "CommitsQuery is used when querying for GitHub commits", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "gitRef": { + "type": "string" + }, + "includeFiles": { + "type": "boolean" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "gitRef", + "includeFiles" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Tags", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Tags" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "TagsQuery is used when querying for GitHub tags", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + } + }, + "required": [ + "repository", + "owner" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Labels", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Labels" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "LabelsQuery is used when querying for GitHub issue labels", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "query": { + "description": "Query searches labels by name and description", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "query" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Releases", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Releases" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "ReleasesQuery is used when querying for GitHub issue labels", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + } + }, + "required": [ + "repository", + "owner" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Contributors", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Contributors" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "ContributorsQuery is used when querying for GitHub contributors", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "query": { + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + } + }, + "required": [ + "repository", + "owner" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Repositories", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Repositories" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "RepositoriesQuery is used when querying for GitHub repositories", + "properties": { + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Issues", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Issues" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "IssuesQuery is used when querying for GitHub issues", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "filters": { + "additionalProperties": false, + "properties": { + "assignee": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "labels": { + "items": { + "type": "string" + }, + "type": "array" + }, + "mentioned": { + "type": "string" + }, + "milestone": { + "type": "string" + }, + "milestoneNumber": { + "type": "string" + }, + "since": { + "additionalProperties": false, + "type": "object" + }, + "states": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "viewerSubscribed": { + "type": "boolean" + } + }, + "type": "object" + }, + "owner": { + "type": "string" + }, + "query": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "timeField": { + "type": "integer" + } + }, + "required": [ + "repository", + "owner", + "filters", + "timeField" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Packages", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Packages" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "PackagesQuery is used when querying for GitHub packages, including NPM, Maven, PyPi, Rubygems, and Docker", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "names": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "packageType": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "names", + "packageType" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Milestones", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Milestones" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "MilestonesQuery is used when querying for GitHub milestones", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "query": { + "description": "Query searches milestones by name and description", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "query" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Vulnerabilities", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Vulnerabilities" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "VulnerabilityQuery is used when querying for GitHub Repository Vulnerabilities", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + } + }, + "required": [ + "repository", + "owner" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Stargazers", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Stargazers" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "StargazersQuery is used when querying stargazers for a repository", + "properties": { + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Workflows", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Workflows" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "WorkflowsQuery is used when querying workflows for an organization", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + }, + "timeField": { + "description": "The field used to check if an entry is in the requested range.", + "type": "integer" + } + }, + "required": [ + "owner", + "repository", + "timeField" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Workflow_Usage", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Workflow_Usage" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "WorkflowUsageQuery is used when querying a workflow usage", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "branch": { + "description": "Branch is the branch to filter the runs by.", + "type": "string" + }, + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + }, + "workflow": { + "description": "Workflow is the id or the workflow file name.", + "type": "string" + } + }, + "required": [ + "owner", + "repository", + "workflow", + "branch" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Code_Scanning", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Code_Scanning" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "CodeScanningQuery is used when querying code scanning alerts for a repository", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "gitRef": { + "description": "Ref is the Git reference for the results we want to list.\nThe ref for a branch can be formatted either as refs/heads/\u003cbranch name\u003e or simply \u003cbranch name\u003e.\nTo reference a pull request use refs/pull/\u003cnumber\u003e/merge.", + "type": "string" + }, + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + }, + "state": { + "description": "State is the state of the code scanning alerts. Can be one of: open, closed, dismissed, fixed.", + "type": "string" + } + }, + "required": [ + "owner", + "repository", + "state", + "gitRef" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Commit_Files", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Commit_Files" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "CommitFilesQuery is used when querying for files changed in a GitHub commit", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "commitSha": { + "description": "Ref is the commit SHA to retrieve changed files for", + "type": "string" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "owner", + "repository", + "commitSha" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Pull_Request_Reviews", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Pull_Request_Reviews" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "PullRequestReviewsQuery is used when querying for GitHub Pull Request Reviews", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "query": { + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + }, + "timeField": { + "description": "TimeField defines what time field to filter by", + "type": "integer" + } + }, + "required": [ + "repository", + "owner", + "timeField" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Pull_Request_Files", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Pull_Request_Files" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "PullRequestFilesQuery is used when querying for files changed in a GitHub pull request", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "owner": { + "type": "string" + }, + "prNumber": { + "description": "PRNumber is the pull request number", + "type": "integer" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "owner", + "repository", + "prNumber" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Workflow_Runs", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Workflow_Runs" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "WorkflowRunsQuery is used when querying workflow runs for a repository", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "branch": { + "description": "Branch is the branch to filter the runs by.", + "type": "string" + }, + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + }, + "workflow": { + "description": "Workflow is the id or the workflow file name.", + "type": "string" + } + }, + "required": [ + "owner", + "repository", + "workflow", + "branch" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + }, + { + "metadata": { + "name": "Deployments", + "resourceVersion": "1777970210999", + "creationTimestamp": "2026-05-05T08:36:50Z" + }, + "spec": { + "discriminators": [ + { + "field": "queryType", + "value": "Deployments" + } + ], + "schema": { + "$schema": "https://json-schema.org/draft-04/schema", + "additionalProperties": false, + "description": "DeploymentsQuery is used when querying deployments for a repository", + "properties": { + "options": { + "additionalProperties": false, + "properties": { + "environment": { + "description": "Environment is the name of the environment (e.g., \"production\", \"staging\") to filter by", + "type": "string" + }, + "gitRef": { + "description": "GitRef is the name of the ref (branch, tag, or SHA) to filter by", + "type": "string" + }, + "owner": { + "description": "Owner is the owner of the repository (ex: grafana)", + "type": "string" + }, + "repository": { + "description": "Repository is the name of the repository being queried (ex: grafana)", + "type": "string" + }, + "sha": { + "description": "SHA is the SHA recorded at creation time to filter by", + "type": "string" + }, + "task": { + "description": "Task is the name of the task (e.g., \"deploy\", \"deploy:migrations\") to filter by", + "type": "string" + } + }, + "required": [ + "repository", + "owner" + ], + "type": "object" + }, + "owner": { + "type": "string" + }, + "repository": { + "type": "string" + } + }, + "required": [ + "repository", + "owner", + "options" + ], + "type": "object" + } + } + } + ] +} \ No newline at end of file diff --git a/pkg/schema/v0alpha1/routes.json b/pkg/schema/v0alpha1/routes.json new file mode 100644 index 00000000..d94542cb --- /dev/null +++ b/pkg/schema/v0alpha1/routes.json @@ -0,0 +1,24 @@ +{ + "paths": { + "/resources/labels": { + "get": { + "summary": "List GitHub labels matching the given query", + "parameters": [ + { "name": "owner", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Owner of the repository" }, + { "name": "repository", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Repository name" }, + { "name": "query", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Substring filter on label name" } + ] + } + }, + "/resources/milestones": { + "get": { + "summary": "List GitHub milestones matching the given query", + "parameters": [ + { "name": "owner", "in": "query", "required": true, "schema": { "type": "string" } }, + { "name": "repository", "in": "query", "required": true, "schema": { "type": "string" } }, + { "name": "query", "in": "query", "required": false, "schema": { "type": "string" } } + ] + } + } + } +} diff --git a/pkg/schema_embed.go b/pkg/schema_embed.go new file mode 100644 index 00000000..f1863bbe --- /dev/null +++ b/pkg/schema_embed.go @@ -0,0 +1,22 @@ +package main + +import ( + "embed" + "io/fs" + + "github.com/grafana/grafana-plugin-sdk-go/experimental/pluginschema" +) + +//go:embed schema/v0alpha1/*.json +var schemaFS embed.FS + +// loadSchema returns the embedded v0alpha1 PluginSchema. +func loadSchema() (*pluginschema.PluginSchema, error) { + // the composite provider expects files under {apiVersion}/... + // our embed roots at schema/, so strip that prefix. + sub, err := fs.Sub(schemaFS, "schema") + if err != nil { + return nil, err + } + return pluginschema.NewCompositeFileSchemaProvider(sub).Get("v0alpha1") +} diff --git a/pkg/schema_embed_test.go b/pkg/schema_embed_test.go new file mode 100644 index 00000000..cd411e53 --- /dev/null +++ b/pkg/schema_embed_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestLoadSchema_returnsAllSections(t *testing.T) { + schema, err := loadSchema() + require.NoError(t, err) + require.NotNil(t, schema.QueryTypes) + require.NotEmpty(t, schema.QueryTypes.Items) + require.NotNil(t, schema.QueryExamples) + require.NotEmpty(t, schema.QueryExamples.Examples) + require.NotNil(t, schema.Routes) + require.Contains(t, schema.Routes.Paths, "/resources/labels") + require.Contains(t, schema.Routes.Paths, "/resources/milestones") +}