mirror of
https://github.com/hanzoai/agents.git
synced 2026-10-30 18:48:36 +00:00
Transforms hanzoai/agents from a marketplace config repo into a full agent orchestration platform by merging the AgentField infrastructure: - Go control plane (K8s-like agent orchestration, service mesh, DAG workflows) - Python SDK (FastAPI-based agent framework, LiteLLM, memory, DID/VC) - TypeScript SDK (@hanzo/agents - Vercel AI SDK, MCP, workflows) - Go SDK (idiomatic agent builder + client) - React 19 embedded dashboard (XyFlow DAGs, Recharts, Radix UI) - Docker/K8s/Helm deployment configs - Examples: hello world, deep research, RAG, simulation, benchmarks - Functional test suite across Python/Go/TypeScript All references rebranded: AgentField → Hanzo Agents - Module: github.com/hanzoai/agents/control-plane - Python: hanzo_agents - TypeScript: @hanzo/agents - Go: github.com/hanzoai/agents/sdk/go - Env vars: HANZO_AGENTS_* - Config: hanzo-agents.yaml Previous marketplace configs moved to config/ directory.
128 lines
3.9 KiB
Go
128 lines
3.9 KiB
Go
// hanzo-agents/internal/core/domain/models.go
|
|
package domain
|
|
|
|
import "time"
|
|
|
|
// AgentNode represents a running agent instance
|
|
type AgentNode struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Port int `json:"port"`
|
|
PID int `json:"pid"`
|
|
Status string `json:"status"`
|
|
LifecycleStatus string `json:"lifecycle_status"`
|
|
StartedAt time.Time `json:"started_at"`
|
|
Environment map[string]string `json:"environment"`
|
|
LogFile string `json:"log_file"`
|
|
}
|
|
|
|
// PackageMetadata represents package information
|
|
type PackageMetadata struct {
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
Description string `json:"description"`
|
|
Author string `json:"author"`
|
|
Path string `json:"path"`
|
|
}
|
|
|
|
// InstallationSpec represents package installation configuration
|
|
type InstallationSpec struct {
|
|
Source string `json:"source"`
|
|
Destination string `json:"destination"`
|
|
Force bool `json:"force"`
|
|
Environment map[string]string `json:"environment"`
|
|
}
|
|
|
|
// ProcessSpec represents process execution configuration
|
|
type ProcessSpec struct {
|
|
Command string `json:"command"`
|
|
Args []string `json:"args"`
|
|
WorkingDir string `json:"working_dir"`
|
|
Environment map[string]string `json:"environment"`
|
|
LogFile string `json:"log_file"`
|
|
}
|
|
|
|
// InstallationRegistry tracks installed packages
|
|
type InstallationRegistry struct {
|
|
Installed map[string]InstalledPackage `json:"installed"`
|
|
}
|
|
|
|
// InstalledPackage represents an installed package
|
|
type InstalledPackage struct {
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
Path string `json:"path"`
|
|
Environment map[string]string `json:"environment"`
|
|
InstalledAt time.Time `json:"installed_at"`
|
|
}
|
|
|
|
// HanzoAgentsConfig represents the HanzoAgents configuration
|
|
type HanzoAgentsConfig struct {
|
|
HomeDir string `json:"home_dir"`
|
|
Environment map[string]string `json:"environment"`
|
|
MCP MCPConfig `json:"mcp"`
|
|
}
|
|
|
|
// MCPConfig contains MCP server configuration
|
|
type MCPConfig struct {
|
|
Servers []MCPServer `json:"servers"`
|
|
}
|
|
|
|
// MCPServer represents an MCP server configuration
|
|
type MCPServer struct {
|
|
Name string `json:"name"`
|
|
URL string `json:"url"`
|
|
Enabled bool `json:"enabled"`
|
|
}
|
|
|
|
// InstallOptions represents options for package installation
|
|
type InstallOptions struct {
|
|
Force bool `json:"force"`
|
|
Verbose bool `json:"verbose"`
|
|
}
|
|
|
|
// RunOptions represents options for running an agent
|
|
type RunOptions struct {
|
|
Port int `json:"port"`
|
|
Detach bool `json:"detach"`
|
|
}
|
|
|
|
// RunningAgent represents a currently running agent instance
|
|
type RunningAgent struct {
|
|
Name string `json:"name"`
|
|
PID int `json:"pid"`
|
|
Port int `json:"port"`
|
|
Status string `json:"status"`
|
|
StartedAt time.Time `json:"started_at"`
|
|
LogFile string `json:"log_file"`
|
|
}
|
|
|
|
// AgentStatus represents the status of an agent
|
|
type AgentStatus struct {
|
|
Name string `json:"name"`
|
|
IsRunning bool `json:"is_running"`
|
|
PID int `json:"pid"`
|
|
Port int `json:"port"`
|
|
Uptime string `json:"uptime"`
|
|
LastSeen time.Time `json:"last_seen"`
|
|
}
|
|
|
|
// DevOptions represents options for development mode
|
|
type DevOptions struct {
|
|
Port int `json:"port"`
|
|
AutoReload bool `json:"auto_reload"`
|
|
Verbose bool `json:"verbose"`
|
|
WatchFiles bool `json:"watch_files"`
|
|
}
|
|
|
|
// DevStatus represents the status of development mode
|
|
type DevStatus struct {
|
|
Path string `json:"path"`
|
|
IsRunning bool `json:"is_running"`
|
|
PID int `json:"pid"`
|
|
Port int `json:"port"`
|
|
StartedAt time.Time `json:"started_at"`
|
|
AutoReload bool `json:"auto_reload"`
|
|
WatchedFiles []string `json:"watched_files"`
|
|
}
|