Complete BZZZ functionality port to CHORUS

🎭 CHORUS now contains full BZZZ functionality adapted for containers

Core systems ported:
- P2P networking (libp2p with DHT and PubSub)
- Task coordination (COOEE protocol)
- HMMM collaborative reasoning
- SHHH encryption and security
- SLURP admin election system
- UCXL content addressing
- UCXI server integration
- Hypercore logging system
- Health monitoring and graceful shutdown
- License validation with KACHING

Container adaptations:
- Environment variable configuration (no YAML files)
- Container-optimized logging to stdout/stderr
- Auto-generated agent IDs for container deployments
- Docker-first architecture

All proven BZZZ P2P protocols, AI integration, and collaboration
features are now available in containerized form.

Next: Build and test container deployment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
anthonyrawlins
2025-09-02 20:02:37 +10:00
parent 7c6cbd562a
commit 543ab216f9
224 changed files with 86331 additions and 186 deletions

46
pkg/storage/interfaces.go Normal file
View File

@@ -0,0 +1,46 @@
// 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{}
}
// SearchQuery defines search criteria for UCXL content
type SearchQuery struct {
Agent string `json:"agent,omitempty"`
Role string `json:"role,omitempty"`
Project string `json:"project,omitempty"`
Task string `json:"task,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"`
}
// 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"`
}