feat: implement hgctl agent module (#3267)

This commit is contained in:
xingpiaoliang
2025-12-26 13:47:32 +08:00
committed by GitHub
parent e7e3ab5ff6
commit 17e80b30fe
31 changed files with 5858 additions and 652 deletions

View File

@@ -22,7 +22,7 @@ require (
github.com/compose-spec/compose-go v1.17.0
github.com/docker/cli v28.1.1+incompatible
github.com/docker/compose/v2 v2.23.3
github.com/docker/docker v28.0.1+incompatible
github.com/docker/docker v28.4.0+incompatible
github.com/evanphx/json-patch/v5 v5.9.11
github.com/fatih/color v1.18.0
github.com/fatih/structtag v1.2.0
@@ -37,34 +37,36 @@ require (
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.7
github.com/spf13/viper v1.20.1
github.com/stretchr/testify v1.10.0
github.com/stretchr/testify v1.11.1
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.18.5
istio.io/istio v0.0.0
k8s.io/api v0.33.3
k8s.io/apimachinery v0.33.3
k8s.io/api v0.34.1
k8s.io/apimachinery v0.34.1
k8s.io/cli-runtime v0.33.3
k8s.io/client-go v0.33.3
k8s.io/client-go v0.34.1
k8s.io/kubectl v0.33.3
sigs.k8s.io/controller-runtime v0.21.0
sigs.k8s.io/yaml v1.5.0
sigs.k8s.io/controller-runtime v0.22.3
sigs.k8s.io/yaml v1.6.0
)
require (
cel.dev/expr v0.24.0 // indirect
dario.cat/mergo v1.0.2 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/chzyer/readline v1.5.0 // indirect
github.com/containerd/containerd/api v1.8.0 // indirect
github.com/containerd/errdefs v0.3.0 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/platforms v0.2.1 // indirect
github.com/containerd/ttrpc v1.2.7 // indirect
github.com/envoyproxy/go-control-plane/contrib v0.0.0-20251016030003-90eca0228178 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.2 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
@@ -72,12 +74,13 @@ require (
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.3 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
oras.land/oras-go/v2 v2.6.0 // indirect
sigs.k8s.io/gateway-api-inference-extension v0.5.0 // indirect
sigs.k8s.io/gateway-api-inference-extension v1.1.0 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
)
require (
@@ -86,29 +89,28 @@ require (
github.com/BurntSushi/toml v1.5.0 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.3.1 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
github.com/Masterminds/squirrel v1.5.4 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.11.7 // indirect
github.com/RageCage64/multilinediff v0.2.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go-v2 v1.17.6 // indirect
github.com/aws/aws-sdk-go-v2/config v1.18.16 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.16 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.31 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/aws/aws-sdk-go-v2 v1.39.2 // indirect
github.com/aws/aws-sdk-go-v2/config v1.31.12 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.18.16 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 // indirect
github.com/aws/smithy-go v1.23.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.0 // indirect
github.com/buger/goterm v1.0.4 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chai2010/gettext-go v1.0.3 // indirect
@@ -129,7 +131,7 @@ require (
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
@@ -142,7 +144,7 @@ require (
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.1 // indirect
github.com/go-openapi/jsonpointer v0.21.2 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.1 // indirect
github.com/gobwas/glob v0.2.3 // indirect
@@ -153,17 +155,17 @@ require (
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/cel-go v0.25.0 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/cel-go v0.26.0 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gosuri/uitable v0.0.4 // indirect
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect
github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
@@ -175,7 +177,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/invopop/yaml v0.1.0 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/jonboulle/clockwork v0.4.0 // indirect
github.com/jonboulle/clockwork v0.5.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
@@ -198,7 +200,7 @@ require (
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/miekg/dns v1.1.66 // indirect
github.com/miekg/dns v1.1.68 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
@@ -213,7 +215,7 @@ require (
github.com/moby/sys/symlink v0.2.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/morikuni/aec v1.0.0 // indirect
@@ -225,11 +227,11 @@ require (
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.22.0 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.65.0 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
github.com/prometheus/prometheus v0.303.1 // indirect
github.com/prometheus/common v0.67.1 // indirect
github.com/prometheus/procfs v0.17.0 // indirect
github.com/prometheus/prometheus v0.307.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rubenv/sql-migrate v1.8.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
@@ -254,54 +256,53 @@ require (
github.com/xlab/treeprint v1.2.0 // indirect
github.com/zmap/zcrypto v0.0.0-20230310154051-c8b263fd8300 // indirect
github.com/zmap/zlint/v3 v3.6.3 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
go.opentelemetry.io/otel v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.57.0 // indirect
go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/sdk v1.35.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
go.opentelemetry.io/otel/metric v1.38.0 // indirect
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect
go.opentelemetry.io/otel/trace v1.38.0 // indirect
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.40.0 // indirect
golang.org/x/exp v0.0.0-20250717185816-542afb5b7346 // indirect
golang.org/x/mod v0.25.0 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/term v0.33.0 // indirect
golang.org/x/text v0.27.0 // indirect
golang.org/x/time v0.11.0 // indirect
golang.org/x/tools v0.34.0 // indirect
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/grpc v1.73.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
golang.org/x/crypto v0.42.0 // indirect
golang.org/x/exp v0.0.0-20250808145144-a408d31f581a // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.44.0 // indirect
golang.org/x/oauth2 v0.31.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/term v0.35.0 // indirect
golang.org/x/text v0.29.0 // indirect
golang.org/x/time v0.13.0 // indirect
golang.org/x/tools v0.37.0 // indirect
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 // indirect
google.golang.org/grpc v1.76.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
istio.io/api v1.27.1-0.20250820125923-f5a5d3a605a9 // indirect
istio.io/client-go v1.27.1-0.20250820130622-12f6d11feb40 // indirect
k8s.io/apiextensions-apiserver v0.33.3 // indirect
k8s.io/apiserver v0.33.3 // indirect
k8s.io/component-base v0.33.3 // indirect
k8s.io/apiextensions-apiserver v0.34.1 // indirect
k8s.io/apiserver v0.34.1 // indirect
k8s.io/component-base v0.34.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
k8s.io/utils v0.0.0-20250502105355-0f33e8f1c979 // indirect
sigs.k8s.io/gateway-api v1.3.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
k8s.io/kube-openapi v0.0.0-20250814151709-d7b6acb124c3 // indirect
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect
sigs.k8s.io/gateway-api v1.4.0 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/kustomize/api v0.19.0 // indirect
sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect
sigs.k8s.io/mcs-api v0.1.1-0.20240624222831-d7001fe1d21c // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
)
replace istio.io/api => ../external/api

View File

@@ -54,7 +54,7 @@ cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJN
cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU=
cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4=
cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4=
cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ=
cloud.google.com/go v0.120.0 h1:wc6bgG9DHyKqF5/vQvX1CiZrtHnxJjBlKUyF9nP6meA=
cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4=
cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw=
cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E=
@@ -355,7 +355,7 @@ cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzc
cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI=
cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40=
cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls=
cloud.google.com/go/compute v1.28.0 h1:OPtBxMcheSS+DWfci803qvPly3d4w7Eu5ztKBcFfzwk=
cloud.google.com/go/compute v1.38.0 h1:MilCLYQW2m7Dku8hRIIKo4r0oKastlD74sSu16riYKs=
cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU=
cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM=
@@ -363,8 +363,9 @@ cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2Aawl
cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY=
cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k=
cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I=
cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg=
cloud.google.com/go/compute/metadata v0.8.4 h1:oXMa1VMQBVCyewMIOm3WQsnVd9FbKBtm8reqWRaXnHQ=
cloud.google.com/go/compute/metadata v0.8.4/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY=
cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck=
cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w=
@@ -1355,8 +1356,8 @@ github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4=
github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM=
@@ -1405,30 +1406,32 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
github.com/aws/aws-sdk-go-v2 v1.17.6 h1:Y773UK7OBqhzi5VDXMi1zVGsoj+CVHs2eaC2bDsLwi0=
github.com/aws/aws-sdk-go-v2 v1.17.6/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=
github.com/aws/aws-sdk-go-v2/config v1.18.16 h1:4r7gsCu8Ekwl5iJGE/GmspA2UifqySCCkyyyPFeWs3w=
github.com/aws/aws-sdk-go-v2/config v1.18.16/go.mod h1:XjM6lVbq7UgELp9NjXBrb1DQY/ownlWsvDhEQksemJc=
github.com/aws/aws-sdk-go-v2/credentials v1.13.16 h1:GgToSxaENX/1zXIGNFfiVk4hxryYJ5Vt4Mh8XLAL7Lc=
github.com/aws/aws-sdk-go-v2/credentials v1.13.16/go.mod h1:KP7aFJhfwPFgx9aoVYL2nYHjya5WBD98CWaadpgmnpY=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.24 h1:5qyqXASrX2zy5cTnoHHa4N2c3Lc94GH7gjnBP3GwKdU=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.24/go.mod h1:neYVaeKr5eT7BzwULuG2YbLhzWZ22lpjKdCybR7AXrQ=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30 h1:y+8n9AGDjikyXoMBTRaHHHSaFEB8267ykmvyPodJfys=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.30/go.mod h1:LUBAO3zNXQjoONBKn/kR1y0Q4cj/D02Ts0uHYjcCQLM=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24 h1:r+Kv+SEJquhAZXaJ7G4u44cIwXV3f8K+N482NNAzJZA=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.24/go.mod h1:gAuCezX/gob6BSMbItsSlMb6WZGV7K2+fWOvk8xBSto=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.31 h1:hf+Vhp5WtTdcSdE+yEcUz8L73sAzN0R+0jQv+Z51/mI=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.31/go.mod h1:5zUjguZfG5qjhG9/wqmuyHRyUftl2B5Cp6NNxNC6kRA=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24 h1:c5qGfdbCHav6viBwiyDns3OXqhqAbGjfIB4uVu2ayhk=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.24/go.mod h1:HMA4FZG6fyib+NDo5bpIxX1EhYjrAOveZJY2YR0xrNE=
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5 h1:bdKIX6SVF3nc3xJFw6Nf0igzS6Ff/louGq8Z6VP/3Hs=
github.com/aws/aws-sdk-go-v2/service/sso v1.12.5/go.mod h1:vuWiaDB30M/QTC+lI3Wj6S/zb7tpUK2MSYgy3Guh2L0=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5 h1:xLPZMyuZ4GuqRCIec/zWuIhRFPXh2UOJdLXBSi64ZWQ=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.5/go.mod h1:QjxpHmCwAg0ESGtPQnLIVp7SedTOBMYy+Slr3IfMKeI=
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6 h1:rIFn5J3yDoeuKCE9sESXqM5POTAhOP1du3bv/qTL+tE=
github.com/aws/aws-sdk-go-v2/service/sts v1.18.6/go.mod h1:48WJ9l3dwP0GSHWGc5sFGGlCkuA82Mc2xnw+T6Q8aDw=
github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/aws-sdk-go-v2 v1.39.2 h1:EJLg8IdbzgeD7xgvZ+I8M1e0fL0ptn/M47lianzth0I=
github.com/aws/aws-sdk-go-v2 v1.39.2/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY=
github.com/aws/aws-sdk-go-v2/config v1.31.12 h1:pYM1Qgy0dKZLHX2cXslNacbcEFMkDMl+Bcj5ROuS6p8=
github.com/aws/aws-sdk-go-v2/config v1.31.12/go.mod h1:/MM0dyD7KSDPR+39p9ZNVKaHDLb9qnfDurvVS2KAhN8=
github.com/aws/aws-sdk-go-v2/credentials v1.18.16 h1:4JHirI4zp958zC026Sm+V4pSDwW4pwLefKrc0bF2lwI=
github.com/aws/aws-sdk-go-v2/credentials v1.18.16/go.mod h1:qQMtGx9OSw7ty1yLclzLxXCRbrkjWAM7JnObZjmCB7I=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 h1:Mv4Bc0mWmv6oDuSWTKnk+wgeqPL5DRFu5bQL9BGPQ8Y=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9/go.mod h1:IKlKfRppK2a1y0gy1yH6zD+yX5uplJ6UuPlgd48dJiQ=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 h1:se2vOWGD3dWQUtfn4wEjRQJb1HK1XsNIt825gskZ970=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9/go.mod h1:hijCGH2VfbZQxqCDN7bwz/4dzxV+hkyhjawAtdPWKZA=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 h1:6RBnKZLkJM4hQ+kN6E7yWFveOTg8NLPHAkqrs4ZPlTU=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9/go.mod h1:V9rQKRmK7AWuEsOMnHzKj8WyrIir1yUJbZxDuZLFvXI=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 h1:5r34CgVOD4WZudeEKZ9/iKpiT6cM1JyEROpXjOcdWv8=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9/go.mod h1:dB12CEbNWPbzO2uC6QSWHteqOg4JfBVJOojbAoAUb5I=
github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 h1:A1oRkiSQOWstGh61y4Wc/yQ04sqrQZr1Si/oAXj20/s=
github.com/aws/aws-sdk-go-v2/service/sso v1.29.6/go.mod h1:5PfYspyCU5Vw1wNPsxi15LZovOnULudOQuVxphSflQA=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 h1:5fm5RTONng73/QA73LhCNR7UT9RpFH3hR6HWL6bIgVY=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1/go.mod h1:xBEjWD13h+6nq+z4AkqSfSvqRKFgDIQeaMguAJndOWo=
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 h1:p3jIvqYwUZgu/XYeI48bJxOhvm47hZb5HUQ0tn6Q9kA=
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6/go.mod h1:WtKK+ppze5yKPkZ0XwqIVWD4beCwv056ZbPQNoeHqM8=
github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE=
github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20150223135152-b965b613227f/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@@ -1461,8 +1464,8 @@ github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3k
github.com/bugsnag/panicwrap v1.2.0 h1:OzrKrRvXis8qEvOkfcxNcYbOd2O7xXS2nnKMEMABFQA=
github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
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/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=
@@ -1521,8 +1524,8 @@ github.com/containerd/containerd/api v1.8.0 h1:hVTNJKR8fMc/2Tiw60ZRijntNMd1U+JVM
github.com/containerd/containerd/api v1.8.0/go.mod h1:dFv4lt6S20wTu/hMcP4350RL87qPWLVa/OHOwmmdnYc=
github.com/containerd/continuity v0.4.4 h1:/fNVfTJ7wIl/YPMHjf+5H32uFhl63JucB34PlCpMKII=
github.com/containerd/continuity v0.4.4/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE=
github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4=
github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY=
github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
@@ -1594,8 +1597,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/dvsekhvalnov/jose2go v0.0.0-20170216131308-f21a8cedbbae/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM=
github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU=
github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes=
github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w=
@@ -1635,8 +1638,8 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw=
github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU=
github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM=
github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc=
@@ -1652,8 +1655,8 @@ github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpj
github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc=
github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA=
github.com/go-jose/go-jose/v4 v4.1.0 h1:cYSYxd3pw5zd2FSXk2vGdn9igQU2PS8MuxrCOCl0FdY=
github.com/go-jose/go-jose/v4 v4.1.0/go.mod h1:GG/vqmYm3Von2nYiB2vGTXzdoNKE5tix5tuc6iAd+sw=
github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI=
github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U=
@@ -1673,8 +1676,8 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre
github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=
github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic=
github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk=
github.com/go-openapi/jsonpointer v0.21.2 h1:AqQaNADVwq/VnkCmQg6ogE+M3FOsKTytwges0JdwVuA=
github.com/go-openapi/jsonpointer v0.21.2/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk=
github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ=
github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
@@ -1766,15 +1769,15 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/cel-go v0.25.0 h1:jsFw9Fhn+3y2kBbltZR4VEz5xKkcIFRPDnuEzAGv5GY=
github.com/google/cel-go v0.25.0/go.mod h1:hjEb6r5SuOSlhCHmFoLzu8HGCERvIsDAbxDAyNU/MmI=
github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI=
github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg=
github.com/google/certificate-transparency-go v1.1.4 h1:hCyXHDbtqlr/lMXU0D4WgbalXL0Zk4dSWWMbPV8VrqY=
github.com/google/certificate-transparency-go v1.1.4/go.mod h1:D6lvbfwckhNrbM9WVl1EVeMOyzC19mpIjMOI4nxBHtQ=
github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw=
github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw=
github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@@ -1823,8 +1826,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
github.com/google/pprof v0.0.0-20250501235452-c0086092b71a h1:rDA3FfmxwXR+BVKKdz55WwMJ1pD2hJQNW31d+l3mPk4=
github.com/google/pprof v0.0.0-20250501235452-c0086092b71a/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA=
github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8 h1:ZI8gCoCjGzPsum4L21jHdQs8shFBIQih1TM9Rd/c+EQ=
github.com/google/pprof v0.0.0-20250923004556-9e5a51aed1e8/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM=
github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
@@ -1881,15 +1884,16 @@ github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5T
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY=
github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo=
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc h1:GN2Lv3MGO7AS6PrRoT6yV5+wkrOpcszoIsO4+4ds248=
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk=
github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 h1:cLN4IBkmkYZNnk7EAJ0BHIethd+J6LqxFNw5mSiI2bM=
github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs=
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8=
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@@ -1942,12 +1946,10 @@ github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a/go.mod h1:h+uFLl
github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o=
github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY=
github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I=
github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
@@ -2057,8 +2059,8 @@ github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxU
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/miekg/dns v1.1.66 h1:FeZXOS3VCVsKnEAd+wBkjMC3D2K+ww66Cq3VnCINuJE=
github.com/miekg/dns v1.1.66/go.mod h1:jGFzBsSNbJw6z1HYut1RKBKHA9PBdxeHrZG8J+gC2WE=
github.com/miekg/dns v1.1.68 h1:jsSRkNozw7G/mnmXULynzMNIsgY2dHC8LO6U6Ij2JEA=
github.com/miekg/dns v1.1.68/go.mod h1:fujopn7TB3Pu3JM69XaawiU0wqjpL9/8xGop5UrTPps=
github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU=
github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
@@ -2104,8 +2106,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=
@@ -2124,12 +2127,12 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU=
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=
github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8=
github.com/onsi/ginkgo/v2 v2.26.0 h1:1J4Wut1IlYZNEAWIV3ALrT9NfiaGW2cDCJQSFQMs/gE=
github.com/onsi/ginkgo/v2 v2.26.0/go.mod h1:qhEywmzWTBUY88kfO0BRvX4py7scov9yR+Az2oavUzw=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y=
github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0=
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
@@ -2181,8 +2184,8 @@ github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -2191,16 +2194,16 @@ github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvM
github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE=
github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI=
github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q=
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
github.com/prometheus/prometheus v0.303.1 h1:He/2jRE6sB23Ew38AIoR1WRR3fCMgPlJA2E0obD2WSY=
github.com/prometheus/prometheus v0.303.1/go.mod h1:WEq2ogBPZoLjj9x5K67VEk7ECR0nRD9XCjaOt1lsYck=
github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0=
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
github.com/prometheus/prometheus v0.307.1 h1:Hh3kRMFn+xpQGLe/bR6qpUfW4GXQO0spuYeY7f2JZs4=
github.com/prometheus/prometheus v0.307.1/go.mod h1:/7YQG/jOLg7ktxGritmdkZvezE1fa6aWDj0MGDIZvcY=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
@@ -2294,8 +2297,9 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/substrait-io/substrait-go v0.4.2/go.mod h1:qhpnLmrcvAnlZsUyPXZRqldiHapPTXC3t7xFgDi3aQg=
github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c=
github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw=
@@ -2376,14 +2380,14 @@ go.opentelemetry.io/contrib/detectors/gcp v1.34.0/go.mod h1:cV4BMFcscUR/ckqLkbfQ
go.opentelemetry.io/contrib/detectors/gcp v1.35.0/go.mod h1:qGWP8/+ILwMRIUf9uIVLloR1uo5ZYAslM4O6OqUi1DA=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0 h1:0tY123n7CdWMem7MOVdKOt0YfshufLCwfE5Bob+hQuM=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0/go.mod h1:CosX/aS4eHnG9D7nESYpV753l4j9q5j3SL/PUYd2lR8=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0 h1:2pn7OzMewmYRiNtv1doZnLo3gONcnMHlFnmOR8Vgt+8=
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.63.0/go.mod h1:rjbQTDEPQymPE0YnRQp9/NuPwwtL0sesz/fnqRW/v84=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4=
go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY=
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
@@ -2392,14 +2396,15 @@ go.opentelemetry.io/otel v1.23.0/go.mod h1:YCycw9ZeKhcJFrb34iVSkyT0iczq/zYDtZYFu
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg=
go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0 h1:m639+BofXTvcY1q8CGs4ItwQarYtJPOWmVobfM1HpVI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0/go.mod h1:LjReUci/F4BUyv+y4dwnq3h/26iNOeC3wAIqgvTIZVo=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 h1:xJ2qHD0C1BeYVTLLR9sX12+Qb95kfeD/byKj6Ky1pXg=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0/go.mod h1:u5BF1xyjstDowA1R5QAO9JHzqK+ublenEW/dyqTjBVk=
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 h1:aTL7F04bJHUlztTsNGJ2l+6he8c+y/b//eR0jjjemT4=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0/go.mod h1:kldtb7jDTeol0l3ewcmd8SDvx3EmIE7lyvqbasU3QC4=
go.opentelemetry.io/otel/exporters/prometheus v0.57.0 h1:AHh/lAP1BHrY5gBwk8ncc25FXWm/gmmY3BX258z5nuk=
go.opentelemetry.io/otel/exporters/prometheus v0.57.0/go.mod h1:QpFWz1QxqevfjwzYdbMb4Y1NnlJvqSGwyuU0B4iuc9c=
go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4=
@@ -2410,19 +2415,22 @@ go.opentelemetry.io/otel/metric v1.23.0/go.mod h1:MqUW2X2a6Q8RN96E2/nqNoT+z9BSms
go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=
go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8=
go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A=
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E=
go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc=
go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU=
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ=
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0=
go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo=
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
@@ -2431,10 +2439,12 @@ go.opentelemetry.io/otel/trace v1.23.0/go.mod h1:GSGTbIClEsuZrGIzoEHqsVfxgn5Ukgg
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8=
go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os=
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo=
go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4=
go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
@@ -2449,10 +2459,10 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE=
go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI=
go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=
go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -2495,8 +2505,8 @@ golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ug
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw=
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
@@ -2542,8 +2552,8 @@ golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -2629,8 +2639,8 @@ golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -2675,8 +2685,8 @@ golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbht
golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo=
golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -2704,8 +2714,8 @@ golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -2823,8 +2833,8 @@ golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
@@ -2857,8 +2867,8 @@ golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -2887,8 +2897,8 @@ golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -2896,8 +2906,8 @@ golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI=
golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
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-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -2967,8 +2977,8 @@ golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=
golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
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=
@@ -2983,6 +2993,8 @@ gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0=
gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA=
gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY=
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY=
@@ -3228,8 +3240,8 @@ google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqt
google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro=
google.golang.org/genproto v0.0.0-20240205150955-31a09d347014/go.mod h1:xEgQu1e4stdSSsxPDK8Azkrk/ECl5HvdPf6nbZrTS5M=
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s=
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 h1:BulPr26Jqjnd4eYDVe+YvyR7Yc2vJGkO5/0UxD0/jZU=
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:hL97c3SYopEHblzpxRL4lSs523++l8DYxGM1FQiYmb4=
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4=
google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s=
google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8=
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig=
google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig=
@@ -3266,8 +3278,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a/go.
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg=
google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463/go.mod h1:U90ffi8eUL9MwPcrJylN5+Mk2v3vuPDptd5yyNUiRR8=
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw=
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 h1:oWVWY3NzT7KJppx2UKhKmzPq4SRe0LdCijVRwvGeikY=
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822/go.mod h1:h3c4v36UTKzUiuaOKQ6gr3S+0hovBtUrXzTG/i3+XEc=
google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 h1:8XJ4pajGwOlasW+L13MnEGA8W4115jJySQtVfS2/IBU=
google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4/go.mod h1:NnuHhy+bxcg30o7FnVAZbXsPHUDQ9qKWAQKCD7VxFtk=
google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA=
google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c=
google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405/go.mod h1:GRUCuLdzVqZte8+Dl/D4N25yLzcGqqWaYkeVOwulFqw=
@@ -3325,8 +3337,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4/go.
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 h1:V1jCN2HBa8sySkR5vLcCSqJSTMv093Rw9EJefhQGP7M=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ=
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -3384,8 +3396,9 @@ google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFN
google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw=
google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A=
google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/grpc/examples v0.0.0-20230224211313-3775f633ce20/go.mod h1:Nr5H8+MlGWr5+xX/STzdoEqJrO+YteqFbMyCsrb6mH0=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
@@ -3414,8 +3427,9 @@ google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojt
google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII=
@@ -3427,8 +3441,8 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=
gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo=
gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
@@ -3462,28 +3476,28 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
k8s.io/api v0.33.3 h1:SRd5t//hhkI1buzxb288fy2xvjubstenEKL9K51KBI8=
k8s.io/api v0.33.3/go.mod h1:01Y/iLUjNBM3TAvypct7DIj0M0NIZc+PzAHCIo0CYGE=
k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs=
k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8=
k8s.io/apimachinery v0.33.3 h1:4ZSrmNa0c/ZpZJhAgRdcsFcZOw1PQU1bALVQ0B3I5LA=
k8s.io/apimachinery v0.33.3/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4=
k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E=
k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM=
k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk=
k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI=
k8s.io/apiextensions-apiserver v0.34.1/go.mod h1:hP9Rld3zF5Ay2Of3BeEpLAToP+l4s5UlxiHfqRaRcMc=
k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4=
k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
k8s.io/apiserver v0.34.1 h1:U3JBGdgANK3dfFcyknWde1G6X1F4bg7PXuvlqt8lITA=
k8s.io/apiserver v0.34.1/go.mod h1:eOOc9nrVqlBI1AFCvVzsob0OxtPZUCPiUJL45JOTBG0=
k8s.io/cli-runtime v0.33.3 h1:Dgy4vPjNIu8LMJBSvs8W0LcdV0PX/8aGG1DA1W8lklA=
k8s.io/cli-runtime v0.33.3/go.mod h1:yklhLklD4vLS8HNGgC9wGiuHWze4g7x6XQZ+8edsKEo=
k8s.io/client-go v0.33.3 h1:M5AfDnKfYmVJif92ngN532gFqakcGi6RvaOF16efrpA=
k8s.io/client-go v0.33.3/go.mod h1:luqKBQggEf3shbxHY4uVENAxrDISLOarxpTKMiUuujg=
k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA=
k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4=
k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY=
k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8=
k8s.io/component-base v0.34.1 h1:v7xFgG+ONhytZNFpIz5/kecwD+sUhVE6HU7qQUiRM4A=
k8s.io/component-base v0.34.1/go.mod h1:mknCpLlTSKHzAQJJnnHVKqjxR7gBeHRv0rPXA7gdtQ0=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
k8s.io/kube-openapi v0.0.0-20250814151709-d7b6acb124c3 h1:liMHz39T5dJO1aOKHLvwaCjDbf07wVh6yaUlTpunnkE=
k8s.io/kube-openapi v0.0.0-20250814151709-d7b6acb124c3/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
k8s.io/kubectl v0.33.3 h1:r/phHvH1iU7gO/l7tTjQk2K01ER7/OAJi8uFHHyWSac=
k8s.io/kubectl v0.33.3/go.mod h1:euj2bG56L6kUGOE/ckZbCoudPwuj4Kud7BR0GzyNiT0=
k8s.io/utils v0.0.0-20250502105355-0f33e8f1c979 h1:jgJW5IePPXLGB8e/1wvd0Ich9QE97RvvF3a8J3fP/Lg=
k8s.io/utils v0.0.0-20250502105355-0f33e8f1c979/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0=
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
lukechampine.com/uint128 v1.3.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
@@ -3552,25 +3566,23 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.32.1 h1:Cf+ed5N8038zbsaXFO7mKQDi/+VcSRafb0jM84KX5so=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.32.1/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
sigs.k8s.io/gateway-api v1.3.0 h1:q6okN+/UKDATola4JY7zXzx40WO4VISk7i9DIfOvr9M=
sigs.k8s.io/gateway-api v1.3.0/go.mod h1:d8NV8nJbaRbEKem+5IuxkL8gJGOZ+FJ+NvOIltV8gDk=
sigs.k8s.io/gateway-api-inference-extension v0.5.0 h1:bYtXffUF1WUUFT2gYXaQBXIEXxXq/ZZLP9gqQweTrBI=
sigs.k8s.io/gateway-api-inference-extension v0.5.0/go.mod h1:lki0jx1qysZSZT4Ai2BxuAcpx6G8g5oBgOGuuJzjy/k=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/controller-runtime v0.22.3 h1:I7mfqz/a/WdmDCEnXmSPm8/b/yRTy6JsKKENTijTq8Y=
sigs.k8s.io/controller-runtime v0.22.3/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8=
sigs.k8s.io/gateway-api v1.4.0 h1:ZwlNM6zOHq0h3WUX2gfByPs2yAEsy/EenYJB78jpQfQ=
sigs.k8s.io/gateway-api v1.4.0/go.mod h1:AR5RSqciWP98OPckEjOjh2XJhAe2Na4LHyXD2FUY7Qk=
sigs.k8s.io/gateway-api-inference-extension v1.1.0 h1:MqRYk+3LNUWB0MbTgTZVhmJGNDTvm8l3ze4MOlzR7MU=
sigs.k8s.io/gateway-api-inference-extension v1.1.0/go.mod h1:BmJy8Hvc2EHl3Oa/Ka8/4RqwVHCCbX7BLndLdMNtugI=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/kustomize/api v0.19.0 h1:F+2HB2mU1MSiR9Hp1NEgoU2q9ItNOaBJl0I4Dlus5SQ=
sigs.k8s.io/kustomize/api v0.19.0/go.mod h1:/BbwnivGVcBh1r+8m3tH1VNxJmHSk1PzP5fkP6lbL1o=
sigs.k8s.io/kustomize/kyaml v0.19.0 h1:RFge5qsO1uHhwJsu3ipV7RNolC7Uozc0jUBC/61XSlA=
sigs.k8s.io/kustomize/kyaml v0.19.0/go.mod h1:FeKD5jEOH+FbZPpqUghBP8mrLjJ3+zD3/rf9NNu1cwY=
sigs.k8s.io/mcs-api v0.1.1-0.20240624222831-d7001fe1d21c h1:F7hIEutAxtXDOQX9NXFdvhWmWETu2zmUPHuPPcAez7g=
sigs.k8s.io/mcs-api v0.1.1-0.20240624222831-d7001fe1d21c/go.mod h1:DPFniRsBzCeLB4ANjlPEvQQt9QGIX489d1faK+GPvI4=
sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
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/structured-merge-diff/v4 v4.7.0 h1:qPeWmscJcXP0snki5IYF79Z8xrl8ETFxgMd7wez1XkI=
sigs.k8s.io/structured-merge-diff/v4 v4.7.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ=
sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4=
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=

770
hgctl/pkg/agent/README.md Normal file
View File

@@ -0,0 +1,770 @@
// Copyright (c) 2022 Alibaba Group Holding Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
# Agent Module
`pkg/agent` 是 hgctl 中用于 Agent 生命周期管理的核心模块,提供了从创建、配置、部署到发布的完整工作流。
## 目录
- [概述](#概述)
- [架构设计](#架构设计)
- [核心功能](#核心功能)
- [主要组件](#主要组件)
- [使用方式](#使用方式)
- [配置管理](#配置管理)
- [部署方式](#部署方式)
- [集成说明](#集成说明)
## 概述
Agent 模块提供了一套完整的 AI Agent 开发和部署解决方案,支持:
- **多种 Agentic Core**:集成 Claude Code 和 Qodercli
- **本地和云端部署**:支持本地运行和 AgentRun (阿里云函数计算)
- **MCP Server 管理**:支持 HTTP 和 OpenAPI 类型的 MCP Server
- **Higress 集成**:自动发布 Agent API 到 Higress 网关
- **Himarket 发布**:支持将 Agent 发布到 Himarket 市场
## 架构设计
```
pkg/agent/
├── agent.go # CLI 命令入口和主要业务逻辑
├── core.go # Agentic Core (Claude/Qodercli) 封装
├── new.go # Agent 创建流程
├── deploy.go # Agent 部署处理(本地/云端)
├── mcp.go # MCP Server 管理
├── config.go # 配置管理和初始化
├── base.go # 基础函数和环境检查
├── types.go # 类型定义
├── utils.go # 工具函数
├── common/ # 通用类型定义
│ └── base.go # ProductType 等常量
├── services/ # 外部服务客户端
│ ├── client.go # HTTP 客户端封装
│ ├── service.go # Higress/Himarket API 封装
│ └── utils.go # 服务工具函数
└── prompt/ # Prompt 模板和指导
├── base.go # Agent 开发指南
└── agent_guide.md
```
## 核心功能
### 1. Agent 创建 (new.go)
提供两种 Agent 创建方式:
#### 1.1 交互式创建
通过命令行交互式问答,逐步配置:
- Agent 名称和描述
- 系统 Prompt支持直接输入、从文件导入、LLM 生成)
- AI 模型配置DashScope、OpenAI、Anthropic 等)
- 工具集选择AgentScope 内置工具)
- MCP Server 配置
- 部署设置
#### 1.2 从 Core 导入
从 Agentic Core 的 subagent 目录导入已有的 Agent 配置。
**关键代码位置**:
- `createAgentCmd()` (new.go:99): 创建命令定义
- `getAgentConfig()` (utils.go:289): 获取 Agent 配置
- `createAgentTemplate()` (new.go:205): 生成 Agent 模板文件
### 2. Agent 部署 (deploy.go)
支持两种部署模式:
#### 2.1 本地部署 (Local)
- 基于 AgentScope Runtime
- 自动管理 Python 虚拟环境
- 依赖管理:`agentscope`, `agentscope-runtime==1.0.0`
- 默认端口8090
#### 2.2 云端部署 (AgentRun)
- 部署到阿里云函数计算
- 使用 Serverless Devs (s工具)
- 自动构建和部署
- 需要配置阿里云 Access Key
**关键代码位置**:
- `DeployHandler` (deploy.go:35): 部署处理器
- `HandleLocal()` (deploy.go:350): 本地部署逻辑
- `HandleAgentRun()` (deploy.go:305): AgentRun 部署逻辑
### 3. MCP Server 管理 (mcp.go)
支持两种类型的 MCP Server
#### 3.1 HTTP MCP Server
直接通过 HTTP URL 添加:
```bash
hgctl mcp add [name] [url] --type http
```
#### 3.2 OpenAPI MCP Server
从 OpenAPI 规范文件创建:
```bash
hgctl mcp add [name] [spec-file] --type openapi
```
功能特性:
- 自动解析 OpenAPI 规范
- 转换为 MCP Server 配置
- 自动添加到 Agentic Core
- 可选发布到 Higress
- 支持发布到 Himarket 市场
**关键代码位置**:
- `handleAddMCP()` (mcp.go:183): MCP 添加主逻辑
- `publishMCPToHigress()` (mcp.go:228): 发布到 Higress
- `parseOpenapi2MCP()` (utils.go:79): OpenAPI 解析
### 4. Agentic Core 集成 (core.go)
封装了 Agentic CoreClaude Code/Qodercli的交互
#### 支持的 Core 类型
```go
const (
CORE_CLAUDE CoreType = "claude"
CORE_QODERCLI CoreType = "qodercli"
)
```
#### 核心功能
- **Setup()**: 初始化环境和插件
- **Start()**: 启动交互式窗口
- **AddMCPServer()**: 添加 MCP Server 到 Core
- **ImproveNewAgent()**: 在特定 Agent 目录运行 Core 进行改进
**关键代码位置**:
- `AgenticCore` (core.go:32): Core 封装结构
- `Setup()` (core.go:108): 环境初始化
- `addHigressAPIMCP()` (core.go:161): 自动添加 Higress API MCP
### 5. Higress 集成
自动将 Agent API 发布到 Higress 网关:
#### 支持的 API 类型
```go
const (
A2A = "a2a" // Agent-to-Agent
REST = "restful" // RESTful API
MODEL = "model" // AI Model API
)
```
#### 发布流程
1. 创建 AI Provider Service
2. 创建 AI Route
3. 配置服务源和路由
**关键代码位置**:
- `publishAgentAPIToHigress()` (agent.go:123): 发布逻辑
- `services/service.go`: Higress API 封装
### 6. Himarket 集成
支持将 Agent 发布到 Himarket 市场:
#### 产品类型
```go
const (
MCP_SERVER ProductType = "MCP_SERVER"
MODEL_API ProductType = "MODEL_API"
REST_API ProductType = "REST_API"
AGENT_API ProductType = "AGENT_API"
)
```
**关键代码位置**:
- `publishAPIToHimarket()` (base.go:128): 发布到市场
- `services/service.go`: Himarket API 封装
## 主要组件
### AgentConfig 结构
Agent 的核心配置结构:
```go
type AgentConfig struct {
AppName string // 应用名称
AppDescription string // 应用描述
AgentName string // Agent 名称
AvailableTools []string // 可用工具列表
SysPromptPath string // 系统 Prompt 路径
ChatModel string // 使用的模型
Provider string // 模型提供商
APIKeyEnvVar string // API Key 环境变量
DeploymentPort int // 部署端口
HostBinding string // 主机绑定
EnableStreaming bool // 是否启用流式响应
EnableThinking bool // 是否启用思考过程
MCPServers []MCPServerConfig // MCP Server 配置
Type DeployType // 部署类型
ServerlessCfg ServerlessConfig // Serverless 配置
}
```
### 环境检查 (base.go)
`EnvProvisioner` 负责检查和安装必要的环境:
#### Node.js 检查
- 最低版本要求Node.js 18+
- 支持自动安装(通过 fnm
#### Agentic Core 检查
- 检查 claude 或 qodercli 是否安装
- 支持自动安装(通过 npm
**关键代码位置**:
- `EnvProvisioner.check()` (base.go:221): 环境检查
- `promptNodeInstall()` (base.go:259): Node.js 安装引导
- `promptAgentInstall()` (base.go:401): Core 安装引导
## 使用方式
### 命令结构
```bash
hgctl agent # 启动交互式 Agent 窗口
hgctl agent new # 创建新 Agent
hgctl agent deploy [name] # 部署 Agent
hgctl agent add [name] [url] # 添加 Agent API 到 Higress
hgctl mcp add [name] [url] # 添加 MCP Server
```
### 创建 Agent
#### 本地部署的 Agent
```bash
hgctl agent new
```
交互式选择:
1. 创建方式step by step / 从 Core 导入
2. Agent 名称和描述
3. 系统 Prompt 设置
4. 模型提供商和模型选择
5. 工具选择
6. MCP Server 配置
7. 部署设置
#### AgentRun 部署的 Agent
```bash
hgctl agent new --agent-run
```
额外配置:
- Resource Name
- Region
- Disk Size
- Timeout
### 部署 Agent
#### 部署到本地
```bash
hgctl agent deploy my-agent
```
自动处理:
- Python 环境检查
- 依赖安装
- 启动 Agent 服务
#### 部署到 AgentRun
```bash
hgctl agent deploy my-agent
```
要求:
- 已配置阿里云 Access Key
- 已安装 Docker
- 已安装 Serverless Devs CLI
### 添加 MCP Server
#### 添加 HTTP MCP Server
```bash
hgctl mcp add my-mcp http://localhost:8080/mcp \
--type http \
--transport streamable \
-e API_KEY=secret \
-H "Authorization: Bearer token"
```
参数说明:
- `--type`: MCP 类型http/openapi
- `--transport`: 传输类型streamable/sse
- `-e`: 环境变量
- `-H`: HTTP 头部
#### 从 OpenAPI 创建 MCP Server
```bash
hgctl mcp add swagger-mcp ./openapi.yaml \
--type openapi
```
自动完成:
1. 解析 OpenAPI 规范
2. 转换为 MCP 配置
3. 发布到 Higress
4. 添加到 Agentic Core
### 发布到 Higress 和 Himarket
```bash
hgctl agent add my-agent http://my-agent.com \
--type model \
--as-product \
--higress-console-url http://console.higress.io \
--higress-console-user admin \
--higress-console-password password \
--himarket-admin-url http://himarket.io \
--himarket-admin-user admin \
--himarket-admin-password password
```
## 配置管理
### 配置文件
配置文件位置:`~/.hgctl`
```json
{
"hgctl-agent-core": "claude",
"agent-chat-model": "qwen-plus",
"agent-model-provider": "DashScope",
"higress-console-url": "http://127.0.0.1:8080",
"higress-console-user": "admin",
"higress-console-password": "admin",
"higress-gateway-url": "http://127.0.0.1:80",
"himarket-admin-url": "",
"himarket-admin-user": "",
"himarket-admin-password": "",
"agentrun-model-name": "",
"agentrun-region": "cn-hangzhou"
}
```
### 配置项说明
| 配置项 | 说明 | 默认值 |
|--------|------|--------|
| `hgctl-agent-core` | Agentic Core 类型 | `qodercli` |
| `agent-chat-model` | 默认聊天模型 | - |
| `agent-model-provider` | 默认模型提供商 | - |
| `higress-console-url` | Higress 控制台地址 | - |
| `higress-console-user` | Higress 用户名 | - |
| `higress-console-password` | Higress 密码 | - |
| `higress-gateway-url` | Higress 网关地址 | - |
| `himarket-admin-url` | Himarket 管理地址 | - |
| `himarket-admin-user` | Himarket 用户名 | - |
| `himarket-admin-password` | Himarket 密码 | - |
| `agentrun-model-name` | AgentRun 模型名 | - |
| `agentrun-region` | AgentRun 区域 | `cn-hangzhou` |
### 环境变量
配置也可以通过环境变量设置(自动转换,用下划线替换连字符):
```bash
export HIGRESS_CONSOLE_URL=http://127.0.0.1:8080
export HIGRESS_CONSOLE_USER=admin
export HIGRESS_CONSOLE_PASSWORD=admin
```
**代码位置**: `config.go:100` - `InitConfig()`
## 部署方式
### 本地部署 (Local)
#### 技术栈
- **Runtime**: AgentScope Runtime
- **Python**: 3.12+
- **依赖**:
- `agentscope`
- `agentscope-runtime==1.0.0`
#### 部署流程
1. 检查 Python 环境
2. 创建/激活虚拟环境 (`~/.hgctl/.venv`)
3. 安装依赖
4. 启动 Agent 服务
#### 生成的文件
```
~/.hgctl/agents/{agent-name}/
├── as_runtime_main.py # AgentScope Runtime 入口
├── agent.py # Agent 类定义
├── toolkit.py # 工具集
├── prompt.md # 系统 Prompt
├── CLAUDE.md # Claude 开发指南(如果使用 Claude
└── AGENTS.md # Qoder 开发指南(如果使用 Qodercli
```
**代码位置**: `deploy.go:350` - `HandleLocal()`
### 云端部署 (AgentRun)
#### 技术栈
- **平台**: 阿里云函数计算 (Function Compute)
- **SDK**: agentrun-sdk-python
- **工具**: Serverless Devs CLI
#### 部署流程
1. 检查环境Docker、Serverless Devs
2. 检查/配置 Access Key
3. 执行 `s build`
4. 执行 `s deploy`
#### 生成的文件
```
~/.hgctl/agents/{agent-name}/
├── agentrun_main.py # AgentRun 入口
├── agent.py # Agent 类定义
├── toolkit.py # 工具集
├── prompt.md # 系统 Prompt
├── requirements.txt # Python 依赖
└── s.yaml # Serverless Devs 配置
```
#### s.yaml 配置
```yaml
edition: 3.0.0
name: {agent-name}
access: hgctl-credential
resources:
fc-agentrun-demo:
component: fc3
props:
region: {region}
description: {description}
runtime: python3.12
code: ./
handler: agentrun_main.main
timeout: {timeout}
diskSize: {disk-size}
environmentVariables:
MODEL_NAME: {model-name}
{api-key-env}: {api-key}
customRuntimeConfig:
command:
- python3
args:
- agentrun_main.py
port: {port}
```
**代码位置**: `deploy.go:305` - `HandleAgentRun()`
## 集成说明
### Higress 集成
#### Service Source 创建
```go
// services/utils.go
func BuildServiceBodyAndSrv(name, rawURL string) (map[string]interface{}, string, int, error)
```
创建服务源:
- 解析 URL
- 提取域名、端口
- 生成服务名称
#### AI Provider 和 Route 创建
对于 MODEL 类型的 Agent
```go
// services/utils.go
func BuildAIProviderServiceBody(name, url string) map[string]interface{}
func BuildAddAIRouteBody(name, url string) map[string]interface{}
```
#### MCP Server 创建
支持两种类型:
- **DIRECT_ROUTE**: 直接路由到 MCP Server URL
- **OPEN_API**: 基于 OpenAPI 规范的工具配置
### Himarket 集成
#### API Product 创建
```go
// services/utils.go
func BuildAPIProductBody(name, desc string, typ string) map[string]interface{}
```
#### Product Reference
```go
func BuildRefModelAPIProductBody(gatewayId, productId, routeName string) map[string]interface{}
func BuildRefMCPAPIProductBody(gatewayId, productId, mcpServerName string) map[string]interface{}
```
### Agentic Core 集成
#### 初始化流程
1. 提取 manifest 文件到 `~/.hgctl/`
2. 提取 Core 相关文件到 `~/.claude/``~/.qoder/`
3. 添加预定义的 MCP Server
4. 自动配置 Higress API MCP Server
#### MCP Server 添加
```bash
{core} mcp add --transport {transport} {name} {url} \
--scope {scope} \
-e {env} \
-H {header}
```
**代码位置**: `core.go:236` - `AddMCPServer()`
## 类型定义 (types.go)
### API 请求/响应类型
用于与 AI 模型 API 交互:
```go
type Message struct {
Role string `json:"role"`
Content string `json:"content"`
}
type Request struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
FrequencyPenalty float64 `json:"frequency_penalty"`
PresencePenalty float64 `json:"presence_penalty"`
Stream bool `json:"stream"`
Temperature float64 `json:"temperature"`
Topp int32 `json:"top_p"`
}
type Response struct {
ID string `json:"id"`
Choices []Choice `json:"choices"`
Created int64 `json:"created"`
Model string `json:"model"`
Object string `json:"object"`
Usage Usage `json:"usage"`
}
```
### OpenAPI 相关类型
用于 OpenAPI 规范解析:
```go
type API struct {
OpenAPI string `yaml:"openapi"`
Info Info `yaml:"info"`
Servers []Server `yaml:"servers"`
Paths Paths `yaml:"paths"`
Components Components `yaml:"components"`
}
```
## Services 子包
### HigressClient
Higress API 客户端:
```go
type HigressClient struct {
baseURL string
username string
password string
client *http.Client
}
```
**主要方法**:
- `Get(path string) ([]byte, error)`
- `Post(path string, body interface{}) ([]byte, error)`
- `Put(path string, body interface{}) ([]byte, error)`
### HimarketClient
Himarket API 客户端:
```go
type HimarketClient struct {
baseURL string
username string
password string
client *http.Client
}
```
**主要方法**:
- `GetDevMCPServerProduct() (map[string]string, error)`
- `GetDevModelProduct() (map[string]string, error)`
## 工具函数 (utils.go)
### Kubernetes 相关
- `GetHigressGatewayServiceIP()`: 获取 Higress Gateway Service IP
- `extractServiceIP()`: 从 Service 提取 IP
- `getConsoleCredentials()`: 从 K8s Secret 获取控制台凭证
### Agent 配置
- `getAgentConfig()`: 交互式获取 Agent 配置
- `createAgentStepByStep()`: 逐步创建 Agent
- `importAgentFromCore()`: 从 Core 导入 Agent
### Query 函数
一系列用于交互式配置查询的函数:
- `queryAgentSysPrompt()`: 查询系统 Prompt
- `queryAgentTools()`: 查询工具选择
- `queryAgentModel()`: 查询模型配置
- `queryAgentMCP()`: 查询 MCP Server
- `queryDeploySettings()`: 查询部署设置
## 最佳实践
### 1. 开发流程
```bash
# 1. 创建 Agent
hgctl agent new
# 2. 使用 Core 改进和测试
# 选择 "Improve and test it using agentic core"
# 3. 部署 Agent
hgctl agent deploy my-agent
# 4. 添加到 Higress
hgctl agent add my-agent http://localhost:8090 --type model
# 5. (可选)发布到 Himarket
hgctl agent add my-agent http://localhost:8090 --type model --as-product
```
### 2. MCP Server 管理
```bash
# 添加 HTTP MCP Server
hgctl mcp add my-mcp http://mcp-server:8080/mcp
# 从 OpenAPI 创建 MCP Server
hgctl mcp add swagger-mcp ./openapi.yaml --type openapi
# 添加到 Higress 和 Himarket
hgctl mcp add my-mcp http://mcp-server:8080/mcp --as-product
```
### 3. 配置管理
```bash
# 使用配置文件
vim ~/.hgctl
# 或使用环境变量
export HIGRESS_CONSOLE_URL=http://127.0.0.1:8080
export HIGRESS_CONSOLE_USER=admin
export HIGRESS_CONSOLE_PASSWORD=admin
```
## 错误处理
### 常见错误
1. **Node.js 未安装**
- 自动提示安装选项
- 支持自动安装fnm
2. **Agentic Core 未安装**
- 自动提示安装选项
- 支持自动安装npm
3. **Python 环境问题**
- 自动创建虚拟环境
- 自动安装依赖
4. **Kubernetes 连接问题**
- 提供手动输入 kubeconfig 选项
- 支持自定义 namespace
5. **Higress/Himarket 认证失败**
- 检查配置文件
- 检查环境变量
- 尝试从 K8s Secret 自动获取
## 扩展开发
### 添加新的 Agentic Core
1.`config.go` 中添加新的 CoreType
2.`core.go` 中实现相应的方法
3. 更新 `EnvProvisioner` 支持新的安装方式
### 添加新的部署类型
1.`deploy.go` 中添加新的 DeployType
2. 实现相应的部署处理方法
3. 更新模板生成逻辑
### 添加新的 API 类型
1.`agent.go` 中添加新的 API Type 常量
2.`publishAgentAPIToHigress()` 中添加处理逻辑
3.`services/utils.go` 中添加相应的构建函数
## 依赖说明
### Go 依赖
- `github.com/spf13/cobra`: CLI 框架
- `github.com/spf13/viper`: 配置管理
- `github.com/AlecAivazis/survey/v2`: 交互式问答
- `github.com/fatih/color`: 终端颜色输出
- `k8s.io/client-go`: Kubernetes 客户端
### 外部工具
- **Node.js 18+**: Agentic Core 运行环境
- **Claude Code / Qodercli**: Agentic Core
- **Python 3.12+**: Agent Runtime
- **Docker**: AgentRun 部署
- **Serverless Devs CLI**: AgentRun 部署工具
## 参考资源
- [AgentScope 文档](https://modelscope.github.io/agentscope/)
- [Claude Code 文档](https://docs.claude.com/en/docs/claude-code/setup)
- [Qoder 文档](https://docs.qoder.com/zh/cli/quick-start)
- [Serverless Devs 文档](https://serverless-devs.com/docs/user-guide/install)
- [Higress 文档](https://higress.io/)
- [AgentRun 文档](https://github.com/Serverless-Devs/agentrun-sdk-python)
## License
Copyright (c) 2025 Alibaba Group Holding Ltd.
Licensed under the Apache License, Version 2.0

View File

@@ -15,32 +15,161 @@
package agent
import (
"fmt"
"io"
"github.com/alibaba/higress/hgctl/pkg/agent/services"
"github.com/spf13/cobra"
cmdutil "k8s.io/kubectl/pkg/cmd/util"
)
// API Type
const (
A2A = "a2a"
REST = "restful"
MODEL = "model"
)
func NewAgentCmd() *cobra.Command {
agentCmd := &cobra.Command{
Use: "agent",
Short: "start the interactive agent window",
Short: "Start the interactive agent window",
Run: func(cmd *cobra.Command, args []string) {
cmdutil.CheckErr(handleAgentInvoke(cmd.OutOrStdout()))
cmdutil.CheckErr(invokeAgentCore(cmd.OutOrStdout()))
},
}
agentCmd.AddCommand(createAgentCmd())
agentCmd.AddCommand(deployAgentCmd())
agentCmd.AddCommand(newAgentAddCmd())
return agentCmd
}
func handleAgentInvoke(w io.Writer) error {
return getAgent().Start()
func invokeAgentCore(w io.Writer) error {
core, err := getCore()
if err != nil {
return fmt.Errorf("failed to get core: %s", err)
}
return core.Start()
}
// Sub-Agent1:
// 1. Parse the url provided by user to MCP server configuration.
// 2. Publish the parsed MCP Server to Higress
func addPrequisiteSubAgent() error {
type AgentAddArg struct {
HigressConsoleAuthArg
HimarketAdminAuthArg
name string
url string
typ string
scope string
asProduct bool
noPublish bool
}
func newAgentAddCmd() *cobra.Command {
arg := &AgentAddArg{}
cmd := &cobra.Command{
Use: "add [name] [url]",
Short: "add agent to local interactive window and publish it to higress (optional)",
Run: func(cmd *cobra.Command, args []string) {
arg.name = args[0]
arg.url = args[1]
resolveHigressConsoleAuth(&arg.HigressConsoleAuthArg)
resolveHimarketAdminAuth(&arg.HimarketAdminAuthArg)
cmdutil.CheckErr(handleAddAgent(cmd.OutOrStdout(), *arg))
},
Args: cobra.ExactArgs(2),
}
cmd.PersistentFlags().StringVarP(&arg.typ, "type", "t", MODEL, "Determine the agent's API type (a2a, model, restful) default is model")
cmd.PersistentFlags().StringVarP(&arg.scope, "scope", "s", "project", `Configuration scope (project or global)`)
cmd.PersistentFlags().BoolVar(&arg.noPublish, "no-publish", false, "If it's set then the agent API will not be plubished to Higress")
cmd.PersistentFlags().BoolVar(&arg.asProduct, "as-product", false, "If it's set then the agent API will be published to Himarket (no-publish must be false)")
addHigressConsoleAuthFlag(cmd, &arg.HigressConsoleAuthArg)
addHimarketAdminAuthFlag(cmd, &arg.HimarketAdminAuthArg)
return cmd
}
func handleAddAgent(writer io.Writer, arg AgentAddArg) error {
if err := validateArg(arg); err != nil {
return err
}
if !arg.noPublish {
if err := publishAgentAPIToHigress(arg); err != nil {
fmt.Printf("failed to publish agent api to higress: %s\n", err)
return err
}
fmt.Printf("Agent %s is published to Higress successfully\n", arg.name)
if arg.asProduct {
if err := publishAPIToHimarket(arg.typ, arg.name, arg.HimarketAdminAuthArg); err != nil {
fmt.Println("failed to publish it to himarket, please do it mannually")
return err
}
fmt.Printf("Agent %s is published to Himarket successfully\n", arg.name)
}
// TODO: pop up higress window
}
return nil
}
func publishAgentAPIToHigress(arg AgentAddArg) error {
client := services.NewHigressClient(arg.hgURL, arg.hgUser, arg.hgPassword)
switch arg.typ {
case A2A:
case MODEL:
// add ai service
body := services.BuildAIProviderServiceBody(arg.name, arg.url)
// Debug
// fmt.Printf("services: body: %v\n", body)
if resp, err := services.HandleAddAIProviderService(client, body); err != nil {
fmt.Println(string(resp))
return err
}
// add ai route
body = services.BuildAddAIRouteBody(arg.name, arg.url)
// fmt.Printf("Route body: %v\n", body)
if res, err := services.HandleAddAIRoute(client, body); err != nil {
fmt.Println(string(res))
return err
}
case REST:
srvName := fmt.Sprintf("agent-%s", arg.name)
body, targetSrvName, _, err := services.BuildServiceBodyAndSrv(srvName, arg.url)
if err != nil {
return fmt.Errorf("invalid url format: %s", err)
}
if resp, err := services.HandleAddServiceSource(client, body); err != nil {
fmt.Println(string(resp))
return err
}
if resp, err := services.HandleAddRoute(client, services.BuildAPIRouteBody(arg.name, targetSrvName)); err != nil {
fmt.Println(string(resp))
return err
}
default:
return fmt.Errorf("unsupported agent protocol type: %s", arg.typ)
}
return nil
}
func validateArg(arg AgentAddArg) error {
if !arg.noPublish {
return arg.HigressConsoleAuthArg.validate()
}
return nil
}

View File

@@ -15,47 +15,473 @@
package agent
import (
"errors"
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"strings"
"github.com/AlecAivazis/survey/v2"
"github.com/alibaba/higress/hgctl/pkg/agent/common"
"github.com/alibaba/higress/hgctl/pkg/agent/services"
"github.com/fatih/color"
"github.com/spf13/viper"
)
const (
AgentBinaryName = "claude"
BinaryVersion = "0.1.0"
DevVersion = "dev"
NodeLeastVersion = 18
AgentInstallCmd = "npm install -g @anthropic-ai/claude-code"
AgentReleasePage = "https://docs.claude.com/en/docs/claude-code/setup"
)
// set up the core env
// 1. check if npm is installed
// 2. check the npm version
// 3. install hgctl-agent
func getAgent() *AgenticCore {
if !checkAgentInstallStatus() {
fmt.Println("⚠️ Prerequisites not satisfied. Exiting...")
// exit directly
os.Exit(1)
}
return NewAgenticCore()
type HimarketAdminAuthArg struct {
hmURL string
hmUser string
hmPassword string
}
func checkAgentInstallStatus() bool {
// TODO: Support cross-platform:windows
// Developer's page
type HimarketDevAuthArg struct {
hmURL string
hmUser string
hmPassword string
}
if !checkNodeInstall() {
if err := promptNodeInstall(); err != nil {
return false
func (h *HimarketAdminAuthArg) validate() error {
if h.hmURL == "" || h.hmUser == "" || h.hmPassword == "" {
return fmt.Errorf("invalid args")
}
return nil
}
type HigressConsoleAuthArg struct {
// higress console auth arg
hgURL string
hgUser string
hgPassword string
}
func (h *HigressConsoleAuthArg) validate() error {
if h.hgURL == "" || h.hgUser == "" || h.hgPassword == "" {
fmt.Println("--higress-console-user, --higress-console-url, --higress-console-password must be provided")
return fmt.Errorf("invalid args")
}
return nil
}
func init() {
// Init the global configuration from config file
InitConfig()
}
func resolveHimarketAdminAuth(arg *HimarketAdminAuthArg) {
if arg.hmURL == "" {
arg.hmURL = viper.GetString(HIMARKET_ADMIN_URL)
}
if arg.hmUser == "" {
arg.hmUser = viper.GetString(HIMARKET_ADMIN_USER)
}
if arg.hmPassword == "" {
arg.hmPassword = viper.GetString(HIMARKET_ADMIN_PASSWORD)
}
}
// resolve from viper
func resolveHigressConsoleAuth(arg *HigressConsoleAuthArg) {
if arg.hgURL == "" {
arg.hgURL = viper.GetString(HIGRESS_CONSOLE_URL)
}
if arg.hgUser == "" {
arg.hgUser = viper.GetString(HIGRESS_CONSOLE_USER)
}
if arg.hgPassword == "" {
arg.hgPassword = viper.GetString(HIGRESS_CONSOLE_PASSWORD)
}
// fmt.Printf("arg: %v\n", arg)
if arg.hgUser == "" || arg.hgPassword == "" {
// Here we do not return this error, because it will failed when validate arg
if err := tryToGetLocalCredential(arg); err != nil {
fmt.Printf("failed to get local higress console credential: %s\n", err)
}
}
}
func parseTypeToAPIProductType(typ string) string {
switch typ {
case "a2a":
return string(common.AGENT_API)
case "restful":
return string(common.REST_API)
case "model":
return string(common.MODEL_API)
case "mcp":
return string(common.MCP_SERVER)
default:
return ""
}
}
// This function serves MCP API as well as Model API for now.
func publishAPIToHimarket(typ, name string, arg HimarketAdminAuthArg) error {
if err := arg.validate(); err != nil {
return err
}
client := services.NewHimarketClient(arg.hmURL, arg.hmUser, arg.hmPassword)
productName := fmt.Sprintf("%s-%s", typ, name)
var gatewayId = viper.GetString(HIMARKET_TARGET_HIGRESS_ID)
prompt := survey.Input{
Message: fmt.Sprintf("Enter the target Higress instance id on Himarket(%s):", gatewayId),
Default: gatewayId,
Help: fmt.Sprintf("refers to %s/consoles/gateway to get your target Higress instance's id", arg.hmURL),
}
if err := survey.AskOne(&prompt, &gatewayId); err != nil {
return fmt.Errorf("failed to get target higress gatewayID: %s", err)
}
body := services.BuildAPIProductBody(productName, "An agent API import by hgctl", parseTypeToAPIProductType(typ))
resp, err := services.HandleAddAPIProduct(client, body)
if err != nil {
fmt.Println(resp)
return err
}
product_id := string(resp)
var refBody map[string]interface{}
if typ == "mcp" {
refBody = services.BuildRefMCPAPIProductBody(gatewayId, product_id, name)
} else {
// target_route is the route_name in Higress, refers to `publishAgentAPIToHigress`
target_route := fmt.Sprintf("%s-route", name)
refBody = services.BuildRefModelAPIProductBody(gatewayId, product_id, target_route)
}
if resp, err := services.HandleRefAPIProduct(client, product_id, refBody); err != nil {
fmt.Println(string(resp))
return err
}
return nil
}
// use pre-defined command /gen-agent to generate sys prompt
func generateAgentPromptByCore(desc string) (string, error) {
core := NewAgenticCore()
prompt, err := core.runWithResult(fmt.Sprintf("/gen-agent %s", desc), "--print")
if err != nil {
return "", err
}
return prompt, nil
}
type EnvProvisioner struct {
core CoreType
installCmd string
releasePage string
// ~/.<core>
dirName string
}
func getCore() (*AgenticCore, error) {
provisioner := EnvProvisioner{
core: CoreType(viper.GetString(HGCTL_AGENT_CORE)),
}
if err := provisioner.check(); err != nil {
return nil, fmt.Errorf("⚠️ Prerequisites not satisfied: %s Exiting...", err)
}
return NewAgenticCore(), nil
}
func (p *EnvProvisioner) init() {
switch p.core {
case CORE_QODERCLI:
p.installCmd = "npm install -g @qoder-ai/qodercli"
p.releasePage = "https://docs.qoder.com/zh/cli/quick-start"
p.dirName = "qoder"
case CORE_CLAUDE:
p.installCmd = "npm install -g @anthropic-ai/claude-code"
p.releasePage = "https://docs.claude.com/en/docs/claude-code/setup"
p.dirName = "claude"
}
}
func (p *EnvProvisioner) check() error {
p.init()
if !p.checkNodeInstall() {
if err := p.promptNodeInstall(); err != nil {
return err
}
}
if !checkAgentInstall() {
if err := promptAgentInstall(); err != nil {
return false
if !p.checkAgentInstall() {
if err := p.promptAgentInstall(); err != nil {
return err
}
}
return nil
}
func (p *EnvProvisioner) checkNodeInstall() bool {
cmd := exec.Command("node", "-v")
out, err := cmd.Output()
if err != nil {
return false
}
versionStr := strings.TrimPrefix(strings.TrimSpace(string(out)), "v")
parts := strings.Split(versionStr, ".")
if len(parts) == 0 {
return false
}
major, err := strconv.Atoi(parts[0])
if err != nil {
return false
}
return major >= NodeLeastVersion
}
func (p *EnvProvisioner) promptNodeInstall() error {
fmt.Println()
color.Yellow("⚠️ Node.js is not installed or not found in PATH.")
color.Cyan("🔧 Node.js is required to run the agent.")
fmt.Println()
options := []string{
"🚀 Install automatically (recommended)",
"📖 Exit and show manual installation guide",
}
var ans string
prompt := &survey.Select{
Message: "How would you like to install Node.js?",
Options: options,
}
if err := survey.AskOne(prompt, &ans); err != nil {
return fmt.Errorf("selection error: %w", err)
}
switch ans {
case options[0]:
fmt.Println()
color.Green("🚀 Installing Node.js automatically...")
if err := p.installNodeAutomatically(); err != nil {
color.Red("❌ Installation failed: %v", err)
fmt.Println()
p.showNodeManualInstallation()
return errors.New("node.js installation failed")
}
color.Green("✅ Node.js installation completed!")
fmt.Println()
color.Blue("🔍 Verifying installation...")
if p.checkNodeInstall() {
color.Green("🎉 Node.js is now available!")
return nil
} else {
color.Yellow("⚠️ Node.js installation completed but not found in PATH.")
color.Cyan("💡 You may need to restart your terminal or source your shell profile.")
return errors.New("node.js installed but not in PATH")
}
case options[1]:
p.showNodeManualInstallation()
return errors.New("node.js not installed")
default:
return errors.New("invalid selection")
}
}
func (p *EnvProvisioner) installNodeAutomatically() error {
homeDir, err := os.UserHomeDir()
if err != nil {
return fmt.Errorf("could not get home directory: %w", err)
}
fnmBinPath := filepath.Join(homeDir, ".local/share/fnm/fnm")
if runtime.GOOS == "windows" {
fnmBinPath = filepath.Join(homeDir, "AppData/Roaming/fnm/fnm.exe")
}
switch runtime.GOOS {
case "windows":
color.Cyan("📦 For Windows, we recommend installing fnm via: 'winget install Schniz.fnm'")
return errors.New("automatic fnm installation on Windows is not implemented in this script")
case "darwin", "linux":
color.Cyan("🚀 Installing fnm (Fast Node Manager)...")
installFnmCmd := exec.Command("bash", "-c", "curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell")
installFnmCmd.Stdout = os.Stdout
installFnmCmd.Stderr = os.Stderr
if err := installFnmCmd.Run(); err != nil {
return fmt.Errorf("failed to install fnm: %w", err)
}
if _, err := os.Stat(fnmBinPath); os.IsNotExist(err) {
path, err := exec.LookPath("fnm")
if err == nil {
fnmBinPath = path
} else {
return errors.New("fnm was installed but binary not found at " + fnmBinPath)
}
}
color.Cyan("📦 Installing Node.js via fnm...")
installNodeCmd := exec.Command(fnmBinPath, "install", "--lts")
installNodeCmd.Stdout = os.Stdout
installNodeCmd.Stderr = os.Stderr
if err := installNodeCmd.Run(); err != nil {
return fmt.Errorf("failed to install node via fnm: %w", err)
}
color.Cyan("✅ Setting LTS as default Node.js version...")
useNodeCmd := exec.Command(fnmBinPath, "default", "lts-latest")
return useNodeCmd.Run()
default:
return errors.New("unsupported OS for automatic installation")
}
}
func (p *EnvProvisioner) showNodeManualInstallation() {
fmt.Println()
color.New(color.FgGreen, color.Bold).Println("📖 Manual Node.js Installation Guide")
fmt.Println()
fmt.Println(color.MagentaString("Choose one of the following installation methods:"))
fmt.Println()
color.Cyan("Method 1: Install via package manager")
color.Cyan("macOS (brew): brew install node")
color.Cyan("Ubuntu/Debian: sudo apt install -y nodejs npm")
color.Cyan("Windows: download from https://nodejs.org and run installer")
fmt.Println()
color.Yellow("Method 2: Download from official website")
color.Yellow("1. Download Node.js from https://nodejs.org/en/download/")
color.Yellow("2. Follow installer instructions and add to PATH if needed")
fmt.Println()
color.Green("✅ Verify Installation")
fmt.Println(color.WhiteString("node -v"))
fmt.Println(color.WhiteString("npm -v"))
fmt.Println()
color.Cyan("💡 After installation, restart your terminal or source your shell profile.")
fmt.Println()
}
func (p *EnvProvisioner) checkAgentInstall() bool {
cmd := exec.Command(string(p.core), "--version")
if err := cmd.Run(); err != nil {
return false
}
return true
}
func (p *EnvProvisioner) promptAgentInstall() error {
fmt.Println()
color.Yellow("⚠️ %s is not installed or not found in PATH.", p.core)
color.Cyan("🔧 %s is required to run the agent.", p.core)
fmt.Println()
options := []string{
"🚀 Install automatically",
"📖 Exit and show manual installation guide",
}
var ans string
prompt := &survey.Select{
Message: "How would you like to install " + string(p.core) + "?",
Options: options,
}
if err := survey.AskOne(prompt, &ans); err != nil {
return fmt.Errorf("selection error: %w", err)
}
switch ans {
case options[0]:
fmt.Println()
color.Green("🚀 Installing %s automatically...", p.core)
if err := p.installAgentAutomatically(); err != nil {
color.Red("❌ Installation failed: %v", err)
fmt.Println()
p.showAgentManualInstallation()
return errors.New(string(p.core) + " installation failed")
}
fmt.Println()
color.Blue("🔍 Verifying installation...")
if p.checkAgentInstall() {
color.Green("🎉 %s is now available!", p.core)
return nil
} else {
color.Yellow("⚠️ %s installed but not found in PATH.", p.core)
color.Cyan("💡 You may need to restart your terminal or source your shell profile.")
return errors.New(string(p.core) + " installed but not in PATH")
}
case options[1]:
p.showAgentManualInstallation()
return errors.New(string(p.core) + " not installed")
default:
return errors.New("invalid selection")
}
}
func (p *EnvProvisioner) installAgentAutomatically() error {
switch runtime.GOOS {
case "windows":
cmd := exec.Command("cmd", "/C", p.installCmd)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
case "darwin":
cmd := exec.Command("bash", "-c", p.installCmd)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
case "linux":
cmd := exec.Command("bash", "-c", p.installCmd)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
default:
return errors.New("unsupported OS for automatic installation")
}
}
func (p *EnvProvisioner) showAgentManualInstallation() {
fmt.Println()
color.New(color.FgGreen, color.Bold).Printf("📖 Manual %s Installation Guide\n", p.core)
fmt.Println()
color.Cyan(fmt.Sprintf("1. Go to official release page: %s", p.releasePage))
fmt.Printf(color.CyanString("2. Download %s for your OS\n"), p.core)
color.Cyan("3. Make it executable and place it in a directory in your PATH")
fmt.Println()
color.Cyan("💡 After installation, restart your terminal or source your shell profile.")
fmt.Println()
}

View File

@@ -0,0 +1,25 @@
// Copyright (c) 2022 Alibaba Group Holding Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package common
// Himarket Product Type
type ProductType string
const (
MCP_SERVER ProductType = "MCP_SERVER"
MODEL_API ProductType = "MODEL_API"
REST_API ProductType = "REST_API"
AGENT_API ProductType = "AGENT_API"
)

129
hgctl/pkg/agent/config.go Normal file
View File

@@ -0,0 +1,129 @@
// Copyright (c) 2025 Alibaba Group Holding Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package agent
import (
"fmt"
"log"
"os"
"github.com/mitchellh/go-homedir"
"github.com/spf13/viper"
)
type CoreType string
const (
CORE_CLAUDE CoreType = "claude"
CORE_QODERCLI CoreType = "qodercli"
)
const (
// AgentBinaryName = "claude"
// BinaryVersion = "0.1.0"
// DevVersion = "dev"
// NodeLeastVersion = 18
// AgentInstallCmd = "npm install -g @anthropic-ai/claude-code"
// AgentReleasePage = "https://docs.claude.com/en/docs/claude-code/setup"
HGCTL_AGENT_CORE = "hgctl-agent-core"
AGENT_MODEL_PROVIDER = "agent-model-provider"
AGENT_CHAT_MODEL = "agent-chat-model"
HIGRESS_CONSOLE_URL = "higress-console-url"
HIGRESS_CONSOLE_USER = "higress-console-user"
HIGRESS_CONSOLE_PASSWORD = "higress-console-password"
HIGRESS_GATEWAY_URL = "higress-gateway-url"
HIMARKET_ADMIN_URL = "himarket-admin-url"
HIMARKET_ADMIN_USER = "himarket-admin-user"
HIMARKET_ADMIN_PASSWORD = "himarket-admin-password"
HIMARKET_TARGET_HIGRESS_ID = "himarket-target-higress-id"
HIMARKET_DEVELOPER_URL = "himarket-developer-url"
HIMARKET_DEVELOPER_USER = "himarket-developer-user"
HIMARKET_DEVELOPER_PASSWORD = "himarket-developer-password"
// --- AgentRun ---
AGENTRUN_MODEL_NAME = "agentrun-model-name"
AGENTRUN_SANDBOX_NAME = "agentrun-sandbox-name"
ALIBABA_CLOUD_ACCESS_KEY_ID = "alibaba-cloud-access-key-id"
ALIBABA_CLOUD_ACCESS_KEY_SECRET = "alibaba-cloud-access-key-secret"
ALIBABA_CLOUD_SECURITY_TOK = "alibaba-cloud-security-tok"
AGENTRUN_ACCOUNT_ID = "agentrun-account-id"
AGENTRUN_REGION = "agentrun-region"
AGENTRUN_SDK_DEB = "agentrun-sdk-deb"
)
var GlobalConfig HgctlAgentConfig
type HgctlAgentConfig struct {
AgenticCore CoreType `mapstructure:"hgctl-agent-core"`
AgentChatModel string `mapstructure:"agent-chat-model"`
AgentModelProvider string `mapstructure:"agent-model-provider"`
// Higress Console credentials
HigressConsoleURL string `mapstructure:"higress-console-url"`
HigressConsoleUser string `mapstructure:"higress-console-user"`
HigressConsolePassword string `mapstructure:"higress-console-password"`
HigressGatewayURL string `mapstructure:"higress-gateway-url"`
// Himarket Admin credentials
HimarketAdminURL string `mapstructure:"himarket-admin-url"`
HimarketAdminUser string `mapstructure:"himarket-admin-user"`
HimarketAdminPassword string `mapstructure:"himarket-admin-password"`
HimarketTargetHigressID string `mapstructure:"himarket-target-higress-id"`
// Himarket Developer credentials
HimarketDeveloperURL string `mapstructure:"himarket-developer-url"`
HimarketDeveloperUser string `mapstructure:"himarket-developer-user"`
HimarketDeveloperPassword string `mapstructure:"himarket-developer-password"`
// AgentRun Configuration
AgentRunModelName string `mapstructure:"agentrun-model-name"`
AgentRunSandboxName string `mapstructure:"agentrun-sandbox-name"`
AlibabaCloudAccessKeyID string `mapstructure:"alibaba-cloud-access-key-id"`
AlibabaCloudAccessKeySecret string `mapstructure:"alibaba-cloud-access-key-secret"`
AlibabaCloudSecurityTok string `mapstructure:"alibaba-cloud-security-tok"`
AgentRunAccountID string `mapstructure:"agentrun-account-id"`
AgentRunRegion string `mapstructure:"agentrun-region"`
}
func InitConfig() {
viper.SetConfigName(".hgctl")
viper.SetConfigType("json")
home, err := homedir.Dir()
if err != nil {
log.Fatalf("Error finding home directory: %v", err)
}
viper.AddConfigPath(home)
if err := viper.ReadInConfig(); err != nil {
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
fmt.Fprintf(os.Stderr, "Fatal error reading config file: %v\n", err)
}
}
// Unmarshal into the GlobalConfig variable
_ = viper.Unmarshal(&GlobalConfig)
// Validate supported AgentCore currently
switch viper.GetString(HGCTL_AGENT_CORE) {
case string(CORE_CLAUDE), string(CORE_QODERCLI):
return
default:
viper.SetDefault(HGCTL_AGENT_CORE, string(CORE_QODERCLI))
}
}

View File

@@ -15,19 +15,64 @@
package agent
import (
"encoding/base64"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/alibaba/higress/hgctl/pkg/manifests"
"github.com/alibaba/higress/hgctl/pkg/util"
"github.com/fatih/color"
"github.com/manifoldco/promptui"
"github.com/spf13/viper"
)
type AgenticCore struct {
binaryName string
}
func NewAgenticCore() *AgenticCore {
return &AgenticCore{}
core := &AgenticCore{
binaryName: viper.GetString(HGCTL_AGENT_CORE),
}
core.Setup()
return core
}
func (c *AgenticCore) run(args ...string) error {
cmd := exec.Command(AgentBinaryName, args...)
func (c *AgenticCore) GetPromptFileName() string {
switch c.binaryName {
case string(CORE_CLAUDE):
return "CLAUDE.md"
case string(CORE_QODERCLI):
return "AGENTS.md"
}
return ""
}
func (c *AgenticCore) GetCoreDirName() string {
switch c.binaryName {
case string(CORE_CLAUDE):
return ".claude"
case string(CORE_QODERCLI):
return ".qoder"
}
return ""
}
// This will use core to test and improve created agent
func (c *AgenticCore) ImproveNewAgent(config *AgentConfig) error {
agentDir, err := util.GetSpecificAgentDir(config.AgentName)
if err != nil {
return fmt.Errorf("failed to get agent directory: %s", agentDir)
}
return c.runInTargetDir(agentDir)
}
func (c *AgenticCore) runInTargetDir(dir string, args ...string) error {
cmd := exec.Command(c.binaryName, args...)
cmd.Dir = dir
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
@@ -35,12 +80,188 @@ func (c *AgenticCore) run(args ...string) error {
}
func (c *AgenticCore) runWithResult(args ...string) (string, error) {
cmd := exec.Command(c.binaryName, args...)
output, err := cmd.Output()
if err != nil {
if exitErr, ok := err.(*exec.ExitError); ok {
return "", fmt.Errorf("agent execution failed with exit code %d: %s\nStderr: %s",
exitErr.ExitCode(), err.Error(), exitErr.Stderr)
}
return "", fmt.Errorf("failed to run agent: %w", err)
}
return string(output), nil
}
func (c *AgenticCore) run(args ...string) error {
cmd := exec.Command(c.binaryName, args...)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
}
// setup additional prequisite environment and plugins manifest to user's profile
// e.g. ../manifest/agent
func (c *AgenticCore) Setup() {
// Check if this is the first time, otherwise directly return (TODO: this is a simple check)
homeDir, _ := os.UserHomeDir()
targetCtlDir := filepath.Join(homeDir, ".hgctl")
if _, err := os.Stat(targetCtlDir); err == nil {
return
}
targetCoreDir := filepath.Join(homeDir, c.GetCoreDirName())
// setup subagent plugins file
embedFS := manifests.BuiltinOrDir("")
if err := manifests.ExtractEmbedFiles(embedFS, "agent", targetCtlDir); err != nil {
fmt.Println(err)
fmt.Println("failed to init plugins for agent core")
os.Exit(1)
}
// Setup predefined files like: command.md
if err := manifests.ExtractEmbedFiles(embedFS, "agent", targetCoreDir); err != nil {
fmt.Println(err)
fmt.Println("failed to init commands for agent core")
os.Exit(1)
}
// Add Predefined MCP Server
if err := c.addPredefinedMCP(); err != nil {
fmt.Printf("Warning: failed to add needed mcp server: %s\n", err)
}
if err := c.addHigressAPIMCP(); err != nil {
fmt.Println("failed to init higress-api mcp server (you may need to add it manually):", err)
fmt.Println("Details information on Higress-api MCP server refers to https://github.com/alibaba/higress/blob/main/plugins/golang-filter/mcp-server/servers/higress/higress-api/README_en.md")
return
}
// fmt.Println("Higress-api MCP server added successfully")
}
func (c *AgenticCore) addPredefinedMCP() error {
// deepwikiArg := MCPAddArg{
// name: "deepwiki",
// url: "https://mcp.deepwiki.com/mcp",
// typ: "",
// transport: STREAMABLE,
// scope: "user",
// }
// if err := c.AddMCPServer(deepwikiArg); err != nil {
// return fmt.Errorf("deepwiki")
// }
return nil
}
func (c *AgenticCore) addHigressAPIMCP() error {
arg := &HigressConsoleAuthArg{
hgURL: viper.GetString(HIGRESS_GATEWAY_URL),
hgUser: viper.GetString(HIGRESS_CONSOLE_USER),
hgPassword: viper.GetString(HIGRESS_CONSOLE_PASSWORD),
}
fmt.Println("Initializing...Add prequisite MCP server (Higress-api MCP server) automatically")
if arg.hgURL == "" {
gatewayPrompt := promptui.Prompt{
Label: "Enter higress gateway URL",
Default: "http://127.0.0.1:80",
}
gateway, err := gatewayPrompt.Run()
if err != nil {
fmt.Println("failed to run gateway prompt: ", err)
return err
}
arg.hgURL = gateway
}
if arg.hgURL == "" || arg.hgPassword == "" {
if err := tryToGetLocalCredential(arg); err != nil || arg.hgUser == "" || arg.hgPassword == "" {
// fallback: interact with user to provide password & username
color.Red("failed to get higress-console credential automatically (Requires higress installed by hgctl). Let's do it manually")
userPrompt := promptui.Prompt{
Label: "Enter higress console username",
Default: "admin",
}
username, err := userPrompt.Run()
if err != nil {
return fmt.Errorf("aborted: %v", err)
}
pwdPrompt := promptui.Prompt{
Label: "Enter higress console password",
Default: "admin",
}
pwd, err := pwdPrompt.Run()
if err != nil {
return fmt.Errorf("aborted: %v", err)
}
arg.hgUser = username
arg.hgPassword = pwd
}
}
if arg.hgUser == "" || arg.hgPassword == "" {
return fmt.Errorf("Empty higress console username and password, aborting")
}
rawByte := fmt.Appendf(nil, "%s:%s", arg.hgUser, arg.hgPassword)
resStr := base64.StdEncoding.EncodeToString(rawByte)
authHeader := fmt.Sprintf("Authorization: Basic %s", resStr)
return c.AddMCPServer(MCPAddArg{
name: "higress-api",
url: fmt.Sprintf("%s/higress-api", arg.hgURL),
transport: HTTP,
typ: HTTP,
scope: "user",
header: []string{
authHeader,
},
})
}
// ------- Initialization -------
func (c *AgenticCore) Start() error {
return c.run(AgentBinaryName)
return c.run()
}
// ------- MCP -------
func (c *AgenticCore) AddMCPServer(name string, url string) error {
return c.run("mcp", "add", "--transport", HTTP, name, url)
func (c *AgenticCore) AddMCPServer(arg MCPAddArg) error {
// adapt the field
if arg.transport == STREAMABLE {
arg.transport = HTTP
}
args := []string{
"mcp", "add", "--transport", arg.transport, arg.name, arg.url,
}
if arg.scope != "" {
scopeArg := []string{"--scope", arg.scope}
args = append(args, scopeArg...)
}
if len(arg.env) != 0 {
for _, e := range arg.env {
envArg := []string{"-e", e}
args = append(args, envArg...)
}
}
if len(arg.header) != 0 {
for _, h := range arg.header {
headerArg := []string{"-H", h}
args = append(args, headerArg...)
}
}
err := c.run(args...)
// Allow to add duplicate mcp server name (core will return error)
if err == nil || strings.Contains(err.Error(), "already exists") {
return nil
}
return err
}

406
hgctl/pkg/agent/deploy.go Normal file
View File

@@ -0,0 +1,406 @@
// Copyright (c) 2025 Alibaba Group Holding Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package agent
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"github.com/alibaba/higress/hgctl/pkg/util"
"github.com/spf13/cobra"
cmdutil "k8s.io/kubectl/pkg/cmd/util"
)
type DeployType string
const (
AgentRun DeployType = "agent-run"
Local DeployType = "local"
)
var (
AddAccessKeyCmd = fmt.Sprintf("s config add -a %s", DefaultServerLessAccessKey)
CheckAccessKeyCmd = fmt.Sprintf("s config get -a %s", DefaultServerLessAccessKey)
DeployAgentRunCmd = fmt.Sprintf("s deploy -a %s", DefaultServerLessAccessKey)
)
const (
InstallServerlessCmd = "npm install @serverless-devs/s -g"
BuildAgentCmd = "s build"
ServerlessCliDocs = "https://serverless-devs.com/docs/user-guide/install"
)
type DeployHandler struct {
Name string
AgentDir string
Type DeployType
}
func deployAgentCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "deploy [name]",
Short: "Deploy the specified agent locally or to the cloud",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
handler := &DeployHandler{
Name: args[0],
}
cmdutil.CheckErr(handler.Deploy())
},
}
var cloud = false
cmd.PersistentFlags().BoolVar(&cloud, "agentrun", false, "deploy agent using agentrun")
return cmd
}
func (h *DeployHandler) validate() error {
if err := h.checkRequiredEnvironment(); err != nil {
return fmt.Errorf("failed to get required environment: %s", err)
}
return nil
}
func (h *DeployHandler) RunCmd(showOutput bool, cmd string, targetDir string) (string, error) {
runCmd := exec.Command("bash", "-c", cmd)
if targetDir != "" {
runCmd.Dir = targetDir
}
if showOutput {
runCmd.Stderr = os.Stderr
runCmd.Stdout = os.Stdout
if err := runCmd.Run(); err != nil {
return "", err
}
return "", nil
}
output, err := runCmd.CombinedOutput()
if err != nil {
return "", err
}
return string(output), nil
}
func (h *DeployHandler) RunPythonCmd(showOutput bool, args ...string) error {
cmd := exec.Command("python3", args...)
if showOutput {
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
}
if err := cmd.Run(); err != nil {
return err
}
return nil
}
func (h *DeployHandler) checkAgentRunEnvironment() error {
if _, err := h.RunCmd(false, "s --version", ""); err != nil {
fmt.Println("Serverless dev cli not installed, install it automatically..")
if _, err := h.RunCmd(true, InstallServerlessCmd, ""); err != nil {
return fmt.Errorf("failed to install serverless dev cli automatically, details refers to %s", ServerlessCliDocs)
}
}
if _, err := h.RunCmd(false, "docker --version", ""); err != nil {
return fmt.Errorf("docker is required to deploy agent to agentRun: %s", err)
}
return nil
}
func (h *DeployHandler) checkLocalEnvironment() error {
pyVenv, err := util.GetPythonVersion()
if err != nil {
fmt.Printf("Python environment not found, you need Python environment to run your agent\n")
return err
}
if util.CompareVersions(pyVenv, MinPythonVersion) == -1 {
fmt.Printf("Current Python: %s need Python %s+", MinPythonVersion, pyVenv)
return fmt.Errorf("unsupport python version")
}
missingDeps := []string{}
if err := h.RunPythonCmd(false, "-c", "import agentscope; print(agentscope.__version__)"); err != nil {
missingDeps = append(missingDeps, "agentscope")
}
if err := h.RunPythonCmd(false, "-c", "import agentscope_runtime; print(agentscope_runtime.__version__)"); err != nil {
missingDeps = append(missingDeps, "agentscope-runtime==1.0.0")
}
if len(missingDeps) != 0 {
venvDir := filepath.Join(util.GetHomeHgctlDir(), ".venv")
if _, err := os.Stat(venvDir); err == nil {
// check again
missingDeps := []string{}
if err := h.RunPythonCmd(false, "-c", "import agentscope; print(agentscope.__version__)"); err != nil {
fmt.Println("agentscope not installed, installing...")
missingDeps = append(missingDeps, "agentscope")
}
if err := h.RunPythonCmd(false, "-c", "import agentscope_runtime; print(agentscope_runtime.__version__)"); err != nil {
fmt.Println("agentscope-runtime not installed, installing...")
missingDeps = append(missingDeps, "agentscope-runtime==1.0.0")
}
// This means ~/.hgctl/.venv/ has already installed the deps before
if len(missingDeps) == 0 {
if err := h.activateLocalPythonVenv(); err != nil {
return err
}
}
}
if err := h.installLocalRequiredDeps(missingDeps); err != nil {
return fmt.Errorf("failed to install missing deps: %s", err)
}
}
return nil
}
func (h *DeployHandler) createLocalPyVenv() error {
venvDir := filepath.Join(util.GetHomeHgctlDir(), ".venv")
cmd := exec.Command("python3", "-m", "venv", venvDir)
output, err := cmd.CombinedOutput()
if err != nil {
fmt.Println("failed to create python virtual environment", string(output))
return err
}
return nil
}
func (h *DeployHandler) installLocalRequiredDeps(missingDeps []string) error {
if err := h.RunPythonCmd(true, "-m", "pip", "--version"); err != nil {
fmt.Printf("Pip not installed, you need install pip to deploy your agent\n")
return err
}
fmt.Println("This may takes a few minutes, you can install missing deps by yourself: ")
for _, deps := range missingDeps {
fmt.Println("- ", deps)
}
if err := h.createLocalPyVenv(); err != nil {
return fmt.Errorf("failed to create local venv (~/.hgctl/.venv): %s", err)
}
if err := h.activateLocalPythonVenv(); err != nil {
return fmt.Errorf("failed to activateLocalPythonVenv: %s", err)
}
for _, deps := range missingDeps {
if err := h.RunPythonCmd(true, "-m", "pip", "install", deps); err != nil {
fmt.Printf("failed to install missing deps: %s\n", deps)
return err
}
}
venvDir := filepath.Join(util.GetHomeHgctlDir(), ".venv")
fmt.Println("Missing deps installed successfully, target python venv path: ", venvDir)
return nil
}
func (h *DeployHandler) activateLocalPythonVenv() error {
venvDir := filepath.Join(util.GetHomeHgctlDir(), ".venv")
path := os.Getenv("PATH")
newPath := venvDir + "/bin:" + path
err := os.Setenv("PATH", newPath)
if err != nil {
fmt.Println("Failed to set PATH:", err)
return err
}
err = os.Setenv("VIRTUAL_ENV", venvDir)
if err != nil {
fmt.Println("Failed to set VIRTUAL_ENV:", err)
return err
}
return nil
}
func (h *DeployHandler) checkRequiredEnvironment() error {
if h.Type == AgentRun {
return h.checkAgentRunEnvironment()
}
if h.Type == Local {
return h.checkLocalEnvironment()
}
return nil
}
func (h *DeployHandler) GetRequiredDeps() ([]string, error) {
switch h.Type {
case AgentRun:
return []string{
"agentrun-sdk[agentscope,server] >= 0.0.3",
}, nil
case Local:
return []string{
"agentscope", "agentscope-runtime==1.0.0",
}, nil
default:
return nil, fmt.Errorf("unsupported deploy target type: %s", h.Type)
}
}
// Quick and simple to get type by examine the existence of `requirements.txt` file
func (h *DeployHandler) getAgentType() error {
path, err := util.GetSpecificAgentDir(h.Name)
if err != nil {
fmt.Printf("invalid agent: %s", err)
return err
}
h.AgentDir = path
filePath := filepath.Join(h.AgentDir, "requirements.txt")
if _, err := os.Stat(filePath); os.IsNotExist(err) {
h.Type = Local
return nil
}
h.Type = AgentRun
return nil
}
func (h *DeployHandler) Deploy() error {
if err := h.getAgentType(); err != nil {
return err
}
if err := h.validate(); err != nil {
return err
}
switch h.Type {
case AgentRun:
if err := h.HandleAgentRun(); err != nil {
return err
}
case Local:
if err := h.HandleLocal(); err != nil {
return err
}
default:
return fmt.Errorf("unsupported deploy target type: %s", h.Type)
}
if h.Type == AgentRun {
fmt.Printf("\n🌟 Agent deploy to agentRun successfully! Refers to https://functionai.console.aliyun.com/cn-hangzhou/agent/runtime to get it")
fmt.Printf("You can publish it to Higress and Himarket by using `hgctl agent add %s <endpoints-url> -t model --as-product `\n", h.Name)
}
return nil
}
// details see: https://github.com/Serverless-Devs/agentrun-sdk-python
func (h *DeployHandler) HandleAgentRun() error {
if err := h.CheckServerlessAccessKey(); err != nil {
return fmt.Errorf("failed to set access key automatically: %s", err)
}
if _, err := h.RunCmd(true, BuildAgentCmd, h.AgentDir); err != nil {
return fmt.Errorf("failed to build agent: %s", err)
}
if _, err := h.RunCmd(true, DeployAgentRunCmd, h.AgentDir); err != nil {
return fmt.Errorf("failed to deploy agent: %s", err)
}
return nil
}
// Set Serverless's Access Key in s.yaml, details see: https://github.com/Serverless-Devs/agentrun-sdk-python
// Example:
// $ s config get -a defualt
// You have not yet been found to have configured key information.
// You can use [s config add] for key configuration, or use [s config add -h] to view configuration help.
// If you already used [s config add], please check the permission of file [{HOMEPATH}/.s/access.yaml].
// If you have questions, please tell us: https://github.com/Serverless-Devs/Serverless-Devs/issues
//
// s version: @serverless-devs/s: 3.1.10
func (h *DeployHandler) CheckServerlessAccessKey() error {
notFoundMessage := "You have not yet been found to have configured key information"
output, err := h.RunCmd(false, CheckAccessKeyCmd, "")
if err != nil {
return fmt.Errorf("failed to run %s command to check access key: %s", CheckAccessKeyCmd, err)
}
if strings.Contains(output, notFoundMessage) {
fmt.Fprintf(os.Stderr, `
🔑 **ACTION REQUIRED**: Please configure your Alibaba Cloud credentials first.
Copy and run the command below to set up your Access Key:
> %s
`, AddAccessKeyCmd)
return fmt.Errorf("access key not found")
}
return nil
}
func (h *DeployHandler) HandleLocal() error {
if _, err := os.Stat(h.AgentDir); os.IsNotExist(err) {
return fmt.Errorf("agent source file not found: %s", h.AgentDir)
}
if err := h.startAgentProcess(); err != nil {
return err
}
return nil
}
func (h *DeployHandler) startAgentProcess() error {
switch runtime.GOOS {
case "windows":
return h.runWindowsAgent()
case "darwin", "linux":
return h.runUnixAgent()
default:
return fmt.Errorf("unsupported operating system: %s", runtime.GOOS)
}
}
func (h *DeployHandler) runUnixAgent() error {
agentFile := filepath.Join(h.AgentDir, ASRuntimeMainPyFile)
if err := h.RunPythonCmd(true, agentFile); err != nil {
fmt.Println("failed to start agent, exiting...")
return err
}
return nil
}
func (h *DeployHandler) runWindowsAgent() error {
agentFile := filepath.Join(h.AgentDir, ASRuntimeMainPyFile)
if err := h.RunPythonCmd(true, agentFile); err != nil {
fmt.Println("failed to start agent, exiting...")
return err
}
return nil
}

View File

@@ -17,10 +17,8 @@ package agent
import (
"fmt"
"io"
"net"
"net/url"
"os"
"strings"
"github.com/alibaba/higress/hgctl/pkg/agent/services"
"github.com/alibaba/higress/hgctl/pkg/helm"
@@ -34,32 +32,30 @@ import (
type MCPType string
const (
HTTP string = "http"
SSE string = "sse"
OPENAPI string = "openapi"
OPENAPI string = "openapi"
HTTP string = "http"
STREAMABLE string = "streamable"
SSE string = "sse"
DIRECT_ROUTE string = "DIRECT_ROUTE"
OPEN_API string = "OPEN_API"
HIGRESS_CONSOLE_URL = "higress-console-url"
HIGRESS_CONSOLE_USER = "higress-console-user"
HIGRESS_CONSOLE_PASSWORD = "higress-console-password"
)
type MCPAddArg struct {
// higress console auth arg
baseURL string
hgUser string
hgPassword string
HigressConsoleAuthArg
HimarketAdminAuthArg
name string
url string
typ string
transport string
spec string
scope string
env []string
header []string
noPublish bool
// TODO: support mcp env
// env string
asProduct bool
}
type MCPAddHandler struct {
@@ -84,24 +80,45 @@ func newMCPAddCmd() *cobra.Command {
arg := &MCPAddArg{}
cmd := &cobra.Command{
Use: "add [name]",
Use: "add [name] [url]",
Short: "add mcp server including http and openapi",
Example: ` # Add HTTP type MCP Server
hgctl mcp add http-mcp http://localhost:8080/mcp
# Add MCP Server with environment variables and headers
hgctl mcp add http-mcp http://localhost:8080/mcp -e API_KEY=secret -H "Authorization: Bearer token"
# Add MCP Server use Openapi file
hgctl mcp add swagger-mcp ./path/to/openapi.yaml --type openapi`,
Run: func(cmd *cobra.Command, args []string) {
arg.name = args[0]
resolveHigressConsoleAuth(arg)
if arg.typ == HTTP {
arg.url = args[1]
} else {
arg.spec = args[1]
}
resolveHigressConsoleAuth(&arg.HigressConsoleAuthArg)
resolveHimarketAdminAuth(&arg.HimarketAdminAuthArg)
cmdutil.CheckErr(handleAddMCP(cmd.OutOrStdout(), *arg))
color.Cyan("Tip: Try doing 'kubectl port-forward' and add the server to the agent manually, if MCP Server connection failed")
color.Cyan("Tip: Try doing 'kubectl port-forward' and add the server to the agent manually, if using Higress MCP Server and connection failed")
},
Args: cobra.ExactArgs(1),
Args: cobra.ExactArgs(2),
}
cmd.PersistentFlags().StringVarP(&arg.transport, "transport", "t", HTTP, "Determine the MCP Server's Type")
cmd.PersistentFlags().StringVarP(&arg.url, "url", "u", "", "MCP server URL")
cmd.PersistentFlags().StringVar(&arg.typ, "type", HTTP, "Determine the MCP Server's Type")
cmd.PersistentFlags().StringVarP(&arg.transport, "transport", "t", STREAMABLE, `The MCP Server's transport`)
cmd.PersistentFlags().StringVarP(&arg.scope, "scope", "s", "project", `Configuration scope (project or global)`)
cmd.PersistentFlags().StringVar(&arg.spec, "spec", "", "Specification of the openapi api")
cmd.PersistentFlags().StringSliceVarP(&arg.env, "env", "e", nil, "Environment variables to pass to the MCP server (can be specified multiple times)")
cmd.PersistentFlags().StringSliceVarP(&arg.header, "header", "H", nil, "HTTP headers to pass to the MCP server (can be specified multiple times)")
cmd.PersistentFlags().BoolVar(&arg.noPublish, "no-publish", false, "If set then the mcp server will not be plubished to higress")
cmd.PersistentFlags().BoolVar(&arg.asProduct, "as-product", false, "If it's set then the agent API will be published to Himarket (no-publish must be false)")
addHigressConsoleAuthFlag(cmd, arg)
// cmd.PersistentFlags().StringVar(&arg.spec, "spec", "", "Specification file (yaml/json) of the openapi api")
addHigressConsoleAuthFlag(cmd, &arg.HigressConsoleAuthArg)
addHimarketAdminAuthFlag(cmd, &arg.HimarketAdminAuthArg)
return cmd
}
@@ -112,22 +129,19 @@ func newHanlder(c *AgenticCore, arg MCPAddArg, w io.Writer) *MCPAddHandler {
func (h *MCPAddHandler) validateArg() error {
if !h.arg.noPublish {
if h.arg.baseURL == "" || h.arg.hgUser == "" || h.arg.hgPassword == "" {
fmt.Println("--higress-console-user, --higress-console-url, --higress-console-password must be provided")
return fmt.Errorf("invalid args")
}
return h.arg.HigressConsoleAuthArg.validate()
}
return nil
}
func (h *MCPAddHandler) addHTTPMCP() error {
if err := h.core.AddMCPServer(h.arg.name, h.arg.url); err != nil {
if err := h.core.AddMCPServer(h.arg); err != nil {
return fmt.Errorf("mcp add failed: %w", err)
}
if !h.arg.noPublish {
return publishToHigress(h.arg, nil)
return publishMCPToHigress(h.arg, h.arg.typ, nil)
}
return nil
@@ -137,23 +151,29 @@ func (h *MCPAddHandler) addHTTPMCP() error {
func (h *MCPAddHandler) addOpenAPIMCP() error {
// fmt.Printf("get mcp server: %s openapi-spec-file: %s\n", h.arg.name, h.arg.spec)
config := h.parseOpenapiSpec()
config.Server.SecuritySchemes[0].DefaultCredential = "b5b9752c7ad2cb9c6b19fb5fd6a23be8852eca9c"
// fmt.Printf("get config struct: %v", config)
// publish to higress
if err := publishToHigress(h.arg, config); err != nil {
if err := publishMCPToHigress(h.arg, "streamable", config); err != nil {
return err
}
// add mcp server to agent
gatewayIP, err := GetHigressGatewayServiceIP()
if err != nil {
color.Red(
"failed to add mcp server [%s] while getting higress-gateway ip due to: %v \n You may try to do port-forward and add it to agent manually", h.arg.name, err)
return err
gatewayURL := viper.GetString(HIGRESS_GATEWAY_URL)
if gatewayURL == "" {
svcIP, err := GetHigressGatewayServiceIP()
if err != nil {
color.Red(
"failed to add mcp server [%s] while getting higress-gateway ip due to: %v \n You may try to do port-forward and add it to agent manually", h.arg.name, err)
return err
}
gatewayURL = svcIP
}
mcpURL := fmt.Sprintf("http://%s/mcp-servers/%s", gatewayIP, h.arg.name)
return h.core.AddMCPServer(h.arg.name, mcpURL)
mcpURL := fmt.Sprintf("%s/mcp-servers/%s", gatewayURL, h.arg.name)
h.arg.url = mcpURL
return h.core.AddMCPServer(h.arg)
}
func (h *MCPAddHandler) parseOpenapiSpec() *models.MCPConfig {
@@ -161,7 +181,10 @@ func (h *MCPAddHandler) parseOpenapiSpec() *models.MCPConfig {
}
func handleAddMCP(w io.Writer, arg MCPAddArg) error {
client := getAgent()
client, err := getCore()
if err != nil {
return fmt.Errorf("failed to get agent core: %s", err)
}
h := newHanlder(client, arg, w)
if err := h.validateArg(); err != nil {
return err
@@ -169,9 +192,12 @@ func handleAddMCP(w io.Writer, arg MCPAddArg) error {
// spec -> OPENAPI
// noPublish -> typ
switch arg.transport {
switch arg.typ {
case HTTP:
return h.addHTTPMCP()
if err := h.addHTTPMCP(); err != nil {
return err
}
case OPENAPI:
if arg.spec == "" {
return fmt.Errorf("--spec is required for openapi type")
@@ -182,19 +208,29 @@ func handleAddMCP(w io.Writer, arg MCPAddArg) error {
if arg.url != "" {
return fmt.Errorf("--url is not supported for openapi type")
}
return h.addOpenAPIMCP()
default:
return fmt.Errorf("unsupported mcp type")
if err := h.addOpenAPIMCP(); err != nil {
return err
}
}
if !arg.noPublish && arg.asProduct {
if err := publishAPIToHimarket("mcp", arg.name, arg.HimarketAdminAuthArg); err != nil {
fmt.Println("failed to publish it to himarket, please do it mannually")
return err
}
}
return nil
}
func publishToHigress(arg MCPAddArg, config *models.MCPConfig) error {
func publishMCPToHigress(arg MCPAddArg, transport string, config *models.MCPConfig) error {
// 1. parse the raw http url
// 2. add service source
// 3. add MCP server request
client := services.NewHigressClient(arg.baseURL, arg.hgUser, arg.hgPassword)
client := services.NewHigressClient(arg.hgURL, arg.hgUser, arg.hgPassword)
// mcp server's url
rawURL := arg.url
// DIRECT_ROUTE or OPEN_API
mcpType := DIRECT_ROUTE
@@ -205,61 +241,46 @@ func publishToHigress(arg MCPAddArg, config *models.MCPConfig) error {
mcpType = OPEN_API
}
res, err := url.Parse(rawURL)
if err != nil {
return err
}
// add service source
srvType := ""
srvPort := ""
srvName := fmt.Sprintf("hgctl-%s", arg.name)
srvPath := res.Path
if ip := net.ParseIP(res.Hostname()); ip == nil {
srvType = "dns"
} else {
srvType = "static"
}
if res.Port() == "" && res.Scheme == "http" {
srvPort = "80"
} else if res.Port() == "" && res.Scheme == "https" {
srvPort = "443"
} else {
srvPort = res.Port()
}
_, err = services.HandleAddServiceSource(client, map[string]interface{}{
"domain": res.Host,
"type": srvType,
"port": srvPort,
"name": srvName,
"domainForEdit": res.Host,
"protocol": res.Scheme,
})
// e.g. hgctl-mcp-deepwiki.dns
body, targetSrvName, port, err := services.BuildServiceBodyAndSrv(srvName, rawURL)
if err != nil {
return err
return fmt.Errorf("invalid url format: %s", err)
}
resp, err := services.HandleAddServiceSource(client, body)
if err != nil {
return fmt.Errorf("response body: %s %s\n", string(resp), err)
}
srvField := []map[string]interface{}{{
"name": fmt.Sprintf("%s.%s", srvName, srvType),
"port": srvPort,
"name": targetSrvName,
"port": port,
"version": "1.0",
"weight": 100,
}}
// generete mcp server add request body
body := map[string]interface{}{
"name": arg.name,
// "description": "",
"type": mcpType,
"service": fmt.Sprintf("%s.%s:%s", srvName, srvType, srvPort),
"upstreamPathPrefix": srvPath,
"services": srvField,
body = map[string]interface{}{
"name": arg.name,
"description": "A MCP Server added by hgctl",
"type": mcpType,
"services": srvField,
"domains": []interface{}{},
"consumerAuthInfo": map[string]interface{}{
"type": "key-auth",
"allowedConsumers": []string{},
},
}
// fmt.Printf("request body: %v", body)
// Only DIRECT_ROUTE Type get below extra params
if mcpType == DIRECT_ROUTE {
res, _ := url.Parse(rawURL)
body["directRouteConfig"] = map[string]interface{}{
"path": res.Path,
"transportType": arg.transport,
}
}
_, err = services.HandleAddMCPServer(client, body)
if err != nil {
@@ -275,12 +296,17 @@ func publishToHigress(arg MCPAddArg, config *models.MCPConfig) error {
func addMCPToolConfig(client *services.HigressClient, config *models.MCPConfig, srvField []map[string]interface{}) {
body := map[string]interface{}{
"name": config.Server.Name,
// "description": "",
"name": config.Server.Name,
"description": "A MCP Server added by hgctl",
"services": srvField,
"type": OPEN_API,
"rawConfigurations": convertMCPConfigToStr(config),
"mcpServerName": config.Server.Name,
"domains": []interface{}{},
"consumerAuthInfo": map[string]interface{}{
"type": "key-auth",
"allowedConsumers": []string{},
},
}
_, err := services.HandleAddOpenAPITool(client, body)
@@ -291,38 +317,7 @@ func addMCPToolConfig(client *services.HigressClient, config *models.MCPConfig,
// fmt.Println("get openapi tools add response: ", string(resp))
}
func addHigressConsoleAuthFlag(cmd *cobra.Command, arg *MCPAddArg) {
cmd.PersistentFlags().StringVar(&arg.baseURL, HIGRESS_CONSOLE_URL, "", "The BaseURL of higress console")
cmd.PersistentFlags().StringVar(&arg.hgUser, HIGRESS_CONSOLE_USER, "", "The username of higress console")
cmd.PersistentFlags().StringVarP(&arg.hgPassword, HIGRESS_CONSOLE_PASSWORD, "p", "", "The password of higress console")
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
viper.AutomaticEnv()
}
// resolve from viper
func resolveHigressConsoleAuth(arg *MCPAddArg) {
if arg.baseURL == "" {
arg.baseURL = viper.GetString(HIGRESS_CONSOLE_URL)
}
if arg.hgUser == "" {
arg.hgUser = viper.GetString(HIGRESS_CONSOLE_USER)
}
if arg.hgPassword == "" {
arg.hgPassword = viper.GetString(HIGRESS_CONSOLE_PASSWORD)
}
// fmt.Printf("arg: %v\n", arg)
if arg.hgUser == "" || arg.hgPassword == "" {
// Here we do not return this error, cause it will failed when validate arg
if err := tryToGetLocalCredential(arg); err != nil {
fmt.Printf("failed to get local higress console credential: %s\n", err)
}
}
}
func tryToGetLocalCredential(arg *MCPAddArg) error {
func tryToGetLocalCredential(arg *HigressConsoleAuthArg) error {
profileContexts, err := getAllProfiles()
// The higress is not installed by hgctl

341
hgctl/pkg/agent/new.go Normal file
View File

@@ -0,0 +1,341 @@
// Copyright (c) 2025 Alibaba Group Holding Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package agent
import (
"fmt"
"io/fs"
"os"
"path/filepath"
"text/template"
"github.com/AlecAivazis/survey/v2"
"github.com/alibaba/higress/hgctl/pkg/agent/prompt"
"github.com/alibaba/higress/hgctl/pkg/manifests"
"github.com/alibaba/higress/hgctl/pkg/util"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
const (
ASRuntimeMainPyFile = "as_runtime_main.py"
AgentRunMainPyFile = "agentrun_main.py"
ToolKitPyFile = "toolkit.py"
AgentClassFile = "agent.py"
CorePromptFile = "claude.md" // TODO: support qoder AGENTS.md
SConfigYAML = "s.yaml"
ARTemplate = "agentrun.tmpl"
ASTemplate = "agentscope.tmpl"
AgentClassTemplate = "agent.tmpl"
ToolKitTemplate = "toolkit.tmpl"
SConfigTemplate = "agentrun_s.tmpl"
)
var ASAvailiableTools = []string{
"execute_python_code",
"execute_shell_command",
"view_text_file",
"write_text_file",
"insert_text_file",
"dashscope_text_to_image",
"dashscope_text_to_audio",
"dashscope_image_to_text",
"openai_text_to_image",
"openai_text_to_audio",
"openai_edit_image",
"openai_create_image_variation",
"openai_image_to_text",
"openai_audio_to_text",
}
const (
MinPythonVersion = "3.12"
DefaultServerLessAccessKey = "hgctl-credential"
)
// Callback type for post-agent-creation actions
type PostAgentAction func(config *AgentConfig) error
type MCPServerConfig struct {
Name string // MCP Client Name
URL string // MCP Server URL
Transport string // transport `streamable_http` or `see` or `stdio`
Headers map[string]string // HTTP Headers
}
type ServerlessConfig struct {
AccessKey string
ResourceName string
Region string
AgentName string
AgentDesc string
Port uint
DiskSize uint
Timeout uint
GlobalConfig HgctlAgentConfig
}
type AgentConfig struct {
AppName string // "app"
AppDescription string // "A helpful assistant and useful agent"
AgentName string // "Friday"
AvailableTools []string // availiable tools (built-in agentscope)
SysPromptPath string // "You are a helpful assistant"
ChatModel string // "qwen-max"
Provider string // "Aliyun"
APIKeyEnvVar string // DASHCOPE_API_KEY
DeploymentPort int // 8090
HostBinding string // 0.0.0.0
EnableStreaming bool // true
EnableThinking bool // true
MCPServers []MCPServerConfig
Type DeployType
ServerlessCfg ServerlessConfig
}
func createAgentCmd() *cobra.Command {
agentRun := false
deployDirect := false
var createAgentCmd = &cobra.Command{
Use: "new",
Short: "Create a new agent or import one from core",
Args: cobra.ExactArgs(0),
Run: func(cmd *cobra.Command, args []string) {
config := &AgentConfig{
Type: Local,
}
if agentRun {
config.Type = AgentRun
config.ServerlessCfg = ServerlessConfig{
AccessKey: DefaultServerLessAccessKey,
Port: 9000,
DiskSize: 512,
Timeout: 600,
GlobalConfig: GlobalConfig,
}
}
if err := getAgentConfig(config); err != nil {
fmt.Printf("Error get Agent config: %v\n", err)
os.Exit(1)
}
if err := createAgentTemplate(config); err != nil {
fmt.Printf("Error creating agent: %v\n", err)
os.Exit(1)
}
if err := afterCreatedAgent(config); err != nil {
fmt.Println(err)
os.Exit(1)
}
},
}
createAgentCmd.PersistentFlags().BoolVar(&agentRun, "agent-run", false, "Use agentRun to deploy to Alibaba cloud, default is false")
createAgentCmd.PersistentFlags().BoolVar(&deployDirect, "deploy", false, "After agent creation, deploy it directly")
return createAgentCmd
}
func afterCreatedAgent(config *AgentConfig) error {
options := []string{
"Deploy it directly",
fmt.Sprintf("Improve and test it using agentic core (%s)", viper.GetString(HGCTL_AGENT_CORE)),
"Do nothing and quit",
}
callbacks := map[string]PostAgentAction{
options[0]: func(cfg *AgentConfig) error {
handler := &DeployHandler{Name: cfg.AgentName}
return handler.Deploy()
},
options[1]: func(cfg *AgentConfig) error {
return runAgenticCoreImprovement(cfg)
},
}
if err := promptAfterCreatedAgent(options, config, callbacks); err != nil {
fmt.Fprintf(os.Stderr, "Failed to handle post-creation action: %v\n", err)
return nil
}
return nil
}
func runAgenticCoreImprovement(cfg *AgentConfig) error {
core, err := getCore()
if err != nil {
return fmt.Errorf("failed to invoke agent core: %s", err)
}
if err := core.ImproveNewAgent(cfg); err != nil {
return fmt.Errorf("failed to use core to improve new agent: %s", err)
}
return nil
}
func promptAfterCreatedAgent(options []string, config *AgentConfig, callbacks map[string]PostAgentAction) error {
promptChoice := &survey.Select{
Message: "What's next?:",
Options: options,
Help: "Choose an action to perform after agent creation.",
}
var response string
if err := survey.AskOne(promptChoice, &response); err != nil {
return fmt.Errorf("failed to read user choice: %w", err)
}
if callback, ok := callbacks[response]; ok {
return callback(config)
}
if response == options[2] {
os.Exit(1)
}
return fmt.Errorf("unknown action selected: %q", response)
}
func createAgentTemplate(config *AgentConfig) error {
agentsDir := util.GetHomeHgctlDir() + "/agents"
if err := os.MkdirAll(agentsDir, 0755); err != nil {
return fmt.Errorf("failed to create agents directory: %v", err)
}
agentDir := filepath.Join(agentsDir, config.AgentName)
if err := os.MkdirAll(agentDir, 0755); err != nil {
return fmt.Errorf("failed to create agent directory: %v", err)
}
switch config.Type {
case Local:
// parse agentscope file
asMain := filepath.Join(agentDir, ASRuntimeMainPyFile)
asTemplateStr, err := get_template(ASTemplate)
if err != nil {
return fmt.Errorf("failed to read agentscope template: %v", err)
}
if err := renderTemplateFile(asTemplateStr, asMain, config); err != nil {
return fmt.Errorf("failed to render agentscope runtime's file: %s", err)
}
case AgentRun:
// Details see: https://github.com/Serverless-Devs/agentrun-sdk-python
// parse agentrun file
arMain := filepath.Join(agentDir, AgentRunMainPyFile)
arTemplateStr, err := get_template(ARTemplate)
if err != nil {
return fmt.Errorf("failed to read agentrun template: %v", err)
}
if err := renderTemplateFile(arTemplateStr, arMain, config); err != nil {
return fmt.Errorf("failed to render agentscope runtime's file: %s", err)
}
// parse s.yaml
s := filepath.Join(agentDir, SConfigYAML)
STmplStr, err := get_template(SConfigTemplate)
if err != nil {
return fmt.Errorf("failed to read agentrun's serverless config file template: %v", err)
}
if err := renderTemplateFile(STmplStr, s, config.ServerlessCfg); err != nil {
return fmt.Errorf("failed to render agentscope runtime's file: %s", err)
}
// write requirements
fileContent := "agentrun-sdk[agentscope,server]>=0.0.3"
targetFilePath := filepath.Join(agentDir, "requirements.txt")
if err := util.WriteFileString(targetFilePath, fileContent, os.ModePerm); err != nil {
return fmt.Errorf("failed to write requirements.txt file to target agent directory: %s", err)
}
}
// parse toolkitPath
toolkitPath := filepath.Join(agentDir, ToolKitPyFile)
toolkitTmpl, err := get_template(ToolKitTemplate)
if err != nil {
return fmt.Errorf("failed to read toolkit template: %v", err)
}
if err := renderTemplateFile(toolkitTmpl, toolkitPath, config); err != nil {
return fmt.Errorf("failed to render toolkit file: %s", err)
}
// write agent.py
agentPath := filepath.Join(agentDir, AgentClassFile)
agentTmpl, err := get_template(AgentClassTemplate)
if err != nil {
return fmt.Errorf("failed to read agent class template: %v", err)
}
if err := renderTemplateFile(agentTmpl, agentPath, config); err != nil {
return fmt.Errorf("failed to render agent class file: %s", err)
}
// write core_prompt.md
if core, err := getCore(); err == nil {
corePromptPath := filepath.Join(agentDir, core.GetPromptFileName())
if err := util.WriteFileString(corePromptPath, prompt.AgentDevelopmentGuide, os.ModePerm); err != nil {
return fmt.Errorf("failed to write %s file to target agent directory: %s", core.GetPromptFileName(), err)
}
return nil
} else {
return fmt.Errorf("failed to add instruction file in agent dir: %s", err)
}
}
func renderTemplateFile(templateStr string, targetPath string, data interface{}) error {
// sync with python
funcMap := template.FuncMap{
"boolToPython": func(b bool) string {
if b {
return "True"
}
return "False"
},
}
tmpl, err := template.New("agent").Funcs(funcMap).Parse(templateStr)
if err != nil {
return fmt.Errorf("failed to parse template: %v", err)
}
file, err := os.Create(targetPath)
if err != nil {
return fmt.Errorf("failed to create output file: %v", err)
}
defer file.Close()
if err := tmpl.Execute(file, data); err != nil {
return fmt.Errorf("failed to render template: %v", err)
}
return nil
}
func get_template(templatePath string) (string, error) {
f := manifests.BuiltinOrDir("")
templatePath = "agent/template/" + templatePath
data, err := fs.ReadFile(f, templatePath)
if err != nil {
return "", fmt.Errorf("failed to read template: %w", err)
}
return string(data), nil
}

View File

@@ -0,0 +1,244 @@
// Copyright (c) 2025 Alibaba Group Holding Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
# Agent Development Guide
Welcome to this AgentScope agent directory! This guide helps AI CLI tools (like Claude Code) understand the structure and assist you in building powerful agents.
## Directory Overview
This is an automatically generated agent directory with the following structure:
- **agent.py** - Main agent class (generated from agent.tmpl)
- **toolkit.py** - Agent's tools and MCP integrations (generated from toolkit.tmpl)
- **prompt.md** - User-provided system prompt for the agent
- **as_runtime_main.py** / **agentrun_main.py** - Deployment runtime files
- **agent.tmpl** / **toolkit.tmpl** / **agentscope.tmpl** - Generation templates
## What You Should Do
### Primary Focus: Improve Agent Intelligence
Your role is to help users build more capable, "agentic" agents by:
1. **Editing agent.py** - Enhance the agent class with:
- Custom reasoning logic
- Agent-specific hooks and behaviors
- Memory management strategies
- Multi-step task handling
2. **Editing toolkit.py** - Expand agent capabilities by:
- Adding new tool functions
- Integrating MCP (Model Context Protocol) servers
- Configuring tool access and permissions
3. **Editing prompt.md** (when requested) - Refine the system prompt to:
- Improve agent behavior and personality
- Add domain-specific instructions
- Define task-specific guidelines
### Critical Constraints
**DO NOT MODIFY** these deployment files:
- `as_runtime_main.py`
- `agentrun_main.py`
These files handle agent deployment and runtime orchestration. They are managed by the agent framework and should not be changed during development.
## Learning AgentScope
Before helping users, you should become proficient with AgentScope:
### Use the DeepWiki MCP Server
You have access to the `mcp-deepwiki` server. Use it to learn about AgentScope:
```python
# Query the AgentScope repository
ask_question(
repoName="agentscope-ai/agentscope",
question="How does the ReActAgent work?"
)
```
Study these key concepts:
- ReActAgent architecture (Reasoning + Acting loop)
- Agent hooks and lifecycle methods
- Toolkit and tool registration
- Memory systems (short-term and long-term)
- Message formatting and model integration
- MCP integration for external tools
### Testing Your Agent
Use the `agentscope-test-runner` subagent to test agent functionality:
```python
# Launch test runner to validate agent behavior
Task(
subagent_type="agentscope-test-runner",
prompt="Test the agent's ability to handle multi-step tasks",
description="Testing agent functionality"
)
```
**Don't** write your own test harness - use this specialized subagent.
## Building Great Agents: Examples
### Example 1: Browser Automation Agent
Based on the AgentScope BrowserAgent, here's how to build a specialized web agent:
**Key Patterns:**
1. **Extend ReActAgent** - Inherit from ReActAgent for reasoning-acting loop
2. **Use Hooks** - Register instance hooks to customize behavior at different lifecycle points:
- `pre_reply` - Run before generating responses
- `pre_reasoning` - Execute before reasoning phase
- `post_reasoning` - Execute after reasoning phase
- `post_acting` - Execute after taking actions
3. **Manage Memory** - Implement memory summarization to prevent context overflow
4. **Leverage MCP Tools** - Connect to MCP servers (like Playwright browser tools) via toolkit
```python
class Agent(ReActAgent):
def __init__(self, name, model, formatter, memory, toolkit, ...):
super().__init__(name, sys_prompt, model, formatter, memory, toolkit, max_iters)
# Register custom hooks
self.register_instance_hook(
"pre_reply",
"custom_hook_name",
custom_hook_function
)
```
### Example 2: Research Agent
For research and analysis tasks:
**Key Features:**
- Knowledge base integration for RAG (Retrieval-Augmented Generation)
- Long-term memory for persistent context
- Plan notebook for complex multi-step research
- Query rewriting for better information retrieval
```python
class Agent(ReActAgent):
def __init__(
self,
name,
sys_prompt,
model,
formatter,
toolkit,
memory,
long_term_memory=None,
knowledge=None,
enable_rewrite_query=True,
plan_notebook=None,
...
):
# Initialize with research-focused capabilities
super().__init__(...)
```
### Example 3: Code Assistant Agent
For software development tasks:
**Key Capabilities:**
- File operation tools (read, write, insert)
- Code execution (execute_python_code, execute_shell_command)
- Image/audio processing for multimodal interactions
- MCP integration for IDE tools
### Common Agent Patterns
1. **Tool Registration** (in toolkit.py):
```python
from agentscope.tool import Toolkit
from agentscope.tool import execute_shell_command, view_text_file
toolkit = Toolkit()
toolkit.register_tool_function(execute_shell_command)
toolkit.register_tool_function(view_text_file)
```
2. **MCP Integration** (in toolkit.py):
```python
from agentscope.mcp import HttpStatelessClient
async def register_mcp(toolkit):
client = HttpStatelessClient(
name="browser-tools",
transport="sse",
url="http://localhost:3000/sse"
)
await toolkit.register_mcp_client(client)
```
3. **Custom Hooks** (in agent.py):
```python
async def pre_reasoning_hook(self, *args, **kwargs):
"""Custom logic before reasoning"""
# Add context, check conditions, etc.
pass
# In __init__:
self.register_instance_hook("pre_reasoning", "my_hook", pre_reasoning_hook)
```
## More Examples and Resources
Explore official AgentScope examples:
- https://github.com/modelscope/agentscope/tree/main/examples/agent
Key examples to study:
- **ReAct Agent** - Basic reasoning-acting agent
- **Conversation Agent** - Multi-turn dialogue handling
- **User Agent** - Human-in-the-loop interactions
- **Tool Agent** - Advanced tool usage patterns
## Development Workflow
1. **Understand Requirements** - Clarify what the agent should do
2. **Learn Patterns** - Use DeepWiki to research relevant AgentScope patterns
3. **Design Agent** - Choose base class and required capabilities
4. **Implement in agent.py** - Write custom agent logic
5. **Add Tools in toolkit.py** - Register needed tools and MCP servers
6. **Test with agentscope-test-runner** - Validate functionality
7. **Iterate** - Refine based on test results
## Best Practices
1. **Start Simple** - Begin with basic ReActAgent, add complexity as needed
2. **Use Hooks Wisely** - Don't overcomplicate; hooks should have clear purposes
3. **Memory Management** - Implement summarization for long conversations
4. **Tool Selection** - Only add tools the agent actually needs
5. **Clear Prompts** - Write specific, actionable system prompts in prompt.md
6. **Test Iteratively** - Use the test-runner frequently during development
## Getting Help
- Use DeepWiki MCP to query AgentScope documentation
- Study the browser_agent.py example in this guide
- Reference official examples at https://github.com/agentscope-ai/agentscope
- Test early and often with agentscope-test-runner
---
**Remember:** Focus on making the agent intelligent and capable. The deployment infrastructure is already handled - your job is to build the "brain" of the agent in agent.py and give it the right "tools" in toolkit.py.

View File

@@ -0,0 +1,20 @@
// Copyright (c) 2025 Alibaba Group Holding Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package prompt
import _ "embed"
//go:embed agent_guide.md
var AgentDevelopmentGuide string

View File

@@ -31,7 +31,33 @@ type HigressClient struct {
httpClient *http.Client
}
type HimarketClient struct {
baseURL string
username string
password string
httpClient *http.Client
jwtToken string
}
// type ClientType string
// const (
// HigressClientType ClientType = "higress"
// HimarketClientType ClientType = "himarket"
// )
// func NewClient(clientType ClientType, baseURL, username, password string) Client {
// switch clientType {
// case HimarketClientType:
// return NewHimarketClient(baseURL, username, password)
// case HigressClientType:
// fallthrough
// default:
// return NewHigressClient(baseURL, username, password)
// }
// }
func NewHigressClient(baseURL, username, password string) *HigressClient {
client := &HigressClient{
baseURL: baseURL,
username: username,
@@ -44,6 +70,19 @@ func NewHigressClient(baseURL, username, password string) *HigressClient {
return client
}
func NewHimarketClient(baseURL, username, password string) *HimarketClient {
client := &HimarketClient{
baseURL: baseURL,
username: username,
password: password,
httpClient: &http.Client{
Timeout: 30 * time.Second,
},
}
return client
}
func (c *HigressClient) Get(path string) ([]byte, error) {
return c.request("GET", path, nil)
}
@@ -59,6 +98,133 @@ func (c *HigressClient) Put(path string, data interface{}) ([]byte, error) {
func (c *HigressClient) Delete(path string) ([]byte, error) {
return c.request("DELETE", path, nil)
}
func (c *HimarketClient) getJWTToken() error {
loginURL := c.baseURL + "/api/v1/admins/login"
loginData := map[string]string{
"username": c.username,
"password": c.password,
}
jsonData, err := json.Marshal(loginData)
if err != nil {
return fmt.Errorf("failed to marshal login data: %w", err)
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
req, err := http.NewRequestWithContext(ctx, "POST", loginURL, bytes.NewBuffer(jsonData))
if err != nil {
return fmt.Errorf("failed to create login request: %w", err)
}
req.Header.Set("Content-Type", "application/json")
resp, err := c.httpClient.Do(req)
if err != nil {
return fmt.Errorf("login request failed: %w", err)
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
return fmt.Errorf("login failed with status code: %d", resp.StatusCode)
}
var response map[string]interface{}
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return fmt.Errorf("failed to read login response: %w", err)
}
if err := json.Unmarshal(respBody, &response); err != nil {
return fmt.Errorf("failed to parse login response: %w", err)
}
// fmt.Println(string(respBody))
if data, ok := response["data"].(map[string]interface{}); ok {
if token, ok := data["access_token"].(string); ok {
c.jwtToken = token
return nil
}
}
return fmt.Errorf("token not found in login response: %v", response)
}
func (c *HimarketClient) Get(path string) ([]byte, error) {
return c.request("GET", path, nil)
}
func (c *HimarketClient) Post(path string, data interface{}) ([]byte, error) {
return c.request("POST", path, data)
}
func (c *HimarketClient) Put(path string, data interface{}) ([]byte, error) {
return c.request("PUT", path, data)
}
func (c *HimarketClient) request(method, path string, data interface{}) ([]byte, error) {
if c.jwtToken == "" {
if err := c.getJWTToken(); err != nil {
return nil, fmt.Errorf("failed to get JWT token: %w", err)
}
}
url := c.baseURL + path
var body io.Reader
if data != nil {
jsonData, err := json.Marshal(data)
if err != nil {
return nil, fmt.Errorf("failed to marshal request data: %w", err)
}
body = bytes.NewBuffer(jsonData)
}
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
req, err := http.NewRequestWithContext(ctx, method, url, body)
if err != nil {
return nil, fmt.Errorf("failed to create request: %w", err)
}
req.Header.Set("Authorization", "Bearer "+c.jwtToken)
req.Header.Set("Content-Type", "application/json")
resp, err := c.httpClient.Do(req)
if err != nil {
return nil, fmt.Errorf("request failed: %w", err)
}
defer resp.Body.Close()
if resp.StatusCode == 409 {
return nil, fmt.Errorf("resource already exists")
}
if resp.StatusCode == 400 {
return nil, fmt.Errorf("invalid resource definition")
}
if resp.StatusCode == 500 {
return nil, fmt.Errorf("server internal error")
}
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return nil, fmt.Errorf("HTTP error %d", resp.StatusCode)
}
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("failed to read response body: %w", err)
}
return respBody, nil
}
func (c *HigressClient) request(method, path string, data interface{}) ([]byte, error) {
url := c.baseURL + path
@@ -92,6 +258,8 @@ func (c *HigressClient) request(method, path string, data interface{}) ([]byte,
return nil, fmt.Errorf("resource already exists")
}
// fmt.Println(resp)
if resp.StatusCode == 400 {
return nil, fmt.Errorf("invalid resource definition")
}

View File

@@ -15,7 +15,11 @@
package services
import (
"encoding/json"
"fmt"
"time"
"github.com/alibaba/higress/hgctl/pkg/agent/common"
)
func HandleAddServiceSource(client *HigressClient, body interface{}) ([]byte, error) {
@@ -50,22 +54,30 @@ func HandleAddServiceSource(client *HigressClient, body interface{}) ([]byte, er
// add MCP server to higress console, example request body as followed:
//
// {
// "name": "mcp-deepwiki",
// "description": "",
// "type": "DIRECT_ROUTE", // or OPEN_API
// "service": "hgctl-deepwiki.dns:443",
// "upstreamPathPrefix": "/mcp",
// "name": "test",
// "description": "123",
// "type": "DIRECT_ROUTE",
// "services": [
// {
// "name": "hgctl-deepwiki.dns",
// "name": "hgctl-mcp-deepwiki.dns",
// "port": 443,
// "version": "1.0",
// "weight": 100
// }
// ]
// ],
// "consumerAuthInfo": {
// "type": "key-auth",
// "allowedConsumers": []
// },
// "domains": [],
// "directRouteConfig": {
// "path": "/mcp",
// "transportType": "streamable"
// }
// }
func HandleAddMCPServer(client *HigressClient, body interface{}) ([]byte, error) {
data, ok := body.(map[string]interface{})
// fmt.Printf("mcpbody: %v\n", data)
if !ok {
return nil, fmt.Errorf("failed to parse request body")
}
@@ -76,10 +88,6 @@ func HandleAddMCPServer(client *HigressClient, body interface{}) ([]byte, error)
if _, ok := data["type"]; !ok {
return nil, fmt.Errorf("missing required field 'type' in body")
}
if _, ok := data["service"]; !ok {
return nil, fmt.Errorf("missing required field 'service' in body")
}
// if _, ok := data["upstreamPathPrefix"]; !ok {
// return nil, fmt.Errorf("missing required field 'upstreamPathPrefix' in body")
// }
@@ -97,6 +105,40 @@ func HandleAddMCPServer(client *HigressClient, body interface{}) ([]byte, error)
return resp, nil
}
// return map[mcp-server-name]{}
func GetExistingMCPServers(client *HigressClient) (map[string]string, error) {
result := make(map[string]string)
data, err := HandleListMCPServers(client)
if err != nil {
return nil, err
}
var response map[string]interface{}
if err := json.Unmarshal(data, &response); err != nil {
return nil, fmt.Errorf("failed to get product id from response: %s", err)
}
// fmt.Println(response["data"])
if list, ok := response["data"].([]interface{}); ok {
for _, item := range list {
if mcp, ok := item.(map[string]interface{}); ok {
if name, ok := mcp["name"].(string); ok {
result[name] = ""
}
}
}
}
return result, nil
}
func HandleListMCPServers(client *HigressClient) ([]byte, error) {
ts := time.Now().Unix()
pageNum := 1
pageSize := 100
return client.Get(fmt.Sprintf("/v1/mcpServer?ts=%d&pageNum=%d&pageSize=%d", ts, pageNum, pageSize))
}
// add OpenAPI MCP tools to higress console, example request body:
//
// {
@@ -127,3 +169,155 @@ func HandleAddMCPServer(client *HigressClient, body interface{}) ([]byte, error)
func HandleAddOpenAPITool(client *HigressClient, body interface{}) ([]byte, error) {
return client.Put("/v1/mcpServer", body)
}
func HandleAddAIProviderService(client *HigressClient, body interface{}) ([]byte, error) {
return client.Post("/v1/ai/providers", body)
}
func HandleAddAIRoute(client *HigressClient, body interface{}) ([]byte, error) {
return client.Post("/v1/ai/routes", body)
}
func HandleAddRoute(client *HigressClient, body interface{}) ([]byte, error) {
return client.Post("/v1/routes", body)
}
// Himarket-related
func HandleAddHigressInstance(client *HimarketClient, body interface{}) ([]byte, error) {
// This api will not return the higress-gatway-id
return client.Post("/api/v1/gateways", body)
}
func (c *HimarketClient) getProduct(typ common.ProductType) ([]byte, error) {
return c.Get(fmt.Sprintf("/api/v1/products?type=%s&page=0&size=30", string(typ)))
}
func (c *HimarketClient) extractGetProductResponse(typ common.ProductType, response map[string]interface{}) map[string]string {
result := make(map[string]string)
data, ok := response["data"].(map[string]interface{})
if !ok {
return result
}
content, ok := data["content"].([]interface{})
if !ok {
return result
}
for _, item := range content {
product, ok := item.(map[string]interface{})
if !ok {
continue
}
productType, _ := product["type"].(string)
if productType != string(typ) {
continue
}
name, _ := product["name"].(string)
if name == "" {
continue
}
mcpConfig, ok := product["mcpConfig"].(map[string]interface{})
if !ok {
continue
}
serverConfig, ok := mcpConfig["mcpServerConfig"].(map[string]interface{})
if !ok {
continue
}
domains, ok := serverConfig["domains"].([]interface{})
if !ok || len(domains) == 0 {
continue
}
path, ok := serverConfig["path"].(string)
if !ok {
continue
}
for _, domainItem := range domains {
domainConfig, ok := domainItem.(map[string]interface{})
if !ok {
continue
}
domain, _ := domainConfig["domain"].(string)
protocol, _ := domainConfig["protocol"].(string)
if domain == "" || protocol == "" {
continue
}
port, _ := domainConfig["port"].(float64)
url := ""
if port == 0 || port == 80 {
url = fmt.Sprintf("%s://%s%s", protocol, domain, path)
} else {
url = fmt.Sprintf("%s://%s:%d%s", protocol, domain, int(port), path)
}
result[name] = url
break
}
}
return result
}
func (c *HimarketClient) GetDevModelProduct() (map[string]string, error) {
data, err := c.getProduct(common.MODEL_API)
if err != nil {
return nil, fmt.Errorf("failed request himarket: %s", err)
}
var response map[string]interface{}
if err := json.Unmarshal(data, &response); err != nil {
return nil, fmt.Errorf("failed to get model api from response %s", err)
}
return c.extractGetProductResponse(common.MODEL_API, response), nil
}
func (c *HimarketClient) GetDevMCPServerProduct() (map[string]string, error) {
data, err := c.getProduct(common.MCP_SERVER)
if err != nil {
return nil, fmt.Errorf("failed request himarket: %s", err)
}
var response map[string]interface{}
if err := json.Unmarshal(data, &response); err != nil {
return nil, fmt.Errorf("failed to get MCP server from response %s", err)
}
return c.extractGetProductResponse(common.MCP_SERVER, response), nil
}
func HandleListHimarketMCPServers(client *HimarketClient) ([]byte, error) {
return nil, nil
}
func HandleAddAPIProduct(client *HimarketClient, body interface{}) ([]byte, error) {
data, err := client.Post("/api/v1/products", body)
if err != nil {
return data, err
}
var response map[string]interface{}
if err := json.Unmarshal(data, &response); err != nil {
return nil, fmt.Errorf("failed to get product id from response: %s", err)
}
if res, ok := response["data"].(map[string]interface{}); ok {
if productId, ok := res["productId"].(string); ok {
return []byte(productId), nil
}
}
return data, fmt.Errorf("failed to get product id from response")
}
func HandleRefAPIProduct(client *HimarketClient, product_id string, body interface{}) ([]byte, error) {
return client.Post(fmt.Sprintf("/api/v1/products/%s/ref", product_id), body)
}

View File

@@ -0,0 +1,178 @@
// Copyright (c) 2025 Alibaba Group Holding Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package services
import (
"fmt"
"net"
"net/url"
)
func BuildAIProviderServiceBody(name, url string) map[string]interface{} {
customBaseURL := fmt.Sprintf("%s/compatible-mode/v1", url)
return map[string]interface{}{
"type": "openai",
"name": name,
"tokens": []string{},
"version": 0,
"protocol": "openai/v1",
"tokenFailoverConfig": map[string]interface{}{
"enabled": false,
},
"proxyName": "",
"rawConfigs": map[string]interface{}{
"openaiExtraCustomUrls": []string{},
"openaiCustomUrl": customBaseURL,
},
}
}
func BuildAddAIRouteBody(name, _url string) map[string]interface{} {
return map[string]interface{}{
"name": fmt.Sprintf("%s-route", name),
// "version": "627198", // It's unecessary to provide when create a new one
"domains": []interface{}{},
"pathPredicate": map[string]interface{}{
"matchType": "PRE",
// FIXME: Currently, to use model API in higress user hould follow this pattern:
// http://<higress-gateway-ip>/<PRE_MATCH_VALUE>/v1/chat/completions or /v1/embedding
// However in Himarket, when connecting the higress ai route as model API, himarket will directly use http://<higress-gateway-ip>/<PRE_MATCH_VALUE>
// as the final request url, which will not get to right path. So here we make the matchValue hard-coded as `/v1/chat/completions`
"matchValue": "/v1/chat/completions",
"caseSensitive": false,
"ignoreCase": []string{}, // "ignoreCase": ["ignore"]
},
"headerPredicates": []interface{}{},
"urlParamPredicates": []interface{}{},
"upstreams": []interface{}{
map[string]interface{}{
"provider": name,
"weight": 100,
"modelMapping": map[string]interface{}{},
},
},
"modelPredicates": []interface{}{},
"authConfig": map[string]interface{}{
"enabled": false,
"allowedCredentialTypes": []interface{}{},
"allowedConsumers": []interface{}{},
},
"fallbackConfig": map[string]interface{}{
"enabled": false,
"upstreams": nil,
"fallbackStrategy": nil,
"responseCodes": nil,
},
}
}
func BuildServiceBodyAndSrv(name, urlStr string) (map[string]interface{}, string, string, error) {
res, err := url.Parse(urlStr)
if err != nil {
return nil, "", "", err
}
// add service source
srvType := ""
srvPort := ""
if ip := net.ParseIP(res.Hostname()); ip == nil {
srvType = "dns"
} else {
srvType = "static"
}
if res.Port() == "" && res.Scheme == "http" {
srvPort = "80"
} else if res.Port() == "" && res.Scheme == "https" {
srvPort = "443"
} else {
srvPort = res.Port()
}
// e.g. hgctl-mcp-deepwiki.dns
targetSrvName := fmt.Sprintf("%s.%s", name, srvType)
return map[string]interface{}{
"domain": res.Host,
"type": srvType,
"port": srvPort,
"name": name,
"proxyName": "",
"domainForEdit": res.Host,
"protocol": res.Scheme,
}, targetSrvName, srvPort, nil
}
func BuildAPIRouteBody(name, srv string) map[string]interface{} {
return map[string]interface{}{
"name": fmt.Sprintf("%s-route", name),
"path": map[string]interface{}{
"matchType": "PRE", // default is PREFIX
"matchValue": "/process", // default is "/process"
"caseSensitive": true,
},
"authConfig": map[string]interface{}{
"enabled": false,
},
"services": []map[string]interface{}{
{
"name": srv,
},
},
}
}
func BuildAddHigressInstanceBody(name, addr, username, password string) map[string]interface{} {
return map[string]interface{}{
"gatewayName": name,
"gatewayType": "HIGRESS",
"higressConfig": map[string]interface{}{
"address": addr,
"username": username,
"password": password,
},
}
}
func BuildAPIProductBody(name, desc, typ string) map[string]interface{} {
return map[string]interface{}{
"name": name, "description": desc, "type": typ,
}
}
func BuildRefModelAPIProductBody(gateway_id, product_id, target_route string) map[string]interface{} {
return map[string]interface{}{
"gatewayId": gateway_id,
"sourceType": "GATEWAY",
"productId": product_id,
"higressRefConfig": map[string]interface{}{
"modelRouteName": target_route,
"fromGatewayType": "HIGRESS",
},
}
}
func BuildRefMCPAPIProductBody(gateway_id, product_id, mcp_name string) map[string]interface{} {
return map[string]interface{}{
"gatewayId": gateway_id,
"sourceType": "GATEWAY",
"productId": product_id,
"higressRefConfig": map[string]interface{}{
"mcpServerName": mcp_name,
"fromGatewayType": "HIGRESS",
},
}
}

View File

File diff suppressed because it is too large Load Diff

View File

@@ -20,7 +20,7 @@ import (
"regexp"
"strings"
"istio.io/istio/operator/pkg/util"
"github.com/alibaba/higress/hgctl/pkg/util"
"sigs.k8s.io/yaml"
)

View File

@@ -0,0 +1,474 @@
---
name: agentscope-test-runner
description: >
Comprehensive Behavioral & Connectivity QA Specialist for AgentScope agents.
Executes end-to-end testing with proper setup, execution, and teardown phases.
Verifies agent behavior, validates responses semantically, and provides detailed reports.
Handles test isolation, resource cleanup, and error recovery automatically.
tools:
- Bash
- Read
- Grep
- Write
model: sonnet
permissionMode: default
---
# Identity & Purpose
You are the **AgentScope Test Runner** - a specialized QA agent responsible for comprehensive behavioral verification of AgentScope agents.
**Your Mission**: Validate that target agents correctly understand prompts, execute tasks, and return semantically appropriate responses through a complete test lifecycle.
**Core Principles**:
1. **Complete Test Lifecycle**: Setup → Execute → Verify → Teardown → Report
2. **Strict Isolation**: Each test runs in a clean environment
3. **Semantic Validation**: Judge response quality, not just API success
4. **Fail-Safe Cleanup**: Always cleanup resources, even on test failure
5. **Detailed Reporting**: Provide actionable insights via structured XML
# Test Lifecycle Overview
```
┌─────────────┐
│ SETUP │ → Prepare environment, validate dependencies
├─────────────┤
│ EXECUTE │ → Send test prompts, capture responses
├─────────────┤
│ VERIFY │ → Analyze semantic correctness
├─────────────┤
│ TEARDOWN │ → Cleanup temp files, restore state
├─────────────┤
│ REPORT │ → Return structured XML results
└─────────────┘
```
# Communication Contract
You communicate via **Structured XML Reports** with comprehensive diagnostics.
```xml
<test_report>
<status>PASS | FAIL | UNSTABLE | ERROR</status>
<test_id>Unique test identifier</test_id>
<target_endpoint>URL tested</target_endpoint>
<test_duration_ms>Execution time</test_duration_ms>
<setup_phase>
<status>SUCCESS | FAILED</status>
<details>Setup validation results</details>
</setup_phase>
<execution_phase>
<input_prompt>The prompt sent to agent</input_prompt>
<http_status>Response status code</http_status>
<response_snippet>First 500 chars of response</response_snippet>
<response_time_ms>API response time</response_time_ms>
</execution_phase>
<verification_phase>
<semantic_verdict>
Detailed analysis: Does the response correctly address the prompt?
Does it follow instructions? Is the output appropriate?
</semantic_verdict>
<verdict>PASS | FAIL | PARTIAL</verdict>
</verification_phase>
<teardown_phase>
<status>SUCCESS | FAILED</status>
<cleaned_resources>List of cleaned temp files</cleaned_resources>
</teardown_phase>
<diagnostics>
<root_cause>Error explanation if applicable</root_cause>
<recommendations>Suggestions for fixing issues</recommendations>
</diagnostics>
</test_report>
```
# Execution Protocol
## Phase 0: Test Planning & Preparation
**Extract Test Parameters** from Main Agent request:
- **TEST_PROMPT**: What to send to the agent
- **TARGET_URL**: Agent endpoint (default: `http://127.0.0.1:8090/process`)
- **EXPECTED_BEHAVIOR**: What constitutes a correct response
- **TEST_TYPE**: simple | multi-turn | performance | stress
**Generate Test ID**:
```bash
TEST_ID="test_$(date +%s)_$$"
TEST_DIR="/tmp/agentscope_test_${TEST_ID}"
```
## Phase 1: SETUP
**Critical**: Establish clean test environment and validate preconditions.
### 1.1 Create Test Environment
```bash
# Create isolated test directory
mkdir -p "$TEST_DIR"
cd "$TEST_DIR"
# Setup log files
SETUP_LOG="${TEST_DIR}/setup.log"
EXEC_LOG="${TEST_DIR}/execution.log"
CLEANUP_LOG="${TEST_DIR}/cleanup.log"
echo "[$(date -Iseconds)] Test setup initiated" > "$SETUP_LOG"
```
### 1.2 Validate Dependencies
```bash
# Check required tools
for tool in curl nc jq; do
if ! command -v "$tool" &> /dev/null; then
echo "ERROR: Required tool '$tool' not found" >> "$SETUP_LOG"
# Mark setup as failed and skip to reporting
fi
done
```
### 1.3 Connectivity Pre-flight Check
```bash
# Extract host and port from TARGET_URL
TARGET_HOST="127.0.0.1"
TARGET_PORT="8090"
# Verify port is open
nc -zv "$TARGET_HOST" "$TARGET_PORT" 2>&1 | tee -a "$SETUP_LOG"
if [ $? -ne 0 ]; then
echo "FAIL: Target endpoint unreachable" >> "$SETUP_LOG"
# Skip execution, proceed to teardown and reporting
fi
```
### 1.4 Validate Test Prompt
```bash
# Ensure TEST_PROMPT was extracted
if [ -z "$TEST_PROMPT" ]; then
# Use intelligent default based on context
TEST_PROMPT="Who are you and what can you do?"
echo "INFO: Using default test prompt" >> "$SETUP_LOG"
fi
echo "Test Prompt: $TEST_PROMPT" >> "$SETUP_LOG"
```
## Phase 2: EXECUTION
**Critical**: Send test prompts and capture complete responses.
### 2.1 Construct Payload Safely
Use heredoc for special character safety:
```bash
cat <<'EOF' > "${TEST_DIR}/payload.json"
{
"input": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "TEST_PROMPT_PLACEHOLDER"
}
]
}
]
}
EOF
# Safely inject TEST_PROMPT using jq
jq --arg prompt "$TEST_PROMPT" \
'.input[0].content[0].text = $prompt' \
"${TEST_DIR}/payload.json" > "${TEST_DIR}/payload_final.json"
```
### 2.2 Execute Test Request
Capture timing and full output:
```bash
# Record start time
START_TIME=$(date +%s%3N)
# Execute with comprehensive error capture
HTTP_CODE=$(curl -w "%{http_code}" -o "${TEST_DIR}/response.json" \
-sS -N -X POST "${TARGET_URL}" \
-H "Content-Type: application/json" \
-d @"${TEST_DIR}/payload_final.json" \
2> "${TEST_DIR}/curl_stderr.log")
# Record end time
END_TIME=$(date +%s%3N)
DURATION=$((END_TIME - START_TIME))
echo "HTTP Status: $HTTP_CODE" >> "$EXEC_LOG"
echo "Duration: ${DURATION}ms" >> "$EXEC_LOG"
```
### 2.3 Handle Execution Errors
```bash
if [ $HTTP_CODE -ne 200 ]; then
echo "ERROR: Non-200 response code: $HTTP_CODE" >> "$EXEC_LOG"
cat "${TEST_DIR}/curl_stderr.log" >> "$EXEC_LOG"
# Proceed to teardown
fi
```
## Phase 3: VERIFICATION
**Critical**: Perform semantic analysis of agent response.
### 3.1 Validate Response Format
```bash
# Check if response is valid JSON
if ! jq empty "${TEST_DIR}/response.json" 2>/dev/null; then
echo "FAIL: Invalid JSON response" >> "$EXEC_LOG"
VERDICT="FAIL"
fi
```
### 3.2 Extract Response Content
```bash
# Extract agent's text response
RESPONSE_TEXT=$(jq -r '.output[0].content[0].text // empty' \
"${TEST_DIR}/response.json" 2>/dev/null)
# Save snippet for reporting
echo "$RESPONSE_TEXT" | head -c 500 > "${TEST_DIR}/response_snippet.txt"
```
### 3.3 Semantic Analysis
Evaluate response against test prompt:
**Validation Criteria**:
1. **Non-Empty**: Response contains meaningful content
2. **Relevance**: Response addresses the prompt topic
3. **Correctness**: Response shows understanding of the task
4. **Completeness**: Response provides sufficient detail
**Common Failure Patterns**:
- Empty or null response
- Error messages instead of answers
- "I don't know" when knowledge is expected
- Off-topic responses
- Hallucinated or nonsensical content
- Refusal without valid reason
**Examples**:
- Prompt: "Write Python hello world" → Response should contain Python code
- Prompt: "Summarize AgentScope" → Response should be a summary
- Prompt: "Who are you?" → Response should identify as the agent
### 3.4 Assign Verdict
```bash
# Determine verdict based on analysis
if [ -z "$RESPONSE_TEXT" ]; then
VERDICT="FAIL"
REASON="Empty response received"
elif [[ "$RESPONSE_TEXT" == *"error"* ]] || [[ "$RESPONSE_TEXT" == *"Error"* ]]; then
VERDICT="FAIL"
REASON="Error message in response"
else
# Semantic check (implement based on TEST_PROMPT)
VERDICT="PASS" # or PARTIAL or FAIL
REASON="Response semantically appropriate"
fi
```
## Phase 4: TEARDOWN
**Critical**: Always execute cleanup, even if tests failed.
### 4.1 Cleanup Temporary Files
```bash
# Record cleanup actions
echo "[$(date -Iseconds)] Cleanup initiated" > "$CLEANUP_LOG"
# List files to be cleaned
ls -la "$TEST_DIR" >> "$CLEANUP_LOG"
CLEANED_FILES=(
"${TEST_DIR}/payload.json"
"${TEST_DIR}/payload_final.json"
"${TEST_DIR}/response.json"
"${TEST_DIR}/curl_stderr.log"
)
for file in "${CLEANED_FILES[@]}"; do
if [ -f "$file" ]; then
rm -f "$file"
echo "Removed: $file" >> "$CLEANUP_LOG"
fi
done
```
### 4.2 Archive Logs (Optional)
```bash
# If archiving is needed, compress logs before deletion
if [ "$ARCHIVE_LOGS" = "true" ]; then
tar -czf "/tmp/test_${TEST_ID}_logs.tar.gz" -C "$TEST_DIR" .
echo "Logs archived to /tmp/test_${TEST_ID}_logs.tar.gz" >> "$CLEANUP_LOG"
fi
```
### 4.3 Remove Test Directory
```bash
# Final cleanup
cd /tmp
rm -rf "$TEST_DIR"
if [ -d "$TEST_DIR" ]; then
echo "WARNING: Failed to remove test directory" >> "$CLEANUP_LOG"
CLEANUP_STATUS="FAILED"
else
echo "Test directory successfully removed" >> "$CLEANUP_LOG"
CLEANUP_STATUS="SUCCESS"
fi
```
### 4.4 Restore State
```bash
# If any environment variables were modified, restore them
# If any processes were started, stop them
# If any ports were occupied, release them
echo "[$(date -Iseconds)] Cleanup completed" >> "$CLEANUP_LOG"
```
## Phase 5: REPORTING
Generate comprehensive structured report with all phases.
**Report Assembly**:
1. Collect metrics from all phases
2. Include setup status and duration
3. Include execution results and timing
4. Include verification verdict
5. Include teardown status
6. Add diagnostic information
7. Provide actionable recommendations
**Status Determination**:
- **PASS**: All phases successful, semantic verdict positive
- **FAIL**: Execution succeeded but semantic verdict negative
- **UNSTABLE**: Intermittent issues detected
- **ERROR**: Setup or execution phase failed
# Advanced Testing Scenarios
## Multi-Turn Testing
For testing conversational agents:
```bash
# Send multiple prompts in sequence
for prompt in "${TEST_PROMPTS[@]}"; do
# Execute test with current prompt
# Maintain conversation context if needed
# Verify each response
done
```
## Performance Testing
Measure response time and throughput:
```bash
# Run test N times
for i in {1..10}; do
# Execute and record timing
# Calculate average, min, max response times
done
```
## Stress Testing
Test agent under load:
```bash
# Concurrent requests
for i in {1..5}; do
(execute_test "$TEST_PROMPT") &
done
wait
# Analyze results
```
# Error Recovery
**Fail-Safe Mechanism**: Use trap to ensure cleanup on error:
```bash
cleanup_on_exit() {
echo "Cleanup triggered by exit/error"
# Execute teardown logic
rm -rf "$TEST_DIR" 2>/dev/null
}
trap cleanup_on_exit EXIT ERR INT TERM
```
# Best Practices
1. **Always cleanup**: Use trap to ensure resources are freed
2. **Isolate tests**: Each test gets its own directory and ID
3. **Capture everything**: Log all phases for debugging
4. **Be specific**: Provide detailed semantic verdicts
5. **Handle errors**: Gracefully handle network, API, and format errors
6. **Time everything**: Track duration of each phase
7. **Validate inputs**: Check test prompts and endpoints before execution
# Quick Reference
## Default Test Flow
```bash
# 1. SETUP
mkdir -p /tmp/test_$$/
nc -zv 127.0.0.1 8090
# 2. EXECUTE
curl -X POST http://127.0.0.1:8090/process -d @payload.json
# 3. VERIFY
jq '.output[0].content[0].text' response.json
# 4. TEARDOWN
rm -rf /tmp/test_$$/
# 5. REPORT
echo "<test_report>...</test_report>"
```
## Common Test Prompts
- **Identity**: "Who are you and what can you do?"
- **Code generation**: "Write a Python hello world script"
- **Reasoning**: "Explain why the sky is blue"
- **Summarization**: "Summarize AgentScope in 2 sentences"
- **Tool use**: "List files in the current directory"
- **Multi-step**: "Research Python asyncio and write example code"
---
**Remember**: Your value lies not just in checking connectivity, but in validating that agents behave correctly, understand prompts, and produce semantically appropriate responses. Always complete the full test lifecycle: Setup → Execute → Verify → Teardown → Report.

View File

@@ -0,0 +1,51 @@
---
name: openapi-generator
description: Use this agent when you need to generate a standard OpenAPI 3.0.0 YAML specification from HTTP endpoints. This agent is particularly useful for API documentation, integration planning, and creating standardized API contracts. For example: 'I need to create OpenAPI docs for these REST endpoints', 'Generate OpenAPI spec for my new API', or 'I have these URLs that I want to document with OpenAPI format'.
---
You are an OpenAPI 3.0.0 specification generator agent with expertise in HTTP endpoint analysis and API documentation. Your primary function is to receive HTTP endpoints, curl them to analyze their responses, and generate comprehensive OpenAPI 3.0.0 YAML specifications.
You will follow these steps:
1. Parse any input containing HTTP endpoints - these could be URLs or REST API endpoints
2. For each endpoint, make HTTP requests using curl to analyze:
- HTTP methods (GET, POST, PUT, DELETE, etc.)
- Request parameters and body structures
- Response formats and status codes
- Authentication requirements
- Headers and content types
3. Analyze the responses to understand:
- Data models and structures
- Required and optional fields
- Data types and formats
- Error responses and their formats
4. Generate a comprehensive OpenAPI 3.0.0 YAML specification that includes:
- OpenAPI version (3.0.0)
- Info section with title, version, and description
- Server URLs
- Complete paths object with all endpoints
- Schemas for request/response models
- Proper parameter definitions
- Security schemes if authentication is detected
- Example values where appropriate
Best practices to follow:
- Use descriptive names for endpoints, parameters, and models
- Include appropriate descriptions for all major components
- Use proper data types and formats
- Handle both successful and error responses
- Include example responses where beneficial
- Follow OpenAPI 3.0.0 specification strictly
- Organize related endpoints under common paths
- Use reusable components to avoid duplication
When you encounter issues:
- If an endpoint is unreachable or returns errors, document this in the specification
- If authentication is required but not specified, mark as such in security schemes
- If responses are inconsistent, provide the most common structure and note variations
- For complex data structures, create clear schema definitions
Output format:
- Return only the complete OpenAPI 3.0.0 YAML specification
- Ensure proper YAML formatting and indentation
- Include all necessary components for a complete API specification
- Make the specification self-contained and ready for immediate use

View File

@@ -0,0 +1,35 @@
---
name: openapi-to-mcp-converter
description: Use this agent when you need to convert OpenAPI 3.0 YAML specifications into MCP Server Configurations for deployment on Higress. This should be used when you have an API specification in OpenAPI 3.0 format and want to automatically generate the corresponding MCP server configuration to expose that API through the Higress gateway. Examples include: when you receive an OpenAPI YAML file and want to convert it to MCP format, when you need to validate an OpenAPI spec before conversion, when you want to publish your API configuration to Higress, or when you need expert advice on optimizing your MCP configuration based on Higress best practices.
---
You are an OpenAPI to MCP Server Configuration specialist. Your primary role is to help users convert OpenAPI 3.0 YAML specifications into MCP Server Configurations using the higress-api MCP tool, with a focus on accuracy, completeness, and best practices.
Your core responsibilities include:
1. Receiving and thoroughly analyzing OpenAPI 3.0.0 YAML specifications provided by users
2. Validating specifications to ensure they meet OpenAPI standards
3. Using the 'higress-api' MCP server to perform the conversion from OpenAPI YAML to MCP Server Configuration
4. Presenting generated configurations clearly and comprehensively
5. Providing expert guidance on configuration improvements and optimizations
6. Assisting users with publishing their validated configurations to Higress
Your workflow follows these precise steps:
1. Receive and validate the OpenAPI 3.0 YAML specification from the user
2. Use the 'higress-api' MCP server to transform the specification into MCP Server Configuration
3. Return the complete, readable MCP Server Configuration with clear explanations
4. Provide specific, actionable recommendations for improvements based on Higress best practices
5. Assist with configuration modifications when requested by the user
6. Deploy the final configuration to Higress using the 'higress-api' MCP server's publishing functionality
Key operational requirements:
- Always verify input is a proper OpenAPI 3.0 YAML specification before proceeding
- Ensure all generated MCP Server Configurations are complete, properly formatted, and ready for deployment
- Provide clear explanations of configuration components and their functionality
- Offer optimization suggestions that align with Higress performance and security best practices
- Guide users through the entire conversion and publishing process step-by-step
- Handle all errors gracefully with specific troubleshooting guidance and actionable next steps
- Maintain clear communication about the conversion process, including any limitations or constraints
When presenting configurations, structure them logically with annotations for each major section, highlight important settings that users should review, and explain the purpose of generated components. Always connect your recommendations to specific benefits like improved performance, enhanced security, or better scalability.
If a conversion fails, provide a detailed error analysis with specific guidance on how to resolve issues in the original OpenAPI specification. When publishing, confirm successful deployment and provide next steps for verification and monitoring.

View File

@@ -0,0 +1,40 @@
You are a specialized prompt engineer tasked with generating high-quality, structured prompts for AI agents based on user descriptions. Your goal is to create agent prompts that follow a consistent format inspired by subagent creation workflows, similar to Claude's structured agent design.
When you receive an input in the format:
Get $ARGUMENT
ARGUMENT: [user's description of the desired agent]
You must analyze the description and generate a complete agent prompt in the exact format below. Do not add extra text, explanations, or deviations—output only the generated agent prompt.
The output format must be:
name: [a concise, hyphenated name for the agent based on its primary function, e.g., openapi-generator]
description: [A detailed paragraph describing the agent's purpose, use cases, and examples of when to invoke it. Make it informative and highlight key scenarios.]
You are [a descriptive title for the agent] with expertise in [key skills or domains]. Your primary function is to [core purpose based on the description].
You will follow these steps:
[Step 1: Break down the process logically]
[Step 2: Continue with sequential steps]
[Add more numbered steps as needed to cover the full workflow described by the user.]
Best practices to follow:
[Bullet point best practices relevant to the agent's task]
[More best practices]
When you encounter issues:
[Bullet point handling for common edge cases or errors]
[More issue handling]
Output format:
[Describe the exact output structure, e.g., Return only the complete result in a specific format]
[Additional output guidelines]
Adapt the content to fit the user's agent description precisely:
Infer and expand on steps, best practices, and error handling logically from the description.
Ensure the agent prompt is comprehensive, self-contained, and ready to use.
Keep the language professional, clear, and instructional.
If the description involves tools or external interactions (e.g., HTTP requests), incorporate them appropriately in steps.
Now, process the following input and generate the agent prompt accordingly.

View File

@@ -0,0 +1,51 @@
from typing import Literal
from agentscope.agent import ReActAgent
from agentscope.formatter import FormatterBase
from agentscope.memory import LongTermMemoryBase, MemoryBase
from agentscope.model import ChatModelBase
from agentscope.plan import PlanNotebook
from agentscope.rag import KnowledgeBase
from agentscope.tool import Toolkit
from agentscope.tts import TTSModelBase
class Agent(ReActAgent):
def __init__(
self,
name: str,
sys_prompt: str,
model: ChatModelBase,
formatter: FormatterBase,
toolkit: Toolkit | None = None,
memory: MemoryBase | None = None,
long_term_memory: LongTermMemoryBase | None = None,
long_term_memory_mode: (
Literal["agent_control"] | Literal["static_control"] | Literal["both"]
) = "both",
enable_meta_tool: bool = False,
parallel_tool_calls: bool = False,
knowledge: KnowledgeBase | list[KnowledgeBase] | None = None,
enable_rewrite_query: bool = True,
plan_notebook: PlanNotebook | None = None,
print_hint_msg: bool = False,
max_iters: int = 10,
tts_model: TTSModelBase | None = None,
) -> None:
super().__init__(
name,
sys_prompt,
model,
formatter,
toolkit,
memory,
long_term_memory,
long_term_memory_mode,
enable_meta_tool,
parallel_tool_calls,
knowledge,
enable_rewrite_query,
plan_notebook,
print_hint_msg,
max_iters,
tts_model,
)

View File

@@ -0,0 +1,95 @@
import asyncio
from typing import Any
import os
import sys
from agentscope.agent import ReActAgent
from agentscope.memory import InMemoryMemory
from agentscope.message import Msg
from agentscope.pipeline._functional import stream_printing_messages
from agentscope.agent import ReActAgent
from agentscope.model import DashScopeChatModel
from agentscope.formatter import DashScopeChatFormatter
from agentrun.integration.agentscope import model, sandbox_toolset, toolset
from agentrun.sandbox import TemplateType
from agentrun.server import AgentRequest, AgentRunServer
from agentrun.utils.log import logger
from agent import Agent
from toolkit import toolkit, init_toolkit_sync
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "python"))
MODEL_NAME = "{{ .ChatModel }}"
SANDBOX_NAME = os.getenv("AGENTRUN_SANDBOX_NAME")
if not MODEL_NAME:
raise ValueError("请将 MODEL_NAME 替换为您已经创建的模型名称")
code_interpreter_tools = []
if SANDBOX_NAME and not SANDBOX_NAME.startswith("<"):
code_interpreter_tools = sandbox_toolset(
template_name=SANDBOX_NAME,
template_type=TemplateType.CODE_INTERPRETER,
sandbox_idle_timeout_seconds=300,
)
else:
logger.warning("SANDBOX_NAME 未设置或未替换,跳过加载沙箱工具。")
def load_sys_prompt(prompt_file_name="prompt.md"):
script_dir = os.path.dirname(os.path.abspath(__file__))
prompt_path = os.path.join(script_dir, prompt_file_name)
with open(prompt_path, 'r', encoding='utf-8') as f:
return f.read()
agent = Agent(
name="{{ .AgentName }}",
model=model(MODEL_NAME), # type: ignore
sys_prompt=load_sys_prompt(),
toolkit=toolkit,
memory=InMemoryMemory(),
formatter=DashScopeChatFormatter(),
)
async def invoke_agent(request: AgentRequest):
try:
content = request.messages[0].content
input_msg = Msg(
name="user_message",
content=content, # type: ignore
role="user",
)
async for msg, _ in stream_printing_messages(
agents=[agent],
coroutine_task=agent(input_msg),
):
text = msg.get_text_content()
if text:
yield text
except Exception:
logger.exception("调用出错")
raise
def main():
init_toolkit_sync()
AgentRunServer(invoke_agent=invoke_agent).start()
if __name__ == "__main__":
main()
"""
curl 127.0.0.1:9000/openai/v1/chat/completions -XPOST \
-H "content-type: application/json" \
-d '{
"messages": [{"role": "user", "content": "写一段代码,查询现在是几点?"}],
"stream":true
}'
"""

View File

@@ -0,0 +1,81 @@
edition: 3.0.0
name: agentrun-app
access: "{{ .AccessKey }}"
resources:
hgctl-agent2:
component: agentrun
props:
region: "{{ .Region }}"
# ============= 新规范agent 配置 =============
agent:
# 基本信息
name: "{{ .AgentName }}"
description: "{{ .AgentDesc }}"
# 代码配置(直接指定路径,支持目录或 zip 文件,或使用 OSS 代码包)
code:
src: .
# ossBucketName: funagent-agent-quickstart-langchain-demo-code
# ossObjectName: agentrun-quickstart-code.zip
language: python3.12
command:
- python3
- agentrun_main.py
# 容器配置(使用容器模式时配置此项)
# customContainerConfig:
# image: registry.cn-hangzhou.aliyuncs.com/my-app:latest
# command:
# - python3
# - app.py
# port: 9000
# 资源配置
cpu: 2.0
memory: 4096
diskSize: {{ .DiskSize }} # 可选,默认 512 MB
timeout: {{ .Timeout }} # 可选,默认 600 秒
# 端口和并发
port: {{ .Port }}
instanceConcurrency: 100
# 网络配置 - 仅公网访问
internetAccess: true
# VPC 配置(需要 VPC 内网访问时配置)
# vpcConfig:
# vpcId: vpc-xxx
# vSwitchIds: [vsw-xxx] # 支持单个或多个
# securityGroupId: sg-xxx
# internetAccess: true # 同时配置 vpcConfig 和 internetAccess 表示内外网都可访问
# 环境变量需要填写以下环境变量使用推荐使用无明文AK方式在下方填写授信给FC包含AliyunAgentRunFullAccess的执行角色
environmentVariables:
AGENTRUN_ACCESS_KEY_ID: "{{ .GlobalConfig.AlibabaCloudAccessKeyID }}"
AGENTRUN_ACCESS_KEY_SECRET: "{{ .GlobalConfig.AlibabaCloudAccessKeySecret }}"
AGENTRUN_ACCOUNT_ID: "{{ .GlobalConfig.AgentRunAccountID }}"
AGENTRUN_REGION: "{{ .GlobalConfig.AgentRunRegion }}"
# 执行角色填写此角色无需填写上方AK、SK敏感凭据的环境变量角色需要授信给FC包含AliyunAgentRunFullAccess
# role: acs:ram::1160216277279558:role/AliyunFCDefaultRole
# 日志配置
# logConfig:
# project: ws-testhz
# logstore: acs-ecs-system
# 端点配置
endpoints:
- name: prod
version: LATEST
description: "生产环境端点"
# 灰度发布示例
# - name: gray
# version: 2
# description: "灰度环境端点"
# weight: 0.2 # 20% 流量到版本 2

View File

@@ -0,0 +1,122 @@
import os
import asyncio
from agentscope_runtime.engine import AgentApp
from agentscope_runtime.engine.schemas.agent_schemas import AgentRequest
from agentscope.model import {{ .Provider }}Model
from agentscope.formatter import {{ .Provider }}Formatter
from agentscope_runtime.adapters.agentscope.memory import AgentScopeSessionHistoryMemory
from agentscope_runtime.engine.services.agent_state import InMemoryStateService
from agentscope_runtime.engine.services.session_history import InMemorySessionHistoryService
from agentscope.pipeline import stream_printing_messages
from agentscope_runtime.engine.deployers.local_deployer import LocalDeployManager
from agentscope_runtime.engine.deployers.utils.deployment_modes import DeploymentMode
from agent import Agent
from toolkit import toolkit, init_toolkit_sync
app = AgentApp(
app_name="{{.AppName}}",
app_description="{{.AppDescription}}",
)
def load_sys_prompt(prompt_file_name="prompt.md"):
script_dir = os.path.dirname(os.path.abspath(__file__))
prompt_path = os.path.join(script_dir, prompt_file_name)
with open(prompt_path, 'r', encoding='utf-8') as f:
return f.read()
@app.init
async def init_func(self):
"""初始化状态和会话服务"""
self.state_service = InMemoryStateService()
self.session_service = InMemorySessionHistoryService()
await self.state_service.start()
await self.session_service.start()
@app.shutdown
async def shutdown_func(self):
"""清理服务"""
await self.state_service.stop()
await self.session_service.stop()
@app.query(framework="agentscope")
async def query_func(self, msgs, request: AgentRequest, **kwargs):
session_id = request.session_id
user_id = request.user_id
# 恢复 Agent 状态
state = await self.state_service.export_state(
session_id=session_id,
user_id=user_id,
)
# ---- 创建 Agent ----
agent = Agent(
name="{{.AgentName}}",
model={{ .Provider }}Model(
"{{.ChatModel}}",
api_key=os.getenv("{{.APIKeyEnvVar}}"),
stream={{.EnableStreaming | boolToPython}},
),
sys_prompt=load_sys_prompt(),
toolkit=toolkit,
memory=AgentScopeSessionHistoryMemory(
service=self.session_service,
session_id=session_id,
user_id=user_id,
),
formatter={{ .Provider }}Formatter(),
)
agent.set_console_output_enabled(enabled=False)
# 恢复状态
if state:
agent.load_state_dict(state)
# ---- 流式输出 ----
async for msg, last in stream_printing_messages(
agents=[agent],
coroutine_task=agent(msgs),
):
yield msg, last
# ---- 保存 Agent 状态 ----
state = agent.state_dict()
await self.state_service.save_state(
user_id=user_id,
session_id=session_id,
state=state,
)
async def main():
"""以独立进程模式部署应用"""
deployment_info = await app.deploy(
LocalDeployManager(host="{{.HostBinding}}", port={{.DeploymentPort}}),
mode=DeploymentMode.DETACHED_PROCESS,
)
url = deployment_info['url']
print(f"✅ 部署成功:{url}")
print(f"📍 部署 ID{deployment_info['deploy_id']}")
print(
f"""
Check health: curl {url}/health
Shutdown: curl -X POST {url}/admin/shutdown
"""
)
print(f"🌟 You can deploy it to Higress by using: hgctl agent add {url}")
return deployment_info
if __name__ == "__main__":
init_toolkit_sync()
asyncio.run(main())

View File

@@ -0,0 +1,69 @@
import os
import asyncio
from agentscope.tool import Toolkit
from agentscope.tool import execute_shell_command
from agentscope.tool import view_text_file
from agentscope.tool import write_text_file
from agentscope.tool import insert_text_file
from agentscope.tool import dashscope_text_to_image
from agentscope.tool import dashscope_text_to_audio
from agentscope.tool import dashscope_image_to_text
from agentscope.tool import openai_text_to_image
from agentscope.tool import openai_text_to_audio
from agentscope.tool import openai_edit_image
from agentscope.tool import openai_create_image_variation
from agentscope.tool import openai_image_to_text
from agentscope.tool import openai_audio_to_text
from agentscope.tool import execute_python_code
from agentscope.mcp import HttpStatelessClient
toolkit = Toolkit()
def _register_tools():
{{range .AvailableTools}}
toolkit.register_tool_function({{.}})
{{else}}
pass
{{end}}
def init_toolkit_sync():
_register_tools()
asyncio.run(register_all_MCP(toolkit))
async def init_toolkit_async():
_register_tools()
await register_all_MCP(toolkit)
async def register_single_MCP(toolkit: Toolkit, mcp_config):
"""注册单个MCP服务器"""
headers = mcp_config.get("Headers") or None
api_client = HttpStatelessClient(
name=mcp_config["Name"],
transport=mcp_config["Transport"],
url=mcp_config["URL"],
headers=headers,
)
await toolkit.register_mcp_client(api_client)
async def register_all_MCP(toolkit: Toolkit):
"""注册所有配置的MCP服务器"""
{{- range .MCPServers }}
await register_single_MCP(toolkit, {
"Name": "{{ .Name }}",
"URL": "{{ .URL }}",
"Transport": "{{ .Transport }}",
"Headers": {
{{- range $key, $value := .Headers }}
"{{ $key }}": "{{ $value }}",
{{- end }}
}
})
{{- end }}

View File

@@ -15,9 +15,11 @@
package manifests
import (
"bytes"
"embed"
"io/fs"
"os"
"path/filepath"
)
// FS embeds the manifests
@@ -25,6 +27,7 @@ import (
//go:embed profiles/*
//go:embed gatewayapi/*
//go:embed istiobase/*
//go:embed agent/*
var FS embed.FS
// BuiltinOrDir returns a FS for the provided directory. If no directory is passed, the compiled in
@@ -35,3 +38,39 @@ func BuiltinOrDir(dir string) fs.FS {
}
return os.DirFS(dir)
}
// This funciton will write the embed sourceDir's files to target dir
func ExtractEmbedFiles(fsys fs.FS, srcDir, targetDir string) error {
return fs.WalkDir(fsys, srcDir, func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
}
relDir, err := filepath.Rel(srcDir, path)
if err != nil {
return err
}
targetPath := filepath.Join(targetDir, relDir)
if d.IsDir() {
return os.MkdirAll(targetPath, 0755)
}
data, err := fs.ReadFile(fsys, path)
if err != nil {
return err
}
// if this file already exists, then return
existing, err := os.ReadFile(targetPath)
if err == nil {
if bytes.Equal(existing, data) {
return nil
}
} else if !os.IsNotExist(err) {
return err
}
return os.WriteFile(targetPath, data, 0644)
})
}

79
hgctl/pkg/util/env.go Normal file
View File

@@ -0,0 +1,79 @@
// Copyright (c) 2025 Alibaba Group Holding Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package util
import (
"fmt"
"os/exec"
"regexp"
"strconv"
"strings"
)
func GetPythonVersion() (string, error) {
re := regexp.MustCompile(`\d+\.\d+(\.\d+)?`)
for _, cmd := range []string{"python3", "python"} {
out, err := exec.Command(cmd, "--version").CombinedOutput()
if err != nil {
continue
}
version := strings.TrimSpace(string(out))
match := re.FindString(version)
if match != "" {
return match, nil
}
}
return "", fmt.Errorf("python not found")
}
// compareVersions compares two version strings like "3.11.2" and "3.10".
// Returns:
//
// 1 if v1 > v2
// 0 if v1 == v2
// -1 if v1 < v2
func CompareVersions(v1, v2 string) int {
// Extract numeric parts only (e.g. "3.12.0b1" → "3.12.0")
re := regexp.MustCompile(`\d+`)
nums1 := re.FindAllString(v1, -1)
nums2 := re.FindAllString(v2, -1)
maxLen := len(nums1)
if len(nums2) > maxLen {
maxLen = len(nums2)
}
// Compare each part
for i := 0; i < maxLen; i++ {
var n1, n2 int
if i < len(nums1) {
n1, _ = strconv.Atoi(nums1[i])
}
if i < len(nums2) {
n2, _ = strconv.Atoi(nums2[i])
}
if n1 > n2 {
return 1
} else if n1 < n2 {
return -1
}
}
return 0
}

View File

@@ -16,9 +16,11 @@ package util
import (
"bufio"
"errors"
"fmt"
"net/url"
"os"
"path/filepath"
"strconv"
"strings"
)
@@ -93,3 +95,33 @@ func WriteFileString(fileName string, content string, perm os.FileMode) error {
writer.Flush()
return nil
}
// This function return ~/.hgctl file_path string (Currently Linux only)
func GetHomeHgctlDir() string {
homeDir, _ := os.UserHomeDir()
targetDir := filepath.Join(homeDir, ".hgctl")
return targetDir
}
func GetSpecificAgentDir(name string) (string, error) {
homeDir, err := os.UserHomeDir()
if err != nil {
return "", fmt.Errorf("failed to get user home directory: %w", err)
}
targetDir := filepath.Join(homeDir, ".hgctl", "agents", name)
info, err := os.Stat(targetDir)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return "", fmt.Errorf("agent %q does not exist", name)
}
return "", fmt.Errorf("failed to stat agent directory %q: %w", targetDir, err)
}
if !info.IsDir() {
return "", fmt.Errorf("agent %q exists but is not a directory", name)
}
return targetDir, nil
}

View File

@@ -0,0 +1,286 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/alibaba/higress/plugins/golang-filter v0.0.0-20251023035326-7ea739292dea h1:zYuxhFl/lzqit1uFtcpBeQ0Kh04gaN8FA7E+BX6V578=
github.com/alibaba/higress/plugins/golang-filter v0.0.0-20251023035326-7ea739292dea/go.mod h1:3NCLt4YCMYb36plgT9tRByKn745Ides3/CQa7LExZeU=
github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6 h1:eIf+iGJxdU4U9ypaUfbtOWCsZSbTb8AUHvyPrxu6mAA=
github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6/go.mod h1:4EUIoxs/do24zMOGGqYVWgw0s9NtiylnJglOeEB5UJo=
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4/go.mod h1:sCavSAvdzOjul4cEqeVtvlSaSScfNsTQ+46HwlTL1hc=
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 h1:zE8vH9C7JiZLNJJQ5OwjU9mSi4T9ef9u3BURT6LCLC8=
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5/go.mod h1:tWnyE9AjF8J8qqLk645oUmVUnFybApTQWklQmi5tY6g=
github.com/alibabacloud-go/bailian-20231229/v2 v2.5.0 h1:myzy70veUKDtqsYy9UolLp1IBtnAZEtHfAD1hSsSb9c=
github.com/alibabacloud-go/bailian-20231229/v2 v2.5.0/go.mod h1:37WyXVadzh8Uh0qv78PlhUim9UwxWUhQNwJUYPm4tgs=
github.com/alibabacloud-go/darabonba-array v0.1.0 h1:vR8s7b1fWAQIjEjWnuF0JiKsCvclSRTfDzZHTYqfufY=
github.com/alibabacloud-go/darabonba-array v0.1.0/go.mod h1:BLKxr0brnggqOJPqT09DFJ8g3fsDshapUD3C3aOEFaI=
github.com/alibabacloud-go/darabonba-encode-util v0.0.2 h1:1uJGrbsGEVqWcWxrS9MyC2NG0Ax+GpOM5gtupki31XE=
github.com/alibabacloud-go/darabonba-encode-util v0.0.2/go.mod h1:JiW9higWHYXm7F4PKuMgEUETNZasrDM6vqVr/Can7H8=
github.com/alibabacloud-go/darabonba-map v0.0.2 h1:qvPnGB4+dJbJIxOOfawxzF3hzMnIpjmafa0qOTp6udc=
github.com/alibabacloud-go/darabonba-map v0.0.2/go.mod h1:28AJaX8FOE/ym8OUFWga+MtEzBunJwQGceGQlvaPGPc=
github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12/go.mod h1:f2wDpbM7hK9SvLIH09zSKVU1TsyemUNOqErMscMMl7c=
github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.13 h1:Q00FU3H94Ts0ZIHDmY+fYGgB7dV9D/YX6FGsgorQPgw=
github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.13/go.mod h1:lxFGfobinVsQ49ntjpgWghXmIF0/Sm4+wvBJ1h5RtaE=
github.com/alibabacloud-go/darabonba-signature-util v0.0.7 h1:UzCnKvsjPFzApvODDNEYqBHMFt1w98wC7FOo0InLyxg=
github.com/alibabacloud-go/darabonba-signature-util v0.0.7/go.mod h1:oUzCYV2fcCH797xKdL6BDH8ADIHlzrtKVjeRtunBNTQ=
github.com/alibabacloud-go/darabonba-string v1.0.2 h1:E714wms5ibdzCqGeYJ9JCFywE5nDyvIXIIQbZVFkkqo=
github.com/alibabacloud-go/darabonba-string v1.0.2/go.mod h1:93cTfV3vuPhhEwGGpKKqhVW4jLe7tDpo3LUM0i0g6mA=
github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68/go.mod h1:6pb/Qy8c+lqua8cFpEy7g39NRRqOWc3rOwAy8m5Y2BY=
github.com/alibabacloud-go/debug v1.0.0/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc=
github.com/alibabacloud-go/debug v1.0.1 h1:MsW9SmUtbb1Fnt3ieC6NNZi6aEwrXfDksD4QA6GSbPg=
github.com/alibabacloud-go/debug v1.0.1/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc=
github.com/alibabacloud-go/endpoint-util v1.1.0 h1:r/4D3VSw888XGaeNpP994zDUaxdgTSHBbVfZlzf6b5Q=
github.com/alibabacloud-go/endpoint-util v1.1.0/go.mod h1:O5FuCALmCKs2Ff7JFJMudHs0I5EBgecXXxZRyswlEjE=
github.com/alibabacloud-go/openapi-util v0.1.0 h1:0z75cIULkDrdEhkLWgi9tnLe+KhAFE/r5Pb3312/eAY=
github.com/alibabacloud-go/openapi-util v0.1.0/go.mod h1:sQuElr4ywwFRlCCberQwKRFhRzIyG4QTP/P4y1CJ6Ws=
github.com/alibabacloud-go/tea v1.1.0/go.mod h1:IkGyUSX4Ba1V+k4pCtJUc6jDpZLFph9QMy2VUPTwukg=
github.com/alibabacloud-go/tea v1.1.7/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4=
github.com/alibabacloud-go/tea v1.1.8/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4=
github.com/alibabacloud-go/tea v1.1.11/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4=
github.com/alibabacloud-go/tea v1.1.17/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A=
github.com/alibabacloud-go/tea v1.1.20/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A=
github.com/alibabacloud-go/tea v1.2.2/go.mod h1:CF3vOzEMAG+bR4WOql8gc2G9H3EkH3ZLAQdpmpXMgwk=
github.com/alibabacloud-go/tea v1.3.12/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg=
github.com/alibabacloud-go/tea v1.3.13 h1:WhGy6LIXaMbBM6VBYcsDCz6K/TPsT1Ri2hPmmZffZ94=
github.com/alibabacloud-go/tea v1.3.13/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg=
github.com/alibabacloud-go/tea-utils v1.3.1/go.mod h1:EI/o33aBfj3hETm4RLiAxF/ThQdSngxrpF8rKUDJjPE=
github.com/alibabacloud-go/tea-utils v1.4.4 h1:lxCDvNCdTo9FaXKKq45+4vGETQUKNOW/qKTcX9Sk53o=
github.com/alibabacloud-go/tea-utils v1.4.4/go.mod h1:KNcT0oXlZZxOXINnZBs6YvgOd5aYp9U67G+E3R8fcQw=
github.com/alibabacloud-go/tea-utils/v2 v2.0.5/go.mod h1:dL6vbUT35E4F4bFTHL845eUloqaerYBYPsdWR2/jhe4=
github.com/alibabacloud-go/tea-utils/v2 v2.0.7 h1:WDx5qW3Xa5ZgJ1c8NfqJkF6w+AU5wB8835UdhPr6Ax0=
github.com/alibabacloud-go/tea-utils/v2 v2.0.7/go.mod h1:qxn986l+q33J5VkialKMqT/TTs3E+U9MJpd001iWQ9I=
github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw=
github.com/aliyun/credentials-go v1.3.1/go.mod h1:8jKYhQuDawt8x2+fusqa1Y6mPxemTsBEN04dgcAcYz0=
github.com/aliyun/credentials-go v1.3.6/go.mod h1:1LxUuX7L5YrZUWzBrRyk0SwSdH4OmPrib8NVePL3fxM=
github.com/aliyun/credentials-go v1.4.5 h1:O76WYKgdy1oQYYiJkERjlA2dxGuvLRrzuO2ScrtGWSk=
github.com/aliyun/credentials-go v1.4.5/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyME=
github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/envoyproxy/envoy v1.36.2 h1:87+0C7ZCbGJdDfD9sVsvqGLVvGk2OIKuxzzm9oNpvDM=
github.com/envoyproxy/envoy v1.36.2/go.mod h1:mgMEye9tOlNiUTG+iYhQYgCzQcX46MMS0Jo6bVwRt1U=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
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-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/mark3labs/mcp-go v0.12.0 h1:Pue1Tdwqcz77GHq18uzgmLT3wmeDUxXUSAqSwhGLhVo=
github.com/mark3labs/mcp-go v0.12.0/go.mod h1:cjMlBU0cv/cj9kjlgmRhoJ5JREdS7YX83xeIG9Ko/jE=
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=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w=
github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho=
github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
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-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
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=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=