Files
hanzoai_agent/control-plane/internal/server/test_helpers_test.go
zeekay 2899aeaa9f feat: merge agents control plane + SDKs into unified agent repo
Consolidate all Hanzo agent infrastructure into one repo:
- control-plane/: Go control plane server (was agents-new)
- sdk/: Go, Python, TypeScript SDKs
- deployments/: Docker, Kubernetes, Helm configs
- Dockerfile.sdk: Python SDK image (ghcr.io/hanzoai/agent:latest)
- CI builds both SDK + control-plane images

No more agentfield — everything is hanzoai/agent.
2026-02-13 12:24:31 -08:00

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
}