feat: Implement collaborative reasoning via Antennae

This commit completes Phase 2 of the Ollama integration. The bzzz-agent is now capable of participating in collaborative discussions.

Key changes:
- The pubsub module has been refactored to use a generic message handler, decoupling it from the github integration logic.
- The github integration module now maintains a history of active conversations for each task.
- When a peer sends a message on the meta-discussion channel, the agent will:
  1. Append the message to the conversation history.
  2. Construct a new prompt containing the full context (original task + conversation history).
  3. Use the 'reasoning' module to generate a context-aware response.
  4. Publish the response back to the discussion channel.
- The main application has been updated to wire up the new handlers.

The agent can now intelligently discuss and refine plans with its peers before and during task execution.
This commit is contained in:
anthonyrawlins
2025-07-12 20:38:29 +10:00
parent c46e18a88a
commit 26c4b960c8

View File

@@ -52,11 +52,11 @@ func main() {
// === GitHub Integration ===
// This would be loaded from a config file in a real application
githubConfig := &github.Config{
AuthToken: os.Getenv("GITHUB_TOKEN"), // Make sure to set this environment variable
Owner: "anthonyrawlins",
Repository: "bzzz",
AccessToken: os.Getenv("GITHUB_TOKEN"), // Corrected field name
Owner: "anthonyrawlins",
Repository: "bzzz",
}
ghClient, err := github.NewClient(githubConfig)
ghClient, err := github.NewClient(ctx, githubConfig) // Added missing ctx argument
if err != nil {
log.Fatalf("Failed to create GitHub client: %v", err)
}