Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
update from sam-hub to sam-control-plane
Antonio Ojea978e042b3c47
diff --git a/.github/k8s/sam-node-cop-template.yaml b/.github/k8s/sam-node-cop-template.yamlindex a85b8c24..aef67a9f 100644--- a/.github/k8s/sam-node-cop-template.yaml+++ b/.github/k8s/sam-node-cop-template.yaml@@ -63,7 +63,7 @@ spec:args:- "run"- "--config=/etc/sam/sam-node.yaml"- - "--hub=http://sam-hub-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:9090"+ - "--hub=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"- "--jwt-path=/var/run/secrets/tokens/sam-token"- "--api-token=secret-token"- "--bind-addr=127.0.0.1:8080"diff --git a/.github/k8s/sam-node-everything-template.yaml b/.github/k8s/sam-node-everything-template.yamlindex 2054d206..30dd5631 100644--- a/.github/k8s/sam-node-everything-template.yaml+++ b/.github/k8s/sam-node-everything-template.yaml@@ -51,7 +51,7 @@ spec:args:- "run"- "--config=/etc/sam/sam-node.yaml"- - "--hub=http://sam-hub-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:9090"+ - "--hub=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"- "--jwt-path=/var/run/secrets/tokens/sam-token"- "--api-token=secret-token"- "--bind-addr=127.0.0.1:8080"diff --git a/.github/k8s/sam-node-openclaw-template.yaml b/.github/k8s/sam-node-openclaw-template.yamlindex 8280250b..2a49a6f3 100644--- a/.github/k8s/sam-node-openclaw-template.yaml+++ b/.github/k8s/sam-node-openclaw-template.yaml@@ -107,7 +107,7 @@ spec:args:- "run"- "--config=/etc/sam/sam-node.yaml"- - "--hub=http://sam-hub-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:9090"+ - "--hub=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"- "--jwt-path=/var/run/secrets/tokens/sam-token"- "--api-token=secret-token"- "--bind-addr=127.0.0.1:8080"diff --git a/.github/k8s/sam-node-openrouter-template.yaml b/.github/k8s/sam-node-openrouter-template.yamlindex 1dfb2f74..3a5941ec 100644--- a/.github/k8s/sam-node-openrouter-template.yaml+++ b/.github/k8s/sam-node-openrouter-template.yaml@@ -57,7 +57,7 @@ spec:args:- "run"- "--config=/etc/sam/sam-node.yaml"- - "--hub=http://sam-hub-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:9090"+ - "--hub=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"- "--jwt-path=/var/run/secrets/tokens/sam-token"- "--api-token=secret-token"- "--bind-addr=127.0.0.1:8080"diff --git a/.github/k8s/sam-node-vllm-template.yaml b/.github/k8s/sam-node-vllm-template.yamlindex 29c0c104..81abbfad 100644--- a/.github/k8s/sam-node-vllm-template.yaml+++ b/.github/k8s/sam-node-vllm-template.yaml@@ -100,7 +100,7 @@ spec:args:- "run"- "--config=/etc/sam/sam-node.yaml"- - "--hub=http://sam-hub-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:9090"+ - "--hub=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"- "--jwt-path=/var/run/secrets/tokens/sam-token"- "--api-token=secret-token"- "--bind-addr=127.0.0.1:8080"diff --git a/.goreleaser.yaml b/.goreleaser.yamlindex 8783fc6a..8f8a27ed 100644--- a/.goreleaser.yaml+++ b/.goreleaser.yaml@@ -15,9 +15,23 @@ builds:- arm64ldflags:- -s -w- - id: sam-hub- main: ./cmd/sam-hub- binary: sam-hub+ - id: sam-control-plane+ main: ./cmd/sam-control-plane+ binary: sam-control-plane+ env:+ - CGO_ENABLED=0+ goos:+ - linux+ - windows+ - darwin+ goarch:+ - amd64+ - arm64+ ldflags:+ - -s -w+ - id: sam-router+ main: ./cmd/sam-router+ binary: sam-routerenv:- CGO_ENABLED=0goos:diff --git a/README.md b/README.mdindex 6fb52436..3f655515 100644--- a/README.md+++ b/README.md@@ -13,8 +13,9 @@ SAM is a smart network built for autonomous AI agents:## Architecture Components-* `sam-hub`: The control plane for identity mapping and policy distribution.-* `sam-node`: The P2P nodes providing the mesh transport layer and local MCP interfaces.+* `sam-control-plane`: The registry control plane for node identity registration, authorization policies, and router coordinating.+* `sam-router`: The libp2p bootstrap nodes and relays providing data-plane connectivity and forwarding.+* `sam-node`: The local node clients providing mesh transport integration and MCP sidecar routing.---diff --git a/install.sh b/install.shindex 99763bbc..0e626719 100755--- a/install.sh+++ b/install.sh@@ -55,9 +55,9 @@ tar -xzf "${TAR_NAME}"echo "Installing to ${INSTALL_DIR} (may require sudo)..."# In some environments, sudo might not be available or requiredif [ -w "$INSTALL_DIR" ]; then- mv sam-node sam-hub mcp-client "$INSTALL_DIR/" 2>/dev/null || true+ mv sam-node sam-control-plane sam-router mcp-client "$INSTALL_DIR/" 2>/dev/null || trueelse- sudo mv sam-node sam-hub mcp-client "$INSTALL_DIR/" 2>/dev/null || true+ sudo mv sam-node sam-control-plane sam-router mcp-client "$INSTALL_DIR/" 2>/dev/null || truefi# Cleanupdiff --git a/internal/controlplane/server.go b/internal/controlplane/server.goindex 8aa74600..59b138c8 100644--- a/internal/controlplane/server.go+++ b/internal/controlplane/server.go@@ -123,8 +123,6 @@ func (s *Server) Start() error {}}--// Initialize OIDC Providersif err := s.discoverProviders(); err != nil {return fmt.Errorf("failed OIDC discovery: %w", err)@@ -1372,11 +1370,10 @@ func (s *Server) buildApprovedBootstrapEnrollResponse(ctx context.Context, biscu}return &api.BootstrapEnrollResponse{- Status: api.EnrollmentStatus_ENROLLMENT_STATUS_APPROVED,- BiscuitToken: biscuitToken,- HubPublicKey: pubKey,- HubAddresses: routerAddrs,- Expiration: expiration,+ Status: api.EnrollmentStatus_ENROLLMENT_STATUS_APPROVED,+ BiscuitToken: biscuitToken,+ HubPublicKey: pubKey,+ HubAddresses: routerAddrs,+ Expiration: expiration,}, nil}-diff --git a/internal/controlplane/server_test.go b/internal/controlplane/server_test.goindex ce9f8a23..366d5ac7 100644--- a/internal/controlplane/server_test.go+++ b/internal/controlplane/server_test.go@@ -36,8 +36,8 @@ import ("github.com/biscuit-auth/biscuit-go/v2""github.com/golang-jwt/jwt/v5""github.com/google/sam/api"- "github.com/google/sam/internal/storage""github.com/google/sam/internal/node"+ "github.com/google/sam/internal/storage""github.com/libp2p/go-libp2p/core/crypto""github.com/libp2p/go-libp2p/core/peer""google.golang.org/protobuf/proto"diff --git a/internal/node/node.go b/internal/node/node.goindex 11dc7cf8..3bb51c9d 100644--- a/internal/node/node.go+++ b/internal/node/node.go@@ -89,14 +89,13 @@ const (// Reprovide intervalReprovideInterval = 5 * time.Minute-)var (// Renewal timing defaultsDefaultRenewalFallback = (api.BiscuitTokenTTL * 8) / 10 // 80% of TTL (19.2h)- RenewalBuffer = api.BiscuitTokenTTL / 5 // 20% of TTL (4.8h)- RenewalThreshold = api.BiscuitTokenTTL / 4 // 25% of TTL (6h)+ RenewalBuffer = api.BiscuitTokenTTL / 5 // 20% of TTL (4.8h)+ RenewalThreshold = api.BiscuitTokenTTL / 4 // 25% of TTL (6h))var ErrFatalAuth = errors.New("fatal authentication error")diff --git a/site/static/install.sh b/site/static/install.shindex 99763bbc..0e626719 100755--- a/site/static/install.sh+++ b/site/static/install.sh@@ -55,9 +55,9 @@ tar -xzf "${TAR_NAME}"echo "Installing to ${INSTALL_DIR} (may require sudo)..."# In some environments, sudo might not be available or requiredif [ -w "$INSTALL_DIR" ]; then- mv sam-node sam-hub mcp-client "$INSTALL_DIR/" 2>/dev/null || true+ mv sam-node sam-control-plane sam-router mcp-client "$INSTALL_DIR/" 2>/dev/null || trueelse- sudo mv sam-node sam-hub mcp-client "$INSTALL_DIR/" 2>/dev/null || true+ sudo mv sam-node sam-control-plane sam-router mcp-client "$INSTALL_DIR/" 2>/dev/null || truefi# Cleanupdiff --git a/tests/e2e/fixtures/sam-node.yaml b/tests/e2e/fixtures/sam-node.yamlindex 2a099b3b..aa201efe 100644--- a/tests/e2e/fixtures/sam-node.yaml+++ b/tests/e2e/fixtures/sam-node.yaml@@ -19,7 +19,7 @@ spec:command: ["/sam-node", "run"]args:- "--hub"- - "http://sam-hub.default.svc.cluster.local:9090"+ - "http://sam-control-plane.default.svc.cluster.local:8080"- "--jwt-path"- "/var/run/secrets/tokens/sam-token"- "--api-token"