Skip to content

Agent Mesh

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.yaml
index 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.yaml
index 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.yaml
index 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.yaml
index 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.yaml
index 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.yaml
index 8783fc6a..8f8a27ed 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -15,9 +15,23 @@ builds:
- arm64
ldflags:
- -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-router
env:
- CGO_ENABLED=0
goos:
diff --git a/README.md b/README.md
index 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.sh
index 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 required
if [ -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 || true
else
- 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 || true
fi
# Cleanup
diff --git a/internal/controlplane/server.go b/internal/controlplane/server.go
index 8aa74600..59b138c8 100644
--- a/internal/controlplane/server.go
+++ b/internal/controlplane/server.go
@@ -123,8 +123,6 @@ func (s *Server) Start() error {
}
}
-
-
// Initialize OIDC Providers
if 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.go
index 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.go
index 11dc7cf8..3bb51c9d 100644
--- a/internal/node/node.go
+++ b/internal/node/node.go
@@ -89,14 +89,13 @@ const (
// Reprovide interval
ReprovideInterval = 5 * time.Minute
-
)
var (
// Renewal timing defaults
DefaultRenewalFallback = (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.sh
index 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 required
if [ -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 || true
else
- 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 || true
fi
# Cleanup
diff --git a/tests/e2e/fixtures/sam-node.yaml b/tests/e2e/fixtures/sam-node.yaml
index 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"