diff --git a/api/http_server.go b/api/http_server.go index 325e37c4..c780919e 100644 --- a/api/http_server.go +++ b/api/http_server.go @@ -7,8 +7,8 @@ import ( "strconv" "time" - "github.com/anthonyrawlins/bzzz/logging" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/logging" + "chorus.services/bzzz/pubsub" "github.com/gorilla/mux" ) diff --git a/bzzz.service b/bzzz.service index 26f2217e..ca86ddba 100644 --- a/bzzz.service +++ b/bzzz.service @@ -1,6 +1,6 @@ [Unit] -Description=Bzzz P2P Task Coordination System -Documentation=https://github.com/anthonyrawlins/bzzz +Description=BZZZ P2P Task Coordination System +Documentation=https://chorus.services/docs/bzzz After=network.target Wants=network.target @@ -19,8 +19,6 @@ TimeoutStopSec=30 # Environment variables Environment=HOME=/home/tony Environment=USER=tony -Environment=BZZZ_WHOOSH_API_URL=https://whoosh.home.deepblack.cloud -Environment=BZZZ_GITHUB_TOKEN_FILE=/home/tony/chorus/business/secrets/gh-token # Logging StandardOutput=journal @@ -39,4 +37,4 @@ LimitNOFILE=65536 LimitNPROC=4096 [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/cmd/test_bzzz.go b/cmd/test_bzzz.go index 58afc6a2..30ebe7c7 100644 --- a/cmd/test_bzzz.go +++ b/cmd/test_bzzz.go @@ -9,11 +9,11 @@ import ( "syscall" "time" - "github.com/anthonyrawlins/bzzz/discovery" - "github.com/anthonyrawlins/bzzz/monitoring" - "github.com/anthonyrawlins/bzzz/p2p" - "github.com/anthonyrawlins/bzzz/pubsub" - "github.com/anthonyrawlins/bzzz/test" + "chorus.services/bzzz/discovery" + "chorus.services/bzzz/monitoring" + "chorus.services/bzzz/p2p" + "chorus.services/bzzz/pubsub" + "chorus.services/bzzz/test" ) func main() { diff --git a/coordinator/task_coordinator.go b/coordinator/task_coordinator.go index d2a0ef0a..ada0374c 100644 --- a/coordinator/task_coordinator.go +++ b/coordinator/task_coordinator.go @@ -7,17 +7,15 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/logging" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/hive" - "github.com/anthonyrawlins/bzzz/pubsub" - "github.com/anthonyrawlins/bzzz/repository" + "chorus.services/bzzz/logging" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pubsub" + "chorus.services/bzzz/repository" "github.com/libp2p/go-libp2p/core/peer" ) // TaskCoordinator manages task discovery, assignment, and execution across multiple repositories type TaskCoordinator struct { - hiveClient *hive.HiveClient pubsub *pubsub.PubSub hlog *logging.HypercoreLog ctx context.Context @@ -57,14 +55,12 @@ type ActiveTask struct { // NewTaskCoordinator creates a new task coordinator func NewTaskCoordinator( ctx context.Context, - hiveClient *hive.HiveClient, ps *pubsub.PubSub, hlog *logging.HypercoreLog, cfg *config.Config, nodeID string, ) *TaskCoordinator { coordinator := &TaskCoordinator{ - hiveClient: hiveClient, pubsub: ps, hlog: hlog, ctx: ctx, @@ -120,71 +116,11 @@ func (tc *TaskCoordinator) taskDiscoveryLoop() { case <-tc.ctx.Done(): return case <-ticker.C: - tc.discoverAndProcessTasks() + // Task discovery is now handled by WHOOSH } } } -// discoverAndProcessTasks discovers tasks from all repositories and processes them -func (tc *TaskCoordinator) discoverAndProcessTasks() { - // Get monitored repositories from Hive - repositories, err := tc.hiveClient.GetMonitoredRepositories(tc.ctx) - if err != nil { - fmt.Printf("⚠️ Failed to get monitored repositories: %v\n", err) - return - } - - var totalTasks, processedTasks int - - for _, repo := range repositories { - // Skip if repository is not enabled for bzzz - if !repo.BzzzEnabled { - continue - } - - // Create or get repository provider - provider, err := tc.getOrCreateProvider(repo) - if err != nil { - fmt.Printf("⚠️ Failed to create provider for %s: %v\n", repo.Name, err) - continue - } - - // Get available tasks - tasks, err := provider.ListAvailableTasks() - if err != nil { - fmt.Printf("⚠️ Failed to list tasks for %s: %v\n", repo.Name, err) - continue - } - - totalTasks += len(tasks) - - // Filter tasks suitable for this agent - suitableTasks, err := tc.taskMatcher.MatchTasksToRole(tasks, tc.agentInfo.Role, tc.agentInfo.Expertise) - if err != nil { - fmt.Printf("⚠️ Failed to match tasks for role %s: %v\n", tc.agentInfo.Role, err) - continue - } - - // Process suitable tasks - for _, task := range suitableTasks { - if tc.shouldProcessTask(task) { - if tc.processTask(task, provider, repo.ID) { - processedTasks++ - } - } - } - - // Update last sync time - tc.syncLock.Lock() - tc.lastSync[repo.ID] = time.Now() - tc.syncLock.Unlock() - } - - if totalTasks > 0 { - fmt.Printf("🔍 Discovered %d tasks, processed %d suitable tasks\n", totalTasks, processedTasks) - } -} - // shouldProcessTask determines if we should process a task func (tc *TaskCoordinator) shouldProcessTask(task *repository.Task) bool { // Check if we're already at capacity @@ -376,41 +312,6 @@ func (tc *TaskCoordinator) executeTask(activeTask *ActiveTask) { fmt.Printf("✅ Completed task %s #%d\n", activeTask.Task.Repository, activeTask.Task.Number) } -// getOrCreateProvider gets or creates a repository provider -func (tc *TaskCoordinator) getOrCreateProvider(repo *hive.MonitoredRepository) (repository.TaskProvider, error) { - tc.providerLock.RLock() - if provider, exists := tc.providers[repo.ID]; exists { - tc.providerLock.RUnlock() - return provider, nil - } - tc.providerLock.RUnlock() - - // Create new provider - config := &repository.Config{ - Provider: repo.Provider, - BaseURL: repo.ProviderBaseURL, - AccessToken: repo.AccessToken, - Owner: repo.GitOwner, - Repository: repo.GitRepository, - TaskLabel: "bzzz-task", - InProgressLabel: "in-progress", - CompletedLabel: "completed", - BaseBranch: repo.GitBranch, - BranchPrefix: "bzzz/task-", - } - - provider, err := tc.factory.CreateProvider(tc.ctx, config) - if err != nil { - return nil, fmt.Errorf("failed to create provider: %w", err) - } - - tc.providerLock.Lock() - tc.providers[repo.ID] = provider - tc.providerLock.Unlock() - - return provider, nil -} - // announceAgentRole announces this agent's role and capabilities func (tc *TaskCoordinator) announceAgentRole() { data := map[string]interface{}{ @@ -600,4 +501,4 @@ func (tc *TaskCoordinator) GetStatus() map[string]interface{} { "status": tc.agentInfo.Status, "active_tasks": taskList, } -} \ No newline at end of file +} diff --git a/examples/slurp_integration_example.go b/examples/slurp_integration_example.go index 804c66b2..7d2a7e5f 100644 --- a/examples/slurp_integration_example.go +++ b/examples/slurp_integration_example.go @@ -6,10 +6,10 @@ import ( "log" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/coordination" - "github.com/anthonyrawlins/bzzz/pkg/integration" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/coordination" + "chorus.services/bzzz/pkg/integration" + "chorus.services/bzzz/pubsub" "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p/core/host" ) diff --git a/executor/executor.go b/executor/executor.go index adb1e80c..f5b7f4d2 100644 --- a/executor/executor.go +++ b/executor/executor.go @@ -5,11 +5,11 @@ import ( "fmt" "strings" - "github.com/anthonyrawlins/bzzz/logging" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/types" - "github.com/anthonyrawlins/bzzz/reasoning" - "github.com/anthonyrawlins/bzzz/sandbox" + "chorus.services/bzzz/logging" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/types" + "chorus.services/bzzz/reasoning" + "chorus.services/bzzz/sandbox" ) const maxIterations = 10 // Prevents infinite loops diff --git a/github/integration.go b/github/integration.go index 6c11f2a1..9b31f2ed 100644 --- a/github/integration.go +++ b/github/integration.go @@ -7,11 +7,11 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/executor" - "github.com/anthonyrawlins/bzzz/logging" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/types" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/executor" + "chorus.services/bzzz/logging" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/types" + "chorus.services/bzzz/pubsub" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/go.mod b/go.mod index a6304116..e278752b 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ -module github.com/anthonyrawlins/bzzz +module chorus.services/bzzz go 1.23.0 toolchain go1.24.5 require ( - filippo.io/age v1.1.1 + filippo.io/age v1.2.1 github.com/google/go-github/v57 v57.0.0 github.com/libp2p/go-libp2p v0.32.0 github.com/libp2p/go-libp2p-kad-dht v0.25.2 @@ -16,6 +16,7 @@ require ( ) require ( + filippo.io/edwards25519 v1.1.0 // indirect github.com/Microsoft/go-winio v0.4.14 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -43,14 +44,23 @@ require ( github.com/google/go-querystring v1.1.0 // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect + github.com/google/uuid v1.6.0 // indirect github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect github.com/huin/goupnp v1.3.0 // indirect + github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect + github.com/ipfs/go-datastore 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/ipld/go-ipld-prime v0.20.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect + github.com/jbenet/goprocess v0.1.4 // indirect github.com/klauspost/compress v1.17.2 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/koron/go-ssdp v0.0.4 // indirect @@ -58,6 +68,9 @@ require ( github.com/libp2p/go-cidranger v1.1.0 // indirect github.com/libp2p/go-flow-metrics v0.1.0 // indirect github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect + github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect + github.com/libp2p/go-libp2p-record v0.2.0 // indirect + github.com/libp2p/go-libp2p-routing-helpers v0.7.2 // indirect github.com/libp2p/go-msgio v0.3.0 // indirect github.com/libp2p/go-nat v0.2.0 // indirect github.com/libp2p/go-netroute v0.2.1 // indirect @@ -86,18 +99,22 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/opencontainers/runtime-spec v1.1.0 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect + github.com/polydawn/refmt v0.89.0 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.11.1 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.3.4 // indirect github.com/quic-go/quic-go v0.39.3 // indirect github.com/quic-go/webtransport-go v0.6.0 // indirect github.com/raulk/go-watchdog v1.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect + github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect + go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect go.opentelemetry.io/otel v1.37.0 // indirect @@ -108,14 +125,15 @@ require ( go.uber.org/mock v0.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/sync v0.4.0 // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.33.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.14.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/tools v0.22.0 // indirect + gonum.org/v1/gonum v0.13.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.34.2 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index 95940b4c..1579321f 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,11 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= +filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= +filippo.io/age v1.2.1 h1:X0TZjehAZylOIj4DubWYU1vWQxv9bJpo+Uu2/LGhi1o= +filippo.io/age v1.2.1/go.mod h1:JL9ew2lTN+Pyft4RiNGguFfOpewKwSHm5ayKD/A4004= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -140,6 +145,7 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= @@ -188,6 +194,7 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -214,6 +221,9 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0= github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -225,23 +235,42 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= +github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= 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-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= +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/ipld/go-ipld-prime v0.20.0 h1:Ud3VwE9ClxpO2LkCYP7vWPc0Fo+dYdYzgxUJZ3uRG4g= +github.com/ipld/go-ipld-prime v0.20.0/go.mod h1:PzqZ/ZR981eKbgdr3y2DJYeD/8bgMawdGVlJDE8kK+M= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= +github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= +github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -250,6 +279,7 @@ github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -284,8 +314,14 @@ github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLE github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-kad-dht v0.25.2 h1:FOIk9gHoe4YRWXTu8SY9Z1d0RILol0TrtApsMDPjAVQ= github.com/libp2p/go-libp2p-kad-dht v0.25.2/go.mod h1:6za56ncRHYXX4Nc2vn8z7CZK0P4QiMcrn77acKLM2Oo= +github.com/libp2p/go-libp2p-kbucket v0.6.3 h1:p507271wWzpy2f1XxPzCQG9NiN6R6lHL9GiSErbQQo0= +github.com/libp2p/go-libp2p-kbucket v0.6.3/go.mod h1:RCseT7AH6eJWxxk2ol03xtP9pEHetYSPXOaJnOiD8i0= github.com/libp2p/go-libp2p-pubsub v0.10.0 h1:wS0S5FlISavMaAbxyQn3dxMOe2eegMfswM471RuHJwA= github.com/libp2p/go-libp2p-pubsub v0.10.0/go.mod h1:1OxbaT/pFRO5h+Dpze8hdHQ63R0ke55XTs6b6NwLLkw= +github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= +github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= +github.com/libp2p/go-libp2p-routing-helpers v0.7.2 h1:xJMFyhQ3Iuqnk9Q2dYE1eUTzsah7NLw3Qs2zjUV78T0= +github.com/libp2p/go-libp2p-routing-helpers v0.7.2/go.mod h1:cN4mJAD/7zfPKXBcs9ze31JGYAZgzdABEm+q/hkswb8= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= @@ -374,6 +410,8 @@ github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgr github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= @@ -383,6 +421,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.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.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= +github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -391,6 +431,8 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -404,6 +446,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -412,6 +456,8 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/qtls-go1-20 v0.3.4 h1:MfFAPULvst4yoMgY9QmtpYmfij/em7O8UUi+bNVm7Cg= @@ -454,24 +500,35 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/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/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= 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/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 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.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= +github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= +github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= +github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -483,6 +540,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 h1:Hf9xI/XLML9ElpiHVDNwvqI0hIFlzV8dgIr35kV1kRU= @@ -493,6 +552,7 @@ go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/Wgbsd go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +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= @@ -505,9 +565,12 @@ go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +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= @@ -526,6 +589,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -562,6 +627,8 @@ 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/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -595,6 +662,7 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -604,6 +672,8 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -629,6 +699,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -697,6 +769,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -710,6 +784,7 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -719,6 +794,8 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-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-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -749,10 +826,14 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= 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= +gonum.org/v1/gonum v0.13.0 h1:a0T3bh+7fhRyqeNbiC3qVHYmkiQgit3wnNan/2c0HMM= +gonum.org/v1/gonum v0.13.0/go.mod h1:/WPYRckkfWrhWefxyYTfrTtQR0KH4iyHNuzxqXAKyAU= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= @@ -830,6 +911,7 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/infrastructure/migration-scripts/migrate-v1-to-v2.sh b/infrastructure/migration-scripts/migrate-v1-to-v2.sh index ca0f5b37..a537318d 100755 --- a/infrastructure/migration-scripts/migrate-v1-to-v2.sh +++ b/infrastructure/migration-scripts/migrate-v1-to-v2.sh @@ -149,8 +149,8 @@ agent: models: ["llama3.2:70b", "qwen2.5:72b"] max_tasks: 3 -hive_api: - base_url: "http://hive.deepblack.cloud" +whoosh_api: + base_url: "http://whoosh.deepblack.cloud" api_key: "" dht: diff --git a/install-service.sh b/install-service.sh index 1a9f8846..a9a96bbd 100755 --- a/install-service.sh +++ b/install-service.sh @@ -1,11 +1,11 @@ #!/bin/bash -# Bzzz P2P Service Installation Script -# Installs Bzzz as a systemd service +# BZZZ Service Installation Script +# Installs BZZZ as a systemd service set -e -echo "🐝 Installing Bzzz P2P Task Coordination Service..." +echo "🐝 Installing BZZZ P2P Task Coordination Service..." # Check if running as root or with sudo if [ "$EUID" -ne 0 ]; then @@ -14,20 +14,19 @@ if [ "$EUID" -ne 0 ]; then fi # Define paths -BZZZ_DIR="/home/tony/chorus/project-queues/active/BZZZ" +BZZZ_DIR="$(pwd)" SERVICE_FILE="$BZZZ_DIR/bzzz.service" SYSTEMD_DIR="/etc/systemd/system" -# Check if Bzzz binary exists +# Check if BZZZ binary exists if [ ! -f "$BZZZ_DIR/bzzz" ]; then - echo "❌ Bzzz binary not found at $BZZZ_DIR/bzzz" - echo " Please build the binary first with: go build -o bzzz" + echo "❌ BZZZ binary not found at $BZZZ_DIR/bzzz" exit 1 fi # Make binary executable chmod +x "$BZZZ_DIR/bzzz" -echo "✅ Made Bzzz binary executable" +echo "✅ Made BZZZ binary executable" # Copy service file to systemd directory cp "$SERVICE_FILE" "$SYSTEMD_DIR/bzzz.service" @@ -43,24 +42,11 @@ echo "✅ Reloaded systemd daemon" # Enable service to start on boot systemctl enable bzzz.service -echo "✅ Enabled Bzzz service for auto-start" +echo "✅ Enabled BZZZ service for auto-start" # Start the service systemctl start bzzz.service -echo "✅ Started Bzzz service" - -# Check service status -echo "" -echo "📊 Service Status:" -systemctl status bzzz.service --no-pager -l +echo "✅ Started BZZZ service" echo "" -echo "🎉 Bzzz P2P Task Coordination Service installed successfully!" -echo "" -echo "Commands:" -echo " sudo systemctl start bzzz - Start the service" -echo " sudo systemctl stop bzzz - Stop the service" -echo " sudo systemctl restart bzzz - Restart the service" -echo " sudo systemctl status bzzz - Check service status" -echo " sudo journalctl -u bzzz -f - Follow service logs" -echo " sudo systemctl disable bzzz - Disable auto-start" \ No newline at end of file +echo "🎉 BZZZ P2P Task Coordination Service installed successfully!" diff --git a/integration_test/election_integration_test.go b/integration_test/election_integration_test.go index a50b575d..7de53f27 100644 --- a/integration_test/election_integration_test.go +++ b/integration_test/election_integration_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/election" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/election" ) func TestElectionIntegration_ElectionLogic(t *testing.T) { diff --git a/main.go b/main.go index 23e34e3e..ed25ada0 100644 --- a/main.go +++ b/main.go @@ -14,19 +14,19 @@ import ( "syscall" "time" - "github.com/anthonyrawlins/bzzz/api" - "github.com/anthonyrawlins/bzzz/coordinator" - "github.com/anthonyrawlins/bzzz/discovery" - "github.com/anthonyrawlins/bzzz/logging" - "github.com/anthonyrawlins/bzzz/p2p" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/health" - "github.com/anthonyrawlins/bzzz/pkg/shutdown" - "github.com/anthonyrawlins/bzzz/pkg/ucxi" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pubsub" - "github.com/anthonyrawlins/bzzz/reasoning" + "chorus.services/bzzz/api" + "chorus.services/bzzz/coordinator" + "chorus.services/bzzz/discovery" + "chorus.services/bzzz/logging" + "chorus.services/bzzz/p2p" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/health" + "chorus.services/bzzz/pkg/shutdown" + "chorus.services/bzzz/pkg/ucxi" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pubsub" + "chorus.services/bzzz/reasoning" "github.com/libp2p/go-libp2p-kad-dht" "github.com/libp2p/go-libp2p/core/peer" diff --git a/monitoring/hmmm_monitor.go b/monitoring/hmmm_monitor.go index 7068bcfe..09dcc92f 100644 --- a/monitoring/hmmm_monitor.go +++ b/monitoring/hmmm_monitor.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/pubsub" ) // HmmmMonitor tracks and logs HMMM coordination activity diff --git a/p2p/node.go b/p2p/node.go index 731c0e2c..a4ad55ac 100644 --- a/p2p/node.go +++ b/p2p/node.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/dht" "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/peer" diff --git a/pkg/config/config.go b/pkg/config/config.go index fe269cdd..5e93ff53 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -24,7 +24,7 @@ type SecurityConfig struct { // Config represents the complete configuration for a Bzzz agent type Config struct { - HiveAPI HiveAPIConfig `yaml:"hive_api"` + WHOOSHAPI WHOOSHAPIConfig `yaml:"hive_api"` Agent AgentConfig `yaml:"agent"` GitHub GitHubConfig `yaml:"github"` P2P P2PConfig `yaml:"p2p"` @@ -36,8 +36,8 @@ type Config struct { Security SecurityConfig `yaml:"security"` // Cluster security and elections } -// HiveAPIConfig holds Hive system integration settings -type HiveAPIConfig struct { +// WHOOSHAPIConfig holds WHOOSH system integration settings +type WHOOSHAPIConfig struct { BaseURL string `yaml:"base_url"` APIKey string `yaml:"api_key"` Timeout time.Duration `yaml:"timeout"` @@ -258,7 +258,7 @@ func LoadConfig(configPath string) (*Config, error) { // getDefaultConfig returns the default configuration func getDefaultConfig() *Config { return &Config{ - HiveAPI: HiveAPIConfig{ + WHOOSHAPI: WHOOSHAPIConfig{ BaseURL: "https://hive.home.deepblack.cloud", Timeout: 30 * time.Second, RetryCount: 3, @@ -404,12 +404,12 @@ func loadFromFile(config *Config, filePath string) error { // loadFromEnv loads configuration from environment variables func loadFromEnv(config *Config) error { - // Hive API configuration + // WHOOSH API configuration if url := os.Getenv("BZZZ_HIVE_API_URL"); url != "" { - config.HiveAPI.BaseURL = url + config.WHOOSHAPI.BaseURL = url } if apiKey := os.Getenv("BZZZ_HIVE_API_KEY"); apiKey != "" { - config.HiveAPI.APIKey = apiKey + config.WHOOSHAPI.APIKey = apiKey } // Agent configuration @@ -481,7 +481,7 @@ func loadFromEnv(config *Config) error { // validateConfig validates the configuration values func validateConfig(config *Config) error { // Validate required fields - if config.HiveAPI.BaseURL == "" { + if config.WHOOSHAPI.BaseURL == "" { return fmt.Errorf("hive_api.base_url is required") } diff --git a/pkg/config/defaults.go b/pkg/config/defaults.go index 2b143cc4..35ab72d6 100644 --- a/pkg/config/defaults.go +++ b/pkg/config/defaults.go @@ -59,19 +59,19 @@ func GetEnvironmentSpecificDefaults(environment string) *Config { switch environment { case "development", "dev": - config.HiveAPI.BaseURL = "http://localhost:8000" + config.WHOOSHAPI.BaseURL = "http://localhost:8000" config.P2P.EscalationWebhook = "http://localhost:5678/webhook-test/human-escalation" config.Logging.Level = "debug" config.Agent.PollInterval = 10 * time.Second case "staging": - config.HiveAPI.BaseURL = "https://hive-staging.home.deepblack.cloud" + config.WHOOSHAPI.BaseURL = "https://hive-staging.home.deepblack.cloud" config.P2P.EscalationWebhook = "https://n8n-staging.home.deepblack.cloud/webhook-test/human-escalation" config.Logging.Level = "info" config.Agent.PollInterval = 20 * time.Second case "production", "prod": - config.HiveAPI.BaseURL = "https://hive.home.deepblack.cloud" + config.WHOOSHAPI.BaseURL = "https://hive.home.deepblack.cloud" config.P2P.EscalationWebhook = "https://n8n.home.deepblack.cloud/webhook-test/human-escalation" config.Logging.Level = "warn" config.Agent.PollInterval = 30 * time.Second diff --git a/pkg/config/hybrid_config.go b/pkg/config/hybrid_config.go index a123acb3..d11ba403 100644 --- a/pkg/config/hybrid_config.go +++ b/pkg/config/hybrid_config.go @@ -11,10 +11,10 @@ import ( // HybridConfig manages feature flags and configuration for Phase 2 hybrid mode type HybridConfig struct { // DHT Configuration - DHT DHTConfig `json:"dht" yaml:"dht"` + DHT HybridDHTConfig `json:"dht" yaml:"dht"` // UCXL Configuration - UCXL UCXLConfig `json:"ucxl" yaml:"ucxl"` + UCXL HybridUCXLConfig `json:"ucxl" yaml:"ucxl"` // Discovery Configuration Discovery DiscoveryConfig `json:"discovery" yaml:"discovery"` @@ -23,7 +23,7 @@ type HybridConfig struct { Monitoring MonitoringConfig `json:"monitoring" yaml:"monitoring"` } -type DHTConfig struct { +type HybridDHTConfig struct { Backend string `env:"BZZZ_DHT_BACKEND" default:"mock" json:"backend" yaml:"backend"` BootstrapNodes []string `env:"BZZZ_DHT_BOOTSTRAP_NODES" json:"bootstrap_nodes" yaml:"bootstrap_nodes"` FallbackOnError bool `env:"BZZZ_FALLBACK_ON_ERROR" default:"true" json:"fallback_on_error" yaml:"fallback_on_error"` @@ -33,7 +33,7 @@ type DHTConfig struct { OperationTimeout time.Duration `env:"BZZZ_DHT_OPERATION_TIMEOUT" default:"10s" json:"operation_timeout" yaml:"operation_timeout"` } -type UCXLConfig struct { +type HybridUCXLConfig struct { CacheEnabled bool `env:"BZZZ_UCXL_CACHE_ENABLED" default:"true" json:"cache_enabled" yaml:"cache_enabled"` CacheTTL time.Duration `env:"BZZZ_UCXL_CACHE_TTL" default:"5m" json:"cache_ttl" yaml:"cache_ttl"` UseDistributed bool `env:"BZZZ_UCXL_USE_DISTRIBUTED" default:"false" json:"use_distributed" yaml:"use_distributed"` @@ -59,7 +59,7 @@ func LoadHybridConfig() (*HybridConfig, error) { config := &HybridConfig{} // Load DHT configuration - config.DHT = DHTConfig{ + config.DHT = HybridDHTConfig{ Backend: getEnvString("BZZZ_DHT_BACKEND", "mock"), BootstrapNodes: getEnvStringSlice("BZZZ_DHT_BOOTSTRAP_NODES", []string{}), FallbackOnError: getEnvBool("BZZZ_FALLBACK_ON_ERROR", true), @@ -70,7 +70,7 @@ func LoadHybridConfig() (*HybridConfig, error) { } // Load UCXL configuration - config.UCXL = UCXLConfig{ + config.UCXL = HybridUCXLConfig{ CacheEnabled: getEnvBool("BZZZ_UCXL_CACHE_ENABLED", true), CacheTTL: getEnvDuration("BZZZ_UCXL_CACHE_TTL", 5*time.Minute), UseDistributed: getEnvBool("BZZZ_UCXL_USE_DISTRIBUTED", false), @@ -105,7 +105,7 @@ func LoadHybridConfig() (*HybridConfig, error) { func (c *HybridConfig) Validate() error { // Validate DHT backend validBackends := []string{"mock", "real", "hybrid"} - if !contains(validBackends, c.DHT.Backend) { + if !hybridContains(validBackends, c.DHT.Backend) { return fmt.Errorf("invalid DHT backend '%s', must be one of: %v", c.DHT.Backend, validBackends) } @@ -192,7 +192,7 @@ func getEnvStringSlice(key string, defaultValue []string) []string { return defaultValue } -func contains(slice []string, item string) bool { +func hybridContains(slice []string, item string) bool { for _, s := range slice { if s == item { return true @@ -231,7 +231,7 @@ func (w *ConfigWatcher) Events() <-chan ConfigurationChangeEvent { // UpdateDHTBackend changes the DHT backend at runtime func (w *ConfigWatcher) UpdateDHTBackend(backend string) error { validBackends := []string{"mock", "real", "hybrid"} - if !contains(validBackends, backend) { + if !hybridContains(validBackends, backend) { return fmt.Errorf("invalid DHT backend '%s'", backend) } diff --git a/pkg/config/roles.go b/pkg/config/roles.go index c4261897..2c115ba5 100644 --- a/pkg/config/roles.go +++ b/pkg/config/roles.go @@ -2,13 +2,8 @@ package config import ( "fmt" - "io/ioutil" - "os" - "path/filepath" "strings" "time" - - "gopkg.in/yaml.v2" ) // AuthorityLevel defines the decision-making authority of a role diff --git a/pkg/coordination/dependency_detector.go b/pkg/coordination/dependency_detector.go index 0c130808..8eeb267b 100644 --- a/pkg/coordination/dependency_detector.go +++ b/pkg/coordination/dependency_detector.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/pubsub" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/pkg/coordination/meta_coordinator.go b/pkg/coordination/meta_coordinator.go index 7f4df85a..a5899d13 100644 --- a/pkg/coordination/meta_coordinator.go +++ b/pkg/coordination/meta_coordinator.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/integration" - "github.com/anthonyrawlins/bzzz/pubsub" - "github.com/anthonyrawlins/bzzz/reasoning" + "chorus.services/bzzz/pkg/integration" + "chorus.services/bzzz/pubsub" + "chorus.services/bzzz/reasoning" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/pkg/crypto/access_control.go b/pkg/crypto/access_control.go index f6e21a70..ea67cdc4 100644 --- a/pkg/crypto/access_control.go +++ b/pkg/crypto/access_control.go @@ -30,9 +30,10 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/slurp/roles" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/security" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/slurp/roles" ) // AccessControlMatrix implements sophisticated access control enforcement @@ -138,6 +139,26 @@ const ( RoleTypeEmergency RoleType = "emergency" // Emergency access role ) +// RoleStatus represents the status of a role +type RoleStatus string + +const ( + RoleStatusActive RoleStatus = "active" // Role is active and usable + RoleStatusInactive RoleStatus = "inactive" // Role is inactive + RoleStatusSuspended RoleStatus = "suspended" // Role is temporarily suspended + RoleStatusRevoked RoleStatus = "revoked" // Role has been revoked + RoleStatusPending RoleStatus = "pending" // Role is pending approval +) + +// TimeRestrictions represents time-based access restrictions +type TimeRestrictions struct { + AllowedHours []int `json:"allowed_hours"` // 0-23 allowed hours + AllowedDays []time.Weekday `json:"allowed_days"` // Allowed days of week + AllowedTimeZone string `json:"allowed_timezone"` // Timezone for restrictions + StartDate *time.Time `json:"start_date"` // Role start date + EndDate *time.Time `json:"end_date"` // Role end date +} + // Delegation represents role delegation type Delegation struct { DelegationID string `json:"delegation_id"` @@ -824,7 +845,7 @@ func NewRoleHierarchy(cfg *config.Config) (*RoleHierarchy, error) { role := &Role{ ID: roleID, Name: configRole.Name, - Description: configRole.Description, + Description: configRole.Name, // Use Name as Description since Description field doesn't exist Type: RoleTypeStandard, Status: RoleStatusActive, DirectPermissions: []string{}, diff --git a/pkg/crypto/age_crypto.go b/pkg/crypto/age_crypto.go index a05d2c77..146484c4 100644 --- a/pkg/crypto/age_crypto.go +++ b/pkg/crypto/age_crypto.go @@ -38,7 +38,7 @@ import ( "filippo.io/age" // Modern, secure encryption library "filippo.io/age/agessh" // SSH key support (unused but available) - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) // AgeCrypto handles Age encryption for role-based content security. @@ -336,7 +336,7 @@ func (ac *AgeCrypto) EncryptUCXLContent(content []byte, creatorRole string) ([]b // getDecryptableRolesForCreator determines which roles should be able to decrypt content from a creator func (ac *AgeCrypto) getDecryptableRolesForCreator(creatorRole string) ([]string, error) { roles := config.GetPredefinedRoles() - creator, exists := roles[creatorRole] + _, exists := roles[creatorRole] if !exists { return nil, fmt.Errorf("creator role '%s' not found", creatorRole) } diff --git a/pkg/crypto/audit_logger.go b/pkg/crypto/audit_logger.go index 361f3b20..aee25999 100644 --- a/pkg/crypto/audit_logger.go +++ b/pkg/crypto/audit_logger.go @@ -37,8 +37,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/ucxl" ) // AuditLoggerImpl implements comprehensive audit logging @@ -773,7 +773,7 @@ func (al *AuditLoggerImpl) updateUserBehaviorProfile(event *AuditEvent) { // Update activity patterns hour := event.Timestamp.Hour() - if !contains(profile.TypicalHours, hour) { + if !auditContains(profile.TypicalHours, hour) { profile.TypicalHours = append(profile.TypicalHours, hour) } @@ -924,7 +924,7 @@ type AuditQueryCriteria struct { } // Helper functions -func contains(slice []int, item int) bool { +func auditContains(slice []int, item int) bool { for _, s := range slice { if s == item { return true diff --git a/pkg/crypto/key_manager.go b/pkg/crypto/key_manager.go index 3884a31f..600e1b97 100644 --- a/pkg/crypto/key_manager.go +++ b/pkg/crypto/key_manager.go @@ -32,7 +32,7 @@ import ( "time" "golang.org/x/crypto/pbkdf2" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) // KeyManager handles sophisticated key management for role-based encryption @@ -98,6 +98,49 @@ type KeyUsageStats struct { SuspiciousActivity bool `json:"suspicious_activity"` } +// KeyStatus represents the status of a cryptographic key +type KeyStatus string + +const ( + KeyStatusActive KeyStatus = "active" // Key is active and can be used + KeyStatusInactive KeyStatus = "inactive" // Key is inactive + KeyStatusExpired KeyStatus = "expired" // Key has expired + KeyStatusRevoked KeyStatus = "revoked" // Key has been revoked + KeyStatusSuspended KeyStatus = "suspended" // Key is temporarily suspended + KeyStatusPending KeyStatus = "pending" // Key is pending activation +) + +// RoleKey represents a cryptographic key associated with a role +type RoleKey struct { + KeyID string `json:"key_id"` + RoleID string `json:"role_id"` + KeyType string `json:"key_type"` + Version int `json:"version"` + CreatedAt time.Time `json:"created_at"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` + Status KeyStatus `json:"status"` + KeyData []byte `json:"key_data,omitempty"` +} + +// KeyRotationResult represents the result of a key rotation operation +type KeyRotationResult struct { + Success bool `json:"success"` + OldKeyID string `json:"old_key_id"` + NewKeyID string `json:"new_key_id"` + RotatedAt time.Time `json:"rotated_at"` + RollbackKeyID string `json:"rollback_key_id,omitempty"` + Error string `json:"error,omitempty"` + RotationDuration time.Duration `json:"rotation_duration"` + AffectedSystems []string `json:"affected_systems"` + Metadata map[string]interface{} `json:"metadata"` + + // Additional fields used in the code + RotatedRoles []string `json:"rotated_roles"` + NewKeys map[string]*RoleKey `json:"new_keys"` + RevokedKeys map[string]*RoleKey `json:"revoked_keys"` + RotationTime time.Duration `json:"rotation_time"` +} + // KeyFilter represents criteria for filtering keys type KeyFilter struct { RoleID string `json:"role_id,omitempty"` diff --git a/pkg/crypto/role_crypto.go b/pkg/crypto/role_crypto.go index e545e8ee..3a91581a 100644 --- a/pkg/crypto/role_crypto.go +++ b/pkg/crypto/role_crypto.go @@ -37,40 +37,26 @@ import ( "time" "golang.org/x/crypto/pbkdf2" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" - "github.com/anthonyrawlins/bzzz/pkg/slurp/roles" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/security" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/slurp/roles" ) -// AccessLevel defines the security clearance levels for role-based encryption -type AccessLevel int +// AccessLevel type alias for backward compatibility +type AccessLevel = security.AccessLevel +// Access level constants for backward compatibility const ( - AccessPublic AccessLevel = iota // Public information, no encryption required - AccessLow // Basic encrypted information for standard roles - AccessMedium // Confidential information for coordination roles - AccessHigh // Sensitive information for decision-making roles - AccessCritical // Highly classified information for master roles only + AccessPublic = security.AccessLevelPublic + AccessLow = security.AccessLevelInternal + AccessMedium = security.AccessLevelConfidential + AccessHigh = security.AccessLevelSecret + AccessCritical = security.AccessLevelTopSecret ) -// String returns the string representation of an access level -func (al AccessLevel) String() string { - switch al { - case AccessPublic: - return "public" - case AccessLow: - return "low" - case AccessMedium: - return "medium" - case AccessHigh: - return "high" - case AccessCritical: - return "critical" - default: - return "unknown" - } -} +// Note: String() method is provided by security.AccessLevel // RoleEncryptionConfig represents encryption configuration for a role type RoleEncryptionConfig struct { @@ -160,21 +146,7 @@ type RoleCrypto struct { auditLogger AuditLogger } -// AccessControlMatrix defines role hierarchy and access relationships -type AccessControlMatrix struct { - mu sync.RWMutex - roleHierarchy map[string][]string // Role -> can access roles - accessLevels map[string]AccessLevel // Role -> access level - compartments map[string][]string // Role -> accessible compartments - policyEngine PolicyEngine // Policy evaluation engine -} - -// PolicyEngine interface for evaluating access control policies -type PolicyEngine interface { - EvaluateAccess(ctx *AccessContext) (*AccessDecision, error) - LoadPolicies(policies []*SecurityPolicy) error - ValidatePolicy(policy *SecurityPolicy) error -} +// AccessControlMatrix and PolicyEngine are defined in access_control.go // SecurityPolicy represents a security policy for access control type SecurityPolicy struct { @@ -188,33 +160,7 @@ type SecurityPolicy struct { } // PolicyRule represents a single rule within a security policy -type PolicyRule struct { - ID string `json:"id"` - Condition string `json:"condition"` // CEL expression - Action PolicyAction `json:"action"` - Effect PolicyEffect `json:"effect"` - Priority int `json:"priority"` - Metadata map[string]interface{} `json:"metadata"` -} - -// PolicyAction represents actions that can be taken by policy rules -type PolicyAction string - -const ( - PolicyActionAllow PolicyAction = "allow" - PolicyActionDeny PolicyAction = "deny" - PolicyActionAudit PolicyAction = "audit" - PolicyActionTransform PolicyAction = "transform" -) - -// PolicyEffect represents the effect of a policy rule -type PolicyEffect string - -const ( - PolicyEffectPermit PolicyEffect = "permit" - PolicyEffectForbid PolicyEffect = "forbid" - PolicyEffectOblige PolicyEffect = "oblige" -) +// PolicyRule, PolicyAction, and PolicyEffect are defined in access_control.go // AccessContext represents context for access control decisions type AccessContext struct { @@ -299,6 +245,7 @@ type AuditEvent struct { Timestamp time.Time `json:"timestamp"` UserID string `json:"user_id"` Data map[string]interface{} `json:"data"` + IntegrityHash string `json:"integrity_hash,omitempty"` } // NewRoleCrypto creates a new role-based crypto handler diff --git a/pkg/crypto/role_crypto_test.go b/pkg/crypto/role_crypto_test.go index 59ed61b6..c3f6b51c 100644 --- a/pkg/crypto/role_crypto_test.go +++ b/pkg/crypto/role_crypto_test.go @@ -29,9 +29,9 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // RoleCryptoTestSuite provides comprehensive testing for role-based encryption diff --git a/pkg/crypto/shamir.go b/pkg/crypto/shamir.go index 72c12f67..ce82a07e 100644 --- a/pkg/crypto/shamir.go +++ b/pkg/crypto/shamir.go @@ -6,7 +6,7 @@ import ( "fmt" "math/big" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) // ShamirSecretSharing implements Shamir's Secret Sharing algorithm for Age keys diff --git a/pkg/dht/encrypted_storage.go b/pkg/dht/encrypted_storage.go index d099cda7..9fdfa0cf 100644 --- a/pkg/dht/encrypted_storage.go +++ b/pkg/dht/encrypted_storage.go @@ -11,9 +11,9 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/ucxl" dht "github.com/libp2p/go-libp2p-kad-dht" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/peer" diff --git a/pkg/dht/hybrid_dht.go b/pkg/dht/hybrid_dht.go index f832db7a..fb69d270 100644 --- a/pkg/dht/hybrid_dht.go +++ b/pkg/dht/hybrid_dht.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) // HybridDHT provides a switchable interface between mock and real DHT implementations diff --git a/pkg/dht/real_dht.go b/pkg/dht/real_dht.go index 1c182b0b..c9d7295b 100644 --- a/pkg/dht/real_dht.go +++ b/pkg/dht/real_dht.go @@ -7,7 +7,7 @@ import ( "sync" "time" - bzzconfig "github.com/anthonyrawlins/bzzz/pkg/config" + bzzconfig "chorus.services/bzzz/pkg/config" ) // RealDHT implements DHT interface - simplified implementation for Phase 2 diff --git a/pkg/election/election.go b/pkg/election/election.go index b8d139a3..5c7af097 100644 --- a/pkg/election/election.go +++ b/pkg/election/election.go @@ -9,8 +9,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pubsub" libp2p "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/pkg/election/election_test.go b/pkg/election/election_test.go index 0e28d155..04394e77 100644 --- a/pkg/election/election_test.go +++ b/pkg/election/election_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) func TestElectionManager_NewElectionManager(t *testing.T) { diff --git a/pkg/election/interfaces.go b/pkg/election/interfaces.go new file mode 100644 index 00000000..9fd0889d --- /dev/null +++ b/pkg/election/interfaces.go @@ -0,0 +1,163 @@ +// Package election provides election interfaces and types +// This file contains shared interfaces to avoid circular dependencies. + +package election + +import ( + "context" + "time" +) + +// LeaderInfo represents information about the current leader +type LeaderInfo struct { + NodeID string `json:"node_id"` // Leader node ID + Role string `json:"role"` // Leader role + Term int64 `json:"term"` // Election term + ElectedAt time.Time `json:"elected_at"` // When elected + LastSeen time.Time `json:"last_seen"` // Last heartbeat + Capabilities []string `json:"capabilities"` // Leader capabilities +} + +// GenerationStatus represents status of context generation operations +type GenerationStatus struct { + IsGenerating bool `json:"is_generating"` // Whether generation is active + ActiveRequests int `json:"active_requests"` // Number of active requests + QueuedRequests int `json:"queued_requests"` // Number of queued requests + LastGeneration time.Time `json:"last_generation"` // Last generation time + GenerationCount int64 `json:"generation_count"` // Total generations + LeaderID string `json:"leader_id"` // Current leader +} + +// ContextGenerationRequest represents a request for context generation +type ContextGenerationRequest struct { + ID string `json:"id"` // Request ID + RequesterID string `json:"requester_id"` // Node requesting + Priority int `json:"priority"` // Request priority + Context map[string]interface{} `json:"context"` // Request context + CreatedAt time.Time `json:"created_at"` // Request creation time + Deadline *time.Time `json:"deadline"` // Optional deadline +} + +// ContextGenerationResult represents the result of a context generation request +type ContextGenerationResult struct { + RequestID string `json:"request_id"` // Original request ID + Success bool `json:"success"` // Whether successful + Error string `json:"error"` // Error message if failed + GeneratedAt time.Time `json:"generated_at"` // When generated + GeneratedBy string `json:"generated_by"` // Node that generated + Context []byte `json:"context"` // Generated context data +} + +// ContextLeadershipCallbacks defines callbacks for context leadership events +type ContextLeadershipCallbacks struct { + // OnBecomeContextLeader is called when this node becomes context leader + OnBecomeContextLeader func(ctx context.Context, term int64) error + + // OnLoseContextLeadership is called when this node loses context leadership + OnLoseContextLeadership func(ctx context.Context, newLeader string) error + + // OnContextLeaderChanged is called when any leadership change occurs + OnContextLeaderChanged func(oldLeader, newLeader string, term int64) + + // OnContextGenerationStarted is called when context generation starts + OnContextGenerationStarted func(leaderID string) + + // OnContextGenerationStopped is called when context generation stops + OnContextGenerationStopped func(leaderID string, reason string) + + // OnContextFailover is called when context leadership failover occurs + OnContextFailover func(oldLeader, newLeader string, duration time.Duration) + + // OnContextError is called when context-related errors occur + OnContextError func(err error, severity ErrorSeverity) +} + +// ErrorSeverity represents severity levels for election errors +type ErrorSeverity string + +const ( + ErrorSeverityLow ErrorSeverity = "low" // Low severity error + ErrorSeverityMedium ErrorSeverity = "medium" // Medium severity error + ErrorSeverityHigh ErrorSeverity = "high" // High severity error + ErrorSeverityCritical ErrorSeverity = "critical" // Critical error +) + +// ContextManager defines interface for managing context generation +type ContextManager interface { + // Context generation management + RequestContextGeneration(req *ContextGenerationRequest) error + GetGenerationStatus() (*GenerationStatus, error) + StartGeneration(ctx context.Context) error + StopGeneration(ctx context.Context) error + + // Leadership awareness + IsLeader() bool + SetLeader(isLeader bool) + + // Health and status + GetHealth() (bool, error) + GetMetrics() map[string]interface{} +} + +// Additional types for context failover (simplified versions) + +// ContextGenerationJob represents a context generation job +type ContextGenerationJob struct { + ID string `json:"id"` // Job ID + RequestID string `json:"request_id"` // Original request ID + Status string `json:"status"` // Job status + CreatedAt time.Time `json:"created_at"` // Creation time + UpdatedAt time.Time `json:"updated_at"` // Last update + CompletedAt *time.Time `json:"completed_at"` // Completion time + Context map[string]interface{} `json:"context"` // Job context +} + +// ClusterState represents simplified cluster state +type ClusterState struct { + Nodes map[string]interface{} `json:"nodes"` // Node states + Leadership map[string]string `json:"leadership"` // Leadership assignments + LastUpdated time.Time `json:"last_updated"` // Last state update + StateVersion int64 `json:"state_version"` // State version +} + +// ResourceAllocation represents resource allocation +type ResourceAllocation struct { + NodeID string `json:"node_id"` // Target node + Resources map[string]interface{} `json:"resources"` // Allocated resources + AllocatedAt time.Time `json:"allocated_at"` // Allocation time + ExpiresAt *time.Time `json:"expires_at"` // Expiration time +} + +// ManagerConfig represents manager configuration +type ManagerConfig struct { + MaxConcurrentJobs int `json:"max_concurrent_jobs"` // Max concurrent jobs + QueueSize int `json:"queue_size"` // Queue size limit + TimeoutDuration time.Duration `json:"timeout_duration"` // Job timeout + Settings map[string]interface{} `json:"settings"` // Additional settings +} + +// GenerationPolicy represents context generation policy +type GenerationPolicy struct { + Priority string `json:"priority"` // Priority scheme + MaxRetries int `json:"max_retries"` // Maximum retries + BackoffType string `json:"backoff_type"` // Backoff strategy + Settings map[string]interface{} `json:"settings"` // Policy settings +} + +// QueuePolicy represents queue management policy +type QueuePolicy struct { + Strategy string `json:"strategy"` // Queue strategy + MaxSize int `json:"max_size"` // Maximum queue size + DropPolicy string `json:"drop_policy"` // What to drop when full + Settings map[string]interface{} `json:"settings"` // Queue settings +} + +// DefaultManagerConfig returns default manager configuration +func DefaultManagerConfig() *ManagerConfig { + return &ManagerConfig{ + MaxConcurrentJobs: 10, + QueueSize: 100, + TimeoutDuration: 30 * time.Minute, + Settings: make(map[string]interface{}), + } +} \ No newline at end of file diff --git a/pkg/election/slurp_election.go b/pkg/election/slurp_election.go index fedab6fe..82cc5d92 100644 --- a/pkg/election/slurp_election.go +++ b/pkg/election/slurp_election.go @@ -4,8 +4,7 @@ import ( "context" "time" - "github.com/anthonyrawlins/bzzz/pkg/slurp/leader" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // SLURPElection extends the base Election interface to include Project Manager contextual intelligence duties @@ -15,19 +14,19 @@ type SLURPElection interface { // Project Manager specific capabilities // RegisterContextManager registers a SLURP context manager for leader duties - RegisterContextManager(manager leader.ContextManager) error + RegisterContextManager(manager ContextManager) error // IsContextLeader returns whether this node is the current context generation leader IsContextLeader() bool // GetContextManager returns the registered context manager (if leader) - GetContextManager() (leader.ContextManager, error) + GetContextManager() (ContextManager, error) // TransferContextLeadership initiates graceful context leadership transfer TransferContextLeadership(ctx context.Context, targetNodeID string) error // GetContextLeaderInfo returns information about current context leader - GetContextLeaderInfo() (*leader.LeaderInfo, error) + GetContextLeaderInfo() (*LeaderInfo, error) // Context generation coordination @@ -38,10 +37,10 @@ type SLURPElection interface { StopContextGeneration(ctx context.Context) error // GetContextGenerationStatus returns status of context operations - GetContextGenerationStatus() (*leader.GenerationStatus, error) + GetContextGenerationStatus() (*GenerationStatus, error) // RequestContextGeneration queues a context generation request - RequestContextGeneration(req *leader.ContextGenerationRequest) error + RequestContextGeneration(req *ContextGenerationRequest) error // Context leadership monitoring @@ -167,19 +166,19 @@ type ContextFailoverState struct { TransferTime time.Time `json:"transfer_time"` // When transfer occurred // Context generation state - QueuedRequests []*leader.ContextGenerationRequest `json:"queued_requests"` // Queued requests - ActiveJobs map[string]*leader.ContextGenerationJob `json:"active_jobs"` // Active jobs - CompletedJobs []*leader.ContextGenerationJob `json:"completed_jobs"` // Recent completed jobs + QueuedRequests []*ContextGenerationRequest `json:"queued_requests"` // Queued requests + ActiveJobs map[string]*ContextGenerationJob `json:"active_jobs"` // Active jobs + CompletedJobs []*ContextGenerationJob `json:"completed_jobs"` // Recent completed jobs // Cluster coordination state - ClusterState *leader.ClusterState `json:"cluster_state"` // Current cluster state - ResourceAllocations map[string]*leader.ResourceAllocation `json:"resource_allocations"` // Resource allocations + ClusterState *ClusterState `json:"cluster_state"` // Current cluster state + ResourceAllocations map[string]*ResourceAllocation `json:"resource_allocations"` // Resource allocations NodeAssignments map[string][]string `json:"node_assignments"` // Task assignments per node // Configuration state - ManagerConfig *leader.ManagerConfig `json:"manager_config"` // Manager configuration - GenerationPolicy *leader.GenerationPolicy `json:"generation_policy"` // Generation policy - QueuePolicy *leader.QueuePolicy `json:"queue_policy"` // Queue policy + ManagerConfig *ManagerConfig `json:"manager_config"` // Manager configuration + GenerationPolicy *GenerationPolicy `json:"generation_policy"` // Generation policy + QueuePolicy *QueuePolicy `json:"queue_policy"` // Queue policy // State validation StateVersion int64 `json:"state_version"` // State version diff --git a/pkg/election/slurp_manager.go b/pkg/election/slurp_manager.go index 91966fae..b7c72900 100644 --- a/pkg/election/slurp_manager.go +++ b/pkg/election/slurp_manager.go @@ -9,9 +9,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/slurp/leader" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pubsub" libp2p "github.com/libp2p/go-libp2p/core/host" ) @@ -21,7 +20,7 @@ type SLURPElectionManager struct { // SLURP-specific state contextMu sync.RWMutex - contextManager leader.ContextManager + contextManager ContextManager slurpConfig *SLURPElectionConfig contextCallbacks *ContextLeadershipCallbacks @@ -75,7 +74,7 @@ func NewSLURPElectionManager( } // RegisterContextManager registers a SLURP context manager for leader duties -func (sem *SLURPElectionManager) RegisterContextManager(manager leader.ContextManager) error { +func (sem *SLURPElectionManager) RegisterContextManager(manager ContextManager) error { sem.contextMu.Lock() defer sem.contextMu.Unlock() @@ -102,7 +101,7 @@ func (sem *SLURPElectionManager) IsContextLeader() bool { } // GetContextManager returns the registered context manager (if leader) -func (sem *SLURPElectionManager) GetContextManager() (leader.ContextManager, error) { +func (sem *SLURPElectionManager) GetContextManager() (ContextManager, error) { sem.contextMu.RLock() defer sem.contextMu.RUnlock() @@ -175,7 +174,7 @@ func (sem *SLURPElectionManager) TransferContextLeadership(ctx context.Context, } // GetContextLeaderInfo returns information about current context leader -func (sem *SLURPElectionManager) GetContextLeaderInfo() (*leader.LeaderInfo, error) { +func (sem *SLURPElectionManager) GetContextLeaderInfo() (*LeaderInfo, error) { sem.contextMu.RLock() defer sem.contextMu.RUnlock() @@ -184,7 +183,7 @@ func (sem *SLURPElectionManager) GetContextLeaderInfo() (*leader.LeaderInfo, err return nil, fmt.Errorf("no current leader") } - info := &leader.LeaderInfo{ + info := &LeaderInfo{ NodeID: leaderID, Term: sem.contextTerm, ElectedAt: time.Now(), // TODO: Track actual election time @@ -342,14 +341,14 @@ func (sem *SLURPElectionManager) StopContextGeneration(ctx context.Context) erro } // GetContextGenerationStatus returns status of context operations -func (sem *SLURPElectionManager) GetContextGenerationStatus() (*leader.GenerationStatus, error) { +func (sem *SLURPElectionManager) GetContextGenerationStatus() (*GenerationStatus, error) { sem.contextMu.RLock() manager := sem.contextManager isLeader := sem.isContextLeader sem.contextMu.RUnlock() if manager == nil { - return &leader.GenerationStatus{ + return &GenerationStatus{ IsLeader: false, LeaderID: sem.GetCurrentAdmin(), LastUpdate: time.Now(), @@ -369,7 +368,7 @@ func (sem *SLURPElectionManager) GetContextGenerationStatus() (*leader.Generatio } // RequestContextGeneration queues a context generation request -func (sem *SLURPElectionManager) RequestContextGeneration(req *leader.ContextGenerationRequest) error { +func (sem *SLURPElectionManager) RequestContextGeneration(req *ContextGenerationRequest) error { sem.contextMu.RLock() manager := sem.contextManager isLeader := sem.isContextLeader @@ -422,15 +421,15 @@ func (sem *SLURPElectionManager) PrepareContextFailover(ctx context.Context) (*C if sem.contextManager != nil { // Get queued requests (if supported) // TODO: Add interface method to get queued requests - state.QueuedRequests = []*leader.ContextGenerationRequest{} + state.QueuedRequests = []*ContextGenerationRequest{} // Get active jobs (if supported) // TODO: Add interface method to get active jobs - state.ActiveJobs = make(map[string]*leader.ContextGenerationJob) + state.ActiveJobs = make(map[string]*ContextGenerationJob) // Get manager configuration // TODO: Add interface method to get configuration - state.ManagerConfig = leader.DefaultManagerConfig() + state.ManagerConfig = DefaultManagerConfig() } // Get cluster health snapshot @@ -743,7 +742,7 @@ func (chm *ContextHealthMonitor) GetClusterHealth() *ContextClusterHealth { } // UpdateGenerationStatus updates health based on generation status -func (chm *ContextHealthMonitor) UpdateGenerationStatus(status *leader.GenerationStatus) { +func (chm *ContextHealthMonitor) UpdateGenerationStatus(status *GenerationStatus) { chm.mu.Lock() defer chm.mu.Unlock() diff --git a/pkg/election/slurp_scoring.go b/pkg/election/slurp_scoring.go index 7c0d015a..42435f20 100644 --- a/pkg/election/slurp_scoring.go +++ b/pkg/election/slurp_scoring.go @@ -5,7 +5,7 @@ import ( "log" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) // SLURPCandidateCapabilities represents SLURP-specific capabilities for election candidates diff --git a/pkg/health/integration_example.go b/pkg/health/integration_example.go index 723fcc0b..ee76365a 100644 --- a/pkg/health/integration_example.go +++ b/pkg/health/integration_example.go @@ -6,7 +6,7 @@ import ( "net/http" "time" - "github.com/anthonyrawlins/bzzz/pkg/shutdown" + "chorus.services/bzzz/pkg/shutdown" ) // IntegrationExample demonstrates how to integrate health monitoring and graceful shutdown diff --git a/pkg/health/manager.go b/pkg/health/manager.go index 17b1b900..6f782613 100644 --- a/pkg/health/manager.go +++ b/pkg/health/manager.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/shutdown" + "chorus.services/bzzz/pkg/shutdown" ) // Manager provides comprehensive health monitoring and integrates with graceful shutdown diff --git a/pkg/integration/slurp_client.go b/pkg/integration/slurp_client.go index 1132fa85..65175f9a 100644 --- a/pkg/integration/slurp_client.go +++ b/pkg/integration/slurp_client.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) // SlurpClient handles HTTP communication with SLURP endpoints diff --git a/pkg/integration/slurp_events.go b/pkg/integration/slurp_events.go index 4aa8c4c9..ae1cf56a 100644 --- a/pkg/integration/slurp_events.go +++ b/pkg/integration/slurp_events.go @@ -8,8 +8,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pubsub" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/pkg/mcp/server.go b/pkg/mcp/server.go index 41e4a5b9..10898213 100644 --- a/pkg/mcp/server.go +++ b/pkg/mcp/server.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/logging" - "github.com/anthonyrawlins/bzzz/p2p" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/logging" + "chorus.services/bzzz/p2p" + "chorus.services/bzzz/pubsub" "github.com/gorilla/websocket" "github.com/sashabaranov/go-openai" ) diff --git a/pkg/protocol/integration.go b/pkg/protocol/integration.go index 3d8424c1..f00c3372 100644 --- a/pkg/protocol/integration.go +++ b/pkg/protocol/integration.go @@ -7,9 +7,9 @@ import ( "strings" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/p2p" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/p2p" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/pkg/security/access_levels.go b/pkg/security/access_levels.go new file mode 100644 index 00000000..37a7c802 --- /dev/null +++ b/pkg/security/access_levels.go @@ -0,0 +1,102 @@ +// Package security provides shared security types and constants for BZZZ +// This package contains common security definitions that are used by both +// the crypto and slurp/roles packages to avoid circular dependencies. + +package security + +import "fmt" + +// AccessLevel defines the security clearance levels for role-based encryption. +// These levels determine what level of sensitive information a user or role can access. +type AccessLevel int + +const ( + // Public - Information accessible to all users + AccessLevelPublic AccessLevel = iota + + // Internal - Information restricted to internal users + AccessLevelInternal + + // Confidential - Information requiring confidential clearance + AccessLevelConfidential + + // Secret - Information requiring secret clearance + AccessLevelSecret + + // TopSecret - Information requiring top secret clearance + AccessLevelTopSecret +) + +// String returns the string representation of the access level +func (al AccessLevel) String() string { + switch al { + case AccessLevelPublic: + return "public" + case AccessLevelInternal: + return "internal" + case AccessLevelConfidential: + return "confidential" + case AccessLevelSecret: + return "secret" + case AccessLevelTopSecret: + return "top-secret" + default: + return "unknown" + } +} + +// MarshalJSON implements json.Marshaler +func (al AccessLevel) MarshalJSON() ([]byte, error) { + return []byte(fmt.Sprintf(`"%s"`, al.String())), nil +} + +// UnmarshalJSON implements json.Unmarshaler +func (al *AccessLevel) UnmarshalJSON(data []byte) error { + str := string(data) + str = str[1 : len(str)-1] // Remove quotes + + switch str { + case "public": + *al = AccessLevelPublic + case "internal": + *al = AccessLevelInternal + case "confidential": + *al = AccessLevelConfidential + case "secret": + *al = AccessLevelSecret + case "top-secret": + *al = AccessLevelTopSecret + default: + return fmt.Errorf("unknown access level: %s", str) + } + + return nil +} + +// CanAccess returns true if this access level can access the target level +func (al AccessLevel) CanAccess(target AccessLevel) bool { + return al >= target +} + +// IsValid returns true if the access level is valid +func (al AccessLevel) IsValid() bool { + return al >= AccessLevelPublic && al <= AccessLevelTopSecret +} + +// GetRequiredLevel returns the minimum access level required for a given sensitivity +func GetRequiredLevel(sensitivity string) AccessLevel { + switch sensitivity { + case "public": + return AccessLevelPublic + case "internal": + return AccessLevelInternal + case "confidential": + return AccessLevelConfidential + case "secret": + return AccessLevelSecret + case "top-secret": + return AccessLevelTopSecret + default: + return AccessLevelInternal // Default to internal for unknown + } +} \ No newline at end of file diff --git a/pkg/slurp/alignment/interfaces.go b/pkg/slurp/alignment/interfaces.go index d92ec6f8..ac9cf299 100644 --- a/pkg/slurp/alignment/interfaces.go +++ b/pkg/slurp/alignment/interfaces.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // GoalManager handles definition and management of project goals diff --git a/pkg/slurp/alignment/types.go b/pkg/slurp/alignment/types.go index bcb2d01c..c88f9683 100644 --- a/pkg/slurp/alignment/types.go +++ b/pkg/slurp/alignment/types.go @@ -3,8 +3,8 @@ package alignment import ( "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // ProjectGoal represents a high-level project objective diff --git a/pkg/slurp/context/resolver.go b/pkg/slurp/context/resolver.go index ef79d6a4..8c32127b 100644 --- a/pkg/slurp/context/resolver.go +++ b/pkg/slurp/context/resolver.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/config" ) // ContextResolver defines the interface for hierarchical context resolution diff --git a/pkg/slurp/context/types.go b/pkg/slurp/context/types.go index 526fa048..eb46074d 100644 --- a/pkg/slurp/context/types.go +++ b/pkg/slurp/context/types.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/config" ) // ContextNode represents a hierarchical context node in the SLURP system. @@ -36,7 +36,7 @@ type ContextNode struct { // Access control EncryptedFor []string `json:"encrypted_for"` // Roles that can access - AccessLevel config.RoleAccessLevel `json:"access_level"` // Required access level + AccessLevel RoleAccessLevel `json:"access_level"` // Required access level // Custom metadata Metadata map[string]interface{} `json:"metadata,omitempty"` // Additional metadata diff --git a/pkg/slurp/distribution/coordinator.go b/pkg/slurp/distribution/coordinator.go index f4b5dd58..451f3dc1 100644 --- a/pkg/slurp/distribution/coordinator.go +++ b/pkg/slurp/distribution/coordinator.go @@ -7,12 +7,12 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/election" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/election" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // DistributionCoordinator orchestrates distributed context operations across the cluster diff --git a/pkg/slurp/distribution/dht.go b/pkg/slurp/distribution/dht.go index 701ae695..df951f3e 100644 --- a/pkg/slurp/distribution/dht.go +++ b/pkg/slurp/distribution/dht.go @@ -9,12 +9,12 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/election" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/config" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/election" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/config" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // ContextDistributor handles distributed context operations via DHT diff --git a/pkg/slurp/distribution/dht_impl.go b/pkg/slurp/distribution/dht_impl.go index ce74dff6..4f59533b 100644 --- a/pkg/slurp/distribution/dht_impl.go +++ b/pkg/slurp/distribution/dht_impl.go @@ -10,12 +10,12 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/election" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/config" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/election" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/config" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // DHTContextDistributor implements ContextDistributor using BZZZ DHT infrastructure diff --git a/pkg/slurp/distribution/gossip.go b/pkg/slurp/distribution/gossip.go index 401eda90..9a4e3cbd 100644 --- a/pkg/slurp/distribution/gossip.go +++ b/pkg/slurp/distribution/gossip.go @@ -9,9 +9,9 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/ucxl" ) // GossipProtocolImpl implements GossipProtocol interface for metadata synchronization diff --git a/pkg/slurp/distribution/monitoring.go b/pkg/slurp/distribution/monitoring.go index fc704d10..fa82e184 100644 --- a/pkg/slurp/distribution/monitoring.go +++ b/pkg/slurp/distribution/monitoring.go @@ -10,7 +10,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) // MonitoringSystem provides comprehensive monitoring for the distributed context system diff --git a/pkg/slurp/distribution/network.go b/pkg/slurp/distribution/network.go index 89f6110f..5af4e9f5 100644 --- a/pkg/slurp/distribution/network.go +++ b/pkg/slurp/distribution/network.go @@ -9,8 +9,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/config" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/pkg/slurp/distribution/replication.go b/pkg/slurp/distribution/replication.go index 3f83e499..61c992a4 100644 --- a/pkg/slurp/distribution/replication.go +++ b/pkg/slurp/distribution/replication.go @@ -7,9 +7,9 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/ucxl" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/pkg/slurp/distribution/security.go b/pkg/slurp/distribution/security.go index 517a8604..b05db695 100644 --- a/pkg/slurp/distribution/security.go +++ b/pkg/slurp/distribution/security.go @@ -14,8 +14,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/crypto" ) // SecurityManager handles all security aspects of the distributed system diff --git a/pkg/slurp/intelligence/directory_analyzer.go b/pkg/slurp/intelligence/directory_analyzer.go index e7d9ee5a..3dee2f18 100644 --- a/pkg/slurp/intelligence/directory_analyzer.go +++ b/pkg/slurp/intelligence/directory_analyzer.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // DefaultDirectoryAnalyzer provides comprehensive directory structure analysis diff --git a/pkg/slurp/intelligence/engine.go b/pkg/slurp/intelligence/engine.go index d3517434..3f28c00f 100644 --- a/pkg/slurp/intelligence/engine.go +++ b/pkg/slurp/intelligence/engine.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // IntelligenceEngine provides AI-powered context analysis and generation diff --git a/pkg/slurp/intelligence/engine_impl.go b/pkg/slurp/intelligence/engine_impl.go index 091d076a..affe3c41 100644 --- a/pkg/slurp/intelligence/engine_impl.go +++ b/pkg/slurp/intelligence/engine_impl.go @@ -10,8 +10,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // AnalyzeFile analyzes a single file and generates contextual understanding diff --git a/pkg/slurp/intelligence/engine_test.go b/pkg/slurp/intelligence/engine_test.go index 9b094122..a4db9d0e 100644 --- a/pkg/slurp/intelligence/engine_test.go +++ b/pkg/slurp/intelligence/engine_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) func TestIntelligenceEngine_Integration(t *testing.T) { diff --git a/pkg/slurp/intelligence/goal_alignment.go b/pkg/slurp/intelligence/goal_alignment.go index 1a6e56ec..736c2787 100644 --- a/pkg/slurp/intelligence/goal_alignment.go +++ b/pkg/slurp/intelligence/goal_alignment.go @@ -9,7 +9,7 @@ import ( "sync" "time" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // GoalAlignmentEngine provides comprehensive goal alignment assessment diff --git a/pkg/slurp/intelligence/pattern_detector.go b/pkg/slurp/intelligence/pattern_detector.go index cb11d956..329529ad 100644 --- a/pkg/slurp/intelligence/pattern_detector.go +++ b/pkg/slurp/intelligence/pattern_detector.go @@ -9,7 +9,7 @@ import ( "strings" "time" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // DefaultPatternDetector provides comprehensive pattern detection capabilities diff --git a/pkg/slurp/intelligence/rag_integration.go b/pkg/slurp/intelligence/rag_integration.go index fc4e4119..edcb1db3 100644 --- a/pkg/slurp/intelligence/rag_integration.go +++ b/pkg/slurp/intelligence/rag_integration.go @@ -11,7 +11,7 @@ import ( "sync" "time" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // DefaultRAGIntegration provides comprehensive RAG system integration diff --git a/pkg/slurp/intelligence/role_aware_processor.go b/pkg/slurp/intelligence/role_aware_processor.go index 0b61bfed..b9374c52 100644 --- a/pkg/slurp/intelligence/role_aware_processor.go +++ b/pkg/slurp/intelligence/role_aware_processor.go @@ -8,8 +8,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/crypto" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // RoleAwareProcessor provides role-based context processing and insight generation diff --git a/pkg/slurp/intelligence/utils.go b/pkg/slurp/intelligence/utils.go index f2b356b3..53b7ffd2 100644 --- a/pkg/slurp/intelligence/utils.go +++ b/pkg/slurp/intelligence/utils.go @@ -16,7 +16,7 @@ import ( "strings" "time" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // Utility functions and helper types for the intelligence engine diff --git a/pkg/slurp/leader/config.go b/pkg/slurp/leader/config.go index 456b1926..283dcbb1 100644 --- a/pkg/slurp/leader/config.go +++ b/pkg/slurp/leader/config.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) // SLURPLeaderConfig represents comprehensive configuration for SLURP-enabled leader election diff --git a/pkg/slurp/leader/election_integration.go b/pkg/slurp/leader/election_integration.go index 24bb9b48..f4117844 100644 --- a/pkg/slurp/leader/election_integration.go +++ b/pkg/slurp/leader/election_integration.go @@ -7,11 +7,11 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/election" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/slurp/intelligence" - "github.com/anthonyrawlins/bzzz/pkg/slurp/storage" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/election" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/slurp/intelligence" + "chorus.services/bzzz/pkg/slurp/storage" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // ElectionIntegratedContextManager integrates SLURP context management with BZZZ election system diff --git a/pkg/slurp/leader/integration_example.go b/pkg/slurp/leader/integration_example.go index 60602b40..773939d3 100644 --- a/pkg/slurp/leader/integration_example.go +++ b/pkg/slurp/leader/integration_example.go @@ -6,13 +6,13 @@ import ( "log" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/election" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/slurp/intelligence" - "github.com/anthonyrawlins/bzzz/pkg/slurp/storage" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/election" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/slurp/intelligence" + "chorus.services/bzzz/pkg/slurp/storage" + slurpContext "chorus.services/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pubsub" libp2p "github.com/libp2p/go-libp2p/core/host" ) diff --git a/pkg/slurp/leader/manager.go b/pkg/slurp/leader/manager.go index 496b817e..90b0bb11 100644 --- a/pkg/slurp/leader/manager.go +++ b/pkg/slurp/leader/manager.go @@ -8,12 +8,12 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/election" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/slurp/intelligence" - "github.com/anthonyrawlins/bzzz/pkg/slurp/storage" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/election" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/slurp/intelligence" + "chorus.services/bzzz/pkg/slurp/storage" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // ContextManager handles leader-only context generation duties diff --git a/pkg/slurp/leader/types.go b/pkg/slurp/leader/types.go index 52217a8f..5bf12bb0 100644 --- a/pkg/slurp/leader/types.go +++ b/pkg/slurp/leader/types.go @@ -3,8 +3,8 @@ package leader import ( "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // Priority represents priority levels for context generation requests diff --git a/pkg/slurp/roles/interfaces.go b/pkg/slurp/roles/interfaces.go index b59f8ef6..062563d7 100644 --- a/pkg/slurp/roles/interfaces.go +++ b/pkg/slurp/roles/interfaces.go @@ -4,9 +4,9 @@ import ( "context" "time" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/security" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // RoleManager handles definition and management of roles and permissions @@ -63,7 +63,7 @@ type AccessController interface { CheckContextAccess(ctx context.Context, userID string, address ucxl.Address, accessType AccessType) (bool, error) // CheckAccessLevel checks if a user meets the required access level - CheckAccessLevel(ctx context.Context, userID string, requiredLevel crypto.AccessLevel) (bool, error) + CheckAccessLevel(ctx context.Context, userID string, requiredLevel security.AccessLevel) (bool, error) // BatchCheckPermissions checks multiple permissions efficiently BatchCheckPermissions(ctx context.Context, userID string, permissions []Permission) (map[Permission]bool, error) @@ -72,7 +72,7 @@ type AccessController interface { EvaluateContextPermissions(ctx context.Context, userID string, node *slurpContext.ContextNode) (*ContextPermissions, error) // GetUserAccessLevel gets the maximum access level for a user - GetUserAccessLevel(ctx context.Context, userID string) (crypto.AccessLevel, error) + GetUserAccessLevel(ctx context.Context, userID string) (security.AccessLevel, error) // CreateAccessToken creates a time-limited access token CreateAccessToken(ctx context.Context, userID string, permissions []Permission, ttl time.Duration) (*AccessToken, error) diff --git a/pkg/slurp/roles/types.go b/pkg/slurp/roles/types.go index ae5b56b5..7f2c591a 100644 --- a/pkg/slurp/roles/types.go +++ b/pkg/slurp/roles/types.go @@ -3,11 +3,179 @@ package roles import ( "time" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/security" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) +// Stub types for interfaces (to be implemented later) +type RoleFilter struct { + RoleIDs []string `json:"role_ids,omitempty"` + Permissions []string `json:"permissions,omitempty"` +} + +type RoleHierarchy struct { + Roles map[string][]string `json:"roles"` +} + +type RoleValidation struct { + Valid bool `json:"valid"` + Errors []string `json:"errors"` +} + +type RoleStatistics struct { + TotalRoles int `json:"total_roles"` + ActiveRoles int `json:"active_roles"` +} + +type AccessStatistics struct { + TotalRequests int `json:"total_requests"` + GrantedRequests int `json:"granted_requests"` +} + +type FilteringStatistics struct { + TotalFiltered int `json:"total_filtered"` + PassedFilter int `json:"passed_filter"` +} + +type EvaluationStatistics struct { + TotalEvaluations int `json:"total_evaluations"` + SuccessfulEvaluations int `json:"successful_evaluations"` +} + +type PermissionChange struct { + RoleID string `json:"role_id"` + Permission string `json:"permission"` + Action string `json:"action"` + Timestamp time.Time `json:"timestamp"` +} + +type SecurityEvent struct { + EventType string `json:"event_type"` + RoleID string `json:"role_id"` + Timestamp time.Time `json:"timestamp"` + Details map[string]interface{} `json:"details"` +} + +type AuditFilter struct { + RoleIDs []string `json:"role_ids,omitempty"` + EventTypes []string `json:"event_types,omitempty"` + StartTime *time.Time `json:"start_time,omitempty"` + EndTime *time.Time `json:"end_time,omitempty"` +} + +type AuditEntry struct { + ID string `json:"id"` + Timestamp time.Time `json:"timestamp"` + EventType string `json:"event_type"` + RoleID string `json:"role_id"` + Details map[string]interface{} `json:"details"` +} + +type AuditStatistics struct { + TotalEntries int `json:"total_entries"` + RecentEntries int `json:"recent_entries"` +} + +type RetentionPolicy struct { + Duration time.Duration `json:"duration"` + MaxEntries int `json:"max_entries"` +} + +type ArchiveResult struct { + ArchivedCount int `json:"archived_count"` + Success bool `json:"success"` +} + +type EncryptionStatistics struct { + TotalEncrypted int `json:"total_encrypted"` + EncryptionErrors int `json:"encryption_errors"` +} + +type AccessPolicy struct { + ID string `json:"id"` + Name string `json:"name"` + Rules []string `json:"rules"` + CreatedAt time.Time `json:"created_at"` +} + +type PolicyFilter struct { + PolicyIDs []string `json:"policy_ids,omitempty"` + Names []string `json:"names,omitempty"` +} + +type AccessRequest struct { + ID string `json:"id"` + UserID string `json:"user_id"` + RoleID string `json:"role_id"` + Resource string `json:"resource"` + Action string `json:"action"` + Timestamp time.Time `json:"timestamp"` +} + +type PolicyEvaluation struct { + PolicyID string `json:"policy_id"` + Result bool `json:"result"` + Reason string `json:"reason"` + Timestamp time.Time `json:"timestamp"` +} + +type PolicyValidation struct { + Valid bool `json:"valid"` + Errors []string `json:"errors"` + Warnings []string `json:"warnings"` +} + +type UserSession struct { + ID string `json:"id"` + UserID string `json:"user_id"` + RoleIDs []string `json:"role_ids"` + CreatedAt time.Time `json:"created_at"` + LastAccessed time.Time `json:"last_accessed"` + ExpiresAt time.Time `json:"expires_at"` + Active bool `json:"active"` +} + +type SessionUpdate struct { + SessionID string `json:"session_id"` + RoleIDs []string `json:"role_ids,omitempty"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` + Active *bool `json:"active,omitempty"` +} + +type CleanupResult struct { + CleanedSessions int `json:"cleaned_sessions"` + Success bool `json:"success"` +} + +type SessionStatistics struct { + ActiveSessions int `json:"active_sessions"` + TotalSessions int `json:"total_sessions"` + ExpiredSessions int `json:"expired_sessions"` +} + +type Delegation struct { + ID string `json:"id"` + DelegatorID string `json:"delegator_id"` + DelegateID string `json:"delegate_id"` + RoleID string `json:"role_id"` + CreatedAt time.Time `json:"created_at"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` + Active bool `json:"active"` +} + +type DelegationValidation struct { + Valid bool `json:"valid"` + Errors []string `json:"errors"` + Warnings []string `json:"warnings"` +} + +type DelegationStatistics struct { + ActiveDelegations int `json:"active_delegations"` + TotalDelegations int `json:"total_delegations"` + ExpiredDelegations int `json:"expired_delegations"` +} + // Permission represents a specific permission within the system type Permission string @@ -75,7 +243,7 @@ type Role struct { Name string `json:"name"` // Human-readable role name Description string `json:"description"` // Role description Permissions []Permission `json:"permissions"` // Granted permissions - AccessLevel crypto.AccessLevel `json:"access_level"` // Maximum access level + AccessLevel security.AccessLevel `json:"access_level"` // Maximum access level Priority int `json:"priority"` // Role priority for conflicts // Hierarchy @@ -182,7 +350,7 @@ type ContextPermissions struct { CanWrite bool `json:"can_write"` // Can write/modify context CanDelete bool `json:"can_delete"` // Can delete context CanDistribute bool `json:"can_distribute"` // Can distribute context - AccessLevel crypto.AccessLevel `json:"access_level"` // Granted access level + AccessLevel security.AccessLevel `json:"access_level"` // Granted access level AllowedFields []string `json:"allowed_fields"` // Fields user can access RestrictedFields []string `json:"restricted_fields"` // Fields user cannot access Conditions []*PermissionCondition `json:"conditions"` // Access conditions @@ -204,7 +372,7 @@ type AccessToken struct { Token string `json:"token"` // Token string UserID string `json:"user_id"` // User identifier Permissions []Permission `json:"permissions"` // Granted permissions - AccessLevel crypto.AccessLevel `json:"access_level"` // Granted access level + AccessLevel security.AccessLevel `json:"access_level"` // Granted access level IssuedAt time.Time `json:"issued_at"` // When issued ExpiresAt time.Time `json:"expires_at"` // When expires Scope []string `json:"scope"` // Token scope @@ -251,7 +419,7 @@ type LabeledContext struct { Context *slurpContext.ContextNode `json:"context"` // Original context SecurityLabels []*SecurityLabel `json:"security_labels"` // Applied security labels ClassificationLevel string `json:"classification_level"` // Overall classification - RequiredClearance crypto.AccessLevel `json:"required_clearance"` // Required clearance level + RequiredClearance security.AccessLevel `json:"required_clearance"` // Required clearance level LabeledAt time.Time `json:"labeled_at"` // When labels were applied LabeledBy string `json:"labeled_by"` // Who/what applied labels } @@ -262,7 +430,7 @@ type SecurityLabel struct { Value string `json:"value"` // Label value Confidence float64 `json:"confidence"` // Labeling confidence AppliedReason string `json:"applied_reason"` // Why label was applied - RequiredLevel crypto.AccessLevel `json:"required_level"` // Required access level + RequiredLevel security.AccessLevel `json:"required_level"` // Required access level Metadata map[string]interface{} `json:"metadata"` // Additional metadata } @@ -439,7 +607,7 @@ type EncryptedData struct { Data []byte `json:"data"` // Encrypted data EncryptionMethod string `json:"encryption_method"` // Encryption method used RoleKeys map[string]string `json:"role_keys"` // Encrypted keys by role - AccessLevels map[string]crypto.AccessLevel `json:"access_levels"` // Access levels by role + AccessLevels map[string]security.AccessLevel `json:"access_levels"` // Access levels by role CreatedAt time.Time `json:"created_at"` // When encrypted ExpiresAt *time.Time `json:"expires_at,omitempty"` // When encryption expires Metadata map[string]interface{} `json:"metadata"` // Additional metadata diff --git a/pkg/slurp/slurp.go b/pkg/slurp/slurp.go index 0d05d5cd..ca094925 100644 --- a/pkg/slurp/slurp.go +++ b/pkg/slurp/slurp.go @@ -31,10 +31,10 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/election" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/election" ) // SLURP is the main coordinator for contextual intelligence operations. diff --git a/pkg/slurp/storage/backup_manager.go b/pkg/slurp/storage/backup_manager.go index 32ada8fd..157ac00e 100644 --- a/pkg/slurp/storage/backup_manager.go +++ b/pkg/slurp/storage/backup_manager.go @@ -13,7 +13,7 @@ import ( "time" "github.com/robfig/cron/v3" - "github.com/anthonyrawlins/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/crypto" ) // BackupManagerImpl implements the BackupManager interface diff --git a/pkg/slurp/storage/batch_operations.go b/pkg/slurp/storage/batch_operations.go index f6232907..167ce35b 100644 --- a/pkg/slurp/storage/batch_operations.go +++ b/pkg/slurp/storage/batch_operations.go @@ -6,8 +6,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // BatchOperationsImpl provides efficient batch operations for context storage diff --git a/pkg/slurp/storage/context_store.go b/pkg/slurp/storage/context_store.go index 9690249e..1b30aa8d 100644 --- a/pkg/slurp/storage/context_store.go +++ b/pkg/slurp/storage/context_store.go @@ -7,10 +7,10 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // ContextStoreImpl is the main implementation of the ContextStore interface diff --git a/pkg/slurp/storage/distributed_storage.go b/pkg/slurp/storage/distributed_storage.go index 4733d607..755e1743 100644 --- a/pkg/slurp/storage/distributed_storage.go +++ b/pkg/slurp/storage/distributed_storage.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/types" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/types" ) // DistributedStorageImpl implements the DistributedStorage interface diff --git a/pkg/slurp/storage/encrypted_storage.go b/pkg/slurp/storage/encrypted_storage.go index 4b2baffd..6a3ef518 100644 --- a/pkg/slurp/storage/encrypted_storage.go +++ b/pkg/slurp/storage/encrypted_storage.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // EncryptedStorageImpl implements the EncryptedStorage interface diff --git a/pkg/slurp/storage/index_manager.go b/pkg/slurp/storage/index_manager.go index fe470b59..c60af9df 100644 --- a/pkg/slurp/storage/index_manager.go +++ b/pkg/slurp/storage/index_manager.go @@ -13,8 +13,8 @@ import ( "github.com/blevesearch/bleve/v2/analysis/analyzer/standard" "github.com/blevesearch/bleve/v2/analysis/lang/en" "github.com/blevesearch/bleve/v2/mapping" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // IndexManagerImpl implements the IndexManager interface using Bleve diff --git a/pkg/slurp/storage/interfaces.go b/pkg/slurp/storage/interfaces.go index c8813644..7f7fe2f0 100644 --- a/pkg/slurp/storage/interfaces.go +++ b/pkg/slurp/storage/interfaces.go @@ -4,9 +4,9 @@ import ( "context" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/crypto" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // ContextStore provides the main interface for context storage and retrieval diff --git a/pkg/slurp/storage/schema.go b/pkg/slurp/storage/schema.go index 3c23f901..88c8a91a 100644 --- a/pkg/slurp/storage/schema.go +++ b/pkg/slurp/storage/schema.go @@ -3,10 +3,9 @@ package storage import ( "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" - slurpTemporal "github.com/anthonyrawlins/bzzz/pkg/slurp/temporal" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/crypto" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // DatabaseSchema defines the complete schema for encrypted context storage @@ -123,7 +122,7 @@ type DecisionHopRecord struct { ContextVersion int64 `json:"context_version" db:"context_version"` // Decision metadata - ChangeReason slurpTemporal.ChangeReason `json:"change_reason" db:"change_reason"` + ChangeReason string `json:"change_reason" db:"change_reason"` DecisionMaker string `json:"decision_maker" db:"decision_maker"` DecisionRationale string `json:"decision_rationale" db:"decision_rationale"` ImpactScope string `json:"impact_scope" db:"impact_scope"` diff --git a/pkg/slurp/storage/types.go b/pkg/slurp/storage/types.go index c458dfa3..a386bb7d 100644 --- a/pkg/slurp/storage/types.go +++ b/pkg/slurp/storage/types.go @@ -3,9 +3,9 @@ package storage import ( "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/crypto" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/crypto" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // ListCriteria represents criteria for listing contexts diff --git a/pkg/slurp/temporal/factory.go b/pkg/slurp/temporal/factory.go index 4da8b590..d96d996d 100644 --- a/pkg/slurp/temporal/factory.go +++ b/pkg/slurp/temporal/factory.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/anthonyrawlins/bzzz/pkg/slurp/storage" + "chorus.services/bzzz/pkg/slurp/storage" ) // TemporalGraphFactory creates and configures temporal graph components diff --git a/pkg/slurp/temporal/graph.go b/pkg/slurp/temporal/graph.go index 0d24159d..2d636e3b 100644 --- a/pkg/slurp/temporal/graph.go +++ b/pkg/slurp/temporal/graph.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // TemporalGraph manages the temporal evolution of context through decision points diff --git a/pkg/slurp/temporal/graph_impl.go b/pkg/slurp/temporal/graph_impl.go index aa60a7a8..a9184bd4 100644 --- a/pkg/slurp/temporal/graph_impl.go +++ b/pkg/slurp/temporal/graph_impl.go @@ -9,9 +9,9 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" - "github.com/anthonyrawlins/bzzz/pkg/slurp/storage" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/slurp/storage" ) // temporalGraphImpl implements the TemporalGraph interface diff --git a/pkg/slurp/temporal/graph_test.go b/pkg/slurp/temporal/graph_test.go index 18ba6404..4a4ae57c 100644 --- a/pkg/slurp/temporal/graph_test.go +++ b/pkg/slurp/temporal/graph_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" - "github.com/anthonyrawlins/bzzz/pkg/slurp/storage" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/slurp/storage" ) // Mock storage for testing diff --git a/pkg/slurp/temporal/influence_analyzer.go b/pkg/slurp/temporal/influence_analyzer.go index c853059d..8567df2a 100644 --- a/pkg/slurp/temporal/influence_analyzer.go +++ b/pkg/slurp/temporal/influence_analyzer.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/ucxl" ) // influenceAnalyzerImpl implements the InfluenceAnalyzer interface diff --git a/pkg/slurp/temporal/influence_analyzer_test.go b/pkg/slurp/temporal/influence_analyzer_test.go index c5f393b4..c621a5a2 100644 --- a/pkg/slurp/temporal/influence_analyzer_test.go +++ b/pkg/slurp/temporal/influence_analyzer_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) func TestInfluenceAnalyzer_AnalyzeInfluenceNetwork(t *testing.T) { diff --git a/pkg/slurp/temporal/integration_test.go b/pkg/slurp/temporal/integration_test.go index 508bec9f..c7b2699b 100644 --- a/pkg/slurp/temporal/integration_test.go +++ b/pkg/slurp/temporal/integration_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" - "github.com/anthonyrawlins/bzzz/pkg/slurp/storage" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/slurp/storage" ) // Integration tests for the complete temporal graph system diff --git a/pkg/slurp/temporal/navigator_impl.go b/pkg/slurp/temporal/navigator_impl.go index 24e988d7..1288aa12 100644 --- a/pkg/slurp/temporal/navigator_impl.go +++ b/pkg/slurp/temporal/navigator_impl.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/ucxl" ) // decisionNavigatorImpl implements the DecisionNavigator interface diff --git a/pkg/slurp/temporal/navigator_test.go b/pkg/slurp/temporal/navigator_test.go index 8fdbf484..e35c6136 100644 --- a/pkg/slurp/temporal/navigator_test.go +++ b/pkg/slurp/temporal/navigator_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) func TestDecisionNavigator_NavigateDecisionHops(t *testing.T) { diff --git a/pkg/slurp/temporal/persistence.go b/pkg/slurp/temporal/persistence.go index afd98233..7af6ccee 100644 --- a/pkg/slurp/temporal/persistence.go +++ b/pkg/slurp/temporal/persistence.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - "github.com/anthonyrawlins/bzzz/pkg/slurp/storage" + "chorus.services/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/slurp/storage" ) // persistenceManagerImpl handles persistence and synchronization of temporal graph data diff --git a/pkg/slurp/temporal/query_system.go b/pkg/slurp/temporal/query_system.go index 317eec61..3aec5ba4 100644 --- a/pkg/slurp/temporal/query_system.go +++ b/pkg/slurp/temporal/query_system.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/ucxl" ) // querySystemImpl implements decision-hop based query operations diff --git a/pkg/slurp/temporal/staleness_detector.go b/pkg/slurp/temporal/staleness_detector.go index 06b7c63d..a9a243b8 100644 --- a/pkg/slurp/temporal/staleness_detector.go +++ b/pkg/slurp/temporal/staleness_detector.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/ucxl" ) // stalenessDetectorImpl implements the StalenessDetector interface diff --git a/pkg/slurp/temporal/types.go b/pkg/slurp/temporal/types.go index 88c820af..120a125c 100644 --- a/pkg/slurp/temporal/types.go +++ b/pkg/slurp/temporal/types.go @@ -3,8 +3,8 @@ package temporal import ( "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" - slurpContext "github.com/anthonyrawlins/bzzz/pkg/slurp/context" + "chorus.services/bzzz/pkg/ucxl" + slurpContext "chorus.services/bzzz/pkg/slurp/context" ) // ChangeReason represents why a context changed at a decision point diff --git a/pkg/slurp/types.go b/pkg/slurp/types.go index 1cc29604..01aa5bde 100644 --- a/pkg/slurp/types.go +++ b/pkg/slurp/types.go @@ -3,7 +3,7 @@ package slurp import ( "time" - "github.com/anthonyrawlins/bzzz/pkg/crypto" + "chorus.services/bzzz/pkg/crypto" ) // Core data types for the SLURP contextual intelligence system. diff --git a/pkg/storage/interfaces.go b/pkg/storage/interfaces.go new file mode 100644 index 00000000..913cb1ba --- /dev/null +++ b/pkg/storage/interfaces.go @@ -0,0 +1,45 @@ +// Package storage provides common storage interfaces for BZZZ +// This package contains shared storage interfaces to avoid circular dependencies. + +package storage + +import "time" + +// UCXLStorage defines the interface for UCXL content storage operations +type UCXLStorage interface { + // StoreUCXLContent stores content at a UCXL address with role-based encryption + StoreUCXLContent(address string, content []byte, role string, contentType string) error + + // RetrieveUCXLContent retrieves and decrypts content from a UCXL address + RetrieveUCXLContent(address string) ([]byte, *UCXLMetadata, error) + + // AnnounceContent announces content availability in the network + AnnounceContent(address string) error + + // SearchContent searches for content based on query parameters + SearchContent(query *SearchQuery) ([]*UCXLMetadata, error) + + // GetMetrics returns storage metrics + GetMetrics() map[string]interface{} +} + +// UCXLMetadata represents metadata about stored UCXL content +type UCXLMetadata struct { + Address string `json:"address"` + CreatorRole string `json:"creator_role"` + ContentType string `json:"content_type"` + CreatedAt time.Time `json:"created_at"` + Size int64 `json:"size"` + Encrypted bool `json:"encrypted"` +} + +// SearchQuery represents search parameters for UCXL content +type SearchQuery struct { + Agent string `json:"agent,omitempty"` + Role string `json:"role,omitempty"` + Project string `json:"project,omitempty"` + ContentType string `json:"content_type,omitempty"` + CreatedAfter time.Time `json:"created_after,omitempty"` + CreatedBefore time.Time `json:"created_before,omitempty"` + Limit int `json:"limit,omitempty"` +} \ No newline at end of file diff --git a/pkg/types/repository.go b/pkg/types/repository.go new file mode 100644 index 00000000..849c9daf --- /dev/null +++ b/pkg/types/repository.go @@ -0,0 +1,10 @@ +package types + +// Repository represents a Git repository configuration from WHOOSH +type Repository struct { + ProjectID int `json:"project_id"` + Owner string `json:"owner"` + Repository string `json:"repository"` + Branch string `json:"branch"` + GitURL string `json:"git_url"` +} diff --git a/pkg/types/task.go b/pkg/types/task.go index 7495f293..020ad167 100644 --- a/pkg/types/task.go +++ b/pkg/types/task.go @@ -2,8 +2,6 @@ package types import ( "time" - - "github.com/anthonyrawlins/bzzz/pkg/hive" ) // EnhancedTask extends a basic Task with project-specific context. @@ -28,8 +26,8 @@ type EnhancedTask struct { Deliverables []string Context map[string]interface{} - // Hive-integration fields providing repository context. + // WHOOSH-integration fields providing repository context. ProjectID int GitURL string - Repository hive.Repository + Repository Repository } diff --git a/pkg/ucxi/resolver.go b/pkg/ucxi/resolver.go index 03c77f59..00ecbbd7 100644 --- a/pkg/ucxi/resolver.go +++ b/pkg/ucxi/resolver.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/ucxl" ) // BasicAddressResolver provides a basic implementation of AddressResolver diff --git a/pkg/ucxi/resolver_test.go b/pkg/ucxi/resolver_test.go index aac4f890..cf4e9ca2 100644 --- a/pkg/ucxi/resolver_test.go +++ b/pkg/ucxi/resolver_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/ucxl" ) func TestNewBasicAddressResolver(t *testing.T) { diff --git a/pkg/ucxi/server.go b/pkg/ucxi/server.go index 565166ff..0a2de7a5 100644 --- a/pkg/ucxi/server.go +++ b/pkg/ucxi/server.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/ucxl" ) // Server represents a UCXI HTTP server for UCXL operations diff --git a/pkg/ucxi/server_test.go b/pkg/ucxi/server_test.go index f12176fd..807af68e 100644 --- a/pkg/ucxi/server_test.go +++ b/pkg/ucxi/server_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/ucxl" ) // Mock implementations for testing diff --git a/pkg/ucxl/decision_publisher.go b/pkg/ucxl/decision_publisher.go index 0754d42a..a3cff514 100644 --- a/pkg/ucxl/decision_publisher.go +++ b/pkg/ucxl/decision_publisher.go @@ -7,15 +7,15 @@ import ( "log" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/storage" ) // DecisionPublisher handles publishing task completion decisions to encrypted DHT storage type DecisionPublisher struct { ctx context.Context config *config.Config - dhtStorage *dht.EncryptedDHTStorage + dhtStorage storage.UCXLStorage nodeID string agentName string } @@ -24,7 +24,7 @@ type DecisionPublisher struct { func NewDecisionPublisher( ctx context.Context, config *config.Config, - dhtStorage *dht.EncryptedDHTStorage, + dhtStorage storage.UCXLStorage, nodeID string, agentName string, ) *DecisionPublisher { @@ -74,7 +74,7 @@ func (dp *DecisionPublisher) PublishTaskDecision(decision *TaskDecision) error { decision.Role = dp.config.Agent.Role } if decision.Project == "" { - decision.Project = dp.config.Project.Name + decision.Project = "default-project" // TODO: Add project field to config } if decision.Timestamp.IsZero() { decision.Timestamp = time.Now() @@ -196,7 +196,9 @@ func (dp *DecisionPublisher) generateUCXLAddress(decision *TaskDecision) (string Role: decision.Role, Project: decision.Project, Task: decision.Task, - Node: fmt.Sprintf("%d", decision.Timestamp.Unix()), + TemporalSegment: TemporalSegment{ + Type: TemporalLatest, // Latest decision for this agent/role/project/task + }, } return address.String(), nil @@ -253,8 +255,8 @@ func (dp *DecisionPublisher) QueryRecentDecisions( project string, limit int, since time.Time, -) ([]*dht.UCXLMetadata, error) { - query := &dht.SearchQuery{ +) ([]*storage.UCXLMetadata, error) { + query := &storage.SearchQuery{ Agent: agent, Role: role, Project: project, @@ -285,7 +287,7 @@ func (dp *DecisionPublisher) GetDecisionContent(ucxlAddress string) (*TaskDecisi // SubscribeToDecisions sets up a subscription to new decisions (placeholder for future pubsub) func (dp *DecisionPublisher) SubscribeToDecisions( roleFilter string, - callback func(*TaskDecision, *dht.UCXLMetadata), + callback func(*TaskDecision, *storage.UCXLMetadata), ) error { // This is a placeholder for future pubsub implementation // For now, we'll implement a simple polling mechanism @@ -367,7 +369,7 @@ func (dp *DecisionPublisher) GetPublisherMetrics() map[string]interface{} { "node_id": dp.nodeID, "agent_name": dp.agentName, "current_role": dp.config.Agent.Role, - "project": dp.config.Project.Name, + "project": "default-project", // TODO: Add project field to config "dht_metrics": dhtMetrics, "last_publish": time.Now(), // This would be tracked in a real implementation } diff --git a/repository/factory.go b/repository/factory.go index f33e5d6f..8e945f1a 100644 --- a/repository/factory.go +++ b/repository/factory.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/anthonyrawlins/bzzz/gitea" - "github.com/anthonyrawlins/bzzz/github" + "chorus.services/bzzz/gitea" + "chorus.services/bzzz/github" ) // DefaultProviderFactory implements ProviderFactory diff --git a/sandbox/sandbox.go b/sandbox/sandbox.go index 1a7091fb..59e0f86a 100644 --- a/sandbox/sandbox.go +++ b/sandbox/sandbox.go @@ -10,8 +10,8 @@ import ( "path/filepath" "strings" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/workspace" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/workspace" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" diff --git a/test-mock.go b/test-mock.go index b161f8ae..83f485bc 100644 --- a/test-mock.go +++ b/test-mock.go @@ -5,8 +5,8 @@ import ( "fmt" "log" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/ucxl" ) func main() { diff --git a/test/chat_api_handler.go b/test/chat_api_handler.go index d340361b..ec81a53a 100644 --- a/test/chat_api_handler.go +++ b/test/chat_api_handler.go @@ -11,10 +11,10 @@ import ( "strings" "time" - "github.com/anthonyrawlins/bzzz/executor" - "github.com/anthonyrawlins/bzzz/logging" - "github.com/anthonyrawlins/bzzz/pkg/types" - "github.com/anthonyrawlins/bzzz/sandbox" + "chorus.services/bzzz/executor" + "chorus.services/bzzz/logging" + "chorus.services/bzzz/pkg/types" + "chorus.services/bzzz/sandbox" "github.com/gorilla/mux" ) diff --git a/test/hmmm_test.go b/test/hmmm_test.go index 0c0d749a..914e3744 100644 --- a/test/hmmm_test.go +++ b/test/hmmm_test.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/anthonyrawlins/bzzz/pubsub" - "github.com/anthonyrawlins/bzzz/pkg/coordination" + "chorus.services/bzzz/pubsub" + "chorus.services/bzzz/pkg/coordination" ) // HmmmTestSuite runs comprehensive tests for the HMMM coordination system diff --git a/test/integration/mock_dht_test.go b/test/integration/mock_dht_test.go index 2436d2fb..66b4e430 100644 --- a/test/integration/mock_dht_test.go +++ b/test/integration/mock_dht_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/dht" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/test/integration/phase1_integration_test.go b/test/integration/phase1_integration_test.go index 748c0370..b1bbd045 100644 --- a/test/integration/phase1_integration_test.go +++ b/test/integration/phase1_integration_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/dht" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/ucxl" ) // Phase 1 Integration Tests for BZZZ-RUSTLE Mock Implementation diff --git a/test/integration/phase2_hybrid_dht_test.go b/test/integration/phase2_hybrid_dht_test.go index 069af2a6..cdfa84cd 100644 --- a/test/integration/phase2_hybrid_dht_test.go +++ b/test/integration/phase2_hybrid_dht_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" - "github.com/anthonyrawlins/bzzz/pkg/dht" + "chorus.services/bzzz/pkg/config" + "chorus.services/bzzz/pkg/dht" ) // Phase 2 Hybrid DHT Integration Tests @@ -40,7 +40,7 @@ func TestPhase2HybridDHTBasic(t *testing.T) { func testHybridDHTCreation(t *testing.T, ctx context.Context) { // Create configuration for mock-only mode config := &config.HybridConfig{ - DHT: config.DHTConfig{ + DHT: config.HybridDHTConfig{ Backend: "mock", FallbackOnError: true, HealthCheckInterval: 5 * time.Second, @@ -75,7 +75,7 @@ func testHybridDHTCreation(t *testing.T, ctx context.Context) { func testMockBackendOperations(t *testing.T, ctx context.Context) { config := &config.HybridConfig{ - DHT: config.DHTConfig{ + DHT: config.HybridDHTConfig{ Backend: "mock", FallbackOnError: true, HealthCheckInterval: 5 * time.Second, @@ -149,7 +149,7 @@ func testMockBackendOperations(t *testing.T, ctx context.Context) { func testBackendSwitching(t *testing.T, ctx context.Context) { config := &config.HybridConfig{ - DHT: config.DHTConfig{ + DHT: config.HybridDHTConfig{ Backend: "mock", FallbackOnError: true, HealthCheckInterval: 5 * time.Second, @@ -204,7 +204,7 @@ func testBackendSwitching(t *testing.T, ctx context.Context) { func testHealthMonitoring(t *testing.T, ctx context.Context) { config := &config.HybridConfig{ - DHT: config.DHTConfig{ + DHT: config.HybridDHTConfig{ Backend: "mock", FallbackOnError: true, HealthCheckInterval: 1 * time.Second, // Fast for testing @@ -254,7 +254,7 @@ func testHealthMonitoring(t *testing.T, ctx context.Context) { func testMetricsCollection(t *testing.T, ctx context.Context) { config := &config.HybridConfig{ - DHT: config.DHTConfig{ + DHT: config.HybridDHTConfig{ Backend: "mock", FallbackOnError: true, HealthCheckInterval: 5 * time.Second, @@ -401,7 +401,7 @@ func TestPhase2ConfigurationFromEnv(t *testing.T) { func TestPhase2ConcurrentOperations(t *testing.T) { config := &config.HybridConfig{ - DHT: config.DHTConfig{ + DHT: config.HybridDHTConfig{ Backend: "mock", FallbackOnError: true, HealthCheckInterval: 5 * time.Second, diff --git a/test/integration/ucxl_parser_test.go b/test/integration/ucxl_parser_test.go index 0dd3343a..7ce35469 100644 --- a/test/integration/ucxl_parser_test.go +++ b/test/integration/ucxl_parser_test.go @@ -3,7 +3,7 @@ package integration import ( "testing" - "github.com/anthonyrawlins/bzzz/pkg/ucxl" + "chorus.services/bzzz/pkg/ucxl" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/test/task_simulator.go b/test/task_simulator.go index 4a7f8128..fa8eac3e 100644 --- a/test/task_simulator.go +++ b/test/task_simulator.go @@ -7,7 +7,7 @@ import ( "math/rand" "time" - "github.com/anthonyrawlins/bzzz/pubsub" + "chorus.services/bzzz/pubsub" ) // TaskSimulator generates realistic task scenarios for testing HMMM coordination @@ -287,7 +287,7 @@ func generateMockRepositories() []MockRepository { { Owner: "deepblackcloud", Name: "bzzz", - URL: "https://github.com/anthonyrawlins/bzzz", + URL: "https://chorus.services/bzzz", Dependencies: []string{"whoosh"}, Tasks: []MockTask{ { diff --git a/workspace/hcfs_manager.go b/workspace/hcfs_manager.go index f4eefb89..8ed235bb 100644 --- a/workspace/hcfs_manager.go +++ b/workspace/hcfs_manager.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/anthonyrawlins/bzzz/pkg/config" + "chorus.services/bzzz/pkg/config" ) // HCFSWorkspaceManager manages agent workspaces using HCFS as the backing store