A community based topic aggregation platform built on atproto

Merge pull request #1 from BrettM86/feature/lexicon-implementation

Feature/lexicon implementation

+144
cmd/validate-lexicon/main.go
···
···
+
package main
+
+
import (
+
"flag"
+
"fmt"
+
"log"
+
"os"
+
"path/filepath"
+
+
lexicon "github.com/bluesky-social/indigo/atproto/lexicon"
+
)
+
+
func main() {
+
var (
+
schemaPath = flag.String("path", "internal/atproto/lexicon", "Path to lexicon schemas directory")
+
verbose = flag.Bool("v", false, "Verbose output")
+
)
+
flag.Parse()
+
+
if *verbose {
+
log.SetFlags(log.LstdFlags | log.Lshortfile)
+
}
+
+
// Check if path exists
+
if _, err := os.Stat(*schemaPath); os.IsNotExist(err) {
+
log.Fatalf("Schema path does not exist: %s", *schemaPath)
+
}
+
+
// Create a new catalog
+
catalog := lexicon.NewBaseCatalog()
+
+
// Load all schemas from the directory
+
fmt.Printf("Loading schemas from: %s\n", *schemaPath)
+
if err := loadSchemasWithDebug(&catalog, *schemaPath, *verbose); err != nil {
+
log.Fatalf("Failed to load schemas: %v", err)
+
}
+
+
fmt.Printf("✅ Successfully loaded schemas from %s\n", *schemaPath)
+
+
// Validate schema structure by trying to resolve some known schemas
+
if err := validateSchemaStructure(&catalog, *schemaPath, *verbose); err != nil {
+
log.Fatalf("Schema validation failed: %v", err)
+
}
+
+
fmt.Println("✅ All schemas validated successfully!")
+
}
+
+
// validateSchemaStructure performs additional validation checks
+
func validateSchemaStructure(catalog *lexicon.BaseCatalog, schemaPath string, verbose bool) error {
+
var validationErrors []string
+
var schemaFiles []string
+
+
// Collect all JSON schema files
+
err := filepath.Walk(schemaPath, func(path string, info os.FileInfo, err error) error {
+
if err != nil {
+
return err
+
}
+
+
// Only process .json files
+
if !info.IsDir() && filepath.Ext(path) == ".json" {
+
schemaFiles = append(schemaFiles, path)
+
}
+
return nil
+
})
+
+
if err != nil {
+
return fmt.Errorf("error walking schema directory: %w", err)
+
}
+
+
if verbose {
+
fmt.Printf("\nFound %d schema files to validate:\n", len(schemaFiles))
+
for _, file := range schemaFiles {
+
fmt.Printf(" - %s\n", file)
+
}
+
}
+
+
// Try to resolve some of our expected schemas
+
expectedSchemas := []string{
+
"social.coves.actor.profile",
+
"social.coves.community.profile",
+
"social.coves.post.text",
+
"social.coves.richtext.markup",
+
}
+
+
if verbose {
+
fmt.Println("\nValidating key schemas:")
+
}
+
+
for _, schemaID := range expectedSchemas {
+
if _, err := catalog.Resolve(schemaID); err != nil {
+
validationErrors = append(validationErrors, fmt.Sprintf("Failed to resolve schema %s: %v", schemaID, err))
+
} else if verbose {
+
fmt.Printf(" ✅ %s\n", schemaID)
+
}
+
}
+
+
if len(validationErrors) > 0 {
+
fmt.Println("❌ Schema validation errors found:")
+
for _, errMsg := range validationErrors {
+
fmt.Printf(" %s\n", errMsg)
+
}
+
return fmt.Errorf("found %d validation errors", len(validationErrors))
+
}
+
+
return nil
+
}
+
+
// loadSchemasWithDebug loads schemas one by one to identify problematic files
+
func loadSchemasWithDebug(catalog *lexicon.BaseCatalog, schemaPath string, verbose bool) error {
+
var schemaFiles []string
+
+
// Collect all JSON schema files
+
err := filepath.Walk(schemaPath, func(path string, info os.FileInfo, err error) error {
+
if err != nil {
+
return err
+
}
+
+
// Only process .json files
+
if !info.IsDir() && filepath.Ext(path) == ".json" {
+
schemaFiles = append(schemaFiles, path)
+
}
+
return nil
+
})
+
+
if err != nil {
+
return fmt.Errorf("error walking schema directory: %w", err)
+
}
+
+
// Try to load schemas one by one
+
for _, schemaFile := range schemaFiles {
+
if verbose {
+
fmt.Printf(" Loading: %s\n", schemaFile)
+
}
+
+
// Create a temporary catalog for this file
+
tempCatalog := lexicon.NewBaseCatalog()
+
if err := tempCatalog.LoadDirectory(filepath.Dir(schemaFile)); err != nil {
+
return fmt.Errorf("failed to load schema file %s: %w", schemaFile, err)
+
}
+
}
+
+
// If all individual files loaded OK, try loading the whole directory
+
return catalog.LoadDirectory(schemaPath)
+
}
+59
go.mod
···
)
require (
github.com/mfridman/interpolate v0.0.2 // indirect
github.com/sethvargo/go-retry v0.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/sync v0.8.0 // indirect
)
···
)
require (
+
github.com/beorn7/perks v1.0.1 // indirect
+
github.com/bluesky-social/indigo v0.0.0-20250621010046-488d1b91889b // indirect
+
github.com/carlmjohnson/versioninfo v0.22.5 // indirect
+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
+
github.com/felixge/httpsnoop v1.0.4 // indirect
+
github.com/go-logr/logr v1.4.1 // indirect
+
github.com/go-logr/stdr v1.2.2 // indirect
+
github.com/gogo/protobuf v1.3.2 // indirect
+
github.com/google/uuid v1.6.0 // indirect
+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
+
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
+
github.com/hashicorp/golang-lru v1.0.2 // indirect
+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
+
github.com/ipfs/bbloom v0.0.4 // indirect
+
github.com/ipfs/go-block-format v0.2.0 // indirect
+
github.com/ipfs/go-cid v0.4.1 // indirect
+
github.com/ipfs/go-datastore v0.6.0 // indirect
+
github.com/ipfs/go-ipfs-blockstore v1.3.1 // indirect
+
github.com/ipfs/go-ipfs-ds-help v1.1.1 // indirect
+
github.com/ipfs/go-ipfs-util v0.0.3 // indirect
+
github.com/ipfs/go-ipld-cbor v0.1.0 // indirect
+
github.com/ipfs/go-ipld-format v0.6.0 // indirect
+
github.com/ipfs/go-log v1.0.5 // indirect
+
github.com/ipfs/go-log/v2 v2.5.1 // indirect
+
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
+
github.com/jbenet/goprocess v0.1.4 // indirect
+
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
+
github.com/mattn/go-isatty v0.0.20 // indirect
+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mfridman/interpolate v0.0.2 // indirect
+
github.com/minio/sha256-simd v1.0.1 // indirect
+
github.com/mr-tron/base58 v1.2.0 // indirect
+
github.com/multiformats/go-base32 v0.1.0 // indirect
+
github.com/multiformats/go-base36 v0.2.0 // indirect
+
github.com/multiformats/go-multibase v0.2.0 // indirect
+
github.com/multiformats/go-multihash v0.2.3 // indirect
+
github.com/multiformats/go-varint v0.0.7 // indirect
+
github.com/opentracing/opentracing-go v1.2.0 // indirect
+
github.com/polydawn/refmt v0.89.1-0.20221221234430-40501e09de1f // indirect
+
github.com/prometheus/client_golang v1.17.0 // indirect
+
github.com/prometheus/client_model v0.5.0 // indirect
+
github.com/prometheus/common v0.45.0 // indirect
+
github.com/prometheus/procfs v0.12.0 // indirect
+
github.com/rivo/uniseg v0.1.0 // indirect
github.com/sethvargo/go-retry v0.3.0 // indirect
+
github.com/spaolacci/murmur3 v1.1.0 // indirect
+
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e // indirect
+
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
+
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
+
go.opentelemetry.io/otel v1.26.0 // indirect
+
go.opentelemetry.io/otel/metric v1.26.0 // indirect
+
go.opentelemetry.io/otel/trace v1.26.0 // indirect
+
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
+
go.uber.org/zap v1.26.0 // indirect
+
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/sync v0.8.0 // indirect
+
golang.org/x/sys v0.25.0 // indirect
+
golang.org/x/time v0.3.0 // indirect
+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
+
google.golang.org/protobuf v1.33.0 // indirect
+
lukechampine.com/blake3 v1.2.1 // indirect
)
+205
go.sum
···
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/go-chi/chi/v5 v5.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8=
github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
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/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY=
github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pressly/goose/v3 v3.22.1 h1:2zICEfr1O3yTP9BRZMGPj7qFxQ+ik6yeo+z1LMuioLc=
github.com/pressly/goose/v3 v3.22.1/go.mod h1:xtMpbstWyCpyH+0cxLTMCENWBG+0CSxvTsXhW95d5eo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE=
github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI=
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4=
modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
···
+
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
+
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
+
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+
github.com/bluesky-social/indigo v0.0.0-20250621010046-488d1b91889b h1:QniihTdfvYFr8oJZgltN0VyWSWa28v/0DiIVFHy6nfg=
+
github.com/bluesky-social/indigo v0.0.0-20250621010046-488d1b91889b/go.mod h1:8FlFpF5cIq3DQG0kEHqyTkPV/5MDQoaWLcVwza5ZPJU=
+
github.com/carlmjohnson/versioninfo v0.22.5 h1:O00sjOLUAFxYQjlN/bzYTuZiS0y6fWDQjMRvwtKgwwc=
+
github.com/carlmjohnson/versioninfo v0.22.5/go.mod h1:QT9mph3wcVfISUKd0i9sZfVrPviHuSF+cUtLjm2WSf8=
+
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
+
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
+
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
+
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/go-chi/chi/v5 v5.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8=
github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
+
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
+
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
+
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
+
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
+
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
+
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
+
github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M=
+
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
+
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
+
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
+
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
+
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
+
github.com/ipfs/go-block-format v0.2.0 h1:ZqrkxBA2ICbDRbK8KJs/u0O3dlp6gmAuuXUJNiW1Ycs=
+
github.com/ipfs/go-block-format v0.2.0/go.mod h1:+jpL11nFx5A/SPpsoBn6Bzkra/zaArfSmsknbPMYgzM=
+
github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s=
+
github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk=
+
github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk=
+
github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8=
+
github.com/ipfs/go-ipfs-blockstore v1.3.1 h1:cEI9ci7V0sRNivqaOr0elDsamxXFxJMMMy7PTTDQNsQ=
+
github.com/ipfs/go-ipfs-blockstore v1.3.1/go.mod h1:KgtZyc9fq+P2xJUiCAzbRdhhqJHvsw8u2Dlqy2MyRTE=
+
github.com/ipfs/go-ipfs-ds-help v1.1.1 h1:B5UJOH52IbcfS56+Ul+sv8jnIV10lbjLF5eOO0C66Nw=
+
github.com/ipfs/go-ipfs-ds-help v1.1.1/go.mod h1:75vrVCkSdSFidJscs8n4W+77AtTpCIAdDGAwjitJMIo=
+
github.com/ipfs/go-ipfs-util v0.0.3 h1:2RFdGez6bu2ZlZdI+rWfIdbQb1KudQp3VGwPtdNCmE0=
+
github.com/ipfs/go-ipfs-util v0.0.3/go.mod h1:LHzG1a0Ig4G+iZ26UUOMjHd+lfM84LZCrn17xAKWBvs=
+
github.com/ipfs/go-ipld-cbor v0.1.0 h1:dx0nS0kILVivGhfWuB6dUpMa/LAwElHPw1yOGYopoYs=
+
github.com/ipfs/go-ipld-cbor v0.1.0/go.mod h1:U2aYlmVrJr2wsUBU67K4KgepApSZddGRDWBYR0H4sCk=
+
github.com/ipfs/go-ipld-format v0.6.0 h1:VEJlA2kQ3LqFSIm5Vu6eIlSxD/Ze90xtc4Meten1F5U=
+
github.com/ipfs/go-ipld-format v0.6.0/go.mod h1:g4QVMTn3marU3qXchwjpKPKgJv+zF+OlaKMyhJ4LHPg=
+
github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8=
+
github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo=
+
github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g=
+
github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY=
+
github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI=
+
github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg=
+
github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY=
+
github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA=
+
github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o=
+
github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4=
+
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
+
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
+
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
+
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
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/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
+
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY=
github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg=
+
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
+
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
+
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
+
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
+
github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE=
+
github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI=
+
github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0=
+
github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4=
+
github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g=
+
github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk=
+
github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U=
+
github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM=
+
github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8=
+
github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU=
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
+
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
+
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
+
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+
github.com/polydawn/refmt v0.89.1-0.20221221234430-40501e09de1f h1:VXTQfuJj9vKR4TCkEuWIckKvdHFeJH/huIFJ9/cXOB0=
+
github.com/polydawn/refmt v0.89.1-0.20221221234430-40501e09de1f/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw=
github.com/pressly/goose/v3 v3.22.1 h1:2zICEfr1O3yTP9BRZMGPj7qFxQ+ik6yeo+z1LMuioLc=
github.com/pressly/goose/v3 v3.22.1/go.mod h1:xtMpbstWyCpyH+0cxLTMCENWBG+0CSxvTsXhW95d5eo=
+
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
+
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
+
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
+
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
+
github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM=
+
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
+
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
+
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
+
github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY=
+
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
+
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE=
github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas=
+
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
+
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
+
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
+
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+
github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+
github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw=
+
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e h1:28X54ciEwwUxyHn9yrZfl5ojgF4CBNLWX7LR0rvBkf4=
+
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so=
+
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA=
+
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8=
+
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q=
+
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I=
+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24=
+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo=
+
go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs=
+
go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4=
+
go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30=
+
go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4=
+
go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA=
+
go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0=
+
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
+
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
+
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
+
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
+
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
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/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
+
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
+
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
+
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
+
go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so=
+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
+
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
+
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
+
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
+
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
+
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
+
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
+
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+
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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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=
+
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
+
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
+
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI=
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4=
modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
+67
internal/atproto/lexicon/social/coves/README.md
···
···
+
# Coves atProto Lexicon
+
+
This directory contains the atProto lexicon schemas for Coves, a federated forum platform built on the AT Protocol.
+
+
## Structure
+
+
### Actor (`social.coves.actor.*`)
+
- **profile**: User profile with verification status, federation info, location, moderation history, and violation tracking
+
- **subscription**: Records of communities a user wants to view content from
+
- **membership**: Records of communities where user has reputation
+
+
### Community (`social.coves.community.*`)
+
- **profile**: Community information including moderation type (moderator/sortition/hybrid)
+
- **rules**: Community rules, restrictions, and moderation configuration
+
- **wiki**: Community wiki pages with markdown content
+
+
### Post (`social.coves.post.*`)
+
- **text**: Text posts with optional markdown formatting
+
- **image**: Image posts supporting up to 10 images
+
- **video**: Video posts with thumbnail support
+
- **article**: Link posts with preview metadata
+
- **microblog**: Short-form posts from federated platforms (Bluesky, Mastodon)
+
+
### Interaction (`social.coves.interaction.*`)
+
- **vote**: Upvotes on posts or comments
+
- **tag**: Tags applied to content (helpful, spam, hostile, etc.)
+
- **comment**: Comments supporting text, images, or stickers
+
- **share**: Sharing posts to other communities or platforms
+
+
### Moderation (`social.coves.moderation.*`)
+
- **vote**: Votes on moderation proposals
+
- **tribunalVote**: Jury decisions in sortition-based moderation
+
- **ruleProposal**: Proposals to change community rules
+
+
### Embed (`social.coves.embed.*`)
+
- **image**: Reusable image embed with alt text
+
- **video**: Video embed with metadata
+
- **external**: External link previews
+
- **post**: Embedded/quoted posts
+
+
### Federation (`social.coves.federation.*`)
+
- **post**: Reference to original federated post with platform info
+
+
### RichText (`social.coves.richtext.*`)
+
- **markup**: Text formatting (bold, italic, code, strikethrough, spoiler)
+
- **mention**: User and community mentions
+
- **link**: Links within text content
+
+
## Key Features
+
+
1. **Federation Support**: Posts and users track their origin platform (Bluesky, Lemmy, Mastodon, etc.) with dedicated microblog post type for federated content
+
2. **Dual Relationship Model**: Separate subscription (viewing) from membership (reputation)
+
3. **Flexible Moderation**: Support for moderator-based, sortition-based, or hybrid systems
+
4. **Rich Content**: Support for various post types with embedded media
+
5. **Community Governance**: Democratic rule changes and moderator removal
+
6. **Privacy-First**: Viewing activity is not recorded; only active participation
+
7. **Content Safety**: NSFW flags and content labels (nsfw, violence, spoilers) for communities and posts
+
8. **Accountability**: User profiles track moderation history and rule violations across communities
+
+
## Usage
+
+
These schemas define the data structures for Coves. They follow atProto conventions:
+
- Records are stored in user repositories (except community records)
+
- Communities have their own DIDs and repositories
+
- All timestamps use RFC 3339 format
+
- Text fields support Unicode with grapheme limits
+
- References use AT-URIs for cross-repository linking
+33
internal/atproto/lexicon/social/coves/actor/block.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.actor.block",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A block relationship where one user blocks another",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["subject", "createdAt"],
+
"properties": {
+
"subject": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of the user being blocked"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the block was created"
+
},
+
"reason": {
+
"type": "string",
+
"maxGraphemes": 300,
+
"maxLength": 3000,
+
"description": "Optional reason for blocking"
+
}
+
}
+
}
+
}
+
}
+
}
+85
internal/atproto/lexicon/social/coves/actor/getSaved.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.actor.getSaved",
+
"defs": {
+
"main": {
+
"type": "procedure",
+
"description": "Get all saved posts and comments for the authenticated user",
+
"input": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"properties": {
+
"limit": {
+
"type": "integer",
+
"minimum": 1,
+
"maximum": 100,
+
"default": 50,
+
"description": "Number of items to return"
+
},
+
"cursor": {
+
"type": "string",
+
"description": "Cursor for pagination"
+
},
+
"type": {
+
"type": "string",
+
"enum": ["post", "comment"],
+
"description": "Filter by content type (optional)"
+
}
+
}
+
}
+
},
+
"output": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["savedItems"],
+
"properties": {
+
"savedItems": {
+
"type": "array",
+
"description": "All saved items for the user",
+
"items": {
+
"type": "ref",
+
"ref": "#savedItemView"
+
}
+
},
+
"cursor": {
+
"type": "string",
+
"description": "Cursor for next page"
+
}
+
}
+
}
+
}
+
},
+
"savedItemView": {
+
"type": "object",
+
"required": ["uri", "subject", "type", "savedAt"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the saved record"
+
},
+
"subject": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the saved post or comment"
+
},
+
"type": {
+
"type": "string",
+
"enum": ["post", "comment"],
+
"description": "Type of content that was saved"
+
},
+
"savedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the item was saved"
+
},
+
"note": {
+
"type": "string",
+
"description": "Optional note about why this was saved"
+
}
+
}
+
}
+
}
+
}
+38
internal/atproto/lexicon/social/coves/actor/membership.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.actor.membership",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "Membership in a community",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["community", "reputation", "createdAt", "createdAt"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community (DID-based)"
+
},
+
"reputation": {
+
"type": "integer",
+
"minimum": 0,
+
"default": 0,
+
"description": "Reputation score within the community"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the user's membership started"
+
},
+
"endedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the membership ended (null if current)"
+
}
+
}
+
}
+
}
+
}
+
}
+225
internal/atproto/lexicon/social/coves/actor/profile.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.actor.profile",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A user's profile information",
+
"key": "literal:self",
+
"record": {
+
"type": "object",
+
"required": ["handle", "createdAt"],
+
"properties": {
+
"handle": {
+
"type": "string",
+
"maxLength": 253,
+
"description": "User's handle"
+
},
+
"displayName": {
+
"type": "string",
+
"maxGraphemes": 64,
+
"maxLength": 640,
+
"description": "Optional display name"
+
},
+
"bio": {
+
"type": "string",
+
"maxGraphemes": 256,
+
"maxLength": 2560,
+
"description": "User bio with rich text support"
+
},
+
"bioMarkup": {
+
"type": "array",
+
"description": "Rich text annotations for bio",
+
"items": {
+
"type": "union",
+
"refs": [
+
"social.coves.richtext.markup",
+
"social.coves.richtext.mention",
+
"social.coves.richtext.link"
+
]
+
}
+
},
+
"avatar": {
+
"type": "blob",
+
"accept": ["image/png", "image/jpeg", "image/webp"],
+
"maxSize": 1000000
+
},
+
"banner": {
+
"type": "blob",
+
"accept": ["image/png", "image/jpeg", "image/webp"],
+
"maxSize": 2000000
+
},
+
"verified": {
+
"type": "boolean",
+
"default": false,
+
"description": "Whether the user has completed phone verification"
+
},
+
"verifiedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the user was verified"
+
},
+
"verificationExpiresAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When verification expires"
+
},
+
"federatedFrom": {
+
"type": "string",
+
"knownValues": ["bluesky", "lemmy", "mastodon", "coves"],
+
"description": "Platform user federated from"
+
},
+
"federatedIdentity": {
+
"type": "ref",
+
"ref": "#federatedIdentity",
+
"description": "Identity information from federated platform"
+
},
+
"location": {
+
"type": "ref",
+
"ref": "#geoLocation"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
},
+
"moderatedCommunities": {
+
"type": "array",
+
"description": "Communities the user currently moderates",
+
"items": {
+
"type": "string",
+
"format": "did"
+
}
+
},
+
"moderationHistory": {
+
"type": "array",
+
"description": "Historical record of all moderation roles",
+
"items": {
+
"type": "ref",
+
"ref": "#moderationRole"
+
}
+
},
+
"violations": {
+
"type": "array",
+
"description": "Record of rule violations across communities",
+
"items": {
+
"type": "ref",
+
"ref": "#violation"
+
}
+
}
+
}
+
}
+
},
+
"moderationRole": {
+
"type": "object",
+
"required": ["communityDid", "role", "startedAt"],
+
"properties": {
+
"communityDid": {
+
"type": "string",
+
"format": "did",
+
"description": "Community where moderation role was held"
+
},
+
"role": {
+
"type": "string",
+
"knownValues": ["moderator", "admin"],
+
"description": "Type of moderation role"
+
},
+
"startedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the role began"
+
},
+
"endedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the role ended (null if current)"
+
}
+
}
+
},
+
"violation": {
+
"type": "object",
+
"required": ["communityDid", "ruleViolated", "timestamp", "severity"],
+
"properties": {
+
"communityDid": {
+
"type": "string",
+
"format": "did",
+
"description": "Community where violation occurred"
+
},
+
"ruleViolated": {
+
"type": "string",
+
"description": "Description of the rule that was violated"
+
},
+
"timestamp": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the violation occurred"
+
},
+
"severity": {
+
"type": "string",
+
"knownValues": ["minor", "moderate", "major", "severe"],
+
"description": "Severity level of the violation"
+
},
+
"resolution": {
+
"type": "string",
+
"description": "How the violation was resolved"
+
},
+
"postUri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "Optional reference to the violating content"
+
}
+
}
+
},
+
"federatedIdentity": {
+
"type": "object",
+
"description": "Verified identity from a federated platform",
+
"required": ["did", "handle", "verifiedAt"],
+
"properties": {
+
"did": {
+
"type": "string",
+
"format": "did",
+
"description": "Original DID from the federated platform"
+
},
+
"handle": {
+
"type": "string",
+
"maxLength": 253,
+
"description": "Original handle from the federated platform"
+
},
+
"verifiedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the federated identity was verified via OAuth"
+
},
+
"lastSyncedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "Last time profile data was synced from the federated platform"
+
},
+
"homePDS": {
+
"type": "string",
+
"description": "Home PDS server URL for the federated account"
+
}
+
}
+
},
+
"geoLocation": {
+
"type": "object",
+
"description": "Geographic location information",
+
"properties": {
+
"country": {
+
"type": "string",
+
"maxLength": 2,
+
"description": "ISO 3166-1 alpha-2 country code"
+
},
+
"region": {
+
"type": "string",
+
"maxLength": 128,
+
"description": "State/province/region name"
+
},
+
"displayName": {
+
"type": "string",
+
"maxLength": 256,
+
"description": "Human-readable location name"
+
}
+
}
+
}
+
}
+
}
+37
internal/atproto/lexicon/social/coves/actor/saved.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.actor.saved",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A saved post or comment",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["subject", "type", "createdAt"],
+
"properties": {
+
"subject": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the post or comment being saved"
+
},
+
"type": {
+
"type": "string",
+
"enum": ["post", "comment"],
+
"description": "Type of content being saved"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the item was saved"
+
},
+
"note": {
+
"type": "string",
+
"maxLength": 300,
+
"description": "Optional note about why this was saved"
+
}
+
}
+
}
+
}
+
}
+
}
+32
internal/atproto/lexicon/social/coves/actor/subscription.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.actor.subscription",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A subscription to a community",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["community", "createdAt"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community (DID-based)"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the subscription started"
+
},
+
"endedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the subscription ended (null if current)"
+
}
+
}
+
}
+
}
+
}
+
}
+98
internal/atproto/lexicon/social/coves/community/profile.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.community.profile",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A community's profile information",
+
"key": "literal:self",
+
"record": {
+
"type": "object",
+
"required": ["name", "createdAt", "creator", "moderationType", "federatedFrom"],
+
"properties": {
+
"name": {
+
"type": "string",
+
"maxLength": 64,
+
"description": "Unique community name"
+
},
+
"displayName": {
+
"type": "string",
+
"maxGraphemes": 128,
+
"maxLength": 1280,
+
"description": "Display name for the community"
+
},
+
"description": {
+
"type": "string",
+
"maxGraphemes": 1000,
+
"maxLength": 10000,
+
"description": "Community description with rich text support"
+
},
+
"descriptionMarkup": {
+
"type": "array",
+
"description": "Rich text annotations for description",
+
"items": {
+
"type": "union",
+
"refs": [
+
"social.coves.richtext.markup",
+
"social.coves.richtext.mention",
+
"social.coves.richtext.link"
+
]
+
}
+
},
+
"avatar": {
+
"type": "blob",
+
"accept": ["image/png", "image/jpeg", "image/webp"],
+
"maxSize": 1000000
+
},
+
"banner": {
+
"type": "blob",
+
"accept": ["image/png", "image/jpeg", "image/webp"],
+
"maxSize": 2000000
+
},
+
"creator": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of the community creator"
+
},
+
"moderationType": {
+
"type": "string",
+
"knownValues": ["moderator", "sortition"],
+
"description": "Type of moderation system"
+
},
+
"contentWarnings": {
+
"type": "array",
+
"description": "Required content warnings for this community",
+
"items": {
+
"type": "string",
+
"knownValues": ["nsfw", "violence", "spoilers"],
+
"maxLength": 32
+
}
+
},
+
"memberCount": {
+
"type": "integer",
+
"minimum": 0,
+
"description": "Cached count of community members"
+
},
+
"subscriberCount": {
+
"type": "integer",
+
"minimum": 0,
+
"description": "Cached count of community subscribers"
+
},
+
"federatedFrom": {
+
"type": "string",
+
"knownValues": ["lemmy", "coves"],
+
"description": "Platform community originated from"
+
},
+
"federatedId": {
+
"type": "string",
+
"description": "Original ID on federated platform"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+186
internal/atproto/lexicon/social/coves/community/rules.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.community.rules",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "Community rules and configuration",
+
"key": "literal:self",
+
"record": {
+
"type": "object",
+
"properties": {
+
"postTypes": {
+
"type": "ref",
+
"ref": "#postTypeConfig"
+
},
+
"contentRestrictions": {
+
"type": "ref",
+
"ref": "#contentRestrictions"
+
},
+
"geoRestrictions": {
+
"type": "ref",
+
"ref": "#geoRestrictions"
+
},
+
"customTags": {
+
"type": "array",
+
"maxLength": 50,
+
"description": "Additional tags beyond predefined ones",
+
"items": {
+
"type": "string",
+
"maxLength": 32
+
}
+
},
+
"textRules": {
+
"type": "array",
+
"maxLength": 20,
+
"description": "Community-specific rules",
+
"items": {
+
"type": "ref",
+
"ref": "#rule"
+
}
+
},
+
"moderatorList": {
+
"type": "array",
+
"description": "DIDs of community moderators (if moderator-based)",
+
"items": {
+
"type": "string",
+
"format": "did"
+
}
+
},
+
"sortitionConfig": {
+
"type": "ref",
+
"ref": "#sortitionConfig",
+
"description": "Configuration for sortition-based moderation"
+
}
+
}
+
}
+
},
+
"postTypeConfig": {
+
"type": "object",
+
"description": "Allowed post types in the community",
+
"properties": {
+
"allowText": {
+
"type": "boolean",
+
"default": true,
+
"description": "Allow text posts"
+
},
+
"allowVideo": {
+
"type": "boolean",
+
"default": true,
+
"description": "Allow video posts"
+
},
+
"allowImage": {
+
"type": "boolean",
+
"default": true,
+
"description": "Allow image posts"
+
},
+
"allowArticle": {
+
"type": "boolean",
+
"default": true,
+
"description": "Allow Article posts"
+
}
+
}
+
},
+
"contentRestrictions": {
+
"type": "object",
+
"description": "Content filtering rules",
+
"properties": {
+
"blockedDomains": {
+
"type": "array",
+
"description": "Domains that cannot be linked",
+
"items": {
+
"type": "string"
+
}
+
},
+
"allowedDomains": {
+
"type": "array",
+
"description": "If set, only these domains can be linked",
+
"items": {
+
"type": "string"
+
}
+
}
+
}
+
},
+
"geoRestrictions": {
+
"type": "object",
+
"description": "Geographic posting restrictions",
+
"properties": {
+
"enabled": {
+
"type": "boolean",
+
"default": false
+
},
+
"allowedCountries": {
+
"type": "array",
+
"description": "ISO 3166-1 alpha-2 country codes",
+
"items": {
+
"type": "string",
+
"maxLength": 2
+
}
+
},
+
"allowedRegions": {
+
"type": "array",
+
"description": "Specific regions/states allowed",
+
"items": {
+
"type": "string"
+
}
+
}
+
}
+
},
+
"sortitionConfig": {
+
"type": "object",
+
"description": "Configuration for sortition-based moderation",
+
"properties": {
+
"tagThreshold": {
+
"type": "integer",
+
"minimum": 10,
+
"default": 15,
+
"description": "Number of tags needed to trigger action"
+
},
+
"tribunalThreshold": {
+
"type": "integer",
+
"minimum": 10,
+
"default": 30,
+
"description": "Number of tags to trigger tribunal review"
+
},
+
"jurySize": {
+
"type": "integer",
+
"minimum": 9,
+
"default": 9,
+
"description": "Number of jurors for tribunal"
+
}
+
}
+
},
+
"rule": {
+
"type": "object",
+
"description": "A text-based community rule for display purposes",
+
"required": ["title", "description", "createdAt", "isActive"],
+
"properties": {
+
"title": {
+
"type": "string",
+
"maxLength": 256,
+
"description": "Short rule title (e.g., 'No Editorialized Titles')"
+
},
+
"description": {
+
"type": "string",
+
"maxLength": 2000,
+
"description": "Detailed explanation of the rule"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the rule was created"
+
},
+
"isActive": {
+
"type": "boolean",
+
"default": true,
+
"description": "Whether the rule is currently active"
+
},
+
"disabledAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the rule was disabled (optional)"
+
}
+
}
+
}
+
}
+
}
+73
internal/atproto/lexicon/social/coves/community/wiki.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.community.wiki",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "Community wiki page",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["title", "content", "createdAt"],
+
"properties": {
+
"title": {
+
"type": "string",
+
"maxGraphemes": 128,
+
"maxLength": 512,
+
"description": "Wiki page title"
+
},
+
"slug": {
+
"type": "string",
+
"maxLength": 128,
+
"description": "URL-friendly page identifier"
+
},
+
"content": {
+
"type": "string",
+
"maxLength": 50000,
+
"description": "Markdown-formatted wiki content"
+
},
+
"lastEditedBy": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of the last editor"
+
},
+
"editHistory": {
+
"type": "array",
+
"description": "History of edits (stored separately for efficiency)",
+
"items": {
+
"type": "ref",
+
"ref": "#wikiEdit"
+
}
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
},
+
"updatedAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
},
+
"wikiEdit": {
+
"type": "object",
+
"required": ["editor", "timestamp"],
+
"properties": {
+
"editor": {
+
"type": "string",
+
"format": "did"
+
},
+
"timestamp": {
+
"type": "string",
+
"format": "datetime"
+
},
+
"summary": {
+
"type": "string",
+
"maxLength": 256,
+
"description": "Edit summary"
+
}
+
}
+
}
+
}
+
}
+38
internal/atproto/lexicon/social/coves/embed/external.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.embed.external",
+
"defs": {
+
"main": {
+
"type": "object",
+
"description": "External link embed with preview metadata",
+
"required": ["uri"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "uri",
+
"description": "URI of the external content"
+
},
+
"title": {
+
"type": "string",
+
"maxLength": 500,
+
"description": "Title of the linked content"
+
},
+
"description": {
+
"type": "string",
+
"maxLength": 1000,
+
"description": "Description or excerpt of the linked content"
+
},
+
"thumb": {
+
"type": "blob",
+
"accept": ["image/png", "image/jpeg", "image/webp"],
+
"maxSize": 1000000,
+
"description": "Thumbnail image for the link"
+
},
+
"domain": {
+
"type": "string",
+
"description": "Domain of the linked content"
+
}
+
}
+
}
+
}
+
}
+43
internal/atproto/lexicon/social/coves/embed/image.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.embed.image",
+
"defs": {
+
"main": {
+
"type": "object",
+
"description": "Image embed with metadata",
+
"required": ["image"],
+
"properties": {
+
"image": {
+
"type": "blob",
+
"accept": ["image/png", "image/jpeg", "image/webp", "image/gif"],
+
"maxSize": 10000000,
+
"description": "Image blob reference"
+
},
+
"alt": {
+
"type": "string",
+
"maxLength": 1000,
+
"description": "Alt text for accessibility"
+
},
+
"aspectRatio": {
+
"type": "ref",
+
"ref": "#aspectRatio"
+
}
+
}
+
},
+
"aspectRatio": {
+
"type": "object",
+
"description": "Image aspect ratio for client display",
+
"required": ["width", "height"],
+
"properties": {
+
"width": {
+
"type": "integer",
+
"minimum": 1
+
},
+
"height": {
+
"type": "integer",
+
"minimum": 1
+
}
+
}
+
}
+
}
+
}
+18
internal/atproto/lexicon/social/coves/embed/post.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.embed.post",
+
"defs": {
+
"main": {
+
"type": "object",
+
"description": "Embedded reference to another post",
+
"required": ["uri"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the post being embedded"
+
}
+
}
+
}
+
}
+
}
+39
internal/atproto/lexicon/social/coves/embed/video.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.embed.video",
+
"defs": {
+
"main": {
+
"type": "object",
+
"description": "Video embed with metadata",
+
"required": ["video"],
+
"properties": {
+
"video": {
+
"type": "blob",
+
"accept": ["video/mp4", "video/webm"],
+
"maxSize": 100000000,
+
"description": "Video blob reference"
+
},
+
"thumbnail": {
+
"type": "blob",
+
"accept": ["image/png", "image/jpeg", "image/webp"],
+
"maxSize": 1000000,
+
"description": "Video thumbnail image"
+
},
+
"alt": {
+
"type": "string",
+
"maxLength": 1000,
+
"description": "Alt text describing video content"
+
},
+
"duration": {
+
"type": "integer",
+
"minimum": 0,
+
"description": "Duration in seconds"
+
},
+
"aspectRatio": {
+
"type": "ref",
+
"ref": "social.coves.embed.image#aspectRatio"
+
}
+
}
+
}
+
}
+
}
+27
internal/atproto/lexicon/social/coves/federation/post.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.federation.post",
+
"defs": {
+
"main": {
+
"type": "object",
+
"description": "Reference to original federated post",
+
"required": ["platform"],
+
"properties": {
+
"platform": {
+
"type": "string",
+
"knownValues": ["bluesky", "lemmy", "mastodon"],
+
"description": "Platform the post originated from"
+
},
+
"uri": {
+
"type": "string",
+
"format": "uri",
+
"description": "Original URI of the post"
+
},
+
"id": {
+
"type": "string",
+
"description": "Platform-specific post ID"
+
}
+
}
+
}
+
}
+
}
+90
internal/atproto/lexicon/social/coves/interaction/comment.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.interaction.comment",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A comment on a post or another comment",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["subject", "content", "createdAt"],
+
"properties": {
+
"subject": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of post or comment being replied to"
+
},
+
"content": {
+
"type": "union",
+
"refs": ["#textContent", "#imageContent", "#stickerContent"]
+
},
+
"location": {
+
"type": "ref",
+
"ref": "social.coves.actor.profile#geoLocation"
+
},
+
"translatedFrom": {
+
"type": "string",
+
"maxLength": 10,
+
"description": "Language code if auto-translated (ISO 639-1)"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
},
+
"textContent": {
+
"type": "object",
+
"required": ["text"],
+
"properties": {
+
"text": {
+
"type": "string",
+
"maxLength": 10000,
+
"description": "Comment text"
+
},
+
"markup": {
+
"type": "array",
+
"description": "Rich text annotations",
+
"items": {
+
"type": "union",
+
"refs": [
+
"social.coves.richtext.markup",
+
"social.coves.richtext.mention",
+
"social.coves.richtext.link"
+
]
+
}
+
}
+
}
+
},
+
"imageContent": {
+
"type": "object",
+
"required": ["image"],
+
"properties": {
+
"image": {
+
"type": "ref",
+
"ref": "social.coves.embed.image"
+
},
+
"caption": {
+
"type": "string",
+
"maxLength": 1000
+
}
+
}
+
},
+
"stickerContent": {
+
"type": "object",
+
"required": ["stickerId"],
+
"properties": {
+
"stickerId": {
+
"type": "string",
+
"description": "Reference to a sticker in a sticker pack"
+
},
+
"stickerPackId": {
+
"type": "string",
+
"description": "Reference to the sticker pack"
+
}
+
}
+
}
+
}
+
}
+31
internal/atproto/lexicon/social/coves/interaction/share.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.interaction.share",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "Sharing a post to another community or platform",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["subject", "createdAt"],
+
"properties": {
+
"subject": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the post being shared"
+
},
+
"toCommunity": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "Community being shared to (if applicable)"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+31
internal/atproto/lexicon/social/coves/interaction/tag.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.interaction.tag",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A tag applied to a post or comment",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["subject", "tag", "createdAt"],
+
"properties": {
+
"subject": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the post or comment being tagged"
+
},
+
"tag": {
+
"type": "string",
+
"knownValues": ["helpful", "insightful", "spam", "hostile", "offtopic", "misleading"],
+
"description": "Predefined tag or custom community tag"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+26
internal/atproto/lexicon/social/coves/interaction/vote.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.interaction.vote",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "An upvote on a post or comment",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["subject", "createdAt"],
+
"properties": {
+
"subject": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the post or comment being voted on"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+76
internal/atproto/lexicon/social/coves/moderation/ban.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.moderation.ban",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A ban record for a user in a community",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["community", "subject", "banType", "reason", "createdAt"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community"
+
},
+
"subject": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of the banned user"
+
},
+
"banType": {
+
"type": "string",
+
"knownValues": ["moderator", "tribunal"],
+
"description": "How the ban was imposed"
+
},
+
"reason": {
+
"type": "string",
+
"maxLength": 2000,
+
"description": "Reason for the ban"
+
},
+
"duration": {
+
"type": "integer",
+
"minimum": 1,
+
"description": "Ban duration in hours (null for permanent)"
+
},
+
"bannedBy": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of moderator who issued ban (null for tribunal bans)"
+
},
+
"tribunalCase": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of tribunal case that resulted in ban"
+
},
+
"status": {
+
"type": "string",
+
"knownValues": ["active", "expired", "revoked"],
+
"default": "active"
+
},
+
"expiresAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the ban expires (null for permanent)"
+
},
+
"revokedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the ban was revoked"
+
},
+
"revokedBy": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of moderator who revoked the ban"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+70
internal/atproto/lexicon/social/coves/moderation/banUser.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.moderation.banUser",
+
"defs": {
+
"main": {
+
"type": "procedure",
+
"description": "Ban a user from a community (moderator action)",
+
"input": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["community", "subject", "reason"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community"
+
},
+
"subject": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of the user to ban"
+
},
+
"reason": {
+
"type": "string",
+
"maxLength": 2000,
+
"description": "Reason for the ban"
+
},
+
"duration": {
+
"type": "integer",
+
"minimum": 1,
+
"description": "Ban duration in hours (omit for permanent)"
+
}
+
}
+
}
+
},
+
"output": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["ban"],
+
"properties": {
+
"ban": {
+
"type": "ref",
+
"ref": "social.coves.moderation.ban"
+
}
+
}
+
}
+
},
+
"errors": [
+
{
+
"name": "NotAuthorized",
+
"description": "User is not authorized to ban users in this community"
+
},
+
{
+
"name": "UserNotFound",
+
"description": "Target user does not exist"
+
},
+
{
+
"name": "CommunityNotFound",
+
"description": "Community does not exist"
+
},
+
{
+
"name": "AlreadyBanned",
+
"description": "User is already banned from this community"
+
}
+
]
+
}
+
}
+
}
+54
internal/atproto/lexicon/social/coves/moderation/getBanStatus.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.moderation.getBanStatus",
+
"defs": {
+
"main": {
+
"type": "query",
+
"description": "Check if a user is banned from a community",
+
"parameters": {
+
"type": "params",
+
"required": ["community", "subject"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community"
+
},
+
"subject": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of the user to check"
+
}
+
}
+
},
+
"output": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["isBanned"],
+
"properties": {
+
"isBanned": {
+
"type": "boolean",
+
"description": "Whether the user is currently banned"
+
},
+
"ban": {
+
"type": "ref",
+
"ref": "social.coves.moderation.ban",
+
"description": "Ban record if user is banned"
+
}
+
}
+
}
+
},
+
"errors": [
+
{
+
"name": "CommunityNotFound",
+
"description": "Community does not exist"
+
},
+
{
+
"name": "UserNotFound",
+
"description": "User does not exist"
+
}
+
]
+
}
+
}
+
}
+68
internal/atproto/lexicon/social/coves/moderation/listBans.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.moderation.listBans",
+
"defs": {
+
"main": {
+
"type": "query",
+
"description": "List bans for a community (moderator only)",
+
"parameters": {
+
"type": "params",
+
"required": ["community"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community"
+
},
+
"status": {
+
"type": "string",
+
"knownValues": ["active", "expired", "revoked", "all"],
+
"default": "active",
+
"description": "Filter by ban status"
+
},
+
"limit": {
+
"type": "integer",
+
"minimum": 1,
+
"maximum": 100,
+
"default": 50,
+
"description": "Maximum number of bans to return"
+
},
+
"cursor": {
+
"type": "string",
+
"description": "Pagination cursor"
+
}
+
}
+
},
+
"output": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["bans"],
+
"properties": {
+
"bans": {
+
"type": "array",
+
"items": {
+
"type": "ref",
+
"ref": "social.coves.moderation.ban"
+
}
+
},
+
"cursor": {
+
"type": "string",
+
"description": "Pagination cursor for next page"
+
}
+
}
+
}
+
},
+
"errors": [
+
{
+
"name": "NotAuthorized",
+
"description": "User is not authorized to view bans for this community"
+
},
+
{
+
"name": "CommunityNotFound",
+
"description": "Community does not exist"
+
}
+
]
+
}
+
}
+
}
+89
internal/atproto/lexicon/social/coves/moderation/ruleProposal.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.moderation.ruleProposal",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A proposal to change community rules",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["community", "proposalType", "description", "createdAt"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community"
+
},
+
"proposalType": {
+
"type": "string",
+
"knownValues": [
+
"addTag",
+
"removeTag",
+
"blockDomain",
+
"unblockDomain",
+
"changePostTypes",
+
"addRule",
+
"removeRule",
+
"updateRule",
+
"removeModerator",
+
"addModerator",
+
"changeModerationSystem",
+
"updateSortitionConfig"
+
]
+
},
+
"title": {
+
"type": "string",
+
"maxLength": 256,
+
"description": "Short title for the proposal"
+
},
+
"description": {
+
"type": "string",
+
"maxLength": 5000,
+
"description": "Detailed description of the proposed change"
+
},
+
"proposalData": {
+
"type": "unknown",
+
"description": "Type-specific proposal data"
+
},
+
"requiredVotes": {
+
"type": "integer",
+
"minimum": 1,
+
"description": "Number of votes needed to pass"
+
},
+
"requiredApprovalPercent": {
+
"type": "integer",
+
"minimum": 50,
+
"maximum": 100,
+
"default": 66,
+
"description": "Percentage of approval votes needed"
+
},
+
"status": {
+
"type": "string",
+
"knownValues": ["active", "passed", "failed", "cancelled", "implemented"],
+
"default": "active"
+
},
+
"votingStartsAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When voting begins"
+
},
+
"votingEndsAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When voting ends"
+
},
+
"implementedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "When the change was implemented"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+53
internal/atproto/lexicon/social/coves/moderation/tribunalVote.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.moderation.tribunalVote",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A vote in a tribunal decision",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["tribunal", "subject", "decision", "createdAt"],
+
"properties": {
+
"tribunal": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the tribunal case"
+
},
+
"subject": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "Post/comment/user being judged"
+
},
+
"decision": {
+
"type": "string",
+
"knownValues": ["remove", "keep", "warn", "ban", "timeout"],
+
"description": "Tribunal decision"
+
},
+
"duration": {
+
"type": "integer",
+
"description": "Ban duration in days (for timeout)"
+
},
+
"reason": {
+
"type": "string",
+
"maxLength": 2000,
+
"description": "Detailed reasoning for the decision"
+
},
+
"precedents": {
+
"type": "array",
+
"description": "References to similar past cases",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+65
internal/atproto/lexicon/social/coves/moderation/unbanUser.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.moderation.unbanUser",
+
"defs": {
+
"main": {
+
"type": "procedure",
+
"description": "Unban a user from a community (moderator action)",
+
"input": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["community", "subject"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community"
+
},
+
"subject": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of the user to unban"
+
},
+
"reason": {
+
"type": "string",
+
"maxLength": 1000,
+
"description": "Reason for unbanning (optional)"
+
}
+
}
+
}
+
},
+
"output": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["success"],
+
"properties": {
+
"success": {
+
"type": "boolean",
+
"description": "Whether the unban was successful"
+
}
+
}
+
}
+
},
+
"errors": [
+
{
+
"name": "NotAuthorized",
+
"description": "User is not authorized to unban users in this community"
+
},
+
{
+
"name": "UserNotFound",
+
"description": "Target user does not exist"
+
},
+
{
+
"name": "CommunityNotFound",
+
"description": "Community does not exist"
+
},
+
{
+
"name": "NotBanned",
+
"description": "User is not currently banned from this community"
+
}
+
]
+
}
+
}
+
}
+35
internal/atproto/lexicon/social/coves/moderation/vote.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.moderation.vote",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A vote on a moderation action or rule change",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["subject", "vote", "createdAt"],
+
"properties": {
+
"subject": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the proposal being voted on"
+
},
+
"vote": {
+
"type": "string",
+
"knownValues": ["approve", "reject", "abstain"]
+
},
+
"reason": {
+
"type": "string",
+
"maxLength": 1000,
+
"description": "Optional reason for the vote"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+110
internal/atproto/lexicon/social/coves/post/article.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.post.article",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "An article/link post",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["community", "title", "url", "createdAt"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community this was posted to"
+
},
+
"title": {
+
"type": "string",
+
"maxGraphemes": 300,
+
"maxLength": 3000,
+
"description": "Post title"
+
},
+
"url": {
+
"type": "string",
+
"format": "uri",
+
"description": "URL of the linked article"
+
},
+
"domain": {
+
"type": "string",
+
"description": "Domain of the linked article (cached)"
+
},
+
"embed": {
+
"type": "ref",
+
"ref": "social.coves.embed.external",
+
"description": "Preview metadata for the link"
+
},
+
"autoGeneratedDescription": {
+
"type": "string",
+
"maxLength": 50000,
+
"description": "Optional Auto-generated text breakdown of article"
+
},
+
"content": {
+
"type": "string",
+
"maxLength": 50000,
+
"description": "Optional text content to accompany link"
+
},
+
"contentMarkup": {
+
"type": "array",
+
"description": "Rich text annotations for content",
+
"items": {
+
"type": "union",
+
"refs": [
+
"social.coves.richtext.markup",
+
"social.coves.richtext.mention",
+
"social.coves.richtext.link"
+
]
+
}
+
},
+
"tags": {
+
"type": "array",
+
"maxLength": 10,
+
"items": {
+
"type": "string",
+
"maxLength": 32
+
}
+
},
+
"nsfw": {
+
"type": "boolean",
+
"default": false
+
},
+
"contentLabels": {
+
"type": "array",
+
"description": "Self-applied content labels",
+
"items": {
+
"type": "string",
+
"knownValues": ["nsfw", "spoiler", "violence"],
+
"maxLength": 32
+
}
+
},
+
"federatedFrom": {
+
"type": "ref",
+
"ref": "social.coves.federation.post"
+
},
+
"location": {
+
"type": "ref",
+
"ref": "social.coves.actor.profile#geoLocation"
+
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+39
internal/atproto/lexicon/social/coves/post/crosspost.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.post.crosspost",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A record tracking crosspost relationships between posts",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["originalPost", "crosspostOf", "createdAt"],
+
"properties": {
+
"originalPost": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the original post in the crosspost chain"
+
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the immediate parent this is a crosspost of"
+
},
+
"allCrossposts": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+99
internal/atproto/lexicon/social/coves/post/getCrosspostChain.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.post.getCrosspostChain",
+
"defs": {
+
"main": {
+
"type": "procedure",
+
"description": "Get all crossposts in a crosspost chain for a given post",
+
"input": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["uri"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of any post in the crosspost chain"
+
}
+
}
+
}
+
},
+
"output": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["crossposts"],
+
"properties": {
+
"crossposts": {
+
"type": "array",
+
"description": "All posts in the crosspost chain",
+
"items": {
+
"type": "ref",
+
"ref": "#crosspostView"
+
}
+
}
+
}
+
}
+
}
+
},
+
"crosspostView": {
+
"type": "object",
+
"required": ["uri", "community", "author", "createdAt"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the post"
+
},
+
"community": {
+
"type": "object",
+
"required": ["uri", "name"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community"
+
},
+
"name": {
+
"type": "string",
+
"description": "Display name of the community"
+
},
+
"handle": {
+
"type": "string",
+
"description": "Handle of the community"
+
}
+
}
+
},
+
"author": {
+
"type": "object",
+
"required": ["did", "handle"],
+
"properties": {
+
"did": {
+
"type": "string",
+
"format": "did"
+
},
+
"handle": {
+
"type": "string"
+
},
+
"displayName": {
+
"type": "string"
+
},
+
"avatar": {
+
"type": "string",
+
"format": "uri"
+
}
+
}
+
},
+
"isOriginal": {
+
"type": "boolean",
+
"description": "Whether this is the original post in the chain"
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+97
internal/atproto/lexicon/social/coves/post/image.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.post.image",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "An image post",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["community", "title", "images", "createdAt"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community this was posted to"
+
},
+
"title": {
+
"type": "string",
+
"maxGraphemes": 300,
+
"maxLength": 3000,
+
"description": "Post title"
+
},
+
"images": {
+
"type": "array",
+
"minLength": 1,
+
"maxLength": 10,
+
"description": "Images in the post",
+
"items": {
+
"type": "ref",
+
"ref": "social.coves.embed.image"
+
}
+
},
+
"caption": {
+
"type": "string",
+
"maxLength": 10000,
+
"description": "Optional caption or description"
+
},
+
"captionMarkup": {
+
"type": "array",
+
"description": "Rich text annotations for caption",
+
"items": {
+
"type": "union",
+
"refs": [
+
"social.coves.richtext.markup",
+
"social.coves.richtext.mention",
+
"social.coves.richtext.link"
+
]
+
}
+
},
+
"tags": {
+
"type": "array",
+
"maxLength": 10,
+
"items": {
+
"type": "string",
+
"maxLength": 32
+
}
+
},
+
"contentLabels": {
+
"type": "array",
+
"description": "Self-applied content labels",
+
"items": {
+
"type": "string",
+
"knownValues": ["nsfw", "spoiler", "violence"],
+
"maxLength": 32
+
}
+
},
+
"federatedFrom": {
+
"type": "ref",
+
"ref": "social.coves.federation.post"
+
},
+
"location": {
+
"type": "ref",
+
"ref": "social.coves.actor.profile#geoLocation"
+
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+148
internal/atproto/lexicon/social/coves/post/microblog.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.post.microblog",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A microblog post (typically from federated platforms like Bluesky/Mastodon)",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["community", "content", "createdAt"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community this was posted to"
+
},
+
"content": {
+
"type": "string",
+
"maxLength": 5000,
+
"description": "Microblog post content (plain text or markdown)"
+
},
+
"contentMarkup": {
+
"type": "array",
+
"description": "Rich text annotations for content",
+
"items": {
+
"type": "union",
+
"refs": [
+
"social.coves.richtext.markup",
+
"social.coves.richtext.mention",
+
"social.coves.richtext.link"
+
]
+
}
+
},
+
"title": {
+
"type": "string",
+
"maxLength": 300,
+
"description": "Optional title"
+
},
+
"hashtags": {
+
"type": "array",
+
"maxLength": 20,
+
"description": "Hashtags from the original post",
+
"items": {
+
"type": "string",
+
"maxLength": 100
+
}
+
},
+
"mentions": {
+
"type": "array",
+
"description": "User mentions in the post",
+
"items": {
+
"type": "ref",
+
"ref": "social.coves.richtext.mention"
+
}
+
},
+
"embed": {
+
"type": "union",
+
"description": "Embedded content (images, videos, links, quoted posts)",
+
"refs": [
+
"social.coves.embed.image",
+
"social.coves.embed.video",
+
"social.coves.embed.external",
+
"social.coves.embed.post"
+
]
+
},
+
"contentLabels": {
+
"type": "array",
+
"description": "Content warnings and labels",
+
"items": {
+
"type": "string",
+
"knownValues": ["nsfw", "spoiler", "violence"],
+
"maxLength": 32
+
}
+
},
+
"federatedFrom": {
+
"type": "ref",
+
"ref": "social.coves.federation.post",
+
"description": "Required - reference to original federated post"
+
},
+
"originalAuthor": {
+
"type": "object",
+
"description": "Information about the original author from federated platform",
+
"required": ["handle"],
+
"properties": {
+
"handle": {
+
"type": "string",
+
"maxLength": 253,
+
"description": "Original author's handle"
+
},
+
"displayName": {
+
"type": "string",
+
"maxLength": 640,
+
"description": "Original author's display name"
+
},
+
"did": {
+
"type": "string",
+
"format": "did",
+
"description": "Original author's DID (if available)"
+
},
+
"avatar": {
+
"type": "string",
+
"format": "uri",
+
"description": "URL to original author's avatar"
+
}
+
}
+
},
+
"replyTo": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a reply, reference to the parent post"
+
},
+
"location": {
+
"type": "ref",
+
"ref": "social.coves.actor.profile#geoLocation"
+
},
+
"language": {
+
"type": "string",
+
"maxLength": 10,
+
"description": "Language code (e.g., 'en', 'es', 'fr')"
+
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
},
+
"originalCreatedAt": {
+
"type": "string",
+
"format": "datetime",
+
"description": "Original creation time on the federated platform"
+
}
+
}
+
}
+
}
+
}
+
}
+98
internal/atproto/lexicon/social/coves/post/text.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.post.text",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A text post",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["community", "title", "createdAt"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community this was posted to"
+
},
+
"title": {
+
"type": "string",
+
"maxGraphemes": 300,
+
"maxLength": 3000,
+
"description": "Post title"
+
},
+
"content": {
+
"type": "string",
+
"maxLength": 50000,
+
"description": "Markdown-formatted post content"
+
},
+
"contentMarkup": {
+
"type": "array",
+
"description": "Rich text annotations for content",
+
"items": {
+
"type": "union",
+
"refs": [
+
"social.coves.richtext.markup",
+
"social.coves.richtext.mention",
+
"social.coves.richtext.link"
+
]
+
}
+
},
+
"tags": {
+
"type": "array",
+
"maxLength": 10,
+
"description": "Post tags/categories",
+
"items": {
+
"type": "string",
+
"maxLength": 32
+
}
+
},
+
"contentLabels": {
+
"type": "array",
+
"description": "Self-applied content labels",
+
"items": {
+
"type": "string",
+
"knownValues": ["nsfw", "spoiler", "violence"],
+
"maxLength": 32
+
}
+
},
+
"federatedFrom": {
+
"type": "ref",
+
"ref": "social.coves.federation.post"
+
},
+
"location": {
+
"type": "ref",
+
"ref": "social.coves.actor.profile#geoLocation"
+
},
+
"embed": {
+
"type": "union",
+
"description": "Optional embedded content",
+
"refs": [
+
"social.coves.embed.image",
+
"social.coves.embed.video",
+
"social.coves.embed.external",
+
"social.coves.embed.post"
+
]
+
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+96
internal/atproto/lexicon/social/coves/post/video.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.post.video",
+
"defs": {
+
"main": {
+
"type": "record",
+
"description": "A video post",
+
"key": "tid",
+
"record": {
+
"type": "object",
+
"required": ["community", "title", "video", "createdAt"],
+
"properties": {
+
"community": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the community this was posted to"
+
},
+
"title": {
+
"type": "string",
+
"maxGraphemes": 300,
+
"maxLength": 3000,
+
"description": "Post title"
+
},
+
"video": {
+
"type": "ref",
+
"ref": "social.coves.embed.video",
+
"description": "Video content"
+
},
+
"caption": {
+
"type": "string",
+
"maxLength": 10000,
+
"description": "Optional caption or description"
+
},
+
"captionMarkup": {
+
"type": "array",
+
"description": "Rich text annotations for caption",
+
"items": {
+
"type": "union",
+
"refs": [
+
"social.coves.richtext.markup",
+
"social.coves.richtext.mention",
+
"social.coves.richtext.link"
+
]
+
}
+
},
+
"tags": {
+
"type": "array",
+
"maxLength": 10,
+
"items": {
+
"type": "string",
+
"maxLength": 32
+
}
+
},
+
"nsfw": {
+
"type": "boolean",
+
"default": false
+
},
+
"contentLabels": {
+
"type": "array",
+
"description": "Self-applied content labels",
+
"items": {
+
"type": "string",
+
"knownValues": ["nsfw", "spoiler", "violence"],
+
"maxLength": 32
+
}
+
},
+
"federatedFrom": {
+
"type": "ref",
+
"ref": "social.coves.federation.post"
+
},
+
"location": {
+
"type": "ref",
+
"ref": "social.coves.actor.profile#geoLocation"
+
},
+
"crosspostOf": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "If this is a crosspost, AT-URI of the post this is a crosspost of"
+
},
+
"crosspostChain": {
+
"type": "array",
+
"description": "Array of AT-URIs of all posts in the crosspost chain (including this one)",
+
"items": {
+
"type": "string",
+
"format": "at-uri"
+
}
+
},
+
"createdAt": {
+
"type": "string",
+
"format": "datetime"
+
}
+
}
+
}
+
}
+
}
+
}
+22
internal/atproto/lexicon/social/coves/richtext/link.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.richtext.link",
+
"defs": {
+
"main": {
+
"type": "object",
+
"description": "Link within text content",
+
"required": ["index", "uri"],
+
"properties": {
+
"index": {
+
"type": "ref",
+
"ref": "social.coves.richtext.markup#byteSlice"
+
},
+
"uri": {
+
"type": "string",
+
"format": "uri",
+
"description": "Target URI of the link"
+
}
+
}
+
}
+
}
+
}
+71
internal/atproto/lexicon/social/coves/richtext/markup.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.richtext.markup",
+
"defs": {
+
"main": {
+
"type": "object",
+
"description": "Text markup and formatting annotations",
+
"required": ["index", "features"],
+
"properties": {
+
"index": {
+
"type": "ref",
+
"ref": "#byteSlice"
+
},
+
"features": {
+
"type": "array",
+
"description": "Formatting features applied to this text range",
+
"items": {
+
"type": "union",
+
"refs": ["#bold", "#italic", "#code", "#strikethrough", "#spoiler"]
+
}
+
}
+
}
+
},
+
"byteSlice": {
+
"type": "object",
+
"description": "Byte position and length of text slice",
+
"required": ["byteStart", "byteLength"],
+
"properties": {
+
"byteStart": {
+
"type": "integer",
+
"minimum": 0
+
},
+
"byteLength": {
+
"type": "integer",
+
"minimum": 0
+
}
+
}
+
},
+
"bold": {
+
"type": "object",
+
"description": "Bold text formatting",
+
"properties": {}
+
},
+
"italic": {
+
"type": "object",
+
"description": "Italic text formatting",
+
"properties": {}
+
},
+
"code": {
+
"type": "object",
+
"description": "Code/monospace text formatting",
+
"properties": {}
+
},
+
"strikethrough": {
+
"type": "object",
+
"description": "Strikethrough text formatting",
+
"properties": {}
+
},
+
"spoiler": {
+
"type": "object",
+
"description": "Spoiler text that is hidden until clicked",
+
"properties": {
+
"reason": {
+
"type": "string",
+
"maxLength": 128,
+
"description": "Optional explanation of what's hidden"
+
}
+
}
+
}
+
}
+
}
+30
internal/atproto/lexicon/social/coves/richtext/mention.json
···
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.richtext.mention",
+
"defs": {
+
"main": {
+
"type": "object",
+
"description": "Mention of a user or community in text",
+
"required": ["index", "did"],
+
"properties": {
+
"index": {
+
"type": "ref",
+
"ref": "social.coves.richtext.markup#byteSlice"
+
},
+
"did": {
+
"type": "string",
+
"format": "did",
+
"description": "DID of the mentioned user or community"
+
},
+
"handle": {
+
"type": "string",
+
"description": "Handle at time of mention (may change)"
+
},
+
"federatedFrom": {
+
"type": "string",
+
"description": "Platform the mentioned entity is from (bluesky, lemmy, coves)"
+
}
+
}
+
}
+
}
+
}
+16
scripts/validate-schemas.sh
···
···
+
#!/bin/bash
+
# Script to validate Coves lexicon schemas
+
+
echo "🔍 Validating Coves lexicon schemas..."
+
echo ""
+
+
go run cmd/validate-lexicon/main.go -v
+
+
if [ $? -eq 0 ]; then
+
echo ""
+
echo "🎉 All schemas are valid and ready to use!"
+
else
+
echo ""
+
echo "❌ Schema validation failed. Please check the errors above."
+
exit 1
+
fi
+79
tests/lexicon_validation_test.go
···
···
+
package tests
+
+
import (
+
"testing"
+
+
lexicon "github.com/bluesky-social/indigo/atproto/lexicon"
+
)
+
+
func TestLexiconSchemaValidation(t *testing.T) {
+
// Create a new catalog
+
catalog := lexicon.NewBaseCatalog()
+
+
// Load all schemas from the lexicon directory
+
schemaPath := "../internal/atproto/lexicon"
+
if err := catalog.LoadDirectory(schemaPath); err != nil {
+
t.Fatalf("Failed to load lexicon schemas: %v", err)
+
}
+
+
// Test that we can resolve our key schemas
+
expectedSchemas := []string{
+
"social.coves.actor.profile",
+
"social.coves.actor.subscription",
+
"social.coves.actor.membership",
+
"social.coves.community.profile",
+
"social.coves.community.rules",
+
"social.coves.community.wiki",
+
"social.coves.post.text",
+
"social.coves.post.image",
+
"social.coves.post.video",
+
"social.coves.post.article",
+
"social.coves.richtext.markup",
+
"social.coves.richtext.mention",
+
"social.coves.richtext.link",
+
"social.coves.embed.image",
+
"social.coves.embed.video",
+
"social.coves.embed.external",
+
"social.coves.embed.post",
+
"social.coves.interaction.vote",
+
"social.coves.interaction.tag",
+
"social.coves.interaction.comment",
+
"social.coves.interaction.share",
+
"social.coves.moderation.vote",
+
"social.coves.moderation.tribunalVote",
+
"social.coves.moderation.ruleProposal",
+
}
+
+
for _, schemaID := range expectedSchemas {
+
t.Run(schemaID, func(t *testing.T) {
+
if _, err := catalog.Resolve(schemaID); err != nil {
+
t.Errorf("Failed to resolve schema %s: %v", schemaID, err)
+
}
+
})
+
}
+
}
+
+
func TestLexiconCrossReferences(t *testing.T) {
+
// Create a new catalog
+
catalog := lexicon.NewBaseCatalog()
+
+
// Load all schemas
+
if err := catalog.LoadDirectory("../internal/atproto/lexicon"); err != nil {
+
t.Fatalf("Failed to load lexicon schemas: %v", err)
+
}
+
+
// Test specific cross-references that should work
+
crossRefs := map[string]string{
+
"social.coves.richtext.markup#byteSlice": "byteSlice definition in markup schema",
+
"social.coves.actor.profile#geoLocation": "geoLocation definition in actor profile",
+
"social.coves.community.rules#rule": "rule definition in community rules",
+
}
+
+
for ref, description := range crossRefs {
+
t.Run(ref, func(t *testing.T) {
+
if _, err := catalog.Resolve(ref); err != nil {
+
t.Errorf("Failed to resolve cross-reference %s (%s): %v", ref, description, err)
+
}
+
})
+
}
+
}