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.
31 lines
752 B
Go
31 lines
752 B
Go
package server
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/hanzoai/agents/control-plane/pkg/types"
|
|
)
|
|
|
|
type stubPackageStorage struct {
|
|
packages map[string]*types.AgentPackage
|
|
getCalls []string
|
|
}
|
|
|
|
func newStubPackageStorage() *stubPackageStorage {
|
|
return &stubPackageStorage{packages: make(map[string]*types.AgentPackage)}
|
|
}
|
|
|
|
func (s *stubPackageStorage) GetAgentPackage(ctx context.Context, packageID string) (*types.AgentPackage, error) {
|
|
s.getCalls = append(s.getCalls, packageID)
|
|
if pkg, ok := s.packages[packageID]; ok {
|
|
return pkg, nil
|
|
}
|
|
return nil, fmt.Errorf("package %s not found", packageID)
|
|
}
|
|
|
|
func (s *stubPackageStorage) StoreAgentPackage(ctx context.Context, pkg *types.AgentPackage) error {
|
|
s.packages[pkg.ID] = pkg
|
|
return nil
|
|
}
|