feat: initial SynapBus project scaffolding
Bootstrap the SynapBus project — a local-first, MCP-native agent-to-agent messaging service written in Go. Includes: - Project constitution (10 architectural principles) - 10 feature specs with implementation tasks: 001 Core Messaging, 002 Agent Registry, 003 Human Auth (OAuth 2.1), 004 Channels, 005 Web UI, 006 MCP Server, 007 Trace Logging, 008 Semantic Search, 009 Attachments, 010 Swarm Patterns - Go project scaffold (cobra CLI, SQLite schema, Makefile) - Speckit templates and commands Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
port int
|
||||
dataDir string
|
||||
)
|
||||
|
||||
func main() {
|
||||
rootCmd := &cobra.Command{
|
||||
Use: "synapbus",
|
||||
Short: "SynapBus — MCP-native agent-to-agent messaging",
|
||||
Long: "Local-first, MCP-native messaging service for AI agents. Single binary with embedded storage, semantic search, and a Slack-like Web UI.",
|
||||
}
|
||||
|
||||
serveCmd := &cobra.Command{
|
||||
Use: "serve",
|
||||
Short: "Start the SynapBus server",
|
||||
RunE: runServe,
|
||||
}
|
||||
|
||||
serveCmd.Flags().IntVar(&port, "port", 8080, "HTTP server port")
|
||||
serveCmd.Flags().StringVar(&dataDir, "data", "./data", "Data directory for storage")
|
||||
|
||||
rootCmd.AddCommand(serveCmd)
|
||||
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func runServe(cmd *cobra.Command, args []string) error {
|
||||
// Check for environment variable overrides
|
||||
if p := os.Getenv("SYNAPBUS_PORT"); p != "" {
|
||||
fmt.Sscanf(p, "%d", &port)
|
||||
}
|
||||
if d := os.Getenv("SYNAPBUS_DATA_DIR"); d != "" {
|
||||
dataDir = d
|
||||
}
|
||||
|
||||
fmt.Printf("SynapBus starting on port %d with data dir %s\n", port, dataDir)
|
||||
fmt.Println("TODO: Initialize storage, MCP server, REST API, and Web UI")
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user