Integrate BACKBEAT SDK and resolve KACHING license validation

Major integrations and fixes:
- Added BACKBEAT SDK integration for P2P operation timing
- Implemented beat-aware status tracking for distributed operations
- Added Docker secrets support for secure license management
- Resolved KACHING license validation via HTTPS/TLS
- Updated docker-compose configuration for clean stack deployment
- Disabled rollback policies to prevent deployment failures
- Added license credential storage (CHORUS-DEV-MULTI-001)

Technical improvements:
- BACKBEAT P2P operation tracking with phase management
- Enhanced configuration system with file-based secrets
- Improved error handling for license validation
- Clean separation of KACHING and CHORUS deployment stacks

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
anthonyrawlins
2025-09-06 07:56:26 +10:00
parent 543ab216f9
commit 9bdcbe0447
4730 changed files with 1480093 additions and 1916 deletions

View File

@@ -7,13 +7,13 @@ import (
"strings"
"time"
"chorus.services/bzzz/pkg/config"
"chorus.services/bzzz/pkg/dht"
"chorus.services/bzzz/p2p"
"chorus/pkg/config"
"chorus/pkg/dht"
"chorus/p2p"
"github.com/libp2p/go-libp2p/core/peer"
)
// ProtocolManager manages the BZZZ v2 protocol components
// ProtocolManager manages the CHORUS v2 protocol components
type ProtocolManager struct {
config *config.Config
node *p2p.Node
@@ -97,7 +97,7 @@ func (pm *ProtocolManager) IsEnabled() bool {
return pm.enabled
}
// ResolveURI resolves a bzzz:// URI to peer addresses
// ResolveURI resolves a CHORUS:// URI to peer addresses
func (pm *ProtocolManager) ResolveURI(ctx context.Context, uriStr string) (*ResolutionResult, error) {
if !pm.enabled {
return nil, fmt.Errorf("v2 protocol not enabled")
@@ -205,7 +205,7 @@ func (pm *ProtocolManager) announcePeerToDHT(ctx context.Context, capability *Pe
}
// Announce general peer presence
if err := dht.Provide(ctx, "bzzz:peer"); err != nil {
if err := dht.Provide(ctx, "CHORUS:peer"); err != nil {
// Log error but don't fail
}
@@ -249,7 +249,7 @@ func (pm *ProtocolManager) FindPeersByRole(ctx context.Context, role string) ([]
return result, nil
}
// ValidateURI validates a bzzz:// URI
// ValidateURI validates a CHORUS:// URI
func (pm *ProtocolManager) ValidateURI(uriStr string) error {
if !pm.enabled {
return fmt.Errorf("v2 protocol not enabled")
@@ -259,7 +259,7 @@ func (pm *ProtocolManager) ValidateURI(uriStr string) error {
return err
}
// CreateURI creates a bzzz:// URI with the given components
// CreateURI creates a CHORUS:// URI with the given components
func (pm *ProtocolManager) CreateURI(agent, role, project, task, path string) (*BzzzURI, error) {
if !pm.enabled {
return nil, fmt.Errorf("v2 protocol not enabled")
@@ -313,7 +313,7 @@ func (pm *ProtocolManager) getProjectFromConfig() string {
}
// Default project if none can be inferred
return "bzzz"
return "CHORUS"
}
// GetStats returns protocol statistics