Fix Go module imports and add dynamic Ollama model selection with N8N integration
- Fixed module path from github.com/deepblackcloud/bzzz to github.com/anthonyrawlins/bzzz - Added dynamic Ollama model detection via /api/tags endpoint - Implemented intelligent model selection through N8N webhook integration - Added BZZZ_MODEL_SELECTION_WEBHOOK environment variable support - Fixed GitHub assignee issue by using valid username instead of peer ID - Added comprehensive model fallback mechanisms - Updated all import statements across the codebase - Removed duplicate systemd service file - Added sandbox execution environment and type definitions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -29,12 +29,13 @@ type HiveAPIConfig struct {
|
||||
|
||||
// AgentConfig holds agent-specific configuration
|
||||
type AgentConfig struct {
|
||||
ID string `yaml:"id"`
|
||||
Capabilities []string `yaml:"capabilities"`
|
||||
PollInterval time.Duration `yaml:"poll_interval"`
|
||||
MaxTasks int `yaml:"max_tasks"`
|
||||
Models []string `yaml:"models"`
|
||||
Specialization string `yaml:"specialization"`
|
||||
ID string `yaml:"id"`
|
||||
Capabilities []string `yaml:"capabilities"`
|
||||
PollInterval time.Duration `yaml:"poll_interval"`
|
||||
MaxTasks int `yaml:"max_tasks"`
|
||||
Models []string `yaml:"models"`
|
||||
Specialization string `yaml:"specialization"`
|
||||
ModelSelectionWebhook string `yaml:"model_selection_webhook"`
|
||||
}
|
||||
|
||||
// GitHubConfig holds GitHub integration settings
|
||||
@@ -100,11 +101,12 @@ func getDefaultConfig() *Config {
|
||||
RetryCount: 3,
|
||||
},
|
||||
Agent: AgentConfig{
|
||||
Capabilities: []string{"general", "reasoning", "task-coordination"},
|
||||
PollInterval: 30 * time.Second,
|
||||
MaxTasks: 3,
|
||||
Models: []string{"phi3", "llama3.1"},
|
||||
Specialization: "general_developer",
|
||||
Capabilities: []string{"general", "reasoning", "task-coordination"},
|
||||
PollInterval: 30 * time.Second,
|
||||
MaxTasks: 3,
|
||||
Models: []string{"phi3", "llama3.1"},
|
||||
Specialization: "general_developer",
|
||||
ModelSelectionWebhook: "https://n8n.home.deepblack.cloud/webhook/model-selection",
|
||||
},
|
||||
GitHub: GitHubConfig{
|
||||
TokenFile: "/home/tony/AI/secrets/passwords_and_tokens/gh-token",
|
||||
@@ -164,6 +166,9 @@ func loadFromEnv(config *Config) error {
|
||||
if specialization := os.Getenv("BZZZ_AGENT_SPECIALIZATION"); specialization != "" {
|
||||
config.Agent.Specialization = specialization
|
||||
}
|
||||
if modelWebhook := os.Getenv("BZZZ_MODEL_SELECTION_WEBHOOK"); modelWebhook != "" {
|
||||
config.Agent.ModelSelectionWebhook = modelWebhook
|
||||
}
|
||||
|
||||
// GitHub configuration
|
||||
if tokenFile := os.Getenv("BZZZ_GITHUB_TOKEN_FILE"); tokenFile != "" {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/deepblackcloud/bzzz/pubsub"
|
||||
"github.com/anthonyrawlins/bzzz/pubsub"
|
||||
"github.com/libp2p/go-libp2p/core/peer"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/deepblackcloud/bzzz/pubsub"
|
||||
"github.com/deepblackcloud/bzzz/reasoning"
|
||||
"github.com/anthonyrawlins/bzzz/pubsub"
|
||||
"github.com/anthonyrawlins/bzzz/reasoning"
|
||||
"github.com/libp2p/go-libp2p/core/peer"
|
||||
)
|
||||
|
||||
|
||||
35
pkg/types/task.go
Normal file
35
pkg/types/task.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/anthonyrawlins/bzzz/pkg/hive"
|
||||
)
|
||||
|
||||
// EnhancedTask extends a basic Task with project-specific context.
|
||||
// It's the primary data structure passed between the github, executor,
|
||||
// and reasoning components.
|
||||
type EnhancedTask struct {
|
||||
// Core task details, originally from the GitHub issue.
|
||||
ID int64
|
||||
Number int
|
||||
Title string
|
||||
Description string
|
||||
State string
|
||||
Labels []string
|
||||
Assignee string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
|
||||
// Bzzz-specific fields parsed from the issue body or labels.
|
||||
TaskType string
|
||||
Priority int
|
||||
Requirements []string
|
||||
Deliverables []string
|
||||
Context map[string]interface{}
|
||||
|
||||
// Hive-integration fields providing repository context.
|
||||
ProjectID int
|
||||
GitURL string
|
||||
Repository hive.Repository
|
||||
}
|
||||
Reference in New Issue
Block a user