From c4a5a4d99bc6b35956113478c2adba17ae29e468 Mon Sep 17 00:00:00 2001 From: MaoMengww <1707647656@qq.com> Date: Sat, 7 Mar 2026 15:17:27 +0800 Subject: [PATCH] feat: support weaviate vectordb for knowledge retrieve --- .env.example | 22 +- docker-compose.yml | 35 + go.mod | 76 +- go.sum | 179 +-- .../retriever/weaviate/repository.go | 1052 +++++++++++++++++ .../repository/retriever/weaviate/structs.go | 31 + internal/container/container.go | 47 + internal/types/retriever.go | 1 + internal/types/tenant.go | 4 + 9 files changed, 1347 insertions(+), 100 deletions(-) create mode 100644 internal/application/repository/retriever/weaviate/repository.go create mode 100644 internal/application/repository/retriever/weaviate/structs.go diff --git a/.env.example b/.env.example index 39a0ae64..48112f4d 100644 --- a/.env.example +++ b/.env.example @@ -24,7 +24,7 @@ OLLAMA_BASE_URL=http://host.docker.internal:11434 # 主数据库类型(postgres/mysql) DB_DRIVER=postgres -# 向量存储类型(postgres/elasticsearch_v7/elasticsearch_v8/qdrant/milvus) +# 向量存储类型(postgres/elasticsearch_v7/elasticsearch_v8/qdrant/milvus/weaviate) RETRIEVE_DRIVER=postgres # 文件存储类型(local/minio/cos/tos) @@ -246,3 +246,23 @@ DOCREADER_ADDR=docreader:50051 # Docreader 连接方式 DOCREADER_TRANSPORT=grpc + +# 如果使用Weaviate作为向量存储,需要配置以下参数 +# 注意:容器内访问请使用 service:port(不要用 localhost,也不要用宿主机映射端口) +# Weaviate HTTP 地址(Docker 内:weaviate:8080;宿主机访问:localhost:9035) +# WEAVIATE_HOST=weaviate:8080 + +# Weaviate gRPC 地址(Docker 内:weaviate:50051;宿主机访问:localhost:50052) +# WEAVIATE_GRPC_ADDRESS=weaviate:50051 + +# Weaviate 架构模式 +# WEAVIATE_SCHEME=http + +# 是否开启认证(如果你在 weaviate 里启用了 APIKey/OIDC 认证,再把这里设为 true 并配置 WEAVIATE_API_KEY) +# WEAVIATE_AUTH_ENABLED=false + +# API Key(可选) +# WEAVIATE_API_KEY=your_secret_key + +# Weaviate 数据库名称(可选) +#WEAVIATE_COLLECTION=your_weaviate_db_name diff --git a/docker-compose.yml b/docker-compose.yml index 1b1f7d22..a15f266b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -86,6 +86,11 @@ services: - MILVUS_COLLECTION=${MILVUS_COLLECTION:-weknora_embeddings} - DOCREADER_ADDR=${DOCREADER_ADDR:-docreader:50051} - DOCREADER_TRANSPORT=${DOCREADER_TRANSPORT:-grpc} + - WEAVIATE_HOST=${WEAVIATE_HOST:-weaviate:8080} + - WEAVIATE_GRPC_ADDRESS=${WEAVIATE_GRPC_ADDRESS:-weaviate:50051} + - WEAVIATE_SCHEME=${WEAVIATE_SCHEME:-http} + - WEAVIATE_AUTH_ENABLED=${WEAVIATE_AUTH_ENABLED:-false} + - WEAVIATE_API_KEY=${WEAVIATE_API_KEY:-} - STORAGE_TYPE=${STORAGE_TYPE:-} - LOCAL_STORAGE_BASE_DIR=${LOCAL_STORAGE_BASE_DIR:-} - AUTO_RECOVER_DIRTY=${AUTO_RECOVER_DIRTY:-true} @@ -310,6 +315,35 @@ services: profiles: - milvus + weaviate: + image: semitechnologies/weaviate:1.28.4 + container_name: WeKnora-weaviate + environment: + - PERSISTENCE_DATA_PATH=/var/lib/weaviate + - CLUSTER_HOSTNAME=node1 + - DEFAULT_VECTORIZER_MODULE=none + - ENABLE_MODULES=none + - AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true + - CLUSTER_GOSSIP_BIND_PORT=7000 + - CLUSTER_DATA_BIND_PORT=7001 + - RAFT_BOOTSTRAP_EXPECT=1 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/v1/.well-known/live"] + interval: 30s + start_period: 90s + timeout: 20s + retries: 3 + ports: + - "9035:8080" + - "50052:50051" + volumes: + - weaviate_data:/var/lib/weaviate + networks: + - WeKnora-network + restart: unless-stopped + profiles: + - weaviate + networks: WeKnora-network: driver: bridge @@ -323,3 +357,4 @@ volumes: neo4j-data: qdrant_data: milvus_data: + weaviate_data: diff --git a/go.mod b/go.mod index 2331502c..9f8f2098 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/elastic/go-elasticsearch/v8 v8.18.0 github.com/gin-contrib/cors v1.7.5 github.com/gin-gonic/gin v1.11.0 + github.com/go-openapi/strfmt v0.25.0 github.com/go-viper/mapstructure/v2 v2.4.0 github.com/golang-jwt/jwt/v5 v5.3.0 github.com/golang-migrate/migrate/v4 v4.19.1 @@ -20,17 +21,17 @@ require ( github.com/hibiken/asynq v0.25.1 github.com/mark3labs/mcp-go v0.43.0 github.com/milvus-io/milvus/client/v2 v2.6.2 - github.com/minio/minio-go/v7 v7.0.90 + github.com/minio/minio-go/v7 v7.0.97 github.com/neo4j/neo4j-go-driver/v6 v6.0.0-alpha.1 github.com/ollama/ollama v0.11.4 github.com/panjf2000/ants/v2 v2.11.3 - github.com/parquet-go/parquet-go v0.25.0 + github.com/parquet-go/parquet-go v0.25.1 github.com/pganalyze/pg_query_go/v6 v6.1.0 github.com/pgvector/pgvector-go v0.3.0 github.com/qdrant/go-client v1.16.1 github.com/redis/go-redis/v9 v9.14.0 github.com/sashabaranov/go-openai v1.40.5 - github.com/sirupsen/logrus v1.9.3 + github.com/sirupsen/logrus v1.9.4 github.com/spf13/viper v1.20.1 github.com/stretchr/testify v1.11.1 github.com/swaggo/files v1.0.1 @@ -38,10 +39,12 @@ require ( github.com/swaggo/swag v1.16.6 github.com/tencentyun/cos-go-sdk-v5 v0.7.65 github.com/volcengine/ve-tos-golang-sdk/v2 v2.7.23 + github.com/weaviate/weaviate v1.33.0-rc.1 + github.com/weaviate/weaviate-go-client/v5 v5.5.0 github.com/yanyiwu/gojieba v1.4.5 go.opentelemetry.io/otel v1.38.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.35.0 go.opentelemetry.io/otel/sdk v1.38.0 go.opentelemetry.io/otel/trace v1.38.0 @@ -73,7 +76,7 @@ require ( github.com/bytedance/sonic v1.14.0 // indirect github.com/bytedance/sonic/loader v0.3.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cenkalti/backoff/v5 v5.0.2 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chromedp/cdproto v0.0.0-20250724212937-08a3db8b4327 // indirect github.com/chromedp/sysutil v1.1.0 // indirect @@ -85,7 +88,7 @@ require ( github.com/cockroachdb/redact v1.1.3 // indirect github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/coreos/go-semver v0.3.0 // indirect - github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/docker/go-units v0.5.0 // indirect @@ -104,17 +107,31 @@ require ( github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.8 // indirect - github.com/getsentry/sentry-go v0.12.0 // indirect + github.com/getsentry/sentry-go v0.30.0 // indirect github.com/gin-contrib/sse v1.1.0 // indirect github.com/go-ini/ini v1.67.0 // indirect github.com/go-json-experiment/json v0.0.0-20250725192818-e39067aee2d2 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-openapi/analysis v0.24.1 // indirect + github.com/go-openapi/errors v0.22.4 // indirect + github.com/go-openapi/jsonpointer v0.22.1 // indirect + github.com/go-openapi/jsonreference v0.21.3 // indirect + github.com/go-openapi/loads v0.23.2 // indirect + github.com/go-openapi/runtime v0.29.2 // indirect + github.com/go-openapi/spec v0.22.1 // indirect github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/swag/conv v0.25.1 // indirect + github.com/go-openapi/swag/fileutils v0.25.1 // indirect + github.com/go-openapi/swag/jsonname v0.25.1 // indirect + github.com/go-openapi/swag/jsonutils v0.25.1 // indirect + github.com/go-openapi/swag/loading v0.25.1 // indirect + github.com/go-openapi/swag/mangling v0.25.1 // indirect + github.com/go-openapi/swag/stringutils v0.25.1 // indirect + github.com/go-openapi/swag/typeutils v0.25.1 // indirect + github.com/go-openapi/swag/yamlutils v0.25.1 // indirect + github.com/go-openapi/validate v0.25.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.27.0 // indirect @@ -123,20 +140,20 @@ require ( github.com/gobwas/ws v1.4.0 // indirect github.com/goccy/go-json v0.10.5 // indirect github.com/goccy/go-yaml v1.18.0 // indirect - github.com/godbus/dbus/v5 v5.0.4 // indirect + github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/flatbuffers v25.9.23+incompatible // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/s2a-go v0.1.9 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.7 // indirect github.com/googleapis/gax-go/v2 v2.16.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect github.com/invopop/jsonschema v0.13.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect @@ -144,11 +161,12 @@ require ( github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect - github.com/jonboulle/clockwork v0.2.2 // indirect + github.com/jonboulle/clockwork v0.5.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.13-0.20220915233716-71ac16282d12 // indirect github.com/klauspost/compress v1.18.2 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect + github.com/klauspost/crc32 v1.3.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect @@ -156,31 +174,30 @@ require ( github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 // indirect github.com/mailru/easyjson v0.9.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mattn/go-sqlite3 v1.14.22 // indirect github.com/milvus-io/milvus-proto/go-api/v2 v2.6.8-0.20251223041313-25746c47c1a7 // indirect github.com/milvus-io/milvus/pkg/v2 v2.6.7-0.20251201120310-af64f2acba38 // indirect - github.com/minio/crc64nvme v1.0.1 // indirect + github.com/minio/crc64nvme v1.1.0 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mozillazg/go-httpheader v0.2.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/opencontainers/runtime-spec v1.0.2 // indirect + github.com/oklog/ulid v1.3.1 // indirect + github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/philhofer/fwd v1.2.0 // indirect github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_golang v1.20.5 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.65.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/quic-go/qpack v0.5.1 // indirect github.com/quic-go/quic-go v0.54.0 // indirect - github.com/rivo/uniseg v0.4.7 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rs/xid v1.6.0 // indirect @@ -191,13 +208,14 @@ require ( github.com/soheilhy/cmux v0.1.5 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/afero v1.12.0 // indirect + github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spf13/pflag v1.0.6 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tidwall/gjson v1.17.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect + github.com/tinylib/msgp v1.3.0 // indirect github.com/tklauser/go-sysconf v0.3.16 // indirect github.com/tklauser/numcpus v0.11.0 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect @@ -211,7 +229,7 @@ require ( github.com/yosida95/uritemplate/v3 v3.0.2 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect - go.etcd.io/bbolt v1.3.6 // indirect + go.etcd.io/bbolt v1.4.3 // indirect go.etcd.io/etcd/api/v3 v3.5.5 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect go.etcd.io/etcd/client/v2 v2.305.5 // indirect @@ -219,22 +237,24 @@ require ( go.etcd.io/etcd/pkg/v3 v3.5.5 // indirect go.etcd.io/etcd/raft/v3 v3.5.5 // indirect go.etcd.io/etcd/server/v3 v3.5.5 // indirect + go.mongodb.org/mongo-driver v1.17.6 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect - go.opentelemetry.io/proto/otlp v1.7.0 // indirect + go.opentelemetry.io/proto/otlp v1.7.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/mock v0.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/arch v0.20.0 // indirect golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 // indirect golang.org/x/mod v0.31.0 // indirect golang.org/x/net v0.48.0 // indirect golang.org/x/oauth2 v0.34.0 // indirect - golang.org/x/sys v0.39.0 // indirect + golang.org/x/sys v0.40.0 // indirect golang.org/x/telemetry v0.0.0-20251208220230-2638a1023523 // indirect golang.org/x/text v0.32.0 // indirect golang.org/x/time v0.14.0 // indirect diff --git a/go.sum b/go.sum index c645ed6d..aa648345 100644 --- a/go.sum +++ b/go.sum @@ -1352,8 +1352,6 @@ github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/goquery v1.10.3 h1:pFYcNSqHxBD06Fpj/KsbStFRsgRATgnf3LeXiUkhzPo= github.com/PuerkitoBio/goquery v1.10.3/go.mod h1:tMUX0zDMHXYlAQk6p35XxQMqMweEKB7iK7iLNd4RH4Y= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= @@ -1403,6 +1401,7 @@ github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/bazelbuild/rules_go v0.49.0/go.mod h1:Dhcz716Kqg1RHNWos+N6MlXNkjNP2EwZQ0LukRKJfMs= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -1426,8 +1425,8 @@ github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFos github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= 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.2 h1:rIfFVxEf1QsI7E1ZHfp/B4DF/6QBAUhmgkxc0H7Zss8= -github.com/cenkalti/backoff/v5 v5.0.2/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= +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/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= @@ -1504,8 +1503,9 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -1610,8 +1610,9 @@ github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3G github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/getsentry/sentry-go v0.12.0 h1:era7g0re5iY13bHSdN/xMkyV+5zZppjRVQhZrXCaEIk= github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= +github.com/getsentry/sentry-go v0.30.0 h1:lWUwDnY7sKHaVIoZ9wYqRHJ5iEmoc0pqcRqFkosKzBo= +github.com/getsentry/sentry-go v0.30.0/go.mod h1:WU9B9/1/sHDqeV8T+3VwwbjeR5MSXs/6aqG3mqZrezA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/cors v1.7.5 h1:cXC9SmofOrRg0w9PigwGlHG3ztswH6bqq4vJVXnvYMk= github.com/gin-contrib/cors v1.7.5/go.mod h1:4q3yi7xBEDDWKapjT2o1V7mScKDDr8k+jZ0fSquGoy0= @@ -1624,8 +1625,9 @@ github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/ github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk= github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -1659,21 +1661,50 @@ github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AE github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/analysis v0.24.1 h1:Xp+7Yn/KOnVWYG8d+hPksOYnCYImE3TieBa7rBOesYM= +github.com/go-openapi/analysis v0.24.1/go.mod h1:dU+qxX7QGU1rl7IYhBC8bIfmWQdX4Buoea4TGtxXY84= +github.com/go-openapi/errors v0.22.4 h1:oi2K9mHTOb5DPW2Zjdzs/NIvwi2N3fARKaTJLdNabaM= +github.com/go-openapi/errors v0.22.4/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= +github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= +github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= +github.com/go-openapi/jsonreference v0.21.3 h1:96Dn+MRPa0nYAR8DR1E03SblB5FJvh7W6krPI0Z7qMc= +github.com/go-openapi/jsonreference v0.21.3/go.mod h1:RqkUP0MrLf37HqxZxrIAtTWW4ZJIK1VzduhXYBEeGc4= +github.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4= +github.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY= +github.com/go-openapi/runtime v0.29.2 h1:UmwSGWNmWQqKm1c2MGgXVpC2FTGwPDQeUsBMufc5Yj0= +github.com/go-openapi/runtime v0.29.2/go.mod h1:biq5kJXRJKBJxTDJXAa00DOTa/anflQPhT0/wmjuy+0= +github.com/go-openapi/spec v0.22.1 h1:beZMa5AVQzRspNjvhe5aG1/XyBSMeX1eEOs7dMoXh/k= +github.com/go-openapi/spec v0.22.1/go.mod h1:c7aeIQT175dVowfp7FeCvXXnjN/MrpaONStibD2WtDA= +github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= +github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/swag/conv v0.25.1 h1:+9o8YUg6QuqqBM5X6rYL/p1dpWeZRhoIt9x7CCP+he0= +github.com/go-openapi/swag/conv v0.25.1/go.mod h1:Z1mFEGPfyIKPu0806khI3zF+/EUXde+fdeksUl2NiDs= +github.com/go-openapi/swag/fileutils v0.25.1 h1:rSRXapjQequt7kqalKXdcpIegIShhTPXx7yw0kek2uU= +github.com/go-openapi/swag/fileutils v0.25.1/go.mod h1:+NXtt5xNZZqmpIpjqcujqojGFek9/w55b3ecmOdtg8M= +github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= +github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= +github.com/go-openapi/swag/jsonutils v0.25.1 h1:AihLHaD0brrkJoMqEZOBNzTLnk81Kg9cWr+SPtxtgl8= +github.com/go-openapi/swag/jsonutils v0.25.1/go.mod h1:JpEkAjxQXpiaHmRO04N1zE4qbUEg3b7Udll7AMGTNOo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1 h1:DSQGcdB6G0N9c/KhtpYc71PzzGEIc/fZ1no35x4/XBY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.1/go.mod h1:kjmweouyPwRUEYMSrbAidoLMGeJ5p6zdHi9BgZiqmsg= +github.com/go-openapi/swag/loading v0.25.1 h1:6OruqzjWoJyanZOim58iG2vj934TysYVptyaoXS24kw= +github.com/go-openapi/swag/loading v0.25.1/go.mod h1:xoIe2EG32NOYYbqxvXgPzne989bWvSNoWoyQVWEZicc= +github.com/go-openapi/swag/mangling v0.25.1 h1:XzILnLzhZPZNtmxKaz/2xIGPQsBsvmCjrJOWGNz/ync= +github.com/go-openapi/swag/mangling v0.25.1/go.mod h1:CdiMQ6pnfAgyQGSOIYnZkXvqhnnwOn997uXZMAd/7mQ= +github.com/go-openapi/swag/stringutils v0.25.1 h1:Xasqgjvk30eUe8VKdmyzKtjkVjeiXx1Iz0zDfMNpPbw= +github.com/go-openapi/swag/stringutils v0.25.1/go.mod h1:JLdSAq5169HaiDUbTvArA2yQxmgn4D6h4A+4HqVvAYg= +github.com/go-openapi/swag/typeutils v0.25.1 h1:rD/9HsEQieewNt6/k+JBwkxuAHktFtH3I3ysiFZqukA= +github.com/go-openapi/swag/typeutils v0.25.1/go.mod h1:9McMC/oCdS4BKwk2shEB7x17P6HmMmA6dQRtAkSnNb8= +github.com/go-openapi/swag/yamlutils v0.25.1 h1:mry5ez8joJwzvMbaTGLhw8pXUnhDK91oSJLDPF1bmGk= +github.com/go-openapi/swag/yamlutils v0.25.1/go.mod h1:cm9ywbzncy3y6uPm/97ysW8+wZ09qsks+9RS8fLWKqg= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw= +github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pg/pg/v10 v10.11.0 h1:CMKJqLgTrfpE/aOVeLdybezR2om071Vh38OLZjsyMI0= @@ -1712,8 +1743,9 @@ github.com/goccy/go-yaml v1.9.8/go.mod h1:JubOolP3gh0HpiBc4BLRD4YmjEjHAmIIB2aaXK github.com/goccy/go-yaml v1.11.0/go.mod h1:H+mJrWtjPTJAHvRbV09MCK9xYwODM+wRTVFFTWckfng= github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw= github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= -github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -1780,8 +1812,8 @@ github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85q github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +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/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/flatbuffers v25.9.23+incompatible h1:rGZKv+wOb6QPzIdkM2KxhBZCDrA0DeN6DNmRDrqIsQU= @@ -1887,8 +1919,9 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +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/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -1897,8 +1930,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= 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.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90= +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/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -1955,8 +1988,9 @@ github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +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/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -2000,6 +2034,8 @@ github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8t github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/klauspost/crc32 v1.3.0 h1:sSmTt3gUt81RP655XGZPElI0PelVTZ6YwCRnPSupoFM= +github.com/klauspost/crc32 v1.3.0/go.mod h1:D7kQaZhnkX/Y0tstFGf8VUzv2UofNGqCjnC3zdHB0Hw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -2034,10 +2070,6 @@ github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLO github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mark3labs/mcp-go v0.43.0 h1:lgiKcWMddh4sngbU+hoWOZ9iAe/qp/m851RQpj3Y7jA= @@ -2059,9 +2091,6 @@ github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= -github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= @@ -2082,12 +2111,12 @@ github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpsp github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= -github.com/minio/crc64nvme v1.0.1 h1:DHQPrYPdqK7jQG/Ls5CTBZWeex/2FMS3G5XGkycuFrY= -github.com/minio/crc64nvme v1.0.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg= +github.com/minio/crc64nvme v1.1.0 h1:e/tAguZ+4cw32D+IO/8GSf5UVr9y+3eJcxZI2WOO/7Q= +github.com/minio/crc64nvme v1.1.0/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.90 h1:TmSj1083wtAD0kEYTx7a5pFsv3iRYMsOJ6A4crjA1lE= -github.com/minio/minio-go/v7 v7.0.90/go.mod h1:uvMUcGrpgeSAAI6+sD3818508nUyMULw94j2Nxku/Go= +github.com/minio/minio-go/v7 v7.0.97 h1:lqhREPyfgHTB/ciX8k2r8k0D93WaFqxbJX36UZq5occ= +github.com/minio/minio-go/v7 v7.0.97/go.mod h1:re5VXuo0pwEtoNLsNuSr0RrLfT/MBtohwdaSmPPSRSk= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -2125,10 +2154,8 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neo4j/neo4j-go-driver/v6 v6.0.0-alpha.1 h1:nV3ZdYJTi73jel0mm3dpWumNY3i3nwyo25y69SPGwyg= github.com/neo4j/neo4j-go-driver/v6 v6.0.0-alpha.1/go.mod h1:hzSTfNfM31p1uRSzL1F/BAYOgaiTarE6OAQBajfsm+I= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/ollama/ollama v0.11.4 h1:6xLYLEPTKtw6N20qQecyEL/rrBktPO4o5U05cnvkSmI= github.com/ollama/ollama v0.11.4/go.mod h1:9+1//yWPsDE2u+l1a5mpaKrYw4VdnSsRU3ioq5BvMms= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -2138,15 +2165,15 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= -github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= +github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde h1:x0TT0RDC7UhAVbbWWBzr41ElhJx5tXPWkIHA2HWPRuw= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= github.com/panjf2000/ants/v2 v2.11.3 h1:AfI0ngBoXJmYOpDh9m516vjqoUu2sLrIVgppI9TZVpg= github.com/panjf2000/ants/v2 v2.11.3/go.mod h1:8u92CYMUc6gyvTIw8Ru7Mt7+/ESnJahz5EVtqfrilek= -github.com/parquet-go/parquet-go v0.25.0 h1:GwKy11MuF+al/lV6nUsFw8w8HCiPOSAx1/y8yFxjH5c= -github.com/parquet-go/parquet-go v0.25.0/go.mod h1:OqBBRGBl7+llplCvDMql8dEKaDqjaFA/VAPw+OJiNiw= +github.com/parquet-go/parquet-go v0.25.1 h1:l7jJwNM0xrk0cnIIptWMtnSnuxRkwq53S+Po3KG8Xgo= +github.com/parquet-go/parquet-go v0.25.1/go.mod h1:AXBuotO1XiBtcqJb/FKFyjBG4aqa3aQAAWF3ZPzCanY= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= @@ -2155,6 +2182,8 @@ github.com/pganalyze/pg_query_go/v6 v6.1.0 h1:jG5ZLhcVgL1FAw4C/0VNQaVmX1SUJx71wB github.com/pganalyze/pg_query_go/v6 v6.1.0/go.mod h1:nvTHIuoud6e1SfrUaFwHqT0i4b5Nr+1rPWVds3B5+50= github.com/pgvector/pgvector-go v0.3.0 h1:Ij+Yt78R//uYqs3Zk35evZFvr+G0blW0OUN+Q2D1RWc= github.com/pgvector/pgvector-go v0.3.0/go.mod h1:duFy+PXWfW7QQd5ibqutBO4GxLsUZ9RVXhFZGIBsWSA= +github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM= +github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= @@ -2197,15 +2226,15 @@ github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3d github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +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/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -2226,9 +2255,6 @@ github.com/remeh/sizedwaitgroup v1.0.0 h1:VNGGFwNo/R5+MJBf6yrsr110p0m4/OX4S3DCy7 github.com/remeh/sizedwaitgroup v1.0.0/go.mod h1:3j2R4OIe/SeS6YDhICBy22RWjJC5eNCJ1V+9+NVNYlo= 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= -github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= -github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -2274,8 +2300,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -2291,8 +2317,8 @@ github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY52 github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= -github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= +github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= @@ -2352,6 +2378,8 @@ github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tinylib/msgp v1.3.0 h1:ULuf7GPooDaIlbyvgAxBV/FI7ynli6LZ1/nVUNu+0ww= +github.com/tinylib/msgp v1.3.0/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA= github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI= @@ -2389,14 +2417,18 @@ github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+ github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vmihailenco/bufpool v0.1.11 h1:gOq2WmBrq0i2yW5QJ16ykccQ4wH9UyEsgLm6czKAd94= github.com/vmihailenco/bufpool v0.1.11/go.mod h1:AFf/MOy3l2CFTKbxwt0mp2MwnqjNEs5H/UxrkA5jxTQ= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/volcengine/ve-tos-golang-sdk/v2 v2.7.23 h1:PvDvNKGXNNH8arQZRdu0zpwkaatXjkJQTiAmI3H8njA= github.com/volcengine/ve-tos-golang-sdk/v2 v2.7.23/go.mod h1:IrjK84IJJTuOZOTMv/P18Ydjy/x+ow7fF7q11jAxXLM= +github.com/weaviate/weaviate v1.33.0-rc.1 h1:3Kol9BmA9JOj1I4vOkz0tu4A87K3dKVAnr8k8DMhBs8= +github.com/weaviate/weaviate v1.33.0-rc.1/go.mod h1:MmHF/hZDL0I8j0qAMEa9/TS4ISLaYlIp1Bc3e/n3eUU= +github.com/weaviate/weaviate-go-client/v5 v5.5.0 h1:+5qkHodrL3/Qc7kXvMXnDaIxSBN5+djivLqzmCx7VS4= +github.com/weaviate/weaviate-go-client/v5 v5.5.0/go.mod h1:Zdm2MEXG27I0Nf6fM0FZ3P2vLR4JM0iJZrOxwc+Zj34= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -2435,8 +2467,9 @@ github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo= +go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E= go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= @@ -2451,6 +2484,8 @@ go.etcd.io/etcd/raft/v3 v3.5.5 h1:Ibz6XyZ60OYyRopu73lLM/P+qco3YtlZMOhnXNS051I= go.etcd.io/etcd/raft/v3 v3.5.5/go.mod h1:76TA48q03g1y1VpTue92jZLr9lIHKUNcYdZOOGyx8rI= go.etcd.io/etcd/server/v3 v3.5.5 h1:jNjYm/9s+f9A9r6+SC4RvNaz6AqixpOvhrFdT0PvIj0= go.etcd.io/etcd/server/v3 v3.5.5/go.mod h1:rZ95vDw/jrvsbj9XpTqPrTAB9/kzchVdhRirySPkUBc= +go.mongodb.org/mongo-driver v1.17.6 h1:87JUG1wZfWsr6rIz3ZmpH90rL5tea7O3IHuSwHUpsss= +go.mongodb.org/mongo-driver v1.17.6/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -2483,11 +2518,11 @@ go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7 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.0.1/go.mod h1:Kv8liBeVNFkkkbilbgWRpV+wWuu+H5xdOT6HAgd30iw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 h1:Ahq7pZmv87yiyn3jeFz/LekZmPLLdKejuO3NcK9MssM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0/go.mod h1:MJTqhM0im3mRLw1i8uGHnCvUEeS7VwRyxlLC78PA18M= +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.0.1/go.mod h1:xOvWoTOrQjxjW61xtOmD/WKGRYb/P4NzRo3bs65U6Rk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 h1:EtFWSnwW9hGObjkIdmlnWSydO+Qs8OwzfzXLUPg4xOc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0/go.mod h1:QjUEoiGCPkvFZ/MjK6ZZfNOS6mfVEVKYE99dFhuN2LI= +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/stdout/stdouttrace v1.35.0 h1:T0Ec2E+3YZf5bgTNQVet8iTDW7oIk03tXHq+wkwIDnE= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.35.0/go.mod h1:30v2gqH+vYGJsesLWFov8u47EpYTcIQcBjKpI6pJThg= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= @@ -2526,8 +2561,8 @@ go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSs go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.opentelemetry.io/proto/otlp v1.7.0 h1:jX1VolD6nHuFzOYso2E73H85i92Mv8JQYk0K9vz09os= -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.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= @@ -2536,6 +2571,7 @@ go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/dig v1.18.1 h1:rLww6NuajVjeQn+49u5NcezUJEGwd5uXmyoCKW2g5Es= go.uber.org/dig v1.18.1/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= @@ -2546,8 +2582,11 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +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/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/arch v0.20.0 h1:dx1zTU0MAE98U+TQ8BLl7XsJbgze2WnNKF/8tGp/Q6c= golang.org/x/arch v0.20.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -2706,7 +2745,6 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -2880,7 +2918,6 @@ golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2897,6 +2934,7 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2946,8 +2984,8 @@ golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= -golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.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/telemetry v0.0.0-20251208220230-2638a1023523 h1:H52Mhyrc44wBgLTGzq6+0cmuVuF3LURCSXsLMOqfFos= @@ -3042,6 +3080,7 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -3552,7 +3591,6 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 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= @@ -3581,7 +3619,6 @@ 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.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/application/repository/retriever/weaviate/repository.go b/internal/application/repository/retriever/weaviate/repository.go new file mode 100644 index 00000000..f03c2784 --- /dev/null +++ b/internal/application/repository/retriever/weaviate/repository.go @@ -0,0 +1,1052 @@ +package weaviate + +import ( + "context" + "fmt" + "maps" + "os" + "slices" + "strings" + "unicode/utf8" + + "github.com/Tencent/WeKnora/internal/logger" + "github.com/Tencent/WeKnora/internal/types" + "github.com/Tencent/WeKnora/internal/types/interfaces" + "github.com/go-openapi/strfmt" + "github.com/google/uuid" + "github.com/weaviate/weaviate-go-client/v5/weaviate" + "github.com/weaviate/weaviate-go-client/v5/weaviate/filters" + "github.com/weaviate/weaviate-go-client/v5/weaviate/graphql" + "github.com/weaviate/weaviate/entities/models" +) + +const ( + envWeaviateCollection = "WEAVIATE_COLLECTION" + defaultCollectionName = "Weknora_embeddings" + fieldContent = "content" + fieldSourceID = "source_id" + fieldSourceType = "source_type" + fieldChunkID = "chunk_id" + fieldKnowledgeID = "knowledge_id" + fieldKnowledgeBaseID = "knowledge_base_id" + fieldTagID = "tag_id" + fieldEmbedding = "embedding" + fieldIsEnabled = "is_enabled" + fieldID = "id" +) + +func NewWeaviateRetrieveEngineRepository(client *weaviate.Client) interfaces.RetrieveEngineRepository { + log := logger.GetLogger(context.Background()) + log.Info("[Weaviate] Initializing Weaviate retriever engine repository") + + collectionBaseName := os.Getenv(envWeaviateCollection) + if collectionBaseName == "" { + log.Warn("[Weaviate] WEAVIATE_COLLECTION environment variable not set, using default collection name") + collectionBaseName = defaultCollectionName + } + + res := &weaviateRepository{ + client: client, + collectionBaseName: collectionBaseName, + } + + log.Info("[Weaviate] Successfully initialized repository") + return res +} + +func (w *weaviateRepository) getCollectionName(dimension int) string { + return fmt.Sprintf("%s_%d", w.collectionBaseName, dimension) +} + +func (w *weaviateRepository) ensureCollection(ctx context.Context, dimension int) error { + collectionName := w.getCollectionName(dimension) + + //Check cache first + if _, ok := w.initializedCollections.Load(dimension); ok { + return nil + } + + log := logger.GetLogger(ctx) + + //Check if collection exists + exists, err := w.client.Schema().ClassExistenceChecker().WithClassName(collectionName).Do(ctx) + if err != nil { + log.Errorf("[Weaviate] Failed to check collection existence: %v", err) + return fmt.Errorf("failed to check collection existence: %w", err) + } + enabled := true + if !exists { + log.Infof("[Weaviate] Creating collection %s with dimension %d", collectionName, dimension) + + //定义class结构 + classObj := models.Class{ + Class: collectionName, + Description: fmt.Sprintf("WeKnora embeddings collection with dimension %d", dimension), + VectorConfig: map[string]models.VectorConfig{ + fieldEmbedding: { + VectorIndexType: "hnsw", + VectorIndexConfig: map[string]interface{}{ + "distance": "cosine", + "efConstruction": 128, + "maxConnections": 32, + "ef": 64, + }, + Vectorizer: map[string]interface{}{ + "none": map[string]interface{}{}, + }, + }, + }, + Properties: []*models.Property{ + { + Name: fieldContent, + DataType: []string{"text"}, + Tokenization: "word", + }, + { + Name: fieldSourceID, + DataType: []string{"text"}, + }, + { + Name: fieldSourceType, + DataType: []string{"int"}, + }, + { + Name: fieldChunkID, + DataType: []string{"text"}, + IndexFilterable: &enabled, + }, + { + Name: fieldKnowledgeID, + DataType: []string{"text"}, + IndexFilterable: &enabled, + }, + { + Name: fieldKnowledgeBaseID, + DataType: []string{"text"}, + IndexFilterable: &enabled, + }, + { + Name: fieldTagID, + DataType: []string{"text"}, + IndexFilterable: &enabled, + }, + { + Name: fieldIsEnabled, + DataType: []string{"boolean"}, + IndexFilterable: &enabled, + }, + }, + } + //创建collection + if err = w.client.Schema().ClassCreator().WithClass(&classObj).Do(ctx); err != nil { + log.Errorf("[Weaviate] Failed to create collection: %v", err) + return fmt.Errorf("failed to create collection: %w", err) + } + log.Infof("[Weaviate] Successfully created collection %s", collectionName) + } + w.initializedCollections.Store(dimension, true) + return nil +} + +func (w *weaviateRepository) EngineType() types.RetrieverEngineType { + return types.WeaviateRetrieverEngineType +} + +func (w *weaviateRepository) Support() []types.RetrieverType { + return []types.RetrieverType{types.KeywordsRetrieverType, types.VectorRetrieverType} +} + +// EstimateStorageSize calculates the estimated storage size for a list of indices +func (w *weaviateRepository) EstimateStorageSize(ctx context.Context, + indexInfoList []*types.IndexInfo, params map[string]any, +) int64 { + var totalStorageSize int64 + for _, embedding := range indexInfoList { + embeddingDB := toWeaviateVectorEmbedding(embedding, params) + totalStorageSize += w.calculateStorageSize(embeddingDB) + } + logger.GetLogger(ctx).Infof( + "[Weaviate] Storage size for %d indices: %d bytes", len(indexInfoList), totalStorageSize, + ) + return totalStorageSize +} + +// Save stores a single point in Weaviate +func (w *weaviateRepository) Save(ctx context.Context, + embedding *types.IndexInfo, additionalParams map[string]any, +) error { + log := logger.GetLogger(ctx) + log.Debugf("[Weaviate] Saving index for chunk ID: %s", embedding.ChunkID) + + embeddingDB := toWeaviateVectorEmbedding(embedding, additionalParams) + if len(embeddingDB.Embedding) == 0 { + err := fmt.Errorf("empty embedding vector for chunk ID: %s", embedding.ChunkID) + log.Errorf("[Weaviate] %v", err) + return err + } + + dimension := len(embeddingDB.Embedding) + if err := w.ensureCollection(ctx, dimension); err != nil { + return err + } + collectionName := w.getCollectionName(dimension) + dataSchema := createPayload(embeddingDB) + + id := embedding.ChunkID + // Create point in Weaviate + _, err := w.client.Data().Creator(). + WithClassName(collectionName). + WithID(id). + WithProperties(dataSchema). + WithVector(embeddingDB.Embedding). + Do(ctx) + + if err != nil { + log.Errorf("[Weaviate] Failed to save index: %v", err) + return err + } + log.Infof("[Weaviate] Successfully saved index for chunk ID: %s", embedding.ChunkID) + return nil +} + +// BatchSave stores multiple points in Milvus using batch insert +func (w *weaviateRepository) BatchSave(ctx context.Context, + embeddingList []*types.IndexInfo, additionalParams map[string]any, +) error { + log := logger.GetLogger(ctx) + if len(embeddingList) == 0 { + log.Warn("[Weaviate] Empty list provided to BatchSave, skipping") + return nil + } + + log.Infof("[Weaviate] Batch saving %d indices", len(embeddingList)) + + // Group points by dimension + embeddingsByDimension := make(map[int][]*types.IndexInfo) + + for _, embedding := range embeddingList { + embeddingDB := toWeaviateVectorEmbedding(embedding, additionalParams) + if len(embeddingDB.Embedding) == 0 { + log.Warnf("[Weaviate] Skipping empty embedding for chunk ID: %s", embedding.ChunkID) + continue + } + + dimension := len(embeddingDB.Embedding) + embeddingsByDimension[dimension] = append(embeddingsByDimension[dimension], embedding) + log.Debugf("[Weaviate] Added chunk ID %s to batch request (dimension: %d)", embedding.ChunkID, dimension) + } + + if len(embeddingsByDimension) == 0 { + log.Warn("[Weaviate] No valid points to save after filtering") + return nil + } + + // Save points to each dimension-specific collection + totalSaved := 0 + for dimension, embeddings := range embeddingsByDimension { + batcher := w.client.Batch().ObjectsBatcher() + if err := w.ensureCollection(ctx, dimension); err != nil { + return err + } + collectionName := w.getCollectionName(dimension) + for _, embedding := range embeddings { + embeddingDB := toWeaviateVectorEmbedding(embedding, additionalParams) + dataSchema := createPayload(embeddingDB) + + obj := &models.Object{ + Class: collectionName, + ID: strfmt.UUID(embeddingDB.ChunkID), + Properties: dataSchema, + Vector: embeddingDB.Embedding, + } + batcher.WithObjects(obj) + } + // Flush batch + if _, err := batcher.Do(ctx); err != nil { + log.Errorf("[Weaviate] Failed to execute batch operation for dimension %d: %v", dimension, err) + return fmt.Errorf("failed to batch save (dimension %d): %w", dimension, err) + } + totalSaved += len(embeddings) + log.Infof("[Weaviate] Saved %d points to collection %s", len(embeddings), collectionName) + } + + log.Infof("[Weaviate] Successfully batch saved %d indices", totalSaved) + return nil +} + +// DeleteByChunkIDList removes points from the collection based on chunk IDs +func (w *weaviateRepository) DeleteByChunkIDList(ctx context.Context, chunkIDList []string, dimension int, knowledgeType string) error { + log := logger.GetLogger(ctx) + if len(chunkIDList) == 0 { + log.Warn("[Weaviate] Empty chunk ID list provided for deletion, skipping") + return nil + } + + collectionName := w.getCollectionName(dimension) + log.Infof("[Weaviate] Deleting indices by chunk IDs from %s, count: %d", collectionName, len(chunkIDList)) + + //define filter + filter := w.client.Batch().ObjectsBatchDeleter(). + WithClassName(collectionName). + WithWhere(filters.Where(). + WithPath([]string{fieldChunkID}). + WithOperator(filters.ContainsAny). + WithValueText(chunkIDList...)). + WithOutput("minimal") + + // Execute deletion + if _, err := filter.Do(ctx); err != nil { + log.Errorf("[Weaviate] Failed to delete by chunk IDs: %v", err) + return fmt.Errorf("failed to delete by chunk IDs: %w", err) + } + log.Infof("[Weaviate] Successfully deleted documents by chunk IDs") + return nil +} + +// DeleteByKnowledgeIDList removes points from the collection based on knowledge IDs +func (w *weaviateRepository) DeleteByKnowledgeIDList(ctx context.Context, + knowledgeIDList []string, dimension int, knowledgeType string, +) error { + log := logger.GetLogger(ctx) + if len(knowledgeIDList) == 0 { + log.Warn("[Weaviate] Empty knowledge ID list provided for deletion, skipping") + return nil + } + + collectionName := w.getCollectionName(dimension) + log.Infof("[Weaviate] Deleting indices by knowledge IDs from %s, count: %d", collectionName, len(knowledgeIDList)) + + //define filter + filter := w.client.Batch().ObjectsBatchDeleter(). + WithClassName(collectionName). + WithWhere(filters.Where(). + WithPath([]string{fieldKnowledgeID}). + WithOperator(filters.ContainsAny). + WithValueText(knowledgeIDList...)). + WithOutput("minimal") + + // Execute deletion + if _, err := filter.Do(ctx); err != nil { + log.Errorf("[Weaviate] Failed to delete by knowledge IDs: %v", err) + return fmt.Errorf("failed to delete by knowledge IDs: %w", err) + } + log.Infof("[Weaviate] Successfully deleted documents by knowledge IDs") + return nil +} + +// DeleteBySourceIDList removes points from the collection based on source IDs +func (w *weaviateRepository) DeleteBySourceIDList(ctx context.Context, + sourceIDList []string, dimension int, knowledgeType string, +) error { + log := logger.GetLogger(ctx) + if len(sourceIDList) == 0 { + log.Warn("[Weaviate] Empty Source ID list provided for deletion, skipping") + return nil + } + collectionName := w.getCollectionName(dimension) + log.Infof("[Weaviate] Deleting indices by source IDs from %s, count: %d", collectionName, len(sourceIDList)) + + //define filter + filter := w.client.Batch().ObjectsBatchDeleter(). + WithClassName(collectionName). + WithWhere(filters.Where(). + WithPath([]string{fieldSourceID}). + WithOperator(filters.ContainsAny). + WithValueText(sourceIDList...)). + WithOutput("minimal") + + // Execute deletion + if _, err := filter.Do(ctx); err != nil { + log.Errorf("[Weaviate] Failed to delete by source IDs: %v", err) + return fmt.Errorf("failed to delete by source IDs: %w", err) + } + log.Infof("[Weaviate] Successfully deleted documents by source IDs") + return nil +} + +// BatchUpdateChunkEnabledStatus updates the enabled status of chunks in batch +func (w *weaviateRepository) BatchUpdateChunkEnabledStatus(ctx context.Context, chunkStatusMap map[string]bool) error { + log := logger.GetLogger(ctx) + if len(chunkStatusMap) == 0 { + log.Warn("[Weaviate] Empty chunk status map provided, skipping") + return nil + } + + log.Infof("[Weaviate] Batch updating chunk enabled status, count: %d", len(chunkStatusMap)) + + // Get all collections + collections, err := w.ListCollections(ctx) + if err != nil { + log.Errorf("[Weaviate] Failed to list collections: %v", err) + return fmt.Errorf("failed to list collections: %w", err) + } + + // Update in all matching collections + for _, collectionName := range collections { + // Only process collections that start with our base name + if len(collectionName) <= len(w.collectionBaseName) || + collectionName[:len(w.collectionBaseName)] != w.collectionBaseName { + continue + } + for chunkID, enabled := range chunkStatusMap { + if err != nil { + log.Errorf("[Weaviate] Failed to search ID by chunk ID %s in %s: %v", chunkID, collectionName, err) + continue + } + err = w.client.Data().Updater(). + WithClassName(collectionName). + WithID(chunkID). + WithProperties(map[string]interface{}{ + fieldIsEnabled: enabled, + }). + Do(ctx) + + isEnabled := "enabled" + if !enabled { + isEnabled = "disabled" + } + + if err != nil { + log.Errorf("[Weaviate] Failed to update chunk %s status in %s: %v", isEnabled, collectionName, err) + continue + } + } + } + log.Infof("[Weaviate] Batch update chunk enabled status completed") + return nil +} + +// BatchUpdateChunkTagID updates the tag ID of chunks in batch +func (w *weaviateRepository) BatchUpdateChunkTagID(ctx context.Context, chunkTagMap map[string]string) error { + log := logger.GetLogger(ctx) + if len(chunkTagMap) == 0 { + log.Warn("[Weaviate] Empty chunk tag map provided, skipping") + return nil + } + + log.Infof("[Weaviate] Batch updating chunk tag ID, count: %d", len(chunkTagMap)) + + // Get all collections + collections, err := w.ListCollections(ctx) + if err != nil { + log.Errorf("[Weaviate] Failed to list collections: %w", err) + return fmt.Errorf("failed to list collections: %w", err) + } + + for _, collectionName := range collections { + // Only process collections that start with our base name + if len(collectionName) <= len(w.collectionBaseName) || + collectionName[:len(w.collectionBaseName)] != w.collectionBaseName { + continue + } + + for chunkID, tagID := range chunkTagMap { + if err != nil { + log.Warnf("[Weaviate] Failed to search ID by chunk ID %s in %s: %v", chunkID, collectionName, err) + continue + } + err = w.client.Data().Updater(). + WithClassName(collectionName). + WithID(chunkID). + WithProperties(map[string]interface{}{ + fieldTagID: tagID, + }). + Do(ctx) + if err != nil { + log.Warnf("[Weaviate] Failed to update chunk %s tag ID in %s: %v", chunkID, collectionName, err) + continue + } + } + } + log.Infof("[Weaviate] Batch update chunk tag ID completed") + return nil + +} + +func (w *weaviateRepository) getBaseFilter(params types.RetrieveParams) *filters.WhereBuilder { + var operands []*filters.WhereBuilder + operands = append(operands, filters.Where(). + WithPath([]string{fieldIsEnabled}). + WithOperator(filters.Equal). + WithValueBoolean(true)) + + if len(params.KnowledgeBaseIDs) > 0 { + operands = append(operands, filters.Where(). + WithPath([]string{fieldKnowledgeBaseID}). + WithOperator(filters.ContainsAny). + WithValueText(params.KnowledgeBaseIDs...)) + } + if len(params.KnowledgeIDs) > 0 { + operands = append(operands, filters.Where(). + WithPath([]string{fieldKnowledgeID}). + WithOperator(filters.ContainsAny). + WithValueText(params.KnowledgeIDs...)) + } + + if len(params.TagIDs) > 0 { + operands = append(operands, filters.Where(). + WithPath([]string{fieldTagID}). + WithOperator(filters.ContainsAny). + WithValueText(params.TagIDs...)) + } + if len(params.ExcludeKnowledgeIDs) > 0 { + operands = append(operands, filters.Where(). + WithPath([]string{fieldKnowledgeID}). + WithOperator(filters.NotEqual). + WithValueText(params.ExcludeKnowledgeIDs...)) + } + if len(params.ExcludeChunkIDs) > 0 { + operands = append(operands, filters.Where(). + WithPath([]string{fieldChunkID}). + WithOperator(filters.NotEqual). + WithValueText(params.ExcludeChunkIDs...)) + } + + return filters.Where(). + WithOperator(filters.And). + WithOperands(operands) +} + +// Retrieve dispatches the retrieval operation to the appropriate method based on retriever type +func (w *weaviateRepository) Retrieve(ctx context.Context, + params types.RetrieveParams, +) ([]*types.RetrieveResult, error) { + log := logger.GetLogger(ctx) + log.Debugf("[Weaviate] Processing retrieval request of type: %s", params.RetrieverType) + + switch params.RetrieverType { + case types.VectorRetrieverType: + return w.VectorRetrieve(ctx, params) + case types.KeywordsRetrieverType: + return w.KeywordsRetrieve(ctx, params) + } + + err := fmt.Errorf("invalid retriever type: %v", params.RetrieverType) + log.Errorf("[Weaviate] %v", err) + return nil, err +} + +// VectorRetrieve performs vector similarity search +func (w *weaviateRepository) VectorRetrieve(ctx context.Context, + params types.RetrieveParams, +) ([]*types.RetrieveResult, error) { + log := logger.GetLogger(ctx) + dimension := len(params.Embedding) + log.Infof("[Weaviate] Vector retrieval: dim=%d, topK=%d, threshold=%.4f", + dimension, params.TopK, params.Threshold) + + // Get collection name based on embedding dimension + collectionName := w.getCollectionName(dimension) + + // Check if collection exists + hasCollection, err := w.client.Schema().ClassExistenceChecker().WithClassName(collectionName).Do(ctx) + if err != nil { + log.Errorf("[Weaviate] Failed to check collection existence: %v", err) + return nil, fmt.Errorf("failed to check collection: %w", err) + } + if !hasCollection { + log.Warnf("[Weaviate] Collection %s does not exist, returning empty results", collectionName) + return buildRetrieveResult(nil, types.VectorRetrieverType), nil + } + + where := w.getBaseFilter(params) + limit := params.TopK + scoreThreshold := float32(params.Threshold) + fields := getEmbeddingFields() + result, err := w.client.GraphQL().Get().WithClassName(collectionName). + WithWhere(where). + WithLimit(limit). + WithFields(fields...). + WithNearVector(w.client.GraphQL().NearVectorArgBuilder(). + WithVector(params.Embedding). + WithCertainty(scoreThreshold)). + Do(ctx) + + if err != nil { + log.Errorf("[Weaviate] Vector search failed: %v", err) + return nil, fmt.Errorf("failed to search: %w", err) + } + if len(result.Errors) > 0 { + log.Errorf("[Weaviate] Vector search failed: %v", result.Errors) + return nil, fmt.Errorf("graphql search failed: %w", result.Errors[0].Message) + } + + data, ok := result.Data["Get"].(map[string]interface{}) + if !ok || data[collectionName] == nil { + log.Warnf("[Weaviate] No vector matches found that meet threshold %.4f", params.Threshold) + return buildRetrieveResult(nil, types.VectorRetrieverType), nil + } + items := data[collectionName].([]interface{}) + results := parseGraphQLResponse(items, collectionName, types.MatchTypeEmbedding) + + if len(results) == 0 { + log.Warnf("[Weaviate] No vector matches found that meet threshold %.4f", params.Threshold) + } else { + log.Infof("[Weaviate] Vector retrieval found %d results", len(results)) + log.Debugf("[Weaviate] Top result score: %.4f", results[0].Score) + } + + return buildRetrieveResult(results, types.VectorRetrieverType), nil +} + +// KeywordsRetrieve performs keyword-based search in document content +// This searches across all collections since keyword search doesn't depend on dimension +func (w *weaviateRepository) KeywordsRetrieve(ctx context.Context, + params types.RetrieveParams, +) ([]*types.RetrieveResult, error) { + log := logger.GetLogger(ctx) + log.Infof("[Weaviate] Performing keywords retrieval with query: %s, topK: %d", params.Query, params.TopK) + + // Get all collections that match our base name pattern + collections, err := w.ListCollections(ctx) + if err != nil { + log.Errorf("[Weaviate] Failed to list collections: %v", err) + return nil, fmt.Errorf("failed to list collections: %w", err) + } + + var allResults []*types.IndexWithScore + + for _, collectionName := range collections { + log.Debugf("[Weaviate] Checking collection: %s", collectionName) + // Only process collections that start with our base name + if len(collectionName) <= len(w.collectionBaseName) || + collectionName[:len(w.collectionBaseName)] != w.collectionBaseName { + log.Debugf("[Weaviate] Skipping collection %s (doesn't match base name %s)", collectionName, w.collectionBaseName) + continue + } + + filter := w.getBaseFilter(params) + + //bm25 search + bm25 := w.client.GraphQL().Bm25ArgBuilder(). + WithQuery(params.Query). + WithProperties([]string{fieldContent}...) + + fields := getKeywordsFields() + + result, err := w.client.GraphQL().Get().WithClassName(collectionName). + WithWhere(filter). + WithLimit(params.TopK). + WithFields(fields...). + WithBM25(bm25). + Do(ctx) + + if err != nil { + log.Errorf("[Weaviate] keywords search failed: %v", err) + return nil, fmt.Errorf("failed to search: %w", err) + } + if len(result.Errors) > 0 { + log.Errorf("[Weaviate] keywords search failed: %v", result.Errors) + return nil, fmt.Errorf("graphql search failed: %w", result.Errors[0].Message) + } + data, ok := result.Data["Get"].(map[string]interface{}) + if !ok || data[collectionName] == nil { + log.Warnf("[Weaviate] No keywords matches found that meet threshold %.4f", params.Threshold) + continue + } + items := data[collectionName].([]interface{}) + results := parseGraphQLResponse(items, collectionName, types.MatchTypeKeywords) + allResults = append(allResults, results...) + } + + // Limit results to topK + if len(allResults) > params.TopK { + allResults = allResults[:params.TopK] + } + + if len(allResults) == 0 { + log.Warnf("[Weaviate] No keyword matches found for query: %s", params.Query) + } else { + log.Infof("[Weaviate] Keywords retrieval found %d results", len(allResults)) + } + return buildRetrieveResult(allResults, types.KeywordsRetrieverType), nil +} + +// CopyIndices copies index data from source knowledge base to target knowledge base +func (w *weaviateRepository) CopyIndices(ctx context.Context, + sourceKnowledgeBaseID string, + sourceToTargetKBIDMap map[string]string, + sourceToTargetChunkIDMap map[string]string, + targetKnowledgeBaseID string, + dimension int, + knowledgeType string, +) error { + log := logger.GetLogger(ctx) + log.Infof("[Weaviate] Copying indices from %s to %s, count: %d", + sourceKnowledgeBaseID, targetKnowledgeBaseID, len(sourceToTargetChunkIDMap)) + + if len(sourceToTargetChunkIDMap) == 0 { + return nil + } + + collectionName := w.getCollectionName(dimension) + batchSize := 64 + var lastID string + totalCopied := 0 + fields := getVectorFields() + + for { + result, err := w.client.GraphQL().Get(). + WithClassName(collectionName). + WithWhere(filters.Where(). + WithPath([]string{fieldKnowledgeBaseID}). + WithOperator(filters.Equal). + WithValueString(sourceKnowledgeBaseID)). + WithLimit(batchSize). + WithFields(fields...). + WithAfter(lastID). + Do(ctx) + if err != nil { + log.Errorf("[Weaviate] Failed to query source points: %v", err) + return err + } + + objects, ok := result.Data["Get"].(map[string]interface{})[collectionName].([]interface{}) + if !ok || len(objects) == 0 { + break + } + log.Infof("[Weaviate] Found %d source points in batch", len(objects)) + + batcher := w.client.Batch().ObjectsBatcher() + currentBatchCount := 0 + + targetObjects := make([]*models.Object, 0, len(objects)) + for _, obj := range objects { + data, ok := obj.(map[string]interface{}) + if !ok { + continue + } + additional, ok := data["_additional"].(map[string]interface{}) + if !ok { + continue + } + + lastID = additional["id"].(string) + + sourceChunkID, ok := data[fieldChunkID].(string) + if !ok { + continue + } + sourceKnowledgeID, ok := data[fieldKnowledgeID].(string) + if !ok { + continue + } + originalSourceID, ok := data[fieldSourceID].(string) + if !ok { + continue + } + + targetChunkID, ok1 := sourceToTargetChunkIDMap[sourceChunkID] + targetKnowledgeID, ok2 := sourceToTargetKBIDMap[sourceKnowledgeID] + if !ok1 || !ok2 { + continue + } + + // Handle SourceID transformation for generated questions + // Generated questions have SourceID format: {chunkID}-{questionID} + // Regular chunks have SourceID == ChunkID + var targetSourceID string + if originalSourceID == sourceChunkID { + // Regular chunk, use targetChunkID as SourceID + targetSourceID = targetChunkID + } else if strings.HasPrefix(originalSourceID, sourceChunkID+"-") { + // This is a generated question, preserve the questionID part + questionID := strings.TrimPrefix(originalSourceID, sourceChunkID+"-") + targetSourceID = fmt.Sprintf("%s-%s", targetChunkID, questionID) + } else { + // For other complex scenarios, generate new unique SourceID + targetSourceID = uuid.New().String() + } + + vectorRaw, ok := additional["vector"].([]interface{}) + if !ok { + continue + } + vector := make([]float32, len(vectorRaw)) + for i, v := range vectorRaw { + vector[i] = float32(v.(float64)) + } + + isEnabled := true + newObj := &models.Object{ + Class: collectionName, + ID: strfmt.UUID(uuid.New().String()), + Properties: map[string]interface{}{ + fieldContent: data[fieldContent], + fieldSourceID: targetSourceID, + fieldSourceType: data[fieldSourceType], + fieldChunkID: targetChunkID, + fieldKnowledgeID: targetKnowledgeID, + fieldKnowledgeBaseID: targetKnowledgeBaseID, + fieldTagID: data[fieldTagID], + fieldIsEnabled: isEnabled, + }, + Vector: vector, + } + targetObjects = append(targetObjects, newObj) + currentBatchCount++ + } + if len(targetObjects) > 0 { + resp, err := batcher.WithObjects(targetObjects...).Do(ctx) + if err != nil { + return fmt.Errorf("batch upsert failed: %w", err) + } + for _, r := range resp { + if r.Result.Errors != nil { + log.Errorf("[Weaviate] Object error: %v", r.Result.Errors.Error[0].Message) + } + } + totalCopied += len(targetObjects) + log.Infof("[Weaviate] Successfully copied batch, total: %d", totalCopied) + } + } + log.Infof("[Weaviate] Index copy completed, total copied: %d", totalCopied) + return nil +} + +func (w *weaviateRepository) ListCollections(ctx context.Context) ([]string, error) { + schema, err := w.client.Schema().Getter().Do(ctx) + if err != nil { + return nil, fmt.Errorf("weaviate 获取 schema 失败: %w", err) + } + var collectionNames []string + for _, class := range schema.Classes { + collectionNames = append(collectionNames, class.Class) + } + + return collectionNames, nil +} + +func createPayload(embedding *WeaviateVectorEmbedding) map[string]interface{} { + payload := map[string]any{ + fieldContent: embedding.Content, + fieldSourceID: embedding.SourceID, + fieldSourceType: int64(embedding.SourceType), + fieldChunkID: embedding.ChunkID, + fieldKnowledgeID: embedding.KnowledgeID, + fieldKnowledgeBaseID: embedding.KnowledgeBaseID, + fieldTagID: embedding.TagID, + fieldIsEnabled: embedding.IsEnabled, + } + return payload +} + +func buildRetrieveResult(results []*types.IndexWithScore, retrieverType types.RetrieverType) []*types.RetrieveResult { + return []*types.RetrieveResult{ + { + Results: results, + RetrieverEngineType: types.WeaviateRetrieverEngineType, + RetrieverType: retrieverType, + Error: nil, + }, + } +} + +func getKeywordsFields() []graphql.Field { + return []graphql.Field{ + {Name: fieldContent}, + {Name: fieldSourceID}, + {Name: fieldSourceType}, + {Name: fieldChunkID}, + {Name: fieldKnowledgeID}, + {Name: fieldKnowledgeBaseID}, + {Name: fieldTagID}, + { + Name: "_additional", + Fields: []graphql.Field{ + {Name: "id"}, + {Name: "score"}, + }, + }, + } +} + +func getEmbeddingFields() []graphql.Field { + return []graphql.Field{ + {Name: fieldContent}, + {Name: fieldSourceID}, + {Name: fieldSourceType}, + {Name: fieldChunkID}, + {Name: fieldKnowledgeID}, + {Name: fieldKnowledgeBaseID}, + {Name: fieldTagID}, + { + Name: "_additional", + Fields: []graphql.Field{ + {Name: "id"}, + {Name: "certainty"}, + }, + }, + } +} + +func getVectorFields() []graphql.Field { + return []graphql.Field{ + {Name: fieldContent}, + {Name: fieldSourceID}, + {Name: fieldSourceType}, + {Name: fieldChunkID}, + {Name: fieldKnowledgeID}, + {Name: fieldKnowledgeBaseID}, + {Name: fieldTagID}, + { + Name: "_additional", + Fields: []graphql.Field{ + {Name: "id"}, + {Name: "vector"}, + }, + }, + } +} + +// parseGraphQLResponse parses the GraphQL response for vector embeddings or keyword search results. +func parseGraphQLResponse(items []interface{}, collectionName string, matchType types.MatchType) []*types.IndexWithScore { + var results []*types.IndexWithScore + var additionalName string + if matchType == types.MatchTypeEmbedding { + additionalName = "certainty" + } else { + additionalName = "score" + } + for _, item := range items { + obj := item.(map[string]interface{}) + additional := obj["_additional"].(map[string]interface{}) + + pointID := additional["id"].(string) + score := 0.0 + if s, ok := additional[additionalName].(float64); ok { + if matchType == types.MatchTypeKeywords { + score = 1.0 + } else { + score = s + } + } + + getString := func(key string) string { + if v, ok := obj[key].(string); ok { + return v + } + return "" + } + getInt := func(key string) int { + if v, ok := obj[key].(float64); ok { + return int(v) + } + return 0 + } + + embedding := &WeaviateVectorEmbeddingWithScore{ + WeaviateVectorEmbedding{ + Content: getString(fieldContent), + SourceID: getString(fieldSourceID), + SourceType: getInt(fieldSourceType), + ChunkID: getString(fieldChunkID), + KnowledgeID: getString(fieldKnowledgeID), + KnowledgeBaseID: getString(fieldKnowledgeBaseID), + TagID: getString(fieldTagID), + }, + float64(score), + } + + results = append(results, fromWeaviateVectorEmbedding(pointID, embedding, matchType)) + } + return results +} + +// Ref: https://github.com/weaviate/weaviate/blob/b4aec91c6fe464df50e9fa1e2d643322fbb85679/entities/vectorindex/hnsw/config.go#L27 +func (w *weaviateRepository) calculateStorageSize(embedding *WeaviateVectorEmbedding) int64 { + // Payload fields + payloadSizeBytes := int64(0) + payloadSizeBytes += int64(len(embedding.Content)) // content string + payloadSizeBytes += int64(len(embedding.SourceID)) // source_id string + payloadSizeBytes += int64(len(embedding.ChunkID)) // chunk_id string + payloadSizeBytes += int64(len(embedding.KnowledgeID)) // knowledge_id string + payloadSizeBytes += int64(len(embedding.KnowledgeBaseID)) // knowledge_base_id string + payloadSizeBytes += 8 // source_type int64 + + // Vector storage and index + var vectorSizeBytes int64 = 0 + var hnswIndexBytes int64 = 0 + if embedding.Embedding != nil { + dimensions := int64(len(embedding.Embedding)) + vectorSizeBytes = dimensions * 4 + + // HNSW index: dimensions × (M × 2) × 4 bytes + // Default M=32, so: dimensions × 64 × 4 = dimensions × 256 + const hnswM = 32 + hnswIndexBytes = dimensions * (hnswM * 2) * 4 + } + + // ID tracker metadata: 24 bytes per vector + // (forward refs + backward refs + version tracking = 8 + 8 + 8) + const idTrackerBytes int64 = 24 + + totalSizeBytes := payloadSizeBytes + vectorSizeBytes + hnswIndexBytes + idTrackerBytes + return totalSizeBytes +} + +// toWeaviateVectorEmbedding converts IndexInfo to Weaviate payload format +func toWeaviateVectorEmbedding(embedding *types.IndexInfo, additionalParams map[string]interface{}) *WeaviateVectorEmbedding { + vector := &WeaviateVectorEmbedding{ + Content: embedding.Content, + SourceID: embedding.SourceID, + SourceType: int(embedding.SourceType), + ChunkID: embedding.ChunkID, + KnowledgeID: embedding.KnowledgeID, + KnowledgeBaseID: embedding.KnowledgeBaseID, + TagID: embedding.TagID, + IsEnabled: embedding.IsEnabled, + } + if additionalParams != nil && slices.Contains(slices.Collect(maps.Keys(additionalParams)), fieldEmbedding) { + if embeddingMap, ok := additionalParams[fieldEmbedding].(map[string][]float32); ok { + vector.Embedding = embeddingMap[embedding.SourceID] + } + } + return vector +} + +// fromWeaviateVectorEmbedding converts Weaviate point to IndexWithScore domain model +func fromWeaviateVectorEmbedding(id string, + embedding *WeaviateVectorEmbeddingWithScore, + matchType types.MatchType, +) *types.IndexWithScore { + return &types.IndexWithScore{ + ID: id, + SourceID: embedding.SourceID, + SourceType: types.SourceType(embedding.SourceType), + ChunkID: embedding.ChunkID, + KnowledgeID: embedding.KnowledgeID, + KnowledgeBaseID: embedding.KnowledgeBaseID, + TagID: embedding.TagID, + Content: embedding.Content, + Score: embedding.Score, + MatchType: matchType, + } +} + +// tokenizeQuery splits a query string into tokens for OR-based full-text search. +// It uses jieba for professional Chinese word segmentation. +func tokenizeQuery(query string) []string { + query = strings.TrimSpace(query) + if query == "" { + return nil + } + + // Use jieba for segmentation (search mode for better recall) + words := types.Jieba.CutForSearch(query, true) + + // Filter and deduplicate + seen := make(map[string]bool) + result := make([]string, 0, len(words)) + for _, word := range words { + word = strings.TrimSpace(strings.ToLower(word)) + // Skip empty, single-char, and already seen words + if utf8.RuneCountInString(word) < 2 || seen[word] { + continue + } + seen[word] = true + result = append(result, word) + } + + return result +} diff --git a/internal/application/repository/retriever/weaviate/structs.go b/internal/application/repository/retriever/weaviate/structs.go new file mode 100644 index 00000000..ebc33638 --- /dev/null +++ b/internal/application/repository/retriever/weaviate/structs.go @@ -0,0 +1,31 @@ +package weaviate + +import ( + "sync" + + "github.com/weaviate/weaviate-go-client/v5/weaviate" +) + +type weaviateRepository struct { + client *weaviate.Client + collectionBaseName string + // Cache for initialized collections (dimension -> true) + initializedCollections sync.Map +} + +type WeaviateVectorEmbedding struct { + Content string `json:"content"` + SourceID string `json:"source_id"` + SourceType int `json:"source_type"` + ChunkID string `json:"chunk_id"` + KnowledgeID string `json:"knowledge_id"` + KnowledgeBaseID string `json:"knowledge_base_id"` + TagID string `json:"tag_id"` + Embedding []float32 `json:"embedding"` + IsEnabled bool `json:"is_enabled"` +} + +type WeaviateVectorEmbeddingWithScore struct { + WeaviateVectorEmbedding + Score float64 +} diff --git a/internal/container/container.go b/internal/container/container.go index 2a2e6648..6d64a50d 100644 --- a/internal/container/container.go +++ b/internal/container/container.go @@ -39,6 +39,7 @@ import ( postgresRepo "github.com/Tencent/WeKnora/internal/application/repository/retriever/postgres" qdrantRepo "github.com/Tencent/WeKnora/internal/application/repository/retriever/qdrant" sqliteRetrieverRepo "github.com/Tencent/WeKnora/internal/application/repository/retriever/sqlite" + weaviateRepo "github.com/Tencent/WeKnora/internal/application/repository/retriever/weaviate" "github.com/Tencent/WeKnora/internal/application/service" chatpipline "github.com/Tencent/WeKnora/internal/application/service/chat_pipline" "github.com/Tencent/WeKnora/internal/application/service/file" @@ -61,6 +62,9 @@ import ( "github.com/Tencent/WeKnora/internal/tracing" "github.com/Tencent/WeKnora/internal/types" "github.com/Tencent/WeKnora/internal/types/interfaces" + "github.com/weaviate/weaviate-go-client/v5/weaviate" + "github.com/weaviate/weaviate-go-client/v5/weaviate/auth" + wgrpc "github.com/weaviate/weaviate-go-client/v5/weaviate/grpc" ) // BuildContainer constructs the dependency injection container @@ -669,6 +673,49 @@ func initRetrieveEngineRegistry(db *gorm.DB, cfg *config.Config) (interfaces.Ret } } } + if slices.Contains(retrieveDriver, "weaviate") { + weaviateHost := os.Getenv("WEAVIATE_HOST") + if weaviateHost == "" { + // Docker compose default (service name inside network) + weaviateHost = "weaviate:8080" + } + weaviateGrpcAddress := os.Getenv("WEAVIATE_GRPC_ADDRESS") + if weaviateGrpcAddress == "" { + weaviateGrpcAddress = "weaviate:50051" + } + weaviateScheme := os.Getenv("WEAVIATE_SCHEME") + if weaviateScheme == "" { + weaviateScheme = "http" + } + var authConfig auth.Config + if strings.EqualFold(strings.TrimSpace(os.Getenv("WEAVIATE_AUTH_ENABLED")), "true") { + if apiKey := strings.TrimSpace(os.Getenv("WEAVIATE_API_KEY")); apiKey != "" { + authConfig = auth.ApiKey{Value: apiKey} + } + } + weaviateClient, err := weaviate.NewClient(weaviate.Config{ + Host: weaviateHost, + GrpcConfig: &wgrpc.Config{ + Host: weaviateGrpcAddress, + }, + Scheme: weaviateScheme, + AuthConfig: authConfig, + }) + if err != nil { + log.Errorf("Create weaviate client failed: %v", err) + } else { + weaviateRepository := weaviateRepo.NewWeaviateRetrieveEngineRepository(weaviateClient) + if err := registry.Register( + retriever.NewKVHybridRetrieveEngine( + weaviateRepository, types.WeaviateRetrieverEngineType, + ), + ); err != nil { + log.Errorf("Register weaviate retrieve engine failed: %v", err) + } else { + log.Infof("Register weaviate retrieve engine success") + } + } + } if slices.Contains(retrieveDriver, "milvus") { milvusCfg := milvusclient.ClientConfig{ DialOptions: []grpc.DialOption{grpc.WithTimeout(5 * time.Second)}, diff --git a/internal/types/retriever.go b/internal/types/retriever.go index 3cedeb62..60eeaba8 100644 --- a/internal/types/retriever.go +++ b/internal/types/retriever.go @@ -11,6 +11,7 @@ const ( ElasticFaissRetrieverEngineType RetrieverEngineType = "elasticfaiss" QdrantRetrieverEngineType RetrieverEngineType = "qdrant" MilvusRetrieverEngineType RetrieverEngineType = "milvus" + WeaviateRetrieverEngineType RetrieverEngineType = "weaviate" SQLiteRetrieverEngineType RetrieverEngineType = "sqlite" ) diff --git a/internal/types/tenant.go b/internal/types/tenant.go index a3c77b48..59e01db9 100644 --- a/internal/types/tenant.go +++ b/internal/types/tenant.go @@ -33,6 +33,10 @@ var retrieverEngineMapping = map[string][]RetrieverEngineParams{ {RetrieverType: VectorRetrieverType, RetrieverEngineType: MilvusRetrieverEngineType}, {RetrieverType: KeywordsRetrieverType, RetrieverEngineType: MilvusRetrieverEngineType}, }, + "weaviate": { + {RetrieverType: KeywordsRetrieverType, RetrieverEngineType: WeaviateRetrieverEngineType}, + {RetrieverType: VectorRetrieverType, RetrieverEngineType: WeaviateRetrieverEngineType}, + }, "sqlite": { {RetrieverType: KeywordsRetrieverType, RetrieverEngineType: SQLiteRetrieverEngineType}, {RetrieverType: VectorRetrieverType, RetrieverEngineType: SQLiteRetrieverEngineType},