Skip to content

Agent Mesh

refactor(deploy,mobile,e2e): rename Helm charts, K8s manifests, mobile app, E2E tests, and CI workflows

Antonio Ojeae93e3c7428db
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 8e7787b3..7747708e 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -76,14 +76,14 @@ updates:
- "*"
- package-ecosystem: "pub"
- directory: "/mobile/sam-node-app"
+ directory: "/mobile/agentmesh-node-app"
schedule:
interval: "weekly"
cooldown:
default-days: 7
- package-ecosystem: "gradle"
- directory: "/mobile/sam-node-app/android"
+ directory: "/mobile/agentmesh-node-app/android"
schedule:
interval: "weekly"
cooldown:
diff --git a/.github/k8s/sam-canary-sa-template.yaml b/.github/k8s/agentmesh-canary-sa-template.yaml
similarity index 52%
rename from .github/k8s/sam-canary-sa-template.yaml
rename to .github/k8s/agentmesh-canary-sa-template.yaml
index 215bebde..1dfcfc29 100644
--- a/.github/k8s/sam-canary-sa-template.yaml
+++ b/.github/k8s/agentmesh-canary-sa-template.yaml
@@ -1,8 +1,8 @@
# Identity shared by every canary node in the namespace; deploy.yaml's policy
-# seed binds it to the sam-canary role. Applied with the namespaces so it
+# seed binds it to the agentmesh-canary role. Applied with the namespaces so it
# exists before any canary references it.
apiVersion: v1
kind: ServiceAccount
metadata:
- name: sam-node-sa
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-node-sa
+ namespace: agentmesh-canary-${ENV_NAME}
diff --git a/.github/k8s/sam-console-template.yaml b/.github/k8s/agentmesh-console-template.yaml
similarity index 63%
rename from .github/k8s/sam-console-template.yaml
rename to .github/k8s/agentmesh-console-template.yaml
index 45aa6be8..53c8343b 100644
--- a/.github/k8s/sam-console-template.yaml
+++ b/.github/k8s/agentmesh-console-template.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
- name: sam-console-${ENV_NAME}
+ name: agentmesh-console-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
ports:
@@ -10,37 +10,37 @@ spec:
protocol: TCP
name: http
selector:
- app: sam-console-${ENV_NAME}
+ app: agentmesh-console-${ENV_NAME}
---
apiVersion: apps/v1
kind: Deployment
metadata:
- name: sam-console-${ENV_NAME}
+ name: agentmesh-console-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
replicas: 1
selector:
matchLabels:
- app: sam-console-${ENV_NAME}
+ app: agentmesh-console-${ENV_NAME}
template:
metadata:
labels:
- app: sam-console-${ENV_NAME}
+ app: agentmesh-console-${ENV_NAME}
spec:
containers:
- - name: sam-console
- image: ghcr.io/google/sam-console:${IMAGE_TAG}
+ - name: agentmesh-console
+ image: ghcr.io/google/agentmesh-console:${IMAGE_TAG}
imagePullPolicy: IfNotPresent
args:
- - "--control-plane=http://sam-control-plane-${ENV_NAME}:8080"
+ - "--control-plane=http://agentmesh-control-plane-${ENV_NAME}:8080"
- "--bind-addr=:8081"
- "--static-dir=/app/public"
- "--base-path=/console"
env:
- - name: SAM_ADMIN_TOKEN
+ - name: AGENTMESH_ADMIN_TOKEN
valueFrom:
secretKeyRef:
- name: sam-control-plane-secret-${ENV_NAME}
+ name: agentmesh-control-plane-secret-${ENV_NAME}
key: admin-token
ports:
- containerPort: 8081
diff --git a/.github/k8s/sam-control-plane-template.yaml b/.github/k8s/agentmesh-control-plane-template.yaml
similarity index 84%
rename from .github/k8s/sam-control-plane-template.yaml
rename to .github/k8s/agentmesh-control-plane-template.yaml
index ab477ee2..5767b6b4 100644
--- a/.github/k8s/sam-control-plane-template.yaml
+++ b/.github/k8s/agentmesh-control-plane-template.yaml
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
- name: sam-control-plane-${ENV_NAME}
+ name: agentmesh-control-plane-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
ports:
@@ -10,7 +10,7 @@ spec:
protocol: TCP
name: http
selector:
- app: sam-control-plane-${ENV_NAME}
+ app: agentmesh-control-plane-${ENV_NAME}
---
apiVersion: v1
kind: Service
@@ -54,7 +54,7 @@ spec:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
- name: sam-control-plane-secret-${ENV_NAME}
+ name: agentmesh-control-plane-secret-${ENV_NAME}
key: db-password
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
@@ -76,36 +76,36 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
- name: sam-control-plane-${ENV_NAME}
+ name: agentmesh-control-plane-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
replicas: 2
selector:
matchLabels:
- app: sam-control-plane-${ENV_NAME}
+ app: agentmesh-control-plane-${ENV_NAME}
template:
metadata:
labels:
- app: sam-control-plane-${ENV_NAME}
+ app: agentmesh-control-plane-${ENV_NAME}
spec:
initContainers:
- name: wait-for-db
image: busybox:1.36.1
command: ['sh', '-c', 'until nc -z -w3 sam-db-${ENV_NAME} 5432; do echo waiting for db; sleep 1; done']
containers:
- - name: sam-control-plane
- image: ghcr.io/google/sam-control-plane:${IMAGE_TAG}
+ - name: agentmesh-control-plane
+ image: ghcr.io/google/agentmesh-control-plane:${IMAGE_TAG}
env:
- - name: SAM_ADMIN_TOKEN
+ - name: AGENTMESH_ADMIN_TOKEN
valueFrom:
secretKeyRef:
- name: sam-control-plane-secret-${ENV_NAME}
+ name: agentmesh-control-plane-secret-${ENV_NAME}
key: admin-token
optional: true
- - name: SAM_DB_DSN
+ - name: AGENTMESH_DB_DSN
valueFrom:
secretKeyRef:
- name: sam-control-plane-secret-${ENV_NAME}
+ name: agentmesh-control-plane-secret-${ENV_NAME}
key: db-dsn
ports:
- containerPort: 8080
@@ -129,7 +129,7 @@ spec:
- "--bind-address=0.0.0.0:8080"
- "--db-driver=postgres"
- "--issuer=https://auth.sam-mesh.dev,https://container.googleapis.com/v1/projects/${GCP_PROJECT_ID}/locations/${CLUSTER_REGION}/clusters/${CLUSTER_NAME}"
- - "--allowed-audiences=agentmesh-audience,sam-control-plane-audience"
+ - "--allowed-audiences=agentmesh-audience,agentmesh-control-plane-audience"
- "--auto-approve-enrollment"
- "--key-grace-period=48h"
resources:
@@ -143,7 +143,7 @@ spec:
apiVersion: networking.gke.io/v1
kind: HealthCheckPolicy
metadata:
- name: sam-control-plane-healthcheck-${ENV_NAME}
+ name: agentmesh-control-plane-healthcheck-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
default:
@@ -158,12 +158,12 @@ spec:
targetRef:
group: ""
kind: Service
- name: sam-control-plane-${ENV_NAME}
+ name: agentmesh-control-plane-${ENV_NAME}
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
- name: sam-control-plane-gateway-${ENV_NAME}
+ name: agentmesh-control-plane-gateway-${ENV_NAME}
namespace: ${NAMESPACE}
annotations:
networking.gke.io/certmap: sam-hub-cert-map-${ENV_NAME}
@@ -183,11 +183,11 @@ spec:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
- name: sam-control-plane-route-${ENV_NAME}
+ name: agentmesh-control-plane-route-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
parentRefs:
- - name: sam-control-plane-gateway-${ENV_NAME}
+ - name: agentmesh-control-plane-gateway-${ENV_NAME}
hostnames:
- "${ENV_NAME}.sam-mesh.dev"
rules:
@@ -247,7 +247,7 @@ spec:
type: Exact
value: /oauth/token
backendRefs:
- - name: sam-control-plane-${ENV_NAME}
+ - name: agentmesh-control-plane-${ENV_NAME}
port: 8080
- matches:
- path:
@@ -271,5 +271,5 @@ spec:
type: ReplacePrefixMatch
replacePrefixMatch: /
backendRefs:
- - name: sam-console-${ENV_NAME}
+ - name: agentmesh-console-${ENV_NAME}
port: 8081
diff --git a/.github/k8s/sam-monitoring-template.yaml b/.github/k8s/agentmesh-monitoring-template.yaml
similarity index 62%
rename from .github/k8s/sam-monitoring-template.yaml
rename to .github/k8s/agentmesh-monitoring-template.yaml
index d627908a..724a9398 100644
--- a/.github/k8s/sam-monitoring-template.yaml
+++ b/.github/k8s/agentmesh-monitoring-template.yaml
@@ -4,12 +4,12 @@
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
- name: sam-control-plane-${ENV_NAME}
+ name: agentmesh-control-plane-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
selector:
matchLabels:
- app: sam-control-plane-${ENV_NAME}
+ app: agentmesh-control-plane-${ENV_NAME}
endpoints:
- port: http
path: /metrics
@@ -18,28 +18,28 @@ spec:
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
- name: sam-router-${ENV_NAME}
+ name: agentmesh-router-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
selector:
matchLabels:
- app: sam-router-${ENV_NAME}
+ app: agentmesh-router-${ENV_NAME}
endpoints:
- port: metrics
path: /metrics
interval: 30s
---
-# Every canary pod carries sam-canary=true; a pod without one of these named
+# Every canary pod carries agentmesh-canary=true; a pod without one of these named
# ports is simply not a target for that endpoint.
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
- name: sam-canaries-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-canaries-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
selector:
matchLabels:
- sam-canary: "true"
+ agentmesh-canary: "true"
endpoints:
- port: metrics
path: /metrics
@@ -59,53 +59,53 @@ spec:
apiVersion: monitoring.googleapis.com/v1
kind: Rules
metadata:
- name: sam-mesh-${ENV_NAME}
+ name: agentmesh-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
groups:
- - name: sam-mesh
+ - name: agentmesh
interval: 60s
rules:
# A router that refuses inbound connections closes them before TLS, so a
# member only sees "stream closed" and the router's own log shows
# nothing unless this counter moves. per_ip_limit from one source for
# long means the per-IP count has drifted from the sockets that exist.
- - alert: SamRouterRefusingInboundConnections
- expr: sum by (pod, reason) (rate(sam_router_inbound_connections_refused_total[10m])) > 0.01
+ - alert: AgentMeshRouterRefusingInboundConnections
+ expr: sum by (pod, reason) (rate(agentmesh_router_inbound_connections_refused_total[10m])) > 0.01
for: 15m
labels:
severity: warning
annotations:
summary: "Router {{ $labels.pod }} is refusing inbound connections ({{ $labels.reason }})"
- description: "{{ $value | humanize }} refusals/s for 15m. `kubectl logs {{ $labels.pod }} | grep '\\[Conn\\] Refused'` names the source IPs; compare sam_router_conns_per_source_ip_limit with the connections the router really holds from that IP (`ss -tn` in its network namespace). A restart of the router clears a drifted per-IP count."
+ description: "{{ $value | humanize }} refusals/s for 15m. `kubectl logs {{ $labels.pod }} | grep '\\[Conn\\] Refused'` names the source IPs; compare agentmesh_router_conns_per_source_ip_limit with the connections the router really holds from that IP (`ss -tn` in its network namespace). A restart of the router clears a drifted per-IP count."
# One peer failing the handshake every few seconds for an hour holds a
# credential the control plane no longer signs for, or a peer that
# cannot pull /keys; it also floods the router log.
- - alert: SamRouterHandshakesFailing
- expr: sum by (pod) (rate(sam_router_auth_handshakes_total{result="unauthorized"}[10m])) > 0.05
+ - alert: AgentMeshRouterHandshakesFailing
+ expr: sum by (pod) (rate(agentmesh_router_auth_handshakes_total{result="unauthorized"}[10m])) > 0.05
for: 1h
labels:
severity: warning
annotations:
summary: "Router {{ $labels.pod }} rejects handshakes continuously"
- description: "{{ $value | humanize }} unauthorized handshakes/s for 1h. `kubectl logs {{ $labels.pod }} | grep 'Authorization failed'` names the peer; a credential signed by a retired key means that member did not follow the last rotation (sam_control_plane_retiring_key_expiry_timestamp_seconds says when the retiring key stopped verifying)."
+ description: "{{ $value | humanize }} unauthorized handshakes/s for 1h. `kubectl logs {{ $labels.pod }} | grep 'Authorization failed'` names the peer; a credential signed by a retired key means that member did not follow the last rotation (agentmesh_control_plane_retiring_key_expiry_timestamp_seconds says when the retiring key stopped verifying)."
# Every router renews its lease within a minute; a router that stops is
# down or cannot reach the control plane, and the DNS and /info lists
# keep advertising it until the lease lapses. Both control plane
# replicas export the same figure; max collapses them, and the slack
# covers the scrape interval and the store's refresh TTL.
- - alert: SamRouterLeaseNotRenewed
- expr: time() - max by (namespace, router) (sam_control_plane_router_lease_renewed_timestamp_seconds) > 600
+ - alert: AgentMeshRouterLeaseNotRenewed
+ expr: time() - max by (namespace, router) (agentmesh_control_plane_router_lease_renewed_timestamp_seconds) > 600
for: 5m
labels:
severity: critical
annotations:
summary: "Router {{ $labels.router }} has not renewed its lease for 5m"
- description: "Last renewal {{ $value | humanizeDuration }} ago. Check the router pod's state and `sam_router_lease_renewals_total{result!=\"ok\"}` on it."
+ description: "Last renewal {{ $value | humanizeDuration }} ago. Check the router pod's state and `agentmesh_router_lease_renewals_total{result!=\"ok\"}` on it."
# The mesh had no router at all for a scrape: nothing can enroll, join
# or be reached.
- - alert: SamNoActiveRouter
- expr: sam_control_plane_routers_active < 1
+ - alert: AgentMeshNoActiveRouter
+ expr: agentmesh_control_plane_routers_active < 1
for: 2m
labels:
severity: critical
@@ -115,18 +115,18 @@ spec:
# retiring key is how members fall off the mesh at once; two keys for
# longer than the configured grace period means a rotation did not
# complete.
- - alert: SamSigningKeyRotationStuck
- expr: sam_control_plane_signing_keys > 2 or (sam_control_plane_retiring_key_expiry_timestamp_seconds - time() < 0)
+ - alert: AgentMeshSigningKeyRotationStuck
+ expr: agentmesh_control_plane_signing_keys > 2 or (agentmesh_control_plane_retiring_key_expiry_timestamp_seconds - time() < 0)
for: 10m
labels:
severity: warning
annotations:
summary: "Signing key set on ${ENV_NAME} is not the expected one current key plus at most one retiring key"
- description: "sam_control_plane_signing_keys={{ $value }}; check the keyring and the control plane log for 'Key rotation'."
+ description: "agentmesh_control_plane_signing_keys={{ $value }}; check the keyring and the control plane log for 'Key rotation'."
# The control plane's own view of the mesh is stale: its store read
# failed, so every gauge above is the last good one.
- - alert: SamControlPlaneStoreUnreadable
- expr: sam_control_plane_mesh_state_scrape_success == 0
+ - alert: AgentMeshControlPlaneStoreUnreadable
+ expr: agentmesh_control_plane_mesh_state_scrape_success == 0
for: 5m
labels:
severity: critical
@@ -138,31 +138,31 @@ spec:
apiVersion: monitoring.googleapis.com/v1
kind: Rules
metadata:
- name: sam-canaries-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-canaries-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
groups:
- - name: sam-canaries
+ - name: agentmesh-canaries
interval: 60s
rules:
- - alert: SamCanaryNotReady
- expr: min by (pod) (kube_pod_status_ready{namespace="sam-canary-${ENV_NAME}",condition="true"}) == 0
+ - alert: AgentMeshCanaryNotReady
+ expr: min by (pod) (kube_pod_status_ready{namespace="agentmesh-canary-${ENV_NAME}",condition="true"}) == 0
for: 20m
labels:
severity: warning
annotations:
summary: "Canary {{ $labels.pod }} on ${ENV_NAME} has not been ready for 20m"
- description: "`kubectl logs -n sam-canary-${ENV_NAME} {{ $labels.pod }} -c caller | tail -3` gives the error and the per-router detail of the last calls."
+ description: "`kubectl logs -n agentmesh-canary-${ENV_NAME} {{ $labels.pod }} -c caller | tail -3` gives the error and the per-router detail of the last calls."
# A member's own account of the mesh: its node holds no authenticated
# router connection. A router rollout costs a member seconds; five
# minutes is a member that cannot get back, which after a key rotation
# or a refresh is how a fleet falls off the mesh one pod at a time. The
- # soak fleet (sam-soak-template.yaml) exists to make this fire first.
- - alert: SamCanaryMemberDisconnected
- expr: min by (pod) (sam_node_mesh_connected{namespace="sam-canary-${ENV_NAME}"}) == 0
+ # soak fleet (agentmesh-soak-template.yaml) exists to make this fire first.
+ - alert: AgentMeshCanaryMemberDisconnected
+ expr: min by (pod) (agentmesh_node_mesh_connected{namespace="agentmesh-canary-${ENV_NAME}"}) == 0
for: 5m
labels:
severity: warning
annotations:
summary: "Member {{ $labels.pod }} on ${ENV_NAME} has had no router for 5m"
- description: "`kubectl logs -n sam-canary-${ENV_NAME} {{ $labels.pod }} -c sam-node | grep -iE 'router|auth|renew' | tail -5` says whether it cannot dial, is refused at the handshake, or holds a credential that no longer verifies; compare with sam_router_auth_handshakes_total and sam_router_inbound_connections_refused_total on the routers."
+ description: "`kubectl logs -n agentmesh-canary-${ENV_NAME} {{ $labels.pod }} -c agentmesh-node | grep -iE 'router|auth|renew' | tail -5` says whether it cannot dial, is refused at the handshake, or holds a credential that no longer verifies; compare with agentmesh_router_auth_handshakes_total and agentmesh_router_inbound_connections_refused_total on the routers."
diff --git a/.github/k8s/sam-node-everything-template.yaml b/.github/k8s/agentmesh-node-everything-template.yaml
similarity index 66%
rename from .github/k8s/sam-node-everything-template.yaml
rename to .github/k8s/agentmesh-node-everything-template.yaml
index b5fa9ae1..c3e2e474 100644
--- a/.github/k8s/sam-node-everything-template.yaml
+++ b/.github/k8s/agentmesh-node-everything-template.yaml
@@ -1,10 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: sam-canary-everything-config-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-canary-everything-config-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
data:
- sam-node.yaml: |
+ agentmesh-node.yaml: |
version: "v1alpha1"
attenuation:
policies: []
@@ -20,7 +20,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: everything-canary-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
replicas: 2
selector:
@@ -30,9 +30,9 @@ spec:
metadata:
labels:
app: everything-canary-${ENV_NAME}
- sam-canary: "true"
+ agentmesh-canary: "true"
spec:
- serviceAccountName: sam-node-sa
+ serviceAccountName: agentmesh-node-sa
containers:
- name: server-everything
image: node:22-slim
@@ -47,17 +47,17 @@ spec:
limits:
cpu: 200m
memory: 256Mi
- - name: sam-node
- image: ghcr.io/google/sam-node:${IMAGE_TAG}
+ - name: agentmesh-node
+ image: ghcr.io/google/agentmesh-node:${IMAGE_TAG}
env:
- - name: SAM_API_TOKEN
+ - name: AGENTMESH_API_TOKEN
value: "secret-token"
args:
- "run"
- - "--config=/etc/sam/sam-node.yaml"
- - "--control-plane=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - "--config=/etc/agentmesh/agentmesh-node.yaml"
+ - "--control-plane=http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- "--insecure-control-plane"
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
+ - "--jwt-path=/var/run/secrets/tokens/agentmesh-token"
- "--bind-addr=127.0.0.1:8080"
- "--metrics-addr=0.0.0.0:9090"
ports:
@@ -73,18 +73,18 @@ spec:
memory: 256Mi
volumeMounts:
- name: config-volume
- mountPath: /etc/sam
- - name: sam-token
+ mountPath: /etc/agentmesh
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
volumes:
- name: config-volume
configMap:
- name: sam-canary-everything-config-${ENV_NAME}
- - name: sam-token
+ name: agentmesh-canary-everything-config-${ENV_NAME}
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
diff --git a/.github/k8s/sam-node-openclaw-template.yaml b/.github/k8s/agentmesh-node-openclaw-template.yaml
similarity index 78%
rename from .github/k8s/sam-node-openclaw-template.yaml
rename to .github/k8s/agentmesh-node-openclaw-template.yaml
index 2ce0a7bf..6b600de4 100644
--- a/.github/k8s/sam-node-openclaw-template.yaml
+++ b/.github/k8s/agentmesh-node-openclaw-template.yaml
@@ -1,15 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: sam-canary-openclaw-config-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-canary-openclaw-config-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
data:
- sam-node.yaml: |
+ agentmesh-node.yaml: |
version: "v1alpha1"
attenuation:
policies:
- 'allow if service("mcp", "openclaw");'
- - 'allow if service("system", "/sam/catalog");'
+ - 'allow if service("system", "/mesh/catalog");'
checks: []
rules: []
services: []
@@ -25,7 +25,7 @@ data:
},
"mcp": {
"servers": {
- "sam-mesh": {
+ "agentmesh": {
"enabled": true,
"url": "http://127.0.0.1:8080/mcp"
}
@@ -37,7 +37,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: openclaw-canary-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
replicas: 2
selector:
@@ -47,9 +47,9 @@ spec:
metadata:
labels:
app: openclaw-canary-${ENV_NAME}
- sam-canary: "true"
+ agentmesh-canary: "true"
spec:
- serviceAccountName: sam-node-sa
+ serviceAccountName: agentmesh-node-sa
containers:
- name: openclaw
image: ghcr.io/openclaw/openclaw:2026.8.1
@@ -74,7 +74,7 @@ spec:
openclaw cron add --name mesh-health-check --every 5m --token "${OPENCLAW_GATEWAY_TOKEN}" --best-effort-deliver --no-deliver --message "Use the get_mesh_info tool to check the mesh connection status and log the output." || true
) >/dev/null 2>&1 </dev/null &
env:
- - name: SAM_MCP_URL
+ - name: AGENTMESH_MCP_URL
value: "http://127.0.0.1:8080/mcp"
- name: OPENCLAW_STATE_DIR
value: "/data"
@@ -103,17 +103,17 @@ spec:
subPath: openclaw.json
- name: dshm
mountPath: /dev/shm
- - name: sam-node
- image: ghcr.io/google/sam-node:${IMAGE_TAG}
+ - name: agentmesh-node
+ image: ghcr.io/google/agentmesh-node:${IMAGE_TAG}
env:
- - name: SAM_API_TOKEN
+ - name: AGENTMESH_API_TOKEN
value: "secret-token"
args:
- "run"
- - "--config=/etc/sam/sam-node.yaml"
- - "--control-plane=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - "--config=/etc/agentmesh/agentmesh-node.yaml"
+ - "--control-plane=http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- "--insecure-control-plane"
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
+ - "--jwt-path=/var/run/secrets/tokens/agentmesh-token"
- "--bind-addr=127.0.0.1:8080"
- "--metrics-addr=0.0.0.0:9090"
ports:
@@ -129,23 +129,23 @@ spec:
memory: 256Mi
volumeMounts:
- name: config-volume
- mountPath: /etc/sam
- - name: sam-token
+ mountPath: /etc/agentmesh
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
volumes:
- name: config-volume
configMap:
- name: sam-canary-openclaw-config-${ENV_NAME}
+ name: agentmesh-canary-openclaw-config-${ENV_NAME}
- name: openclaw-data
emptyDir: {}
- name: dshm
emptyDir:
medium: Memory
- - name: sam-token
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
diff --git a/.github/k8s/sam-node-openrouter-template.yaml b/.github/k8s/agentmesh-node-openrouter-template.yaml
similarity index 68%
rename from .github/k8s/sam-node-openrouter-template.yaml
rename to .github/k8s/agentmesh-node-openrouter-template.yaml
index 53321905..8147b46f 100644
--- a/.github/k8s/sam-node-openrouter-template.yaml
+++ b/.github/k8s/agentmesh-node-openrouter-template.yaml
@@ -1,15 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: sam-canary-openrouter-config-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-canary-openrouter-config-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
data:
- sam-node.yaml: |
+ agentmesh-node.yaml: |
version: "v1alpha1"
attenuation:
policies:
- 'allow if service("inference", "openrouter");'
- - 'allow if service("system", "/sam/catalog");'
+ - 'allow if service("system", "/mesh/catalog");'
checks: []
rules: []
services:
@@ -22,7 +22,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: openrouter-canary-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
replicas: 1
selector:
@@ -32,9 +32,9 @@ spec:
metadata:
labels:
app: openrouter-canary-${ENV_NAME}
- sam-canary: "true"
+ agentmesh-canary: "true"
spec:
- serviceAccountName: sam-node-sa
+ serviceAccountName: agentmesh-node-sa
containers:
- name: openrouter-proxy
image: ghcr.io/berriai/litellm:main-latest
@@ -58,17 +58,17 @@ spec:
requests:
cpu: 100m
memory: 256Mi
- - name: sam-node
- image: ghcr.io/google/sam-node:${IMAGE_TAG}
+ - name: agentmesh-node
+ image: ghcr.io/google/agentmesh-node:${IMAGE_TAG}
env:
- - name: SAM_API_TOKEN
+ - name: AGENTMESH_API_TOKEN
value: "secret-token"
args:
- "run"
- - "--config=/etc/sam/sam-node.yaml"
- - "--control-plane=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - "--config=/etc/agentmesh/agentmesh-node.yaml"
+ - "--control-plane=http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- "--insecure-control-plane"
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
+ - "--jwt-path=/var/run/secrets/tokens/agentmesh-token"
- "--bind-addr=127.0.0.1:8080"
- "--metrics-addr=0.0.0.0:9090"
ports:
@@ -81,18 +81,18 @@ spec:
memory: 128Mi
volumeMounts:
- name: config-volume
- mountPath: /etc/sam
- - name: sam-token
+ mountPath: /etc/agentmesh
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
volumes:
- name: config-volume
configMap:
- name: sam-canary-openrouter-config-${ENV_NAME}
- - name: sam-token
+ name: agentmesh-canary-openrouter-config-${ENV_NAME}
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
diff --git a/.github/k8s/sam-node-vllm-template.yaml b/.github/k8s/agentmesh-node-vllm-template.yaml
similarity index 75%
rename from .github/k8s/sam-node-vllm-template.yaml
rename to .github/k8s/agentmesh-node-vllm-template.yaml
index 0a9dc86e..1dbed188 100644
--- a/.github/k8s/sam-node-vllm-template.yaml
+++ b/.github/k8s/agentmesh-node-vllm-template.yaml
@@ -2,7 +2,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: hf-cache-pvc-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
accessModes:
- ReadWriteOnce
@@ -13,15 +13,15 @@ spec:
apiVersion: v1
kind: ConfigMap
metadata:
- name: sam-canary-vllm-config-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-canary-vllm-config-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
data:
- sam-node.yaml: |
+ agentmesh-node.yaml: |
version: "v1alpha1"
attenuation:
policies:
- - 'allow if service("inference", "vllm-tpu"), user("system:serviceaccount:sam-canary-${ENV_NAME}:sam-node-sa");'
- - 'allow if service("system", "/sam/catalog");'
+ - 'allow if service("inference", "vllm-tpu"), user("system:serviceaccount:agentmesh-canary-${ENV_NAME}:agentmesh-node-sa");'
+ - 'allow if service("system", "/mesh/catalog");'
checks: []
rules: []
services:
@@ -34,7 +34,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: vllm-canary-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
replicas: 1
strategy:
@@ -46,9 +46,9 @@ spec:
metadata:
labels:
app: vllm-canary-${ENV_NAME}
- sam-canary: "true"
+ agentmesh-canary: "true"
spec:
- serviceAccountName: sam-node-sa
+ serviceAccountName: agentmesh-node-sa
nodeSelector:
cloud.google.com/gke-tpu-accelerator: tpu-v5-lite-podslice
cloud.google.com/gke-tpu-topology: "1x1"
@@ -96,17 +96,17 @@ spec:
mountPath: /dev/shm
- name: hf-cache
mountPath: /root/.cache/huggingface
- - name: sam-node
- image: ghcr.io/google/sam-node:${IMAGE_TAG}
+ - name: agentmesh-node
+ image: ghcr.io/google/agentmesh-node:${IMAGE_TAG}
env:
- - name: SAM_API_TOKEN
+ - name: AGENTMESH_API_TOKEN
value: "secret-token"
args:
- "run"
- - "--config=/etc/sam/sam-node.yaml"
- - "--control-plane=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - "--config=/etc/agentmesh/agentmesh-node.yaml"
+ - "--control-plane=http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- "--insecure-control-plane"
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
+ - "--jwt-path=/var/run/secrets/tokens/agentmesh-token"
- "--bind-addr=127.0.0.1:8080"
- "--metrics-addr=0.0.0.0:9090"
ports:
@@ -122,8 +122,8 @@ spec:
memory: 256Mi
volumeMounts:
- name: config-volume
- mountPath: /etc/sam
- - name: sam-token
+ mountPath: /etc/agentmesh
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
volumes:
@@ -132,15 +132,15 @@ spec:
claimName: hf-cache-pvc-${ENV_NAME}
- name: config-volume
configMap:
- name: sam-canary-vllm-config-${ENV_NAME}
+ name: agentmesh-canary-vllm-config-${ENV_NAME}
- name: dshm
emptyDir:
medium: Memory
sizeLimit: 16Gi
- - name: sam-token
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
diff --git a/.github/k8s/sam-probe-cronjob-template.yaml b/.github/k8s/agentmesh-probe-cronjob-template.yaml
similarity index 76%
rename from .github/k8s/sam-probe-cronjob-template.yaml
rename to .github/k8s/agentmesh-probe-cronjob-template.yaml
index e79ac529..006da076 100644
--- a/.github/k8s/sam-probe-cronjob-template.yaml
+++ b/.github/k8s/agentmesh-probe-cronjob-template.yaml
@@ -8,8 +8,8 @@
apiVersion: batch/v1
kind: CronJob
metadata:
- name: sam-probe-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-probe-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
schedule: "*/15 * * * *"
concurrencyPolicy: Forbid
@@ -26,11 +26,11 @@ spec:
template:
metadata:
labels:
- app: sam-probe-${ENV_NAME}
+ app: agentmesh-probe-${ENV_NAME}
spec:
- # Bound to the sam-canary role by deploy.yaml's policy seed, which
+ # Bound to the agentmesh-canary role by deploy.yaml's policy seed, which
# is what lets the probe call the canaries' services.
- serviceAccountName: sam-node-sa
+ serviceAccountName: agentmesh-node-sa
restartPolicy: Never
# The agent sidecars run under a shell that pipes to tee; the shell
# gets the SIGTERM, the agent the SIGKILL that follows.
@@ -38,19 +38,19 @@ spec:
initContainers:
# Native sidecars: they stay up for the probe container's lifetime
# and are stopped when that container exits, so the Job completes.
- - name: sam-node
+ - name: agentmesh-node
restartPolicy: Always
- image: ghcr.io/google/sam-node:${IMAGE_TAG}
+ image: ghcr.io/google/agentmesh-node:${IMAGE_TAG}
args:
- "run"
- - "--config=/etc/sam/sam-node.yaml"
- - "--control-plane=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - "--config=/etc/agentmesh/agentmesh-node.yaml"
+ - "--control-plane=http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- "--insecure-control-plane"
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
- - "--data-dir=/var/run/sam/data"
+ - "--jwt-path=/var/run/secrets/tokens/agentmesh-token"
+ - "--data-dir=/var/run/agentmesh/data"
# Socket only: no TCP listener, so no API token to hand out.
- "--bind-addr="
- - "--socket-path=/var/run/sam/node.sock"
+ - "--socket-path=/var/run/agentmesh/node.sock"
- "--metrics-addr=127.0.0.1:9090"
resources:
requests:
@@ -61,12 +61,12 @@ spec:
memory: 256Mi
volumeMounts:
- name: config-volume
- mountPath: /etc/sam
- - name: sam-token
+ mountPath: /etc/agentmesh
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-uds
- mountPath: /var/run/sam
+ - name: agentmesh-uds
+ mountPath: /var/run/agentmesh
# An agent written with each SDK and the official A2A SDK
# (sdk/js/examples/a2a-agent.ts, sdk/python/examples/a2a_agent.py),
# the programs the docs embed. Each accepts A2A requests for
@@ -74,17 +74,17 @@ spec:
# log and to the shared volume, where the probe reads its peer ID.
- name: js-agent
restartPolicy: Always
- image: ghcr.io/google/sam-sdk-js:${IMAGE_TAG}
- command: ["/bin/sh", "-c", "node build/examples/a2a-agent.js 2>&1 | tee /var/run/sam-agents/js-agent.log"]
+ image: ghcr.io/google/agentmesh-sdk-js:${IMAGE_TAG}
+ command: ["/bin/sh", "-c", "node build/examples/a2a-agent.js 2>&1 | tee /var/run/agentmesh-agents/js-agent.log"]
env:
- - name: SAM_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_CONTROL_PLANE_URL
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
- value: /var/run/sam-agents/js-agent
+ - name: AGENTMESH_JWT_PATH
+ value: /var/run/secrets/tokens/agentmesh-token
+ - name: AGENTMESH_STATE_DIR
+ value: /var/run/agentmesh-agents/js-agent
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -97,24 +97,24 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-agents
- mountPath: /var/run/sam-agents
+ - name: agentmesh-agents
+ mountPath: /var/run/agentmesh-agents
- name: python-agent
restartPolicy: Always
- image: ghcr.io/google/sam-sdk-python:${IMAGE_TAG}
- command: ["/bin/sh", "-c", "python examples/a2a_agent.py 2>&1 | tee /var/run/sam-agents/python-agent.log"]
+ image: ghcr.io/google/agentmesh-sdk-python:${IMAGE_TAG}
+ command: ["/bin/sh", "-c", "python examples/a2a_agent.py 2>&1 | tee /var/run/agentmesh-agents/python-agent.log"]
env:
- - name: SAM_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_CONTROL_PLANE_URL
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
- value: /var/run/sam-agents/python-agent
+ - name: AGENTMESH_JWT_PATH
+ value: /var/run/secrets/tokens/agentmesh-token
+ - name: AGENTMESH_STATE_DIR
+ value: /var/run/agentmesh-agents/python-agent
- name: PYTHONUNBUFFERED
value: "1"
securityContext:
@@ -129,11 +129,11 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-agents
- mountPath: /var/run/sam-agents
+ - name: agentmesh-agents
+ mountPath: /var/run/agentmesh-agents
containers:
- name: probe
image: alpine/curl:8.12.1
@@ -147,7 +147,7 @@ spec:
drop: ["ALL"]
env:
- name: PROBE_SERVICE
- # The everything canary's MCP server (sam-node-everything-template.yaml):
+ # The everything canary's MCP server (agentmesh-node-everything-template.yaml):
# a real server, so the node advertises it and initialize succeeds.
value: everything
- name: SDK_AGENTS
@@ -161,23 +161,23 @@ spec:
cpu: 100m
memory: 64Mi
volumeMounts:
- - name: sam-uds
- mountPath: /var/run/sam
- - name: sam-agents
- mountPath: /var/run/sam-agents
+ - name: agentmesh-uds
+ mountPath: /var/run/agentmesh
+ - name: agentmesh-agents
+ mountPath: /var/run/agentmesh-agents
readOnly: true
command: ["/bin/sh", "-c"]
args:
- |
set -u
- SOCK=/var/run/sam/node.sock
+ SOCK=/var/run/agentmesh/node.sock
READYZ=http://127.0.0.1:9090/readyz
START=$(date +%s)
# One JSON line per run, for a log-based metric; the exit code is
# what the Job reports.
fail() {
- printf '{"probe":"sam-cold-path","ok":false,"stage":"%s","error":"%s","elapsed_s":%d}\n' \
+ printf '{"probe":"agentmesh-cold-path","ok":false,"stage":"%s","error":"%s","elapsed_s":%d}\n' \
"$1" "$(printf '%s' "$2" | tr -d '"\n' | cut -c1-300)" "$(( $(date +%s) - START ))"
exit 1
}
@@ -218,7 +218,7 @@ spec:
set -- $(curl -s --unix-socket "$SOCK" -o /tmp/init.out -w '%{http_code} %{time_total}' \
-X POST "http://localhost/mesh/${p}/mcp/${PROBE_SERVICE}" \
-H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
- -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"sam-probe","version":"0"}}}')
+ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"agentmesh-probe","version":"0"}}}')
# curl prints "000 0" when it cannot connect; the defaults
# cover curl printing nothing at all, so set -u cannot end
# the run without a verdict line.
@@ -245,7 +245,7 @@ spec:
SDK_START=$(date +%s)
SDK_PEERS=""
for lang in ${SDK_AGENTS}; do
- AGENT_LOG=/var/run/sam-agents/${lang}-agent.log
+ AGENT_LOG=/var/run/agentmesh-agents/${lang}-agent.log
AGENT_PEER=""
while [ -z "$AGENT_PEER" ]; do
AGENT_PEER=$(grep -o 'accepting a2a://agent as [^ ]*' "$AGENT_LOG" 2>/dev/null | tail -1 | cut -d' ' -f4)
@@ -257,7 +257,7 @@ spec:
CALL_START=$(date +%s)
while :; do
CODE=$(curl -s --unix-socket "$SOCK" -o /tmp/sdk-card.out -w '%{http_code}' "http://localhost/mesh/${AGENT_PEER}/a2a/agent/.well-known/agent-card.json")
- if [ "$CODE" = "200" ] && grep -q 'Echo agent' /tmp/sdk-card.out && grep -q "/sam/${AGENT_PEER}/a2a/agent" /tmp/sdk-card.out; then
+ if [ "$CODE" = "200" ] && grep -q 'Echo agent' /tmp/sdk-card.out && grep -q "/mesh/${AGENT_PEER}/a2a/agent" /tmp/sdk-card.out; then
break
fi
LAST_ERR="HTTP ${CODE} $(head -c 160 /tmp/sdk-card.out | tr -d '"\n')"
@@ -268,31 +268,31 @@ spec:
done
SDK_S=$(( $(date +%s) - SDK_START ))
- printf '{"probe":"sam-cold-path","ok":true,"ready_s":%d,"router_latency_ms":%s,"connected_peers":%s,"reach_s":%d,"providers_tried":%d,"call_s":%s,"provider":"%s","sdk_s":%d,"sdk_agents":{%s},"elapsed_s":%d}\n' \
+ printf '{"probe":"agentmesh-cold-path","ok":true,"ready_s":%d,"router_latency_ms":%s,"connected_peers":%s,"reach_s":%d,"providers_tried":%d,"call_s":%s,"provider":"%s","sdk_s":%d,"sdk_agents":{%s},"elapsed_s":%d}\n' \
"$READY_S" "${ROUTER_MS:-null}" "${PEERS:-null}" "$REACH_S" "$TRIED" "$CALL_S" "$PEER" "$SDK_S" "$SDK_PEERS" "$(( $(date +%s) - START ))"
volumes:
- name: config-volume
configMap:
- name: sam-probe-config-${ENV_NAME}
- - name: sam-uds
+ name: agentmesh-probe-config-${ENV_NAME}
+ - name: agentmesh-uds
emptyDir: {}
- - name: sam-agents
+ - name: agentmesh-agents
emptyDir: {}
- - name: sam-token
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
---
apiVersion: v1
kind: ConfigMap
metadata:
- name: sam-probe-config-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-probe-config-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
data:
- sam-node.yaml: |
+ agentmesh-node.yaml: |
version: "v1alpha1"
attenuation:
policies: []
diff --git a/.github/k8s/sam-router-template.yaml b/.github/k8s/agentmesh-router-template.yaml
similarity index 79%
rename from .github/k8s/sam-router-template.yaml
rename to .github/k8s/agentmesh-router-template.yaml
index 42aea534..e5ee17db 100644
--- a/.github/k8s/sam-router-template.yaml
+++ b/.github/k8s/agentmesh-router-template.yaml
@@ -1,13 +1,13 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: sam-router-sa
+ name: agentmesh-router-sa
namespace: ${NAMESPACE}
---
apiVersion: v1
kind: Service
metadata:
- name: sam-router-${ENV_NAME}
+ name: agentmesh-router-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
clusterIP: None
@@ -21,15 +21,15 @@ spec:
protocol: UDP
name: p2p-udp
selector:
- app: sam-router-${ENV_NAME}
+ app: agentmesh-router-${ENV_NAME}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
- name: sam-router-${ENV_NAME}
+ name: agentmesh-router-${ENV_NAME}
namespace: ${NAMESPACE}
spec:
- serviceName: "sam-router-${ENV_NAME}"
+ serviceName: "agentmesh-router-${ENV_NAME}"
replicas: 3
# A router that is ready has not been re-handshaken by anyone yet: members
# redial a dropped router with a backoff that reaches a minute, and older
@@ -40,19 +40,19 @@ spec:
minReadySeconds: 90
selector:
matchLabels:
- app: sam-router-${ENV_NAME}
+ app: agentmesh-router-${ENV_NAME}
template:
metadata:
labels:
- app: sam-router-${ENV_NAME}
+ app: agentmesh-router-${ENV_NAME}
spec:
- serviceAccountName: sam-router-sa
+ serviceAccountName: agentmesh-router-sa
securityContext:
fsGroup: 65532
fsGroupChangePolicy: "OnRootMismatch"
containers:
- - name: sam-router
- image: ghcr.io/google/sam-router:${IMAGE_TAG}
+ - name: agentmesh-router
+ image: ghcr.io/google/agentmesh-router:${IMAGE_TAG}
ports:
- containerPort: 4501
hostPort: 4501
@@ -67,12 +67,12 @@ spec:
protocol: TCP
name: metrics
args:
- - "--control-plane=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - "--control-plane=http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- "--insecure-control-plane"
- "--listen=/ip4/0.0.0.0/tcp/4501"
- "--listen=/ip4/0.0.0.0/udp/4501/quic-v1"
- "--external-addr=/dnsaddr/bootstrap.${ENV_NAME}.sam-mesh.dev"
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
+ - "--jwt-path=/var/run/secrets/tokens/agentmesh-token"
- "--keys-path=/data/router.key"
- "--metrics-addr=0.0.0.0:9090"
# /healthz answers as soon as the process is up; /readyz once the
@@ -101,19 +101,19 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- name: router-data
mountPath: /data
volumes:
- - name: sam-token
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
volumeClaimTemplates:
- metadata:
name: router-data
diff --git a/.github/k8s/sam-sdk-canary-template.yaml b/.github/k8s/agentmesh-sdk-canary-template.yaml
similarity index 73%
rename from .github/k8s/sam-sdk-canary-template.yaml
rename to .github/k8s/agentmesh-sdk-canary-template.yaml
index 6b511852..2d877781 100644
--- a/.github/k8s/sam-sdk-canary-template.yaml
+++ b/.github/k8s/agentmesh-sdk-canary-template.yaml
@@ -1,4 +1,4 @@
-# Two long-lived pairs of SDK members with no sam-node beside them: an agent
+# Two long-lived pairs of SDK members with no agentmesh-node beside them: an agent
# written with one SDK and the official A2A SDK, and a caller written with the
# other, in one pod, both example programs (sdk/js/examples,
# sdk/python/examples) unchanged. The agent joins through a router and accepts
@@ -15,7 +15,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: js-agent-canary-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
replicas: 1
selector:
@@ -25,23 +25,23 @@ spec:
metadata:
labels:
app: js-agent-canary-${ENV_NAME}
- sam-canary: "true"
+ agentmesh-canary: "true"
spec:
- serviceAccountName: sam-node-sa
+ serviceAccountName: agentmesh-node-sa
terminationGracePeriodSeconds: 10
containers:
- name: agent
- image: ghcr.io/google/sam-sdk-js:${IMAGE_TAG}
- command: ["/bin/sh", "-c", "node build/examples/a2a-agent.js 2>&1 | tee /var/run/sam/agent.log"]
+ image: ghcr.io/google/agentmesh-sdk-js:${IMAGE_TAG}
+ command: ["/bin/sh", "-c", "node build/examples/a2a-agent.js 2>&1 | tee /var/run/agentmesh/agent.log"]
env:
- name: AGENTMESH_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- name: AGENTMESH_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
+ value: /var/run/secrets/tokens/agentmesh-token
- name: AGENTMESH_STATE_DIR
- value: /var/run/sam/agent
+ value: /var/run/agentmesh/agent
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -54,23 +54,23 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-state
- mountPath: /var/run/sam
+ - name: agentmesh-state
+ mountPath: /var/run/agentmesh
- name: caller
- image: ghcr.io/google/sam-sdk-python:${IMAGE_TAG}
- command: ["/bin/sh", "/etc/sam-canary/canary.sh"]
+ image: ghcr.io/google/agentmesh-sdk-python:${IMAGE_TAG}
+ command: ["/bin/sh", "/etc/agentmesh-canary/canary.sh"]
env:
- name: AGENTMESH_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- name: AGENTMESH_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
+ value: /var/run/secrets/tokens/agentmesh-token
- name: AGENTMESH_STATE_DIR
- value: /var/run/sam/caller
+ value: /var/run/agentmesh/caller
- name: PYTHONUNBUFFERED
value: "1"
- name: CANARY
@@ -79,7 +79,7 @@ spec:
value: "python examples/a2a_call.py"
readinessProbe:
exec:
- command: ["test", "-f", "/var/run/sam/reachable"]
+ command: ["test", "-f", "/var/run/agentmesh/reachable"]
initialDelaySeconds: 20
periodSeconds: 30
failureThreshold: 1
@@ -95,33 +95,33 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-state
- mountPath: /var/run/sam
+ - name: agentmesh-state
+ mountPath: /var/run/agentmesh
- name: canary-script
- mountPath: /etc/sam-canary
+ mountPath: /etc/agentmesh-canary
readOnly: true
volumes:
- - name: sam-state
+ - name: agentmesh-state
emptyDir: {}
- name: canary-script
configMap:
- name: sam-sdk-canary-script-${ENV_NAME}
- - name: sam-token
+ name: agentmesh-sdk-canary-script-${ENV_NAME}
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: python-agent-canary-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
replicas: 1
selector:
@@ -131,23 +131,23 @@ spec:
metadata:
labels:
app: python-agent-canary-${ENV_NAME}
- sam-canary: "true"
+ agentmesh-canary: "true"
spec:
- serviceAccountName: sam-node-sa
+ serviceAccountName: agentmesh-node-sa
terminationGracePeriodSeconds: 10
containers:
- name: agent
- image: ghcr.io/google/sam-sdk-python:${IMAGE_TAG}
- command: ["/bin/sh", "-c", "python examples/a2a_agent.py 2>&1 | tee /var/run/sam/agent.log"]
+ image: ghcr.io/google/agentmesh-sdk-python:${IMAGE_TAG}
+ command: ["/bin/sh", "-c", "python examples/a2a_agent.py 2>&1 | tee /var/run/agentmesh/agent.log"]
env:
- name: AGENTMESH_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- name: AGENTMESH_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
+ value: /var/run/secrets/tokens/agentmesh-token
- name: AGENTMESH_STATE_DIR
- value: /var/run/sam/agent
+ value: /var/run/agentmesh/agent
- name: PYTHONUNBUFFERED
value: "1"
securityContext:
@@ -162,30 +162,30 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-state
- mountPath: /var/run/sam
+ - name: agentmesh-state
+ mountPath: /var/run/agentmesh
- name: caller
- image: ghcr.io/google/sam-sdk-js:${IMAGE_TAG}
- command: ["/bin/sh", "/etc/sam-canary/canary.sh"]
+ image: ghcr.io/google/agentmesh-sdk-js:${IMAGE_TAG}
+ command: ["/bin/sh", "/etc/agentmesh-canary/canary.sh"]
env:
- name: AGENTMESH_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- name: AGENTMESH_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
+ value: /var/run/secrets/tokens/agentmesh-token
- name: AGENTMESH_STATE_DIR
- value: /var/run/sam/caller
+ value: /var/run/agentmesh/caller
- name: CANARY
value: js-calls-python-agent
- name: CALL
value: "node build/examples/a2a-call.js"
readinessProbe:
exec:
- command: ["test", "-f", "/var/run/sam/reachable"]
+ command: ["test", "-f", "/var/run/agentmesh/reachable"]
initialDelaySeconds: 20
periodSeconds: 30
failureThreshold: 1
@@ -201,33 +201,33 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-state
- mountPath: /var/run/sam
+ - name: agentmesh-state
+ mountPath: /var/run/agentmesh
- name: canary-script
- mountPath: /etc/sam-canary
+ mountPath: /etc/agentmesh-canary
readOnly: true
volumes:
- - name: sam-state
+ - name: agentmesh-state
emptyDir: {}
- name: canary-script
configMap:
- name: sam-sdk-canary-script-${ENV_NAME}
- - name: sam-token
+ name: agentmesh-sdk-canary-script-${ENV_NAME}
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
---
apiVersion: v1
kind: ConfigMap
metadata:
- name: sam-sdk-canary-script-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-sdk-canary-script-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
data:
canary.sh: |
#!/bin/sh
@@ -240,8 +240,8 @@ data:
# tests/integration runs this script against the example programs.
set -u
INTERVAL=${INTERVAL:-300}
- LOG=${AGENTMESH_CANARY_DIR:-/var/run/sam}/agent.log
- REACHABLE=${AGENTMESH_CANARY_DIR:-/var/run/sam}/reachable
+ LOG=${AGENTMESH_CANARY_DIR:-/var/run/agentmesh}/agent.log
+ REACHABLE=${AGENTMESH_CANARY_DIR:-/var/run/agentmesh}/reachable
verdict() {
printf '{"canary":"%s","ok":%s,"agent_peer":"%s","call_s":%d,"error":"%s","detail":"%s"}\n' \
diff --git a/.github/k8s/sam-sdk-probe-cronjob-template.yaml b/.github/k8s/agentmesh-sdk-probe-cronjob-template.yaml
similarity index 68%
rename from .github/k8s/sam-sdk-probe-cronjob-template.yaml
rename to .github/k8s/agentmesh-sdk-probe-cronjob-template.yaml
index 83ddb5ec..149806ae 100644
--- a/.github/k8s/sam-sdk-probe-cronjob-template.yaml
+++ b/.github/k8s/agentmesh-sdk-probe-cronjob-template.yaml
@@ -1,7 +1,7 @@
# The cold path through the SDKs, on a schedule. Four fresh identities enroll
# with the control plane, two per SDK: an agent written with the official A2A
# SDK, which joins through a router and accepts A2A requests for a2a://agent,
-# and a caller, which reaches an MCP service a sam-node serves (the everything
+# and a caller, which reaches an MCP service a agentmesh-node serves (the everything
# canary) by name and the other language's agent by peer ID, first with the
# mesh SDK's own client for the agent card, then with the A2A SDK's client for
# a message. An agent publishes nothing; the caller learns its peer ID from the
@@ -14,8 +14,8 @@
apiVersion: batch/v1
kind: CronJob
metadata:
- name: sam-sdk-probe-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-sdk-probe-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
schedule: "7,22,37,52 * * * *"
concurrencyPolicy: Forbid
@@ -31,11 +31,11 @@ spec:
template:
metadata:
labels:
- app: sam-sdk-probe-${ENV_NAME}
+ app: agentmesh-sdk-probe-${ENV_NAME}
spec:
- # Bound to the sam-canary role by deploy.yaml's policy seed, which
+ # Bound to the agentmesh-canary role by deploy.yaml's policy seed, which
# is what lets the callers reach the canaries and the agents.
- serviceAccountName: sam-node-sa
+ serviceAccountName: agentmesh-node-sa
restartPolicy: Never
# The agent sidecars run under a shell that pipes to tee; the shell
# gets the SIGTERM, the agent the SIGKILL that follows.
@@ -45,17 +45,17 @@ spec:
initContainers:
- name: js-agent
restartPolicy: Always
- image: ghcr.io/google/sam-sdk-js:${IMAGE_TAG}
- command: ["/bin/sh", "-c", "node build/examples/a2a-agent.js 2>&1 | tee /var/run/sam/js-agent.log"]
+ image: ghcr.io/google/agentmesh-sdk-js:${IMAGE_TAG}
+ command: ["/bin/sh", "-c", "node build/examples/a2a-agent.js 2>&1 | tee /var/run/agentmesh/js-agent.log"]
env:
- - name: SAM_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_CONTROL_PLANE_URL
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
- value: /var/run/sam/js-agent
+ - name: AGENTMESH_JWT_PATH
+ value: /var/run/secrets/tokens/agentmesh-token
+ - name: AGENTMESH_STATE_DIR
+ value: /var/run/agentmesh/js-agent
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -68,24 +68,24 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-state
- mountPath: /var/run/sam
+ - name: agentmesh-state
+ mountPath: /var/run/agentmesh
- name: python-agent
restartPolicy: Always
- image: ghcr.io/google/sam-sdk-python:${IMAGE_TAG}
- command: ["/bin/sh", "-c", "python examples/a2a_agent.py 2>&1 | tee /var/run/sam/python-agent.log"]
+ image: ghcr.io/google/agentmesh-sdk-python:${IMAGE_TAG}
+ command: ["/bin/sh", "-c", "python examples/a2a_agent.py 2>&1 | tee /var/run/agentmesh/python-agent.log"]
env:
- - name: SAM_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_CONTROL_PLANE_URL
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
- value: /var/run/sam/python-agent
+ - name: AGENTMESH_JWT_PATH
+ value: /var/run/secrets/tokens/agentmesh-token
+ - name: AGENTMESH_STATE_DIR
+ value: /var/run/agentmesh/python-agent
- name: PYTHONUNBUFFERED
value: "1"
securityContext:
@@ -100,32 +100,32 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-state
- mountPath: /var/run/sam
+ - name: agentmesh-state
+ mountPath: /var/run/agentmesh
containers:
- name: js
- image: ghcr.io/google/sam-sdk-js:${IMAGE_TAG}
+ image: ghcr.io/google/agentmesh-sdk-js:${IMAGE_TAG}
env:
- - name: SAM_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_CONTROL_PLANE_URL
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
- value: /var/run/sam/js
+ - name: AGENTMESH_JWT_PATH
+ value: /var/run/secrets/tokens/agentmesh-token
+ - name: AGENTMESH_STATE_DIR
+ value: /var/run/agentmesh/js
- name: PROBE
- value: sam-sdk-js
+ value: agentmesh-sdk-js
- name: CALL
value: "node build/examples/call.js"
- name: A2A_CALL
value: "node build/examples/a2a-call.js"
- name: AGENT_LOG
# Where the other SDK's agent prints its peer ID.
- value: /var/run/sam/python-agent.log
+ value: /var/run/agentmesh/python-agent.log
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -138,36 +138,36 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-state
- mountPath: /var/run/sam
+ - name: agentmesh-state
+ mountPath: /var/run/agentmesh
- name: probe-script
- mountPath: /etc/sam-probe
+ mountPath: /etc/agentmesh-probe
readOnly: true
- command: ["/bin/sh", "/etc/sam-probe/probe.sh"]
+ command: ["/bin/sh", "/etc/agentmesh-probe/probe.sh"]
- name: python
- image: ghcr.io/google/sam-sdk-python:${IMAGE_TAG}
+ image: ghcr.io/google/agentmesh-sdk-python:${IMAGE_TAG}
env:
- - name: SAM_CONTROL_PLANE_URL
- value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_CONTROL_PLANE_URL
+ value: "http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
- value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
- value: /var/run/sam/python
+ - name: AGENTMESH_JWT_PATH
+ value: /var/run/secrets/tokens/agentmesh-token
+ - name: AGENTMESH_STATE_DIR
+ value: /var/run/agentmesh/python
- name: PYTHONUNBUFFERED
value: "1"
- name: PROBE
- value: sam-sdk-python
+ value: agentmesh-sdk-python
- name: CALL
value: "python examples/call.py"
- name: A2A_CALL
value: "python examples/a2a_call.py"
- name: AGENT_LOG
- value: /var/run/sam/js-agent.log
+ value: /var/run/agentmesh/js-agent.log
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -180,38 +180,38 @@ spec:
cpu: 500m
memory: 512Mi
volumeMounts:
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-state
- mountPath: /var/run/sam
+ - name: agentmesh-state
+ mountPath: /var/run/agentmesh
- name: probe-script
- mountPath: /etc/sam-probe
+ mountPath: /etc/agentmesh-probe
readOnly: true
- command: ["/bin/sh", "/etc/sam-probe/probe.sh"]
+ command: ["/bin/sh", "/etc/agentmesh-probe/probe.sh"]
volumes:
- - name: sam-state
+ - name: agentmesh-state
emptyDir: {}
- name: probe-script
configMap:
- name: sam-sdk-probe-script-${ENV_NAME}
- - name: sam-token
+ name: agentmesh-sdk-probe-script-${ENV_NAME}
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
---
apiVersion: v1
kind: ConfigMap
metadata:
- name: sam-sdk-probe-script-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-sdk-probe-script-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
data:
probe.sh: |
#!/bin/sh
- # Runs the SDK's call examples against a sam-node's MCP service and the
+ # Runs the SDK's call examples against a agentmesh-node's MCP service and the
# other SDK's agent, and prints one JSON verdict line. PROBE names the
# run, CALL and A2A_CALL are the examples' command lines, AGENT_LOG is
# where the other SDK's agent prints "accepting a2a://agent as <peer>".
@@ -219,7 +219,7 @@ data:
# retried: a member that joined seconds ago has a thin routing table, and
# a provider record can name a pod a rollout just replaced. The first
# call enrolls with the projected token; the later ones resume from
- # SAM_STATE_DIR.
+ # AGENTMESH_STATE_DIR.
set -u
START=$(date +%s)
@@ -259,8 +259,8 @@ data:
done
}
- # 1. Enroll, join and call an MCP service a sam-node serves.
- call "$CALL" node-mcp 'Echo: sam-sdk-probe' mcp://everything echo '{"message": "sam-sdk-probe"}'
+ # 1. Enroll, join and call an MCP service a agentmesh-node serves.
+ call "$CALL" node-mcp 'Echo: agentmesh-sdk-probe' mcp://everything echo '{"message": "agentmesh-sdk-probe"}'
NODE_PEER=$PROVIDER
NODE_S=$(( $(date +%s) - START ))
diff --git a/.github/k8s/sam-soak-template.yaml b/.github/k8s/agentmesh-soak-template.yaml
similarity index 62%
rename from .github/k8s/sam-soak-template.yaml
rename to .github/k8s/agentmesh-soak-template.yaml
index 11dc9bea..5693890a 100644
--- a/.github/k8s/sam-soak-template.yaml
+++ b/.github/k8s/agentmesh-soak-template.yaml
@@ -8,16 +8,16 @@
# the canary alerts see it. There is deliberately no liveness probe: a
# restart would hide exactly the reconnection this fleet exists to observe.
#
-# Every pod carries sam-canary=true, so the canary PodMonitoring scrapes
-# sam_node_mesh_connected from each; sam-monitoring-template.yaml alerts on
+# Every pod carries agentmesh-canary=true, so the canary PodMonitoring scrapes
+# agentmesh_node_mesh_connected from each; agentmesh-monitoring-template.yaml alerts on
# a member that reads 0 for five minutes.
apiVersion: v1
kind: ConfigMap
metadata:
- name: sam-soak-config-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-soak-config-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
data:
- sam-node.yaml: |
+ agentmesh-node.yaml: |
version: "v1alpha1"
attenuation:
policies: []
@@ -28,8 +28,8 @@ data:
apiVersion: apps/v1
kind: Deployment
metadata:
- name: sam-soak-${ENV_NAME}
- namespace: sam-canary-${ENV_NAME}
+ name: agentmesh-soak-${ENV_NAME}
+ namespace: agentmesh-canary-${ENV_NAME}
spec:
replicas: 20
# A rollout of this fleet is itself a burst of joiners; let it be one
@@ -41,29 +41,29 @@ spec:
maxUnavailable: 0
selector:
matchLabels:
- app: sam-soak-${ENV_NAME}
+ app: agentmesh-soak-${ENV_NAME}
template:
metadata:
labels:
- app: sam-soak-${ENV_NAME}
- sam-canary: "true"
+ app: agentmesh-soak-${ENV_NAME}
+ agentmesh-canary: "true"
spec:
- # Bound to the sam-canary role by deploy.yaml's policy seed.
- serviceAccountName: sam-node-sa
+ # Bound to the agentmesh-canary role by deploy.yaml's policy seed.
+ serviceAccountName: agentmesh-node-sa
terminationGracePeriodSeconds: 10
containers:
- - name: sam-node
- image: ghcr.io/google/sam-node:${IMAGE_TAG}
+ - name: agentmesh-node
+ image: ghcr.io/google/agentmesh-node:${IMAGE_TAG}
args:
- "run"
- - "--config=/etc/sam/sam-node.yaml"
- - "--control-plane=http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
+ - "--config=/etc/agentmesh/agentmesh-node.yaml"
+ - "--control-plane=http://agentmesh-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- "--insecure-control-plane"
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
- - "--data-dir=/var/run/sam/data"
+ - "--jwt-path=/var/run/secrets/tokens/agentmesh-token"
+ - "--data-dir=/var/run/agentmesh/data"
# Socket only: no TCP listener, so no API token to hand out.
- "--bind-addr="
- - "--socket-path=/var/run/sam/node.sock"
+ - "--socket-path=/var/run/agentmesh/node.sock"
- "--metrics-addr=0.0.0.0:9090"
ports:
- containerPort: 9090
@@ -87,22 +87,22 @@ spec:
memory: 256Mi
volumeMounts:
- name: config-volume
- mountPath: /etc/sam
- - name: sam-token
+ mountPath: /etc/agentmesh
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- - name: sam-uds
- mountPath: /var/run/sam
+ - name: agentmesh-uds
+ mountPath: /var/run/agentmesh
volumes:
- name: config-volume
configMap:
- name: sam-soak-config-${ENV_NAME}
- - name: sam-uds
+ name: agentmesh-soak-config-${ENV_NAME}
+ - name: agentmesh-uds
emptyDir: {}
- - name: sam-token
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
diff --git a/.github/k8s/dex-config.yaml b/.github/k8s/dex-config.yaml
index e3b18029..7bac3da5 100644
--- a/.github/k8s/dex-config.yaml
+++ b/.github/k8s/dex-config.yaml
@@ -44,7 +44,7 @@ data:
staticClients:
# This ID becomes the 'aud' claim in the JWT consumed by sam-hub
- id: agentmesh-audience
- name: 'SAM Mesh CLI'
+ name: 'Agent Mesh CLI'
public: true # Allows PKCE flow for CLIs without exposing the secret
redirectURIs:
- 'http://127.0.0.1:13000/callback'
diff --git a/.github/k8s/dns-sync-cronjob-template.yaml b/.github/k8s/dns-sync-cronjob-template.yaml
index 9d4dc97a..032fb03d 100644
--- a/.github/k8s/dns-sync-cronjob-template.yaml
+++ b/.github/k8s/dns-sync-cronjob-template.yaml
@@ -56,8 +56,8 @@ spec:
# naming the router's peer ID). The peer ID is read from the
# router's cluster-internal metrics endpoint through the API
# server proxy, so it does not depend on log retention.
- echo "Finding sam-router pods in ${NAMESPACE}..."
- PODS=$(kubectl get pods -n ${NAMESPACE} -l app=sam-router-${ENV_NAME} -o jsonpath='{range .items[?(@.status.phase=="Running")]}{.metadata.name}{" "}{.spec.nodeName}{"\n"}{end}')
+ echo "Finding agentmesh-router pods in ${NAMESPACE}..."
+ PODS=$(kubectl get pods -n ${NAMESPACE} -l app=agentmesh-router-${ENV_NAME} -o jsonpath='{range .items[?(@.status.phase=="Running")]}{.metadata.name}{" "}{.spec.nodeName}{"\n"}{end}')
declare -a IP_ARRAY=()
declare -a TXT_ARRAY=()
@@ -72,7 +72,7 @@ spec:
IP_LIST=$(kubectl get node $node -o jsonpath='{.status.addresses[?(@.type=="ExternalIP")].address}')
PEER_ID=$(kubectl get --raw "/api/v1/namespaces/${NAMESPACE}/pods/${pod}:9090/proxy/metrics" 2>/dev/null \
- | sed -n 's/^sam_router_info{peer_id="\([A-Za-z0-9]*\)"} 1$/\1/p' | head -n 1 || true)
+ | sed -n 's/^agentmesh_router_info{peer_id="\([A-Za-z0-9]*\)"} 1$/\1/p' | head -n 1 || true)
if [ -z "$PEER_ID" ]; then
echo "No peer ID from $pod yet; leaving the TXT record set unchanged this run."
TXT_INCOMPLETE=1
diff --git a/.github/workflows/deploy-sam-one.yaml b/.github/workflows/deploy-agentmesh-one.yaml
similarity index 83%
rename from .github/workflows/deploy-sam-one.yaml
rename to .github/workflows/deploy-agentmesh-one.yaml
index d9595f76..253464a5 100644
--- a/.github/workflows/deploy-sam-one.yaml
+++ b/.github/workflows/deploy-agentmesh-one.yaml
@@ -1,6 +1,6 @@
-name: Sam-One Cloud Run Sandbox
+name: AgentMesh-One Cloud Run Sandbox
-# On-demand sam-one deployments on Cloud Run (see
+# On-demand agentmesh-one deployments on Cloud Run (see
# site/content/docs/guides/cloud-run.md for the manual version).
# Deploys are gated by the 'sam-one-sandbox' GitHub Environment: required
# reviewers approve each run before GCP credentials are minted.
@@ -18,7 +18,7 @@ on:
options: [deploy, delete]
default: deploy
name:
- description: 'Sandbox name (service becomes sam-one-<name>)'
+ description: 'Sandbox name (service becomes agentmesh-one-<name>)'
type: string
default: sandbox
region:
@@ -27,18 +27,18 @@ on:
options: [us-central1, europe-west1, asia-northeast1]
default: us-central1
-run-name: 'sam-one ${{ inputs.action }} ${{ inputs.name }} @ ${{ inputs.region }} (${{ github.ref_name }}) by ${{ github.actor }}'
+run-name: 'agentmesh-one ${{ inputs.action }} ${{ inputs.name }} @ ${{ inputs.region }} (${{ github.ref_name }}) by ${{ github.actor }}'
# One run at a time per sandbox; never cancel an in-flight deploy.
concurrency:
- group: sam-one-${{ inputs.name }}
+ group: agentmesh-one-${{ inputs.name }}
cancel-in-progress: false
permissions: {}
jobs:
sandbox:
- name: '${{ inputs.action }} sam-one-${{ inputs.name }}'
+ name: '${{ inputs.action }} agentmesh-one-${{ inputs.name }}'
runs-on: ubuntu-latest
environment: sam-one-sandbox
timeout-minutes: 30
@@ -49,9 +49,9 @@ jobs:
env:
GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }}
REGION: ${{ inputs.region }}
- SERVICE: sam-one-${{ inputs.name }}
- AR_REPO: ${{ vars.AR_REPO || 'sam-mesh' }}
- # The sam-mesh AR repo only exists in us-central1; Cloud Run pulls
+ SERVICE: agentmesh-one-${{ inputs.name }}
+ AR_REPO: ${{ vars.AR_REPO || 'agentmesh' }}
+ # The agentmesh AR repo only exists in us-central1; Cloud Run pulls
# cross-region, so the deploy region stays a free choice.
AR_LOCATION: ${{ vars.AR_LOCATION || 'us-central1' }}
@@ -80,10 +80,10 @@ jobs:
- name: Build and push image
if: inputs.action == 'deploy'
run: |
- IMG="${AR_LOCATION}-docker.pkg.dev/${GCP_PROJECT_ID}/${AR_REPO}/sam-one:${GITHUB_SHA}"
+ IMG="${AR_LOCATION}-docker.pkg.dev/${GCP_PROJECT_ID}/${AR_REPO}/agentmesh-one:${GITHUB_SHA}"
echo "IMG=${IMG}" >> "$GITHUB_ENV"
gcloud auth configure-docker "${AR_LOCATION}-docker.pkg.dev" --quiet
- docker build --build-arg VERSION="${GITHUB_SHA}" -f Dockerfile.sam-one -t "${IMG}" .
+ docker build --build-arg VERSION="${GITHUB_SHA}" -f Dockerfile.agentmesh-one -t "${IMG}" .
docker push "${IMG}"
- name: Deploy to Cloud Run
@@ -95,7 +95,7 @@ jobs:
# Fresh tokens every deploy; Cloud Run has no disk so they must be
# pinned via env vars or each instance restart regenerates them.
JOIN_TOKEN="mesh_tok_$(openssl rand -hex 16)"
- ADMIN_TOKEN="sam_adm_$(openssl rand -hex 16)"
+ ADMIN_TOKEN="mesh_adm_$(openssl rand -hex 16)"
echo "::add-mask::${JOIN_TOKEN}"
echo "::add-mask::${ADMIN_TOKEN}"
echo "JOIN_TOKEN=${JOIN_TOKEN}" >> "$GITHUB_ENV"
@@ -115,8 +115,8 @@ jobs:
--port 8080 \
--no-cpu-throttling \
--timeout 3600 \
- --labels "managed-by=sam-one-dispatch,requested-by=$(echo "${ACTOR}" | tr '[:upper:]' '[:lower:]' | tr -cd 'a-z0-9-_' | cut -c1-63)" \
- --set-env-vars "SAM_TOKEN=${JOIN_TOKEN},SAM_ADMIN_TOKEN=${ADMIN_TOKEN}" \
+ --labels "managed-by=agentmesh-one-dispatch,requested-by=$(echo "${ACTOR}" | tr '[:upper:]' '[:lower:]' | tr -cd 'a-z0-9-_' | cut -c1-63)" \
+ --set-env-vars "AGENTMESH_TOKEN=${JOIN_TOKEN},AGENTMESH_ADMIN_TOKEN=${ADMIN_TOKEN}" \
"${EXTRA_FLAGS[@]}" \
--quiet
@@ -127,7 +127,7 @@ jobs:
echo "URL=${URL}" >> "$GITHUB_ENV"
gcloud run services update "${SERVICE}" \
--project "${GCP_PROJECT_ID}" --region "${REGION}" \
- --update-env-vars "SAM_EXTERNAL_URL=${URL}" \
+ --update-env-vars "AGENTMESH_EXTERNAL_URL=${URL}" \
--quiet
- name: Verify readiness
@@ -136,7 +136,7 @@ jobs:
# /healthz is swallowed by the Google frontend on run.app; use /readyz.
for i in $(seq 1 30); do
if curl -fsS --max-time 10 "${URL}/readyz" >/dev/null 2>&1; then
- echo "sam-one ready at ${URL}"
+ echo "agentmesh-one ready at ${URL}"
exit 0
fi
sleep 5
@@ -158,7 +158,7 @@ jobs:
| grep -E '^(ssh-ed25519|ssh-rsa) ' > /tmp/recipient.keys || true
{
- echo "## sam-one sandbox \`${SERVICE}\` (${REGION})"
+ echo "## agentmesh-one sandbox \`${SERVICE}\` (${REGION})"
echo
echo "| | |"
echo "|---|---|"
@@ -166,10 +166,10 @@ jobs:
echo "| Console | ${URL}/console |"
echo "| Built from | \`${REF_NAME}\` @ \`${GITHUB_SHA}\` |"
echo
- echo "Join a node (socket-only local API; or export SAM_API_TOKEN instead of --bind-addr \"\"):"
+ echo "Join a node (socket-only local API; or export AGENTMESH_API_TOKEN instead of --bind-addr \"\"):"
echo
echo '```bash'
- echo "sam-node run --control-plane ${URL} --bootstrap-token <JOIN_TOKEN> --bind-addr \"\""
+ echo "agentmesh-node run --control-plane ${URL} --bootstrap-token <JOIN_TOKEN> --bind-addr \"\""
echo '```'
echo
} >> "$GITHUB_STEP_SUMMARY"
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index b125359b..e2b1071b 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -1,4 +1,4 @@
-name: Deploy SAM Hub
+name: Deploy Agent Mesh Hub
on:
push:
@@ -55,7 +55,7 @@ jobs:
id: meta-cp
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
- images: ${{ env.REGISTRY }}/google/sam-control-plane
+ images: ${{ env.REGISTRY }}/google/agentmesh-control-plane
tags: |
type=ref,event=branch
type=ref,event=tag
@@ -67,7 +67,7 @@ jobs:
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
- file: Dockerfile.sam-control-plane
+ file: Dockerfile.agentmesh-control-plane
build-args: VERSION=${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
platforms: ${{ github.ref_type == 'tag' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
@@ -78,7 +78,7 @@ jobs:
id: meta-router
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
- images: ${{ env.REGISTRY }}/google/sam-router
+ images: ${{ env.REGISTRY }}/google/agentmesh-router
tags: |
type=ref,event=branch
type=ref,event=tag
@@ -90,7 +90,7 @@ jobs:
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
- file: Dockerfile.sam-router
+ file: Dockerfile.agentmesh-router
build-args: VERSION=${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
platforms: ${{ github.ref_type == 'tag' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
@@ -101,7 +101,7 @@ jobs:
id: meta-node
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
- images: ${{ env.REGISTRY }}/google/sam-node
+ images: ${{ env.REGISTRY }}/google/agentmesh-node
tags: |
type=ref,event=branch
type=ref,event=tag
@@ -113,18 +113,18 @@ jobs:
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
- file: Dockerfile.sam-node
+ file: Dockerfile.agentmesh-node
build-args: VERSION=${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
platforms: ${{ github.ref_type == 'tag' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
tags: ${{ steps.meta-node.outputs.tags }}
labels: ${{ steps.meta-node.outputs.labels }}
- - name: Extract metadata for sam-console
+ - name: Extract metadata for agentmesh-console
id: meta-console
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
- images: ${{ env.REGISTRY }}/google/sam-console
+ images: ${{ env.REGISTRY }}/google/agentmesh-console
tags: |
type=ref,event=branch
type=ref,event=tag
@@ -132,22 +132,22 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
- - name: Build and push sam-console image
+ - name: Build and push agentmesh-console image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
- file: Dockerfile.sam-console
+ file: Dockerfile.agentmesh-console
build-args: VERSION=${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
platforms: ${{ github.ref_type == 'tag' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
tags: ${{ steps.meta-console.outputs.tags }}
labels: ${{ steps.meta-console.outputs.labels }}
- - name: Extract metadata for sam-one
- id: meta-sam-one
+ - name: Extract metadata for agentmesh-one
+ id: meta-agentmesh-one
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
- images: ${{ env.REGISTRY }}/google/sam-one
+ images: ${{ env.REGISTRY }}/google/agentmesh-one
tags: |
type=ref,event=branch
type=ref,event=tag
@@ -155,26 +155,26 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
- - name: Build and push sam-one image
+ - name: Build and push agentmesh-one image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
- file: Dockerfile.sam-one
+ file: Dockerfile.agentmesh-one
build-args: VERSION=${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
platforms: ${{ github.ref_type == 'tag' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
- tags: ${{ steps.meta-sam-one.outputs.tags }}
- labels: ${{ steps.meta-sam-one.outputs.labels }}
+ tags: ${{ steps.meta-agentmesh-one.outputs.tags }}
+ labels: ${{ steps.meta-agentmesh-one.outputs.labels }}
# The SDK images carry the example programs the docs embed, as the
# testnet canaries and probes run them. Built from the commit, not from
# npm or PyPI, so bananas exercises the SDK at the same commit as the
# Go components it talks to.
- - name: Extract metadata for sam-sdk-js
+ - name: Extract metadata for agentmesh-sdk-js
id: meta-sdk-js
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
- images: ${{ env.REGISTRY }}/google/sam-sdk-js
+ images: ${{ env.REGISTRY }}/google/agentmesh-sdk-js
tags: |
type=ref,event=branch
type=ref,event=tag
@@ -182,21 +182,21 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
- - name: Build and push sam-sdk-js image
+ - name: Build and push agentmesh-sdk-js image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
- file: Dockerfile.sam-sdk-js
+ file: Dockerfile.agentmesh-sdk-js
platforms: ${{ github.ref_type == 'tag' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
tags: ${{ steps.meta-sdk-js.outputs.tags }}
labels: ${{ steps.meta-sdk-js.outputs.labels }}
- - name: Extract metadata for sam-sdk-python
+ - name: Extract metadata for agentmesh-sdk-python
id: meta-sdk-python
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
- images: ${{ env.REGISTRY }}/google/sam-sdk-python
+ images: ${{ env.REGISTRY }}/google/agentmesh-sdk-python
tags: |
type=ref,event=branch
type=ref,event=tag
@@ -204,11 +204,11 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
- - name: Build and push sam-sdk-python image
+ - name: Build and push agentmesh-sdk-python image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
- file: Dockerfile.sam-sdk-python
+ file: Dockerfile.agentmesh-sdk-python
platforms: ${{ github.ref_type == 'tag' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
tags: ${{ steps.meta-sdk-python.outputs.tags }}
@@ -260,12 +260,12 @@ jobs:
run: |
export ENV_NAME="${VAR_ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+ export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
kubectl create namespace dex --dry-run=client -o yaml | kubectl apply -f -
kubectl create namespace ${NAMESPACE} --dry-run=client -o yaml | kubectl apply -f -
kubectl create namespace ${CANARY_NAMESPACE} --dry-run=client -o yaml | kubectl apply -f -
- envsubst '${ENV_NAME}' < .github/k8s/sam-canary-sa-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME}' < .github/k8s/agentmesh-canary-sa-template.yaml | kubectl apply -f -
- name: Provision Dex Secrets
env:
@@ -333,7 +333,7 @@ jobs:
export NAMESPACE="sam-${ENV_NAME}"
# Idempotently provision the sam-hub-secret if it doesn't already exist
if ! kubectl get secret sam-hub-secret -n ${NAMESPACE} >/dev/null 2>&1; then
- echo "Generating a new random 32-byte hex key for SAM_HUB_KEY..."
+ echo "Generating a new random 32-byte hex key for AGENTMESH_HUB_KEY..."
HUB_KEY=$(openssl rand -hex 32)
kubectl create secret generic sam-hub-secret \
--namespace=${NAMESPACE} \
@@ -348,18 +348,18 @@ jobs:
run: |
export ENV_NAME="${VAR_ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
- if ! kubectl get secret sam-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} >/dev/null 2>&1; then
+ if ! kubectl get secret agentmesh-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} >/dev/null 2>&1; then
echo "Generating new random secrets for admin-token and the DB..."
ADMIN_TOKEN=$(openssl rand -hex 32)
DB_PASSWORD=$(openssl rand -hex 32)
- DB_DSN="postgres://sam:${DB_PASSWORD}@sam-db-${ENV_NAME}:5432/sam_mesh?sslmode=disable"
- kubectl create secret generic sam-control-plane-secret-${ENV_NAME} \
+ DB_DSN="postgres://agentmesh:${DB_PASSWORD}@sam-db-${ENV_NAME}:5432/agentmesh?sslmode=disable"
+ kubectl create secret generic agentmesh-control-plane-secret-${ENV_NAME} \
--namespace=${NAMESPACE} \
--from-literal=admin-token="${ADMIN_TOKEN}" \
--from-literal=db-password="${DB_PASSWORD}" \
--from-literal=db-dsn="${DB_DSN}"
else
- echo "sam-control-plane-secret-${ENV_NAME} already exists in namespace ${NAMESPACE}. Skipping generation."
+ echo "agentmesh-control-plane-secret-${ENV_NAME} already exists in namespace ${NAMESPACE}. Skipping generation."
fi
- name: Deploy Control Plane and Routers
@@ -402,13 +402,13 @@ jobs:
export CLUSTER_REGION="${VAR_CLUSTER_REGION}"
export CLUSTER_NAME="${VAR_CLUSTER_NAME}"
- envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/sam-control-plane-template.yaml | kubectl apply -f -
- envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/sam-router-template.yaml | kubectl apply -f -
- envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/sam-console-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/agentmesh-control-plane-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/agentmesh-router-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID} ${CLUSTER_NAME} ${CLUSTER_REGION} ${IMAGE_TAG}' < .github/k8s/agentmesh-console-template.yaml | kubectl apply -f -
envsubst '${ENV_NAME} ${NAMESPACE} ${GCP_PROJECT_ID}' < .github/k8s/dns-sync-cronjob-template.yaml | kubectl apply -f -
# Managed Prometheus ships with GKE; a cluster without it should not block the mesh rollout.
if kubectl get crd podmonitorings.monitoring.googleapis.com >/dev/null 2>&1; then
- envsubst '${ENV_NAME} ${NAMESPACE}' < .github/k8s/sam-monitoring-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE}' < .github/k8s/agentmesh-monitoring-template.yaml | kubectl apply -f -
else
echo "::warning::PodMonitoring CRD not found; managed collection is off on this cluster, metrics will not be scraped"
fi
@@ -416,17 +416,17 @@ jobs:
# The pod is Ready only once the load balancer's NEG controller has
# seen it healthy, which has taken anywhere from half a minute to
# several minutes; two replicas roll one after the other.
- kubectl rollout status deployment/sam-control-plane-${ENV_NAME} -n ${NAMESPACE} --timeout=600s || {
+ kubectl rollout status deployment/agentmesh-control-plane-${ENV_NAME} -n ${NAMESPACE} --timeout=600s || {
echo "Control Plane Deployment failed!"
- print_rollout_diagnostics "${NAMESPACE}" "deployment/sam-control-plane-${ENV_NAME}" "app=sam-control-plane-${ENV_NAME}"
+ print_rollout_diagnostics "${NAMESPACE}" "deployment/agentmesh-control-plane-${ENV_NAME}" "app=agentmesh-control-plane-${ENV_NAME}"
exit 1
}
echo "Seeding Control Plane Policies..."
- ADMIN_TOKEN=$(kubectl get secret sam-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} -o jsonpath='{.data.admin-token}' | base64 -d)
+ ADMIN_TOKEN=$(kubectl get secret agentmesh-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} -o jsonpath='{.data.admin-token}' | base64 -d)
echo "::add-mask::${ADMIN_TOKEN}"
- kubectl port-forward deployment/sam-control-plane-${ENV_NAME} -n ${NAMESPACE} 8080:8080 &
+ kubectl port-forward deployment/agentmesh-control-plane-${ENV_NAME} -n ${NAMESPACE} 8080:8080 &
PF_PID=$!
for i in {1..15}; do
@@ -441,14 +441,14 @@ jobs:
-H "Authorization: Bearer ${ADMIN_TOKEN}" \
-d '{
"roles": [
- {"name": "sam-canary", "allowed_services": ["*"], "allowed_targets": ["*"]},
+ {"name": "agentmesh-canary", "allowed_services": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:router", "allowed_services": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:node"},
{"name": "public-mesh", "allowed_services": ["*"], "allowed_targets": ["*"]}
],
"bindings": [
- {"role": "sam-canary", "members": ["user:system:serviceaccount:sam-canary-'"${ENV_NAME}"':sam-node-sa"]},
- {"role": "mesh:role:router", "members": ["group:routers", "user:system:serviceaccount:'"${NAMESPACE}"':sam-router-sa"]},
+ {"role": "agentmesh-canary", "members": ["user:system:serviceaccount:agentmesh-canary-'"${ENV_NAME}"':agentmesh-node-sa"]},
+ {"role": "mesh:role:router", "members": ["group:routers", "user:system:serviceaccount:'"${NAMESPACE}"':agentmesh-router-sa"]},
{"role": "mesh:role:node", "members": ["mesh:system:authenticated"]},
{"role": "public-mesh", "members": ["mesh:system:authenticated"]}
]
@@ -462,21 +462,21 @@ jobs:
kill $PF_PID
- kubectl rollout status deployment/sam-console-${ENV_NAME} -n ${NAMESPACE} --timeout=120s || {
+ kubectl rollout status deployment/agentmesh-console-${ENV_NAME} -n ${NAMESPACE} --timeout=120s || {
echo "Console Deployment failed!"
- print_rollout_diagnostics "${NAMESPACE}" "deployment/sam-console-${ENV_NAME}" "app=sam-console-${ENV_NAME}"
+ print_rollout_diagnostics "${NAMESPACE}" "deployment/agentmesh-console-${ENV_NAME}" "app=agentmesh-console-${ENV_NAME}"
exit 1
}
# Three routers, each held 90s after it is ready (minReadySeconds)
# so members re-attach before the next one goes.
- kubectl rollout status statefulset/sam-router-${ENV_NAME} -n ${NAMESPACE} --timeout=600s || {
+ kubectl rollout status statefulset/agentmesh-router-${ENV_NAME} -n ${NAMESPACE} --timeout=600s || {
echo "Router Deployment failed!"
- print_rollout_diagnostics "${NAMESPACE}" "statefulset/sam-router-${ENV_NAME}" "app=sam-router-${ENV_NAME}"
+ print_rollout_diagnostics "${NAMESPACE}" "statefulset/agentmesh-router-${ENV_NAME}" "app=agentmesh-router-${ENV_NAME}"
echo "Rolling back Router deployment..."
- kubectl rollout undo statefulset/sam-router-${ENV_NAME} -n ${NAMESPACE}
- kubectl rollout status statefulset/sam-router-${ENV_NAME} -n ${NAMESPACE}
+ kubectl rollout undo statefulset/agentmesh-router-${ENV_NAME} -n ${NAMESPACE}
+ kubectl rollout status statefulset/agentmesh-router-${ENV_NAME} -n ${NAMESPACE}
exit 1
}
@@ -507,14 +507,14 @@ jobs:
export ZONE="${CLUSTER_REGION}-a"
echo "Retrieving Admin Token to generate Bootstrap Token..."
- ADMIN_TOKEN=$(kubectl get secret sam-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} -o jsonpath='{.data.admin-token}' | base64 -d)
+ ADMIN_TOKEN=$(kubectl get secret agentmesh-control-plane-secret-${ENV_NAME} -n ${NAMESPACE} -o jsonpath='{.data.admin-token}' | base64 -d)
echo "::add-mask::${ADMIN_TOKEN}"
# Mint the token from the runner over a port-forward: a helper pod
# would carry the admin token in its spec, where kubectl describe
# and anyone with pod read access can see it.
echo "Generating Bootstrap Token via port-forward to the Control Plane..."
- kubectl port-forward deployment/sam-control-plane-${ENV_NAME} -n ${NAMESPACE} 8080:8080 &
+ kubectl port-forward deployment/agentmesh-control-plane-${ENV_NAME} -n ${NAMESPACE} 8080:8080 &
PF_PID=$!
for i in {1..15}; do
if nc -z localhost 8080; then
@@ -546,32 +546,32 @@ jobs:
echo "Provisioning GCE VM Router instance..."
# Delete existing VM if it exists to ensure fresh deployment with the new token and image
- gcloud compute instances delete sam-router-${ENV_NAME}-vm --zone=${ZONE} --project=${GCP_PROJECT_ID} --quiet || true
+ gcloud compute instances delete agentmesh-router-${ENV_NAME}-vm --zone=${ZONE} --project=${GCP_PROJECT_ID} --quiet || true
- # Create a new COS VM instance running the sam-router
- gcloud compute instances create sam-router-${ENV_NAME}-vm \
+ # Create a new COS VM instance running the agentmesh-router
+ gcloud compute instances create agentmesh-router-${ENV_NAME}-vm \
--project=${GCP_PROJECT_ID} \
--zone=${ZONE} \
--machine-type=e2-micro \
--image-family=cos-stable \
--image-project=cos-cloud \
- --tags=sam-router \
+ --tags=agentmesh-router \
--metadata=startup-script='#!/bin/bash
set -euo pipefail
EXTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip)
# COS drops inbound traffic on the host by default; the VPC rule alone does not open the port.
iptables -w -I INPUT -p tcp --dport 4501 -j ACCEPT
iptables -w -I INPUT -p udp --dport 4501 -j ACCEPT
- install -d -m 0755 /etc/sam-router
- printf "%s" "'"${BOOTSTRAP_TOKEN}"'" > /etc/sam-router/bootstrap-token
- chown 65532:65532 /etc/sam-router/bootstrap-token
- chmod 0600 /etc/sam-router/bootstrap-token
+ install -d -m 0755 /etc/agentmesh-router
+ printf "%s" "'"${BOOTSTRAP_TOKEN}"'" > /etc/agentmesh-router/bootstrap-token
+ chown 65532:65532 /etc/agentmesh-router/bootstrap-token
+ chmod 0600 /etc/agentmesh-router/bootstrap-token
docker run -d \
- --name sam-router \
+ --name agentmesh-router \
--network host \
--restart always \
- -v /etc/sam-router/bootstrap-token:/run/secrets/bootstrap-token:ro \
- ghcr.io/google/sam-router:'"${IMAGE_TAG}"' \
+ -v /etc/agentmesh-router/bootstrap-token:/run/secrets/bootstrap-token:ro \
+ ghcr.io/google/agentmesh-router:'"${IMAGE_TAG}"' \
--control-plane=https://'"${ENV_NAME}"'.sam-mesh.dev \
--bootstrap-token-path=/run/secrets/bootstrap-token \
--listen=/ip4/0.0.0.0/tcp/4501 \
@@ -609,7 +609,7 @@ jobs:
}
export ENV_NAME="${VAR_ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+ export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
export IMAGE_TAG="${VAR_IMAGE_TAG}"
export GEMINI_API_KEY="${VAR_GEMINI_API_KEY}"
@@ -629,7 +629,7 @@ jobs:
# Allow-list the placeholders: ${OPENCLAW_GATEWAY_TOKEN} in the
# template is a container-runtime shell variable, not ours to expand.
- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/sam-node-openclaw-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/agentmesh-node-openclaw-template.yaml | kubectl apply -f -
kubectl rollout status deployment/openclaw-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=300s || {
echo "OpenClaw Canary Deployment failed!"
print_rollout_diagnostics "${CANARY_NAMESPACE}" "openclaw-canary-${ENV_NAME}" "app=openclaw-canary-${ENV_NAME}"
@@ -671,7 +671,7 @@ jobs:
}
export ENV_NAME="${VAR_ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+ export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
export IMAGE_TAG="${VAR_IMAGE_TAG}"
export HF_TOKEN="${VAR_HF_TOKEN}"
@@ -681,7 +681,7 @@ jobs:
--from-literal=hf-token="${HF_TOKEN}" \
--dry-run=client -o yaml | kubectl apply -f -
- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/sam-node-vllm-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/agentmesh-node-vllm-template.yaml | kubectl apply -f -
kubectl rollout status deployment/vllm-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=300s || {
echo "vLLM Canary Deployment failed!"
print_rollout_diagnostics "${CANARY_NAMESPACE}" "vllm-canary-${ENV_NAME}" "app=vllm-canary-${ENV_NAME}"
@@ -721,11 +721,11 @@ jobs:
}
export ENV_NAME="${VAR_ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+ export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
export IMAGE_TAG="${VAR_IMAGE_TAG}"
- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/sam-node-everything-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/agentmesh-node-everything-template.yaml | kubectl apply -f -
kubectl rollout status deployment/everything-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=120s || {
echo "Everything Canary Deployment failed!"
print_rollout_diagnostics "${CANARY_NAMESPACE}" "everything-canary-${ENV_NAME}" "app=everything-canary-${ENV_NAME}"
@@ -746,23 +746,23 @@ jobs:
VAR_IMAGE_TAG: ${{ env.IMAGE_TAG }}
run: |
export ENV_NAME="${VAR_ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+ export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
export IMAGE_TAG="${VAR_IMAGE_TAG}"
- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/sam-soak-template.yaml | kubectl apply -f -
- kubectl rollout status deployment/sam-soak-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=300s || {
+ envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/agentmesh-soak-template.yaml | kubectl apply -f -
+ kubectl rollout status deployment/agentmesh-soak-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=300s || {
echo "Soak fleet rollout failed: a member could not join or hold a router."
- kubectl describe deployment/sam-soak-${ENV_NAME} -n ${CANARY_NAMESPACE} || true
- kubectl get pods -n ${CANARY_NAMESPACE} -l app=sam-soak-${ENV_NAME} -o wide || true
- for pod in $(kubectl get pods -n ${CANARY_NAMESPACE} -l app=sam-soak-${ENV_NAME} -o name | head -3); do
+ kubectl describe deployment/agentmesh-soak-${ENV_NAME} -n ${CANARY_NAMESPACE} || true
+ kubectl get pods -n ${CANARY_NAMESPACE} -l app=agentmesh-soak-${ENV_NAME} -o wide || true
+ for pod in $(kubectl get pods -n ${CANARY_NAMESPACE} -l app=agentmesh-soak-${ENV_NAME} -o name | head -3); do
echo "==== ${pod} ===="
kubectl logs -n ${CANARY_NAMESPACE} "${pod#pod/}" --tail=40 || true
done
exit 1
}
- # Two long-lived pairs with no sam-node: an agent written with one SDK
+ # Two long-lived pairs with no agentmesh-node: an agent written with one SDK
# and the official A2A SDK, and a caller written with the other that
# sends it a message with the A2A SDK's client every few minutes, by
# peer ID. The caller's readiness is the last call's outcome.
@@ -772,13 +772,13 @@ jobs:
VAR_IMAGE_TAG: ${{ env.IMAGE_TAG }}
run: |
export ENV_NAME="${VAR_ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+ export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
export IMAGE_TAG="${VAR_IMAGE_TAG}"
# The SDK canaries that published services, replaced by these.
kubectl delete deployment js-canary-${ENV_NAME} python-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --ignore-not-found
- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/sam-sdk-canary-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/agentmesh-sdk-canary-template.yaml | kubectl apply -f -
for lang in js python; do
kubectl rollout status deployment/${lang}-agent-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=180s || {
echo "${lang} agent canary deployment failed: the other SDK's caller could not reach the agent."
@@ -828,7 +828,7 @@ jobs:
export ENV_NAME="${VAR_ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+ export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
export IMAGE_TAG="${VAR_IMAGE_TAG}"
# The key lives in a Secret the pod references, never in the
@@ -838,7 +838,7 @@ jobs:
--from-literal=api-key="${OPENROUTER_API_KEY}" \
--dry-run=client -o yaml | kubectl apply -f -
- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/sam-node-openrouter-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/agentmesh-node-openrouter-template.yaml | kubectl apply -f -
kubectl rollout status deployment/openrouter-canary-${ENV_NAME} -n ${CANARY_NAMESPACE} --timeout=120s || {
echo "OpenRouter Canary Deployment failed!"
@@ -861,15 +861,15 @@ jobs:
VAR_IMAGE_TAG: ${{ env.IMAGE_TAG }}
run: |
export ENV_NAME="${VAR_ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+ export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
export IMAGE_TAG="${VAR_IMAGE_TAG}"
- JOB="sam-probe-rollout-${ENV_NAME}"
+ JOB="agentmesh-probe-rollout-${ENV_NAME}"
- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/sam-probe-cronjob-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/agentmesh-probe-cronjob-template.yaml | kubectl apply -f -
kubectl delete job "${JOB}" -n "${CANARY_NAMESPACE}" --ignore-not-found
- kubectl create job --from="cronjob/sam-probe-${ENV_NAME}" "${JOB}" -n "${CANARY_NAMESPACE}"
+ kubectl create job --from="cronjob/agentmesh-probe-${ENV_NAME}" "${JOB}" -n "${CANARY_NAMESPACE}"
# `kubectl wait` can only wait for one condition; a failed Job would
# otherwise sit out the whole timeout.
@@ -889,7 +889,7 @@ jobs:
*Complete=True*) echo "Cold-path probe passed." ;;
*)
echo "Cold-path probe did not pass: a fresh node could not enroll, reach a router, call a mesh service, or reach an SDK agent."
- for c in sam-node js-agent python-agent; do
+ for c in agentmesh-node js-agent python-agent; do
echo "==== ${c} sidecar log ===="
kubectl logs "job/${JOB}" -n "${CANARY_NAMESPACE}" -c "${c}" --tail=200 || true
done
@@ -900,7 +900,7 @@ jobs:
# The same cold path through each SDK: an agent written with the A2A
# SDK and a caller enroll with the JavaScript and the Python SDK; each
- # caller reaches the everything canary's MCP server (a sam-node) by
+ # caller reaches the everything canary's MCP server (a agentmesh-node) by
# name and the other SDK's agent by peer ID, its card with the mesh
# SDK's client and a message with the A2A SDK's. With the node probe
# above, every pair of implementations is crossed in both directions
@@ -911,15 +911,15 @@ jobs:
VAR_IMAGE_TAG: ${{ env.IMAGE_TAG }}
run: |
export ENV_NAME="${VAR_ENV_NAME}"
- export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+ export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
export NAMESPACE="sam-${ENV_NAME}"
export IMAGE_TAG="${VAR_IMAGE_TAG}"
- JOB="sam-sdk-probe-rollout-${ENV_NAME}"
+ JOB="agentmesh-sdk-probe-rollout-${ENV_NAME}"
- envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/sam-sdk-probe-cronjob-template.yaml | kubectl apply -f -
+ envsubst '${ENV_NAME} ${NAMESPACE} ${IMAGE_TAG}' < .github/k8s/agentmesh-sdk-probe-cronjob-template.yaml | kubectl apply -f -
kubectl delete job "${JOB}" -n "${CANARY_NAMESPACE}" --ignore-not-found
- kubectl create job --from="cronjob/sam-sdk-probe-${ENV_NAME}" "${JOB}" -n "${CANARY_NAMESPACE}"
+ kubectl create job --from="cronjob/agentmesh-sdk-probe-${ENV_NAME}" "${JOB}" -n "${CANARY_NAMESPACE}"
for _ in $(seq 1 96); do
status=$(kubectl get job "${JOB}" -n "${CANARY_NAMESPACE}" -o jsonpath='{range .status.conditions[*]}{.type}={.status}{"\n"}{end}')
diff --git a/.github/workflows/kind-mesh-e2e.yml b/.github/workflows/kind-mesh-e2e.yml
index 058100ee..be31c23d 100644
--- a/.github/workflows/kind-mesh-e2e.yml
+++ b/.github/workflows/kind-mesh-e2e.yml
@@ -70,7 +70,7 @@ jobs:
if: failure()
run: |
mkdir -p _artifacts
- kind export logs --name sam-kind ./_artifacts/logs
+ kind export logs --name agentmesh-kind ./_artifacts/logs
cp "$RUNNER_TEMP/local-node.log" _artifacts/ 2>/dev/null || true
- name: Upload logs
diff --git a/.github/workflows/member-journey.yaml b/.github/workflows/member-journey.yaml
index a557529b..32784785 100644
--- a/.github/workflows/member-journey.yaml
+++ b/.github/workflows/member-journey.yaml
@@ -63,9 +63,9 @@ jobs:
- name: Build binaries
run: |
- go build -o bin/sam-one ./cmd/sam-one
- go build -o bin/sam-node ./cmd/sam-node
- go build -o bin/sam-bench ./cmd/sam-bench
+ go build -o bin/agentmesh-one ./cmd/agentmesh-one
+ go build -o bin/agentmesh-node ./cmd/agentmesh-node
+ go build -o bin/agentmesh-bench ./cmd/agentmesh-bench
go build -o bin/stdio-mcp ./tests/scale/stdio-mcp
- name: Setup Python
@@ -77,12 +77,12 @@ jobs:
run: python -m pip install --quiet "mcp>=2,<3"
- name: Start a local mesh
- # sam-one is the control plane and the router on one port; its first
+ # agentmesh-one is the control plane and the router on one port; its first
# boot writes the join token every member enrolls with.
run: |
mkdir -p "$RUNNER_TEMP/mesh"
- bin/sam-one --data-dir "$RUNNER_TEMP/mesh" --port 18090 --bind-address 127.0.0.1 \
- > "$RUNNER_TEMP/sam-one.log" 2>&1 &
+ bin/agentmesh-one --data-dir "$RUNNER_TEMP/mesh" --port 18090 --bind-address 127.0.0.1 \
+ > "$RUNNER_TEMP/agentmesh-one.log" 2>&1 &
for _ in $(seq 1 60); do
curl -fsS -o /dev/null "$CONTROL_PLANE/readyz" 2>/dev/null && break
sleep 1
@@ -102,7 +102,7 @@ jobs:
dir="$RUNNER_TEMP/provider-$i"
mkdir -p "$dir"
command_json=$(python -c 'import json, sys; print(json.dumps(sys.argv[1].split()))' "$backend")
- cat > "$dir/sam-node.yaml" <<EOF
+ cat > "$dir/agentmesh-node.yaml" <<EOF
version: "v1alpha1"
services:
- type: "mcp"
@@ -110,10 +110,10 @@ jobs:
description: "member-journey provider $i"
command: $command_json
EOF
- bin/sam-node run \
+ bin/agentmesh-node run \
--control-plane "$CONTROL_PLANE" \
--bootstrap-token-path "$RUNNER_TEMP/mesh/join-token" \
- --config "$dir/sam-node.yaml" \
+ --config "$dir/agentmesh-node.yaml" \
--data-dir "$dir" \
--bind-addr= \
--socket-path "$dir/node.sock" \
@@ -162,7 +162,7 @@ jobs:
run: |
mkdir -p _artifacts
cp "$RUNNER_TEMP"/journey/*.json "$RUNNER_TEMP"/journey/*.log "$RUNNER_TEMP"/journey/*.jsonl _artifacts/ 2>/dev/null || true
- cp "$RUNNER_TEMP"/sam-one.log "$RUNNER_TEMP"/provider-*.log _artifacts/ 2>/dev/null || true
+ cp "$RUNNER_TEMP"/agentmesh-one.log "$RUNNER_TEMP"/provider-*.log _artifacts/ 2>/dev/null || true
- name: Upload observations
if: always()
diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml
index 5ae29322..b1be3810 100644
--- a/.github/workflows/mobile.yml
+++ b/.github/workflows/mobile.yml
@@ -1,6 +1,6 @@
name: Mobile App
-# Builds SAM Connect (Android) on every release tag, in parallel with the
+# Builds Agent Mesh Connect (Android) on every release tag, in parallel with the
# goreleaser workflow that publishes the Go binaries, and on demand from any
# ref. A dispatch may also publish the bundle to a Google Play track, keyless
# via Workload Identity Federation: repository variables
@@ -32,7 +32,7 @@ run-name: "mobile ${{ github.ref_name }}${{ inputs.track && format(' ({0})', inp
permissions: {}
env:
- APP_DIR: mobile/sam-node-app
+ APP_DIR: mobile/agentmesh-node-app
PACKAGE_NAME: dev.sammesh.connect
jobs:
@@ -135,14 +135,14 @@ jobs:
- name: Upload APK artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
- name: sam-connect-apk
+ name: agentmesh-connect-apk
path: ${{ env.APP_DIR }}/build/app/outputs/flutter-apk/app-release.apk
if-no-files-found: error
- name: Upload bundle artifact
if: steps.upload-key.outputs.present == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
- name: sam-connect-aab
+ name: agentmesh-connect-aab
path: ${{ env.APP_DIR }}/build/app/outputs/bundle/release/app-release.aab
if-no-files-found: error
@@ -158,7 +158,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
- pattern: sam-connect-*
+ pattern: agentmesh-connect-*
merge-multiple: true
path: dist
- name: Upload to release
@@ -195,7 +195,7 @@ jobs:
- name: Download bundle
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
- name: sam-connect-aab
+ name: agentmesh-connect-aab
path: dist
- name: Google Auth
id: auth
diff --git a/.github/workflows/test_flutter.yaml b/.github/workflows/test_flutter.yaml
index 29c4d479..50eae370 100644
--- a/.github/workflows/test_flutter.yaml
+++ b/.github/workflows/test_flutter.yaml
@@ -57,10 +57,10 @@ jobs:
cache: true
- name: Install dependencies
run: flutter pub get
- working-directory: mobile/sam-node-app
+ working-directory: mobile/agentmesh-node-app
- name: Analyze code
run: flutter analyze
- working-directory: mobile/sam-node-app
+ working-directory: mobile/agentmesh-node-app
e2e-android:
runs-on: ubuntu-latest
@@ -92,10 +92,10 @@ jobs:
run: |
if [ -n "$GOOGLE_SERVICES_JSON_BASE64" ]; then
echo "[CI] Decoding google-services.json from secret..."
- echo "$GOOGLE_SERVICES_JSON_BASE64" | base64 --decode > mobile/sam-node-app/android/app/google-services.json
+ echo "$GOOGLE_SERVICES_JSON_BASE64" | base64 --decode > mobile/agentmesh-node-app/android/app/google-services.json
else
echo "[CI] GOOGLE_SERVICES_JSON_BASE64 secret not set, copying dummy configuration template..."
- cp mobile/sam-node-app/android/app/google-services.json.tmpl mobile/sam-node-app/android/app/google-services.json
+ cp mobile/agentmesh-node-app/android/app/google-services.json.tmpl mobile/agentmesh-node-app/android/app/google-services.json
fi
- name: Build images and start the mesh (no emulator needed)
run: ./mobile/mobile_e2e.sh setup
diff --git a/.github/workflows/testnet-health.yaml b/.github/workflows/testnet-health.yaml
index c02f1e83..979c98a5 100644
--- a/.github/workflows/testnet-health.yaml
+++ b/.github/workflows/testnet-health.yaml
@@ -63,7 +63,7 @@ jobs:
run: |
set -uo pipefail
NS="sam-${ENV_NAME}"
- CNS="sam-canary-${ENV_NAME}"
+ CNS="agentmesh-canary-${ENV_NAME}"
HOST="${ENV_NAME}.sam-mesh.dev"
rows=()
fails=0
@@ -82,10 +82,10 @@ jobs:
# 2. What the control plane knows, read through the API server so no
# port is opened to the internet for it.
- if metrics=$(kubectl get --raw "/api/v1/namespaces/${NS}/services/sam-control-plane-${ENV_NAME}:8080/proxy/metrics" 2>&1); then
- routers_active=$(awk '$1=="sam_control_plane_routers_active"{print int($2)}' <<<"${metrics}")
- peers=$(awk '$1=="sam_control_plane_mesh_connected_peers"{print int($2)}' <<<"${metrics}")
- scrape=$(awk '$1=="sam_control_plane_mesh_state_scrape_success"{print int($2)}' <<<"${metrics}")
+ if metrics=$(kubectl get --raw "/api/v1/namespaces/${NS}/services/agentmesh-control-plane-${ENV_NAME}:8080/proxy/metrics" 2>&1); then
+ routers_active=$(awk '$1=="agentmesh_control_plane_routers_active"{print int($2)}' <<<"${metrics}")
+ peers=$(awk '$1=="agentmesh_control_plane_mesh_connected_peers"{print int($2)}' <<<"${metrics}")
+ scrape=$(awk '$1=="agentmesh_control_plane_mesh_state_scrape_success"{print int($2)}' <<<"${metrics}")
if [[ "${scrape:-0}" -eq 1 && "${routers_active:-0}" -ge 2 ]]; then
ok "Routers holding a lease" "${routers_active}"
else
@@ -101,7 +101,7 @@ jobs:
fi
# 3. Routers and canaries are fully rolled out.
- sts=$(kubectl get statefulset "sam-router-${ENV_NAME}" -n "${NS}" -o jsonpath='{.status.readyReplicas}/{.spec.replicas}' 2>&1 || echo "?/?")
+ sts=$(kubectl get statefulset "agentmesh-router-${ENV_NAME}" -n "${NS}" -o jsonpath='{.status.readyReplicas}/{.spec.replicas}' 2>&1 || echo "?/?")
if [[ "${sts%%/*}" == "${sts##*/}" && "${sts%%/*}" != "?" && "${sts%%/*}" != "" ]]; then
ok "Router StatefulSet" "${sts} ready"
else
@@ -125,7 +125,7 @@ jobs:
# 4. The cold path: the probe CronJob enrolled a fresh node, found a
# service and spoke MCP to it recently. Three schedules of slack.
- last=$(kubectl get cronjob "sam-probe-${ENV_NAME}" -n "${CNS}" -o jsonpath='{.status.lastSuccessfulTime}' 2>/dev/null || true)
+ last=$(kubectl get cronjob "agentmesh-probe-${ENV_NAME}" -n "${CNS}" -o jsonpath='{.status.lastSuccessfulTime}' 2>/dev/null || true)
if [[ -n "${last}" ]]; then
age=$(( $(date +%s) - $(date -d "${last}" +%s) ))
if [[ "${age}" -le 2700 ]]; then
diff --git a/Makefile b/Makefile
index a71f2e9a..b2434fcf 100644
--- a/Makefile
+++ b/Makefile
@@ -37,14 +37,14 @@ build:
.PHONY: mobile-ffi-host mobile-ffi-android mobile-ffi-android-x86_64 mobile-ffi-ios mobile-ffi mobile-app-apk mobile-app-apk-emulator mobile-app-bundle
mobile-ffi-host:
mkdir -p "$(OUT_DIR)"
- CGO_ENABLED=1 go build -v -ldflags "$(VERSION_LDFLAGS)" -buildmode=c-shared -o "$(OUT_DIR)/libsam.so" ./mobile/sam-node-ffi
+ CGO_ENABLED=1 go build -v -ldflags "$(VERSION_LDFLAGS)" -buildmode=c-shared -o "$(OUT_DIR)/libsam.so" ./mobile/agentmesh-node-ffi
mobile-ffi-android:
@if [ -z "$(ANDROID_NDK_LATEST)" ]; then \
echo "Error: Android NDK not found under $(ANDROID_HOME_RESOLVED)/ndk/. Please install NDK (Side-by-side) via Android Studio or sdkmanager." >&2; \
exit 1; \
fi
- GOOS=android GOARCH=arm64 CGO_ENABLED=1 CC=$(ANDROID_CC_ARM64) go build -v -ldflags="-checklinkname=0 $(VERSION_LDFLAGS)" -buildmode=c-shared -o "$(OUT_DIR)/android/libsam.so" ./mobile/sam-node-ffi
+ GOOS=android GOARCH=arm64 CGO_ENABLED=1 CC=$(ANDROID_CC_ARM64) go build -v -ldflags="-checklinkname=0 $(VERSION_LDFLAGS)" -buildmode=c-shared -o "$(OUT_DIR)/android/libsam.so" ./mobile/agentmesh-node-ffi
mobile-ffi-android-x86_64:
@if [ -z "$(ANDROID_NDK_LATEST)" ]; then \
@@ -52,15 +52,15 @@ mobile-ffi-android-x86_64:
exit 1; \
fi
mkdir -p "$(OUT_DIR)/android-x86_64"
- GOOS=android GOARCH=amd64 CGO_ENABLED=1 CC=$(ANDROID_CC_X86_64) go build -v -ldflags="-checklinkname=0 $(VERSION_LDFLAGS)" -buildmode=c-shared -o "$(OUT_DIR)/android-x86_64/libsam.so" ./mobile/sam-node-ffi
+ GOOS=android GOARCH=amd64 CGO_ENABLED=1 CC=$(ANDROID_CC_X86_64) go build -v -ldflags="-checklinkname=0 $(VERSION_LDFLAGS)" -buildmode=c-shared -o "$(OUT_DIR)/android-x86_64/libsam.so" ./mobile/agentmesh-node-ffi
mobile-ffi-ios:
mkdir -p "$(OUT_DIR)/ios"
- GOOS=ios GOARCH=arm64 CGO_ENABLED=1 go build -v -ldflags "$(VERSION_LDFLAGS)" -buildmode=c-archive -o "$(OUT_DIR)/ios/libsam.a" ./mobile/sam-node-ffi
+ GOOS=ios GOARCH=arm64 CGO_ENABLED=1 go build -v -ldflags "$(VERSION_LDFLAGS)" -buildmode=c-archive -o "$(OUT_DIR)/ios/libsam.a" ./mobile/agentmesh-node-ffi
mobile-ffi: mobile-ffi-host mobile-ffi-android mobile-ffi-android-x86_64 mobile-ffi-ios
-MOBILE_APP_DIR=mobile/sam-node-app
+MOBILE_APP_DIR=mobile/agentmesh-node-app
# Optional overrides of pubspec.yaml's `version: X.Y.Z+N`. Google Play rejects
# a bundle whose versionCode (N) it has already seen, so CI passes a fresh one.
MOBILE_BUILD_NAME?=
@@ -104,7 +104,7 @@ mobile-app-apk-emulator: mobile-app-jnilibs-x86_64 mobile-app-google-services
# Android App Bundle for Google Play. Play rejects debug-signed bundles, so an
# upload key is required: either $(MOBILE_APP_DIR)/android/key.properties or
# the ANDROID_KEYSTORE_PATH / ANDROID_KEYSTORE_PASSWORD / ANDROID_KEY_ALIAS /
-# ANDROID_KEY_PASSWORD environment variables (see mobile/sam-node-app/README.md).
+# ANDROID_KEY_PASSWORD environment variables (see mobile/agentmesh-node-app/README.md).
#
# Play serves each device the split for its own ABI, so the bundle must only
# contain ABIs that have a libsam.so: Flutter's default set also includes
@@ -233,13 +233,13 @@ helm-lint:
exit 1; \
fi; \
fi; \
- $$HELM_BIN lint ./charts/sam-mesh && $$HELM_BIN lint ./charts/sam-node --set controlPlaneUrl=http://required-for-lint:8080
+ $$HELM_BIN lint ./charts/agentmesh && $$HELM_BIN lint ./charts/agentmesh-node --set controlPlaneUrl=http://required-for-lint:8080
# render the chart to bin/chart/ for inspection; pass extra flags via ARGS, e.g. ARGS="--set gateway.enabled=true"
.PHONY: helm-template
helm-template:
rm -rf bin/chart
- helm template sam-mesh ./charts/sam-mesh --output-dir bin/chart $(ARGS)
+ helm template agentmesh ./charts/agentmesh --output-dir bin/chart $(ARGS)
lint: fmt helm-lint
hack/lint.sh
@@ -248,7 +248,7 @@ lint: fmt helm-lint
.PHONY: helm-test
helm-test:
@helm plugin list 2>/dev/null | grep -q '^unittest' || helm plugin install https://github.com/helm-unittest/helm-unittest --version 0.8.2
- helm unittest charts/sam-mesh charts/sam-node
+ helm unittest charts/agentmesh charts/agentmesh-node
.PHONY: verify
verify:
@@ -274,7 +274,7 @@ docker-build-mock-oidc:
docker build --load -t agentmesh-mock-oidc:local -f tests/e2e/docker/Dockerfile.mock-oidc .
docker-build-e2e-runtime:
- docker build --load -t agentmesh-e2e-runtime:local -f tests/e2e/docker/Dockerfile.sam-runtime .
+ docker build --load -t agentmesh-e2e-runtime:local -f tests/e2e/docker/Dockerfile.agentmesh-runtime .
docker-build-agentmesh-console:
docker build --load --build-arg VERSION="$(VERSION)" -t agentmesh-console:local -f Dockerfile.agentmesh-console .
diff --git a/charts/agentmesh-node/Chart.yaml b/charts/agentmesh-node/Chart.yaml
new file mode 100644
index 00000000..70bfce37
--- /dev/null
+++ b/charts/agentmesh-node/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: agentmesh-node
+description: A Helm chart for deploying a Agent Mesh node, optionally hosting a service as a sidecar
+type: application
+version: 0.1.0
+appVersion: "1.0.0"
diff --git a/charts/sam-node/README.md b/charts/agentmesh-node/README.md
similarity index 79%
rename from charts/sam-node/README.md
rename to charts/agentmesh-node/README.md
index 8d1ba5aa..b19101d0 100644
--- a/charts/sam-node/README.md
+++ b/charts/agentmesh-node/README.md
@@ -1,6 +1,6 @@
-# sam-node
+# agentmesh-node
-Deploys one SAM node into a Kubernetes cluster, optionally hosting a service
+Deploys one Agent Mesh node into a Kubernetes cluster, optionally hosting a service
as a sidecar container. The node authenticates to the control plane with a
projected ServiceAccount token (Workload Identity Federation); the token's
`audience` must be listed in the control plane's `allowedAudiences`.
@@ -10,15 +10,15 @@ projected ServiceAccount token (Workload Identity Federation); the token's
A bare node (a caller / mesh participant with no local service):
```bash
-helm install my-node charts/sam-node \
- --set controlPlaneUrl=http://sam-mesh-control-plane:8080
+helm install my-node charts/agentmesh-node \
+ --set controlPlaneUrl=http://agentmesh-control-plane:8080
```
A node hosting an MCP service (see `development/examples/*/values.yaml` for
complete, working examples):
```yaml
-controlPlaneUrl: http://sam-mesh-control-plane:8080
+controlPlaneUrl: http://agentmesh-control-plane:8080
config:
version: v1alpha1
services:
@@ -40,10 +40,10 @@ service:
| `apiToken` | `""` (generated) | Bearer token for the node's local REST API, stored in the Secret `<release>-api-token` and mounted as a file. Empty generates a random one on first install; set to pin |
| `podSecurityContext` / `securityContext` | nonroot 65532, seccomp RuntimeDefault, no capabilities | Pod and container security contexts |
| `bindAddr` | `127.0.0.1:8080` | Node API bind address (loopback = pod-private) |
-| `extraArgs` | `[]` | Extra sam-node args |
-| `config` | empty services | Merged over the chart's defaults and rendered as `sam-node.yaml`; pods roll on config changes |
+| `extraArgs` | `[]` | Extra agentmesh-node args |
+| `config` | empty services | Merged over the chart's defaults and rendered as `agentmesh-node.yaml`; pods roll on config changes |
| `service.image` | `""` | Service container image; empty = bare node |
| `service.name/command/env/ports/resources` | — | Service container spec |
| `serviceAccount.create/name/annotations` | `true` / fullname / `{}` | Skip creation, reuse an existing SA, or annotate it (e.g. Workload Identity) |
-| `image.repository/tag/pullPolicy` | `sam-node:local` | Node image |
+| `image.repository/tag/pullPolicy` | `agentmesh-node:local` | Node image |
| `replicaCount` | `1` | Each replica enrolls as its own mesh node |
diff --git a/charts/sam-node/templates/_helpers.tpl b/charts/agentmesh-node/templates/_helpers.tpl
similarity index 73%
rename from charts/sam-node/templates/_helpers.tpl
rename to charts/agentmesh-node/templates/_helpers.tpl
index 791aa7fe..883b7099 100644
--- a/charts/sam-node/templates/_helpers.tpl
+++ b/charts/agentmesh-node/templates/_helpers.tpl
@@ -1,14 +1,14 @@
{{/*
Expand the name of the chart.
*/}}
-{{- define "sam-node.name" -}}
+{{- define "agentmesh-node.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name, truncated to the 63-char DNS limit.
*/}}
-{{- define "sam-node.fullname" -}}
+{{- define "agentmesh-node.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
@@ -24,16 +24,16 @@ Create a default fully qualified app name, truncated to the 63-char DNS limit.
{{/*
Create chart name and version as used by the chart label.
*/}}
-{{- define "sam-node.chart" -}}
+{{- define "agentmesh-node.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
-{{- define "sam-node.labels" -}}
-helm.sh/chart: {{ include "sam-node.chart" . }}
-{{ include "sam-node.selectorLabels" . }}
+{{- define "agentmesh-node.labels" -}}
+helm.sh/chart: {{ include "agentmesh-node.chart" . }}
+{{ include "agentmesh-node.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
@@ -43,7 +43,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
-{{- define "sam-node.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "sam-node.name" . }}
+{{- define "agentmesh-node.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "agentmesh-node.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
diff --git a/charts/agentmesh-node/templates/configmap.yaml b/charts/agentmesh-node/templates/configmap.yaml
new file mode 100644
index 00000000..401eaa6b
--- /dev/null
+++ b/charts/agentmesh-node/templates/configmap.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "agentmesh-node.fullname" . }}-config
+ labels:
+ {{- include "agentmesh-node.labels" . | nindent 4 }}
+data:
+ agentmesh-node.yaml: |
+ {{- .Values.config | toYaml | nindent 4 }}
diff --git a/charts/sam-node/templates/deployment.yaml b/charts/agentmesh-node/templates/deployment.yaml
similarity index 82%
rename from charts/sam-node/templates/deployment.yaml
rename to charts/agentmesh-node/templates/deployment.yaml
index 30c0db09..e0f0e8b3 100644
--- a/charts/sam-node/templates/deployment.yaml
+++ b/charts/agentmesh-node/templates/deployment.yaml
@@ -1,25 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
- name: {{ include "sam-node.fullname" . }}
+ name: {{ include "agentmesh-node.fullname" . }}
labels:
- {{- include "sam-node.labels" . | nindent 4 }}
+ {{- include "agentmesh-node.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
- {{- include "sam-node.selectorLabels" . | nindent 6 }}
+ {{- include "agentmesh-node.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
- {{- include "sam-node.selectorLabels" . | nindent 8 }}
+ {{- include "agentmesh-node.selectorLabels" . | nindent 8 }}
annotations:
# A config-only or secret change must roll the pods: the node reads its
# config and API token once at startup and never reloads them.
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
spec:
- serviceAccountName: {{ default (include "sam-node.fullname" .) .Values.serviceAccount.name }}
+ serviceAccountName: {{ default (include "agentmesh-node.fullname" .) .Values.serviceAccount.name }}
# The node reads the projected token below; the default SA token would
# be a second, unaudienced credential in the pod.
automountServiceAccountToken: false
@@ -28,7 +28,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- - name: sam-node
+ - name: agentmesh-node
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.securityContext }}
@@ -37,15 +37,15 @@ spec:
{{- end }}
args:
- "run"
- - "--config=/etc/sam/sam-node.yaml"
+ - "--config=/etc/agentmesh/agentmesh-node.yaml"
- "--control-plane={{ required "controlPlaneUrl is required" .Values.controlPlaneUrl }}"
{{- if hasPrefix "http://" .Values.controlPlaneUrl }}
# Plaintext to a non-loopback control plane is refused unless opted
# in; an in-cluster Service URL is the expected case.
- "--insecure-control-plane"
{{- end }}
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
- - "--api-token-path=/var/run/secrets/sam/api-token"
+ - "--jwt-path=/var/run/secrets/tokens/agentmesh-token"
+ - "--api-token-path=/var/run/secrets/agentmesh/api-token"
- "--bind-addr={{ .Values.bindAddr }}"
{{- if .Values.metricsPort }}
- "--metrics-addr=0.0.0.0:{{ .Values.metricsPort }}"
@@ -84,12 +84,12 @@ spec:
{{- end }}
volumeMounts:
- name: config
- mountPath: /etc/sam
- - name: sam-token
+ mountPath: /etc/agentmesh
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
- name: api-token
- mountPath: /var/run/secrets/sam
+ mountPath: /var/run/secrets/agentmesh
readOnly: true
{{- if .Values.service.image }}
- name: {{ .Values.service.name }}
@@ -127,14 +127,14 @@ spec:
volumes:
- name: config
configMap:
- name: {{ include "sam-node.fullname" . }}-config
+ name: {{ include "agentmesh-node.fullname" . }}-config
- name: api-token
secret:
- secretName: {{ include "sam-node.fullname" . }}-api-token
- - name: sam-token
+ secretName: {{ include "agentmesh-node.fullname" . }}-api-token
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
audience: {{ .Values.audience | quote }}
diff --git a/charts/sam-node/templates/monitoring.yaml b/charts/agentmesh-node/templates/monitoring.yaml
similarity index 66%
rename from charts/sam-node/templates/monitoring.yaml
rename to charts/agentmesh-node/templates/monitoring.yaml
index 02bbc13c..2f3ac0e6 100644
--- a/charts/sam-node/templates/monitoring.yaml
+++ b/charts/agentmesh-node/templates/monitoring.yaml
@@ -4,13 +4,13 @@
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
- name: {{ include "sam-node.fullname" . }}
+ name: {{ include "agentmesh-node.fullname" . }}
labels:
- {{- include "sam-node.labels" . | nindent 4 }}
+ {{- include "agentmesh-node.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
- {{- include "sam-node.selectorLabels" . | nindent 6 }}
+ {{- include "agentmesh-node.selectorLabels" . | nindent 6 }}
endpoints:
- port: metrics
path: /metrics
@@ -21,16 +21,16 @@ spec:
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
- name: {{ include "sam-node.fullname" . }}
+ name: {{ include "agentmesh-node.fullname" . }}
labels:
- {{- include "sam-node.labels" . | nindent 4 }}
+ {{- include "agentmesh-node.labels" . | nindent 4 }}
{{- with .Values.monitoring.podMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
- {{- include "sam-node.selectorLabels" . | nindent 6 }}
+ {{- include "agentmesh-node.selectorLabels" . | nindent 6 }}
podMetricsEndpoints:
- port: metrics
path: /metrics
diff --git a/charts/sam-node/templates/secret.yaml b/charts/agentmesh-node/templates/secret.yaml
similarity index 78%
rename from charts/sam-node/templates/secret.yaml
rename to charts/agentmesh-node/templates/secret.yaml
index 49713055..9246728b 100644
--- a/charts/sam-node/templates/secret.yaml
+++ b/charts/agentmesh-node/templates/secret.yaml
@@ -1,4 +1,4 @@
-{{- $secretName := printf "%s-api-token" (include "sam-node.fullname" .) }}
+{{- $secretName := printf "%s-api-token" (include "agentmesh-node.fullname" .) }}
{{- $existing := lookup "v1" "Secret" .Release.Namespace $secretName }}
{{- $apiToken := .Values.apiToken }}
{{- if not $apiToken }}
@@ -13,7 +13,7 @@ kind: Secret
metadata:
name: {{ $secretName }}
labels:
- {{- include "sam-node.labels" . | nindent 4 }}
+ {{- include "agentmesh-node.labels" . | nindent 4 }}
type: Opaque
data:
api-token: {{ $apiToken | b64enc | quote }}
diff --git a/charts/sam-node/templates/serviceaccount.yaml b/charts/agentmesh-node/templates/serviceaccount.yaml
similarity index 59%
rename from charts/sam-node/templates/serviceaccount.yaml
rename to charts/agentmesh-node/templates/serviceaccount.yaml
index 72b60ef4..6100495b 100644
--- a/charts/sam-node/templates/serviceaccount.yaml
+++ b/charts/agentmesh-node/templates/serviceaccount.yaml
@@ -2,9 +2,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ default (include "sam-node.fullname" .) .Values.serviceAccount.name }}
+ name: {{ default (include "agentmesh-node.fullname" .) .Values.serviceAccount.name }}
labels:
- {{- include "sam-node.labels" . | nindent 4 }}
+ {{- include "agentmesh-node.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
diff --git a/charts/sam-node/tests/deployment_test.yaml b/charts/agentmesh-node/tests/deployment_test.yaml
similarity index 89%
rename from charts/sam-node/tests/deployment_test.yaml
rename to charts/agentmesh-node/tests/deployment_test.yaml
index 34bb083d..33210cef 100644
--- a/charts/sam-node/tests/deployment_test.yaml
+++ b/charts/agentmesh-node/tests/deployment_test.yaml
@@ -1,4 +1,4 @@
-suite: sam-node deployment
+suite: agentmesh-node deployment
templates:
# configmap.yaml and secret.yaml must be loaded for the checksum includes to resolve
- templates/deployment.yaml
@@ -13,17 +13,17 @@ tests:
- it: renders a bare node with one container
template: templates/deployment.yaml
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
asserts:
- equal:
path: spec.template.spec.containers[0].name
- value: sam-node
+ value: agentmesh-node
- lengthEqual:
path: spec.template.spec.containers
count: 1
- contains:
path: spec.template.spec.containers[0].args
- content: "--control-plane=http://sam-mesh-control-plane:8080"
+ content: "--control-plane=http://agentmesh-control-plane:8080"
- contains:
path: spec.template.spec.containers[0].args
content: "--insecure-control-plane"
@@ -53,7 +53,7 @@ tests:
asserts:
- contains:
path: spec.template.spec.containers[0].args
- content: "--api-token-path=/var/run/secrets/sam/api-token"
+ content: "--api-token-path=/var/run/secrets/agentmesh/api-token"
- notExists:
path: spec.template.spec.containers[0].env
- contains:
@@ -61,7 +61,7 @@ tests:
content:
name: api-token
secret:
- secretName: RELEASE-NAME-sam-node-api-token
+ secretName: RELEASE-NAME-agentmesh-node-api-token
- equal:
path: spec.template.spec.automountServiceAccountToken
value: false
@@ -90,7 +90,7 @@ tests:
- it: renders the service container when service.image is set
template: templates/deployment.yaml
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
service:
name: calc-mcp
image: calc-mcp:local
@@ -108,7 +108,7 @@ tests:
- it: appends extraArgs
template: templates/deployment.yaml
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
extraArgs: ["--discovery-interval=200ms"]
asserts:
- contains:
@@ -118,7 +118,7 @@ tests:
- it: honors serviceAccount.name for the pod
template: templates/deployment.yaml
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
serviceAccount:
create: false
name: existing-sa
@@ -130,7 +130,7 @@ tests:
- it: serves metrics on a containerPort the probes use, apart from the API
template: templates/deployment.yaml
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
asserts:
- contains:
path: spec.template.spec.containers[0].args
@@ -157,7 +157,7 @@ tests:
- it: metricsPort 0 drops the listener, the port and the probes together
template: templates/deployment.yaml
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
metricsPort: 0
asserts:
- notContains:
diff --git a/charts/sam-node/tests/monitoring_test.yaml b/charts/agentmesh-node/tests/monitoring_test.yaml
similarity index 81%
rename from charts/sam-node/tests/monitoring_test.yaml
rename to charts/agentmesh-node/tests/monitoring_test.yaml
index 09b116ae..a2f29463 100644
--- a/charts/sam-node/tests/monitoring_test.yaml
+++ b/charts/agentmesh-node/tests/monitoring_test.yaml
@@ -1,19 +1,19 @@
-suite: sam-node monitoring
+suite: agentmesh-node monitoring
templates:
- templates/monitoring.yaml
release:
- name: sam-node
+ name: agentmesh-node
tests:
- it: renders nothing by default, since both kinds are CRDs the cluster may lack
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
asserts:
- hasDocuments:
count: 0
- it: podMonitoring selects the node pods on the metrics port
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
monitoring.podMonitoring.enabled: true
asserts:
- hasDocuments:
@@ -24,7 +24,7 @@ tests:
of: monitoring.googleapis.com/v1
- equal:
path: spec.selector.matchLabels["app.kubernetes.io/name"]
- value: sam-node
+ value: agentmesh-node
- equal:
path: spec.endpoints[0].port
value: metrics
@@ -34,7 +34,7 @@ tests:
- it: podMonitor renders the prometheus-operator shape with extra labels
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
monitoring.podMonitor.enabled: true
monitoring.podMonitor.labels:
release: kube-prometheus-stack
@@ -52,7 +52,7 @@ tests:
- it: renders nothing when the metrics listener is disabled
set:
- controlPlaneUrl: http://sam-mesh-control-plane:8080
+ controlPlaneUrl: http://agentmesh-control-plane:8080
metricsPort: 0
monitoring.podMonitoring.enabled: true
monitoring.podMonitor.enabled: true
diff --git a/charts/sam-node/values.yaml b/charts/agentmesh-node/values.yaml
similarity index 92%
rename from charts/sam-node/values.yaml
rename to charts/agentmesh-node/values.yaml
index ac639e07..211c5e52 100644
--- a/charts/sam-node/values.yaml
+++ b/charts/agentmesh-node/values.yaml
@@ -1,12 +1,12 @@
image:
- repository: sam-node
+ repository: agentmesh-node
tag: local
pullPolicy: IfNotPresent
replicaCount: 1
# Required: control plane URL the node enrolls with,
-# e.g. http://sam-mesh-control-plane:8080. A plaintext http:// URL makes the
+# e.g. http://agentmesh-control-plane:8080. A plaintext http:// URL makes the
# chart pass --insecure-control-plane: whoever answers it becomes the node's
# trust root, so use https:// for anything beyond the cluster network.
controlPlaneUrl: ""
@@ -62,10 +62,10 @@ monitoring:
# Extra labels, e.g. the release selector a Prometheus instance matches on.
labels: {}
-# Extra sam-node args, e.g. ["--discovery-interval=200ms"].
+# Extra agentmesh-node args, e.g. ["--discovery-interval=200ms"].
extraArgs: []
-# Rendered verbatim as the node's sam-node.yaml: static services the node
+# Rendered verbatim as the node's agentmesh-node.yaml: static services the node
# advertises, and local attenuation.
config:
version: v1alpha1
diff --git a/charts/sam-mesh/Chart.yaml b/charts/agentmesh/Chart.yaml
similarity index 90%
rename from charts/sam-mesh/Chart.yaml
rename to charts/agentmesh/Chart.yaml
index 59fbb336..5751e1f3 100644
--- a/charts/sam-mesh/Chart.yaml
+++ b/charts/agentmesh/Chart.yaml
@@ -1,5 +1,5 @@
apiVersion: v2
-name: sam-mesh
+name: agentmesh
description: A Helm chart for deploying the SAM control plane, router and console
type: application
version: 0.1.0
diff --git a/charts/sam-mesh/README.md b/charts/agentmesh/README.md
similarity index 92%
rename from charts/sam-mesh/README.md
rename to charts/agentmesh/README.md
index 9ef03708..3a1858eb 100644
--- a/charts/sam-mesh/README.md
+++ b/charts/agentmesh/README.md
@@ -1,6 +1,6 @@
-# sam-mesh Helm chart
+# agentmesh Helm chart
-Deploys a self-contained SAM mesh (control plane, router, console, and an
+Deploys a self-contained Agent Mesh (control plane, router, console, and an
in-cluster Postgres) for local development, testing, or self-hosting your
own mesh.
@@ -11,7 +11,7 @@ own mesh.
## Install
```bash
-helm upgrade --install sam-mesh ./charts/sam-mesh --namespace sam --create-namespace \
+helm upgrade --install agentmesh ./charts/agentmesh --namespace sam --create-namespace \
--set controlPlane.oidcIssuer=<your OIDC issuer URL>
```
@@ -43,7 +43,7 @@ generate one, e.g. for reproducible dev environments or to match an
existing secret:
```bash
-helm upgrade --install sam-mesh ./charts/sam-mesh \
+helm upgrade --install agentmesh ./charts/agentmesh \
--set controlPlane.adminToken="$(openssl rand -hex 32)" \
--set database.postgres.password="$(openssl rand -hex 32)"
```
@@ -114,7 +114,7 @@ gateway:
port: 443
tls:
certificateRefs:
- - name: sam-mesh-tls
+ - name: agentmesh-tls
allowedRoutes:
namespaces:
from: Same
@@ -148,7 +148,7 @@ Scraping is off by default because both supported resources are CRDs:
`monitoring.podMonitor.labels` for the selector your Prometheus matches on.
Mesh size and state come from the control plane
-(`sam_control_plane_mesh_connected_peers`, `sam_control_plane_routers_active`,
-`sam_control_plane_enrolled_nodes{role,state}`); the router adds its live view
-(`sam_router_authenticated_peers`, `sam_router_auth_handshakes_total{result}`)
+(`agentmesh_control_plane_mesh_connected_peers`, `agentmesh_control_plane_routers_active`,
+`agentmesh_control_plane_enrolled_nodes{role,state}`); the router adds its live view
+(`agentmesh_router_authenticated_peers`, `agentmesh_router_auth_handshakes_total{result}`)
alongside libp2p's own relay and connection metrics.
diff --git a/charts/sam-mesh/templates/NOTES.txt b/charts/agentmesh/templates/NOTES.txt
similarity index 74%
rename from charts/sam-mesh/templates/NOTES.txt
rename to charts/agentmesh/templates/NOTES.txt
index 545eed5c..dd876943 100644
--- a/charts/sam-mesh/templates/NOTES.txt
+++ b/charts/agentmesh/templates/NOTES.txt
@@ -1,4 +1,4 @@
-SAM Mesh has been deployed as release "{{ .Release.Name }}" in namespace "{{ .Release.Namespace }}".
+Agent Mesh has been deployed as release "{{ .Release.Name }}" in namespace "{{ .Release.Namespace }}".
{{- if not .Values.controlPlane.adminToken }}
@@ -6,7 +6,7 @@ A random admin token was generated for you (nothing is set in values.yaml).
Retrieve it before you try to call any /admin/* endpoint or log into the
console as root admin:
- kubectl get secret --namespace {{ .Release.Namespace }} {{ include "sam-mesh.fullname" . }}-secrets -o jsonpath='{.data.admin-token}' | base64 -d; echo
+ kubectl get secret --namespace {{ .Release.Namespace }} {{ include "agentmesh.fullname" . }}-secrets -o jsonpath='{.data.admin-token}' | base64 -d; echo
{{- else }}
Using the admin token you provided via values (controlPlane.adminToken).
@@ -19,9 +19,9 @@ A random database password was also generated and stored in the same secret
Postgres yourself.
{{- end }}
-Control plane service: {{ include "sam-mesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}
+Control plane service: {{ include "agentmesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}
{{- if .Values.console.enabled }}
-Console service: {{ include "sam-mesh.fullname" . }}-console:{{ .Values.console.service.port }}
+Console service: {{ include "agentmesh.fullname" . }}-console:{{ .Values.console.service.port }}
{{- end }}
{{- if .Values.controlPlane.autoApproveEnrollment }}
@@ -39,5 +39,5 @@ With fewer than {{ .Values.router.replicaCount }} schedulable nodes (after route
pods stay Pending with "node(s) didn't have free ports".
{{- end }}
-See charts/sam-mesh/README.md for more details on configuring OIDC, TLS, and
+See charts/agentmesh/README.md for more details on configuring OIDC, TLS, and
production values.
diff --git a/charts/sam-mesh/templates/_helpers.tpl b/charts/agentmesh/templates/_helpers.tpl
similarity index 78%
rename from charts/sam-mesh/templates/_helpers.tpl
rename to charts/agentmesh/templates/_helpers.tpl
index 26c19ec2..fa9154f9 100644
--- a/charts/sam-mesh/templates/_helpers.tpl
+++ b/charts/agentmesh/templates/_helpers.tpl
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
-{{- define "sam-mesh.name" -}}
+{{- define "agentmesh.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
@@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
-{{- define "sam-mesh.fullname" -}}
+{{- define "agentmesh.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
-{{- define "sam-mesh.chart" -}}
+{{- define "agentmesh.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
-{{- define "sam-mesh.labels" -}}
-helm.sh/chart: {{ include "sam-mesh.chart" . }}
-{{ include "sam-mesh.selectorLabels" . }}
+{{- define "agentmesh.labels" -}}
+helm.sh/chart: {{ include "agentmesh.chart" . }}
+{{ include "agentmesh.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
@@ -45,7 +45,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
-{{- define "sam-mesh.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "sam-mesh.name" . }}
+{{- define "agentmesh.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "agentmesh.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
diff --git a/charts/sam-mesh/templates/bootstrap-job.yaml b/charts/agentmesh/templates/bootstrap-job.yaml
similarity index 74%
rename from charts/sam-mesh/templates/bootstrap-job.yaml
rename to charts/agentmesh/templates/bootstrap-job.yaml
index c126d74e..b722b4cc 100644
--- a/charts/sam-mesh/templates/bootstrap-job.yaml
+++ b/charts/agentmesh/templates/bootstrap-job.yaml
@@ -1,16 +1,16 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ include "sam-mesh.fullname" . }}-bootstrap-sa
+ name: {{ include "agentmesh.fullname" . }}-bootstrap-sa
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
- name: {{ include "sam-mesh.fullname" . }}-bootstrap-role
+ name: {{ include "agentmesh.fullname" . }}-bootstrap-role
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
rules:
# resourceNames cannot restrict create (the name is unknown at admission),
# so it gets a bare rule; everything else is pinned to the router-token secret.
@@ -19,41 +19,41 @@ rules:
verbs: ["create"]
- apiGroups: [""]
resources: ["secrets"]
- resourceNames: ["{{ include "sam-mesh.fullname" . }}-router-token"]
+ resourceNames: ["{{ include "agentmesh.fullname" . }}-router-token"]
verbs: ["get", "patch", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
- name: {{ include "sam-mesh.fullname" . }}-bootstrap-rb
+ name: {{ include "agentmesh.fullname" . }}-bootstrap-rb
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
- name: {{ include "sam-mesh.fullname" . }}-bootstrap-sa
+ name: {{ include "agentmesh.fullname" . }}-bootstrap-sa
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
- name: {{ include "sam-mesh.fullname" . }}-bootstrap-role
+ name: {{ include "agentmesh.fullname" . }}-bootstrap-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: batch/v1
kind: Job
metadata:
- name: {{ include "sam-mesh.fullname" . }}-bootstrap
+ name: {{ include "agentmesh.fullname" . }}-bootstrap
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
activeDeadlineSeconds: 300
template:
metadata:
labels:
- app: {{ include "sam-mesh.fullname" . }}-bootstrap
+ app: {{ include "agentmesh.fullname" . }}-bootstrap
spec:
- serviceAccountName: {{ include "sam-mesh.fullname" . }}-bootstrap-sa
+ serviceAccountName: {{ include "agentmesh.fullname" . }}-bootstrap-sa
restartPolicy: OnFailure
securityContext:
runAsNonRoot: true
@@ -80,11 +80,11 @@ spec:
- name: NAMESPACE
value: {{ .Release.Namespace | quote }}
- name: SECRET_NAME
- value: "{{ include "sam-mesh.fullname" . }}-router-token"
+ value: "{{ include "agentmesh.fullname" . }}-router-token"
- name: ADMIN_TOKEN
valueFrom:
secretKeyRef:
- name: {{ include "sam-mesh.fullname" . }}-secrets
+ name: {{ include "agentmesh.fullname" . }}-secrets
key: admin-token
command: ["/bin/sh", "-c"]
args:
@@ -92,7 +92,7 @@ spec:
set -e
CACERT=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
K8S_TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
- CP_URL="http://{{ include "sam-mesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
+ CP_URL="http://{{ include "agentmesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
echo "Waiting for Control Plane to be ready..."
until curl -sf "${CP_URL}/info" > /dev/null; do
@@ -103,10 +103,10 @@ spec:
echo "Seeding default policies..."
{{- $bindings := .Values.bootstrap.bindings -}}
{{- if not $bindings -}}
- {{- $defaultRouterSA := printf "user:system:serviceaccount:%s:%s-router-sa" .Release.Namespace (include "sam-mesh.fullname" .) -}}
+ {{- $defaultRouterSA := printf "user:system:serviceaccount:%s:%s-router-sa" .Release.Namespace (include "agentmesh.fullname" .) -}}
{{- $bindings = list
(dict "role" "mesh:role:router" "members" (list "group:routers" $defaultRouterSA))
- (dict "role" "mesh:role:sambox" "members" (list (printf "user:system:serviceaccount:%s:sam-box-sa" .Release.Namespace)))
+ (dict "role" "mesh:role:agentmesh-box" "members" (list (printf "user:system:serviceaccount:%s:agentmesh-box-sa" .Release.Namespace)))
-}}
{{- if .Values.bootstrap.nodeMembers -}}
{{- $bindings = append $bindings (dict "role" "mesh:role:node" "members" .Values.bootstrap.nodeMembers) -}}
@@ -117,8 +117,8 @@ spec:
-H "Authorization: Bearer ${ADMIN_TOKEN}" \
-d '{
"roles": [
- {"name": "sam-admin", "allowed_services": ["*"], "allowed_targets": ["*"]},
- {"name": "mesh:role:sambox", "allowed_services": ["*"], "allowed_targets": ["*"]},
+ {"name": "mesh-admin", "allowed_services": ["*"], "allowed_targets": ["*"]},
+ {"name": "mesh:role:agentmesh-box", "allowed_services": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:router", "allowed_services": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:node", "allowed_services": {{ toJson .Values.bootstrap.nodeServices }}, "allowed_targets": ["*"], "allowed_labels": {{ toJson .Values.bootstrap.nodeLabels }}}
],
@@ -127,7 +127,7 @@ spec:
"${CP_URL}/policies" >/dev/null
- echo "Generating bootstrap token for sam-router..."
+ echo "Generating bootstrap token for agentmesh-router..."
# One use per router replica: a leaked token is worth nothing once
# the routers have enrolled.
TOKEN_RESP=$(curl -sf -X POST \
@@ -157,6 +157,6 @@ spec:
"token": "'"${ROUTER_TOKEN}"'"
}
}' \
- "https://kubernetes.default.svc/api/v1/namespaces/${NAMESPACE}/secrets/${SECRET_NAME}?fieldManager=sam-bootstrap&force=true" > /dev/null
+ "https://kubernetes.default.svc/api/v1/namespaces/${NAMESPACE}/secrets/${SECRET_NAME}?fieldManager=agentmesh-bootstrap&force=true" > /dev/null
echo "Bootstrap completed successfully!"
diff --git a/charts/sam-mesh/templates/console-deployment.yaml b/charts/agentmesh/templates/console-deployment.yaml
similarity index 81%
rename from charts/sam-mesh/templates/console-deployment.yaml
rename to charts/agentmesh/templates/console-deployment.yaml
index f39e615d..f05fa50d 100644
--- a/charts/sam-mesh/templates/console-deployment.yaml
+++ b/charts/agentmesh/templates/console-deployment.yaml
@@ -2,21 +2,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
- name: {{ include "sam-mesh.fullname" . }}-console
+ name: {{ include "agentmesh.fullname" . }}-console
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.console.replicaCount }}
selector:
matchLabels:
- app: {{ include "sam-mesh.fullname" . }}-console
+ app: {{ include "agentmesh.fullname" . }}-console
template:
metadata:
annotations:
# Secrets land as env vars, which are not live-reloaded; roll the pods on change.
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
labels:
- app: {{ include "sam-mesh.fullname" . }}-console
+ app: {{ include "agentmesh.fullname" . }}-console
spec:
{{- with .Values.console.nodeSelector }}
nodeSelector:
@@ -55,13 +55,13 @@ spec:
args:
- |
set -e
- CP_URL="http://{{ include "sam-mesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
+ CP_URL="http://{{ include "agentmesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
until curl -sf "${CP_URL}/info" > /dev/null; do
echo "Control plane not ready yet, sleeping..."
sleep 2
done
containers:
- - name: sam-console
+ - name: agentmesh-console
image: "{{ .Values.console.image.repository }}:{{ .Values.console.image.tag | default .Values.global.imageTag }}"
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
{{- with .Values.console.securityContext }}
@@ -69,10 +69,10 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
env:
- - name: SAM_ADMIN_TOKEN
+ - name: AGENTMESH_ADMIN_TOKEN
valueFrom:
secretKeyRef:
- name: {{ include "sam-mesh.fullname" . }}-secrets
+ name: {{ include "agentmesh.fullname" . }}-secrets
key: admin-token
ports:
- containerPort: 8081
@@ -91,7 +91,7 @@ spec:
resources:
{{- toYaml .Values.console.resources | nindent 10 }}
args:
- - "--control-plane=http://{{ include "sam-mesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
+ - "--control-plane=http://{{ include "agentmesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
- "--bind-addr=:8081"
- "--static-dir=/app/public"
{{- with .Values.console.externalUrl }}
diff --git a/charts/sam-mesh/templates/console-service.yaml b/charts/agentmesh/templates/console-service.yaml
similarity index 72%
rename from charts/sam-mesh/templates/console-service.yaml
rename to charts/agentmesh/templates/console-service.yaml
index a2438151..de628639 100644
--- a/charts/sam-mesh/templates/console-service.yaml
+++ b/charts/agentmesh/templates/console-service.yaml
@@ -2,9 +2,9 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "sam-mesh.fullname" . }}-console
+ name: {{ include "agentmesh.fullname" . }}-console
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
type: {{ .Values.console.service.type }}
ports:
@@ -16,5 +16,5 @@ spec:
{{- end }}
protocol: TCP
selector:
- app: {{ include "sam-mesh.fullname" . }}-console
+ app: {{ include "agentmesh.fullname" . }}-console
{{- end }}
diff --git a/charts/sam-mesh/templates/control-plane-deployment.yaml b/charts/agentmesh/templates/control-plane-deployment.yaml
similarity index 87%
rename from charts/sam-mesh/templates/control-plane-deployment.yaml
rename to charts/agentmesh/templates/control-plane-deployment.yaml
index 5046b8b3..e77fea9d 100644
--- a/charts/sam-mesh/templates/control-plane-deployment.yaml
+++ b/charts/agentmesh/templates/control-plane-deployment.yaml
@@ -1,9 +1,9 @@
apiVersion: apps/v1
kind: Deployment
metadata:
- name: {{ include "sam-mesh.fullname" . }}-control-plane
+ name: {{ include "agentmesh.fullname" . }}-control-plane
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.controlPlane.replicaCount }}
{{- if .Values.controlPlane.hostPort }}
@@ -16,14 +16,14 @@ spec:
{{- end }}
selector:
matchLabels:
- app: {{ include "sam-mesh.fullname" . }}-control-plane
+ app: {{ include "agentmesh.fullname" . }}-control-plane
template:
metadata:
annotations:
# Secrets land as env vars, which are not live-reloaded; roll the pods on change.
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
labels:
- app: {{ include "sam-mesh.fullname" . }}-control-plane
+ app: {{ include "agentmesh.fullname" . }}-control-plane
spec:
{{- with .Values.controlPlane.nodeSelector }}
nodeSelector:
@@ -42,7 +42,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- - name: sam-control-plane
+ - name: agentmesh-control-plane
image: "{{ .Values.controlPlane.image.repository }}:{{ .Values.controlPlane.image.tag | default .Values.global.imageTag }}"
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
{{- with .Values.controlPlane.securityContext }}
@@ -53,20 +53,20 @@ spec:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
- name: {{ include "sam-mesh.fullname" . }}-secrets
+ name: {{ include "agentmesh.fullname" . }}-secrets
key: db-password
{{- if eq .Values.database.type "postgres" }}
- {{- $dbHost := printf "%s-db" (include "sam-mesh.fullname" .) }}
+ {{- $dbHost := printf "%s-db" (include "agentmesh.fullname" .) }}
{{- if not .Values.database.postgres.deployInternal }}
{{- $dbHost = .Values.database.postgres.host }}
{{- end }}
- - name: SAM_DB_DSN
+ - name: AGENTMESH_DB_DSN
value: "postgres://{{ .Values.database.postgres.user }}:$(DB_PASSWORD)@{{ $dbHost }}:{{ .Values.database.postgres.port | default 5432 }}/{{ .Values.database.postgres.database }}?sslmode={{ .Values.database.postgres.sslmode | default "disable" }}"
{{- end }}
- - name: SAM_ADMIN_TOKEN
+ - name: AGENTMESH_ADMIN_TOKEN
valueFrom:
secretKeyRef:
- name: {{ include "sam-mesh.fullname" . }}-secrets
+ name: {{ include "agentmesh.fullname" . }}-secrets
key: admin-token
ports:
- containerPort: 8080
diff --git a/charts/sam-mesh/templates/control-plane-service.yaml b/charts/agentmesh/templates/control-plane-service.yaml
similarity index 70%
rename from charts/sam-mesh/templates/control-plane-service.yaml
rename to charts/agentmesh/templates/control-plane-service.yaml
index 183fb86f..31cdaf3b 100644
--- a/charts/sam-mesh/templates/control-plane-service.yaml
+++ b/charts/agentmesh/templates/control-plane-service.yaml
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "sam-mesh.fullname" . }}-control-plane
+ name: {{ include "agentmesh.fullname" . }}-control-plane
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
type: {{ .Values.controlPlane.service.type }}
ports:
@@ -15,4 +15,4 @@ spec:
{{- end }}
protocol: TCP
selector:
- app: {{ include "sam-mesh.fullname" . }}-control-plane
+ app: {{ include "agentmesh.fullname" . }}-control-plane
diff --git a/charts/sam-mesh/templates/db-service.yaml b/charts/agentmesh/templates/db-service.yaml
similarity index 60%
rename from charts/sam-mesh/templates/db-service.yaml
rename to charts/agentmesh/templates/db-service.yaml
index 3bb4a09e..02359b45 100644
--- a/charts/sam-mesh/templates/db-service.yaml
+++ b/charts/agentmesh/templates/db-service.yaml
@@ -2,9 +2,9 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "sam-mesh.fullname" . }}-db
+ name: {{ include "agentmesh.fullname" . }}-db
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
type: ClusterIP
ports:
@@ -13,5 +13,5 @@ spec:
targetPort: 5432
protocol: TCP
selector:
- app: {{ include "sam-mesh.fullname" . }}-db
+ app: {{ include "agentmesh.fullname" . }}-db
{{- end }}
diff --git a/charts/sam-mesh/templates/db-statefulset.yaml b/charts/agentmesh/templates/db-statefulset.yaml
similarity index 89%
rename from charts/sam-mesh/templates/db-statefulset.yaml
rename to charts/agentmesh/templates/db-statefulset.yaml
index ae18ea11..a681a273 100644
--- a/charts/sam-mesh/templates/db-statefulset.yaml
+++ b/charts/agentmesh/templates/db-statefulset.yaml
@@ -2,19 +2,19 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
- name: {{ include "sam-mesh.fullname" . }}-db
+ name: {{ include "agentmesh.fullname" . }}-db
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
- serviceName: {{ include "sam-mesh.fullname" . }}-db
+ serviceName: {{ include "agentmesh.fullname" . }}-db
replicas: 1
selector:
matchLabels:
- app: {{ include "sam-mesh.fullname" . }}-db
+ app: {{ include "agentmesh.fullname" . }}-db
template:
metadata:
labels:
- app: {{ include "sam-mesh.fullname" . }}-db
+ app: {{ include "agentmesh.fullname" . }}-db
spec:
automountServiceAccountToken: false
{{- with .Values.database.postgres.podSecurityContext }}
@@ -54,7 +54,7 @@ spec:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
- name: {{ include "sam-mesh.fullname" . }}-secrets
+ name: {{ include "agentmesh.fullname" . }}-secrets
key: db-password
ports:
- containerPort: 5432
diff --git a/charts/sam-mesh/templates/gateway.yaml b/charts/agentmesh/templates/gateway.yaml
similarity index 95%
rename from charts/sam-mesh/templates/gateway.yaml
rename to charts/agentmesh/templates/gateway.yaml
index 2d07216c..429f9a22 100644
--- a/charts/sam-mesh/templates/gateway.yaml
+++ b/charts/agentmesh/templates/gateway.yaml
@@ -1,11 +1,11 @@
{{- if .Values.gateway.enabled -}}
-{{- $fullName := include "sam-mesh.fullname" . -}}
+{{- $fullName := include "agentmesh.fullname" . -}}
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: {{ $fullName }}-gateway
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
{{- with .Values.gateway.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
@@ -24,7 +24,7 @@ kind: HTTPRoute
metadata:
name: {{ $fullName }}-route
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
parentRefs:
- name: {{ $fullName }}-gateway
diff --git a/charts/sam-mesh/templates/monitoring.yaml b/charts/agentmesh/templates/monitoring.yaml
similarity index 76%
rename from charts/sam-mesh/templates/monitoring.yaml
rename to charts/agentmesh/templates/monitoring.yaml
index 455b0c54..4d1ad9c4 100644
--- a/charts/sam-mesh/templates/monitoring.yaml
+++ b/charts/agentmesh/templates/monitoring.yaml
@@ -13,13 +13,13 @@ metrics port never has to appear on a Service.
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
- name: {{ include "sam-mesh.fullname" $ }}-{{ $t.name }}
+ name: {{ include "agentmesh.fullname" $ }}-{{ $t.name }}
labels:
- {{- include "sam-mesh.labels" $ | nindent 4 }}
+ {{- include "agentmesh.labels" $ | nindent 4 }}
spec:
selector:
matchLabels:
- app: {{ include "sam-mesh.fullname" $ }}-{{ $t.name }}
+ app: {{ include "agentmesh.fullname" $ }}-{{ $t.name }}
endpoints:
- port: {{ $t.port }}
path: /metrics
@@ -30,16 +30,16 @@ spec:
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
- name: {{ include "sam-mesh.fullname" $ }}-{{ $t.name }}
+ name: {{ include "agentmesh.fullname" $ }}-{{ $t.name }}
labels:
- {{- include "sam-mesh.labels" $ | nindent 4 }}
+ {{- include "agentmesh.labels" $ | nindent 4 }}
{{- with $.Values.monitoring.podMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
- app: {{ include "sam-mesh.fullname" $ }}-{{ $t.name }}
+ app: {{ include "agentmesh.fullname" $ }}-{{ $t.name }}
podMetricsEndpoints:
- port: {{ $t.port }}
path: /metrics
diff --git a/charts/sam-mesh/templates/router-service.yaml b/charts/agentmesh/templates/router-service.yaml
similarity index 69%
rename from charts/sam-mesh/templates/router-service.yaml
rename to charts/agentmesh/templates/router-service.yaml
index 708fc098..45b2bef3 100644
--- a/charts/sam-mesh/templates/router-service.yaml
+++ b/charts/agentmesh/templates/router-service.yaml
@@ -2,9 +2,9 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "sam-mesh.fullname" . }}-router
+ name: {{ include "agentmesh.fullname" . }}-router
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
type: {{ .Values.router.service.type }}
ports:
@@ -17,5 +17,5 @@ spec:
targetPort: 4501
protocol: UDP
selector:
- app: {{ include "sam-mesh.fullname" . }}-router
+ app: {{ include "agentmesh.fullname" . }}-router
{{- end }}
diff --git a/charts/sam-mesh/templates/router-statefulset.yaml b/charts/agentmesh/templates/router-statefulset.yaml
similarity index 81%
rename from charts/sam-mesh/templates/router-statefulset.yaml
rename to charts/agentmesh/templates/router-statefulset.yaml
index 023ca70e..db9c089b 100644
--- a/charts/sam-mesh/templates/router-statefulset.yaml
+++ b/charts/agentmesh/templates/router-statefulset.yaml
@@ -2,29 +2,29 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ include "sam-mesh.fullname" . }}-router-sa
+ name: {{ include "agentmesh.fullname" . }}-router-sa
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
- name: {{ include "sam-mesh.fullname" . }}-router
+ name: {{ include "agentmesh.fullname" . }}-router
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
spec:
- serviceName: {{ include "sam-mesh.fullname" . }}-router
+ serviceName: {{ include "agentmesh.fullname" . }}-router
replicas: {{ .Values.router.replicaCount }}
minReadySeconds: {{ .Values.router.minReadySeconds }}
selector:
matchLabels:
- app: {{ include "sam-mesh.fullname" . }}-router
+ app: {{ include "agentmesh.fullname" . }}-router
template:
metadata:
labels:
- app: {{ include "sam-mesh.fullname" . }}-router
+ app: {{ include "agentmesh.fullname" . }}-router
spec:
- serviceAccountName: {{ include "sam-mesh.fullname" . }}-router-sa
+ serviceAccountName: {{ include "agentmesh.fullname" . }}-router-sa
{{- with .Values.router.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@@ -62,13 +62,13 @@ spec:
args:
- |
set -e
- CP_URL="http://{{ include "sam-mesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
+ CP_URL="http://{{ include "agentmesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
until curl -sf "${CP_URL}/info" > /dev/null; do
echo "Control plane not ready yet, sleeping..."
sleep 2
done
containers:
- - name: sam-router
+ - name: agentmesh-router
image: "{{ .Values.router.image.repository }}:{{ .Values.router.image.tag | default .Values.global.imageTag }}"
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
{{- with .Values.router.securityContext }}
@@ -121,7 +121,7 @@ spec:
fieldPath: status.hostIP
{{- end }}
args:
- - "--control-plane=http://{{ include "sam-mesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
+ - "--control-plane=http://{{ include "agentmesh.fullname" . }}-control-plane:{{ .Values.controlPlane.service.port }}"
# In-cluster plaintext to the chart's own control-plane Service; the
# cluster network is the trust boundary here.
- "--insecure-control-plane"
@@ -136,7 +136,7 @@ spec:
- "--external-addr=/ip4/$(HOST_IP)/tcp/{{ .Values.router.hostPort }}"
- "--external-addr=/ip4/$(HOST_IP)/udp/{{ .Values.router.hostPort }}/quic-v1"
{{- else }}
- - "--external-addr=/dns4/{{ include "sam-mesh.fullname" . }}-router/tcp/{{ .Values.router.service.port }}"
+ - "--external-addr=/dns4/{{ include "agentmesh.fullname" . }}-router/tcp/{{ .Values.router.service.port }}"
{{- end }}
- "--keys-path=/data/router.key"
{{- if .Values.router.allowLoopback }}
@@ -144,37 +144,37 @@ spec:
{{- end }}
- "--log-level={{ .Values.router.logLevel }}"
{{- if .Values.router.useOidcToken }}
- - "--jwt-path=/var/run/secrets/tokens/sam-token"
+ - "--jwt-path=/var/run/secrets/tokens/agentmesh-token"
{{- else }}
# A file, not a flag value: argv is readable through kubectl exec and
# /proc/<pid>/cmdline.
- - "--bootstrap-token-path=/var/run/secrets/sam-router/token"
+ - "--bootstrap-token-path=/var/run/secrets/agentmesh-router/token"
{{- end }}
volumeMounts:
- name: router-data
mountPath: /data
{{- if .Values.router.useOidcToken }}
- - name: sam-token
+ - name: agentmesh-token
mountPath: /var/run/secrets/tokens
readOnly: true
{{- else }}
- name: router-token
- mountPath: /var/run/secrets/sam-router
+ mountPath: /var/run/secrets/agentmesh-router
readOnly: true
{{- end }}
volumes:
{{- if .Values.router.useOidcToken }}
- - name: sam-token
+ - name: agentmesh-token
projected:
sources:
- serviceAccountToken:
- path: sam-token
+ path: agentmesh-token
expirationSeconds: 3600
- audience: "sam-control-plane-audience"
+ audience: "agentmesh-control-plane-audience"
{{- else }}
- name: router-token
secret:
- secretName: {{ include "sam-mesh.fullname" . }}-router-token
+ secretName: {{ include "agentmesh.fullname" . }}-router-token
items:
- key: token
path: token
diff --git a/charts/sam-mesh/templates/secrets.yaml b/charts/agentmesh/templates/secrets.yaml
similarity index 87%
rename from charts/sam-mesh/templates/secrets.yaml
rename to charts/agentmesh/templates/secrets.yaml
index 7b556ce8..0d7e19b1 100644
--- a/charts/sam-mesh/templates/secrets.yaml
+++ b/charts/agentmesh/templates/secrets.yaml
@@ -1,4 +1,4 @@
-{{- $secretName := printf "%s-secrets" (include "sam-mesh.fullname" .) }}
+{{- $secretName := printf "%s-secrets" (include "agentmesh.fullname" .) }}
{{- $existing := lookup "v1" "Secret" .Release.Namespace $secretName }}
{{- $adminToken := .Values.controlPlane.adminToken }}
{{- if not $adminToken }}
@@ -21,7 +21,7 @@ kind: Secret
metadata:
name: {{ $secretName }}
labels:
- {{- include "sam-mesh.labels" . | nindent 4 }}
+ {{- include "agentmesh.labels" . | nindent 4 }}
type: Opaque
data:
admin-token: {{ $adminToken | b64enc | quote }}
diff --git a/charts/sam-mesh/tests/bootstrap-job_test.yaml b/charts/agentmesh/tests/bootstrap-job_test.yaml
similarity index 98%
rename from charts/sam-mesh/tests/bootstrap-job_test.yaml
rename to charts/agentmesh/tests/bootstrap-job_test.yaml
index b2ab0561..4c8e064c 100644
--- a/charts/sam-mesh/tests/bootstrap-job_test.yaml
+++ b/charts/agentmesh/tests/bootstrap-job_test.yaml
@@ -2,7 +2,7 @@ suite: bootstrap job
templates:
- templates/bootstrap-job.yaml
release:
- name: sam-mesh
+ name: agentmesh
tests:
- it: role only touches the router-token secret
documentSelector:
@@ -14,7 +14,7 @@ tests:
value: [create]
- equal:
path: rules[1].resourceNames
- value: [sam-mesh-router-token]
+ value: [agentmesh-router-token]
- equal:
path: rules[1].verbs
value: [get, patch, update]
diff --git a/charts/sam-mesh/tests/console-deployment_test.yaml b/charts/agentmesh/tests/console-deployment_test.yaml
similarity index 98%
rename from charts/sam-mesh/tests/console-deployment_test.yaml
rename to charts/agentmesh/tests/console-deployment_test.yaml
index 4b4c7426..c9f94adf 100644
--- a/charts/sam-mesh/tests/console-deployment_test.yaml
+++ b/charts/agentmesh/tests/console-deployment_test.yaml
@@ -4,7 +4,7 @@ templates:
- templates/console-deployment.yaml
- templates/secrets.yaml
release:
- name: sam-mesh
+ name: agentmesh
tests:
- it: pins the numeric uids for the app and the curl init container
template: templates/console-deployment.yaml
diff --git a/charts/sam-mesh/tests/control-plane-deployment_test.yaml b/charts/agentmesh/tests/control-plane-deployment_test.yaml
similarity index 96%
rename from charts/sam-mesh/tests/control-plane-deployment_test.yaml
rename to charts/agentmesh/tests/control-plane-deployment_test.yaml
index 87db82ea..8d04cc05 100644
--- a/charts/sam-mesh/tests/control-plane-deployment_test.yaml
+++ b/charts/agentmesh/tests/control-plane-deployment_test.yaml
@@ -4,7 +4,7 @@ templates:
- templates/control-plane-deployment.yaml
- templates/secrets.yaml
release:
- name: sam-mesh
+ name: agentmesh
tests:
- it: pins the numeric distroless uid so runAsNonRoot is verifiable
template: templates/control-plane-deployment.yaml
@@ -49,7 +49,7 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].image
- value: sam-control-plane:local
+ value: agentmesh-control-plane:local
- it: external postgres points the DSN at the configured host
template: templates/control-plane-deployment.yaml
@@ -59,7 +59,7 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].env[1].name
- value: SAM_DB_DSN
+ value: AGENTMESH_DB_DSN
- matchRegex:
path: spec.template.spec.containers[0].env[1].value
pattern: "@ext-db:5432"
diff --git a/charts/sam-mesh/tests/db-statefulset_test.yaml b/charts/agentmesh/tests/db-statefulset_test.yaml
similarity index 99%
rename from charts/sam-mesh/tests/db-statefulset_test.yaml
rename to charts/agentmesh/tests/db-statefulset_test.yaml
index bc632cbd..7516aa4c 100644
--- a/charts/sam-mesh/tests/db-statefulset_test.yaml
+++ b/charts/agentmesh/tests/db-statefulset_test.yaml
@@ -2,7 +2,7 @@ suite: db statefulset
templates:
- templates/db-statefulset.yaml
release:
- name: sam-mesh
+ name: agentmesh
tests:
- it: probes postgres with pg_isready
documentSelector:
diff --git a/charts/sam-mesh/tests/gateway_test.yaml b/charts/agentmesh/tests/gateway_test.yaml
similarity index 99%
rename from charts/sam-mesh/tests/gateway_test.yaml
rename to charts/agentmesh/tests/gateway_test.yaml
index e98c8329..6a3b2216 100644
--- a/charts/sam-mesh/tests/gateway_test.yaml
+++ b/charts/agentmesh/tests/gateway_test.yaml
@@ -2,7 +2,7 @@ suite: gateway
templates:
- templates/gateway.yaml
release:
- name: sam-mesh
+ name: agentmesh
tests:
- it: disabled by default renders nothing
asserts:
diff --git a/charts/sam-mesh/tests/monitoring_test.yaml b/charts/agentmesh/tests/monitoring_test.yaml
similarity index 91%
rename from charts/sam-mesh/tests/monitoring_test.yaml
rename to charts/agentmesh/tests/monitoring_test.yaml
index 90b5358e..2a0a41bd 100644
--- a/charts/sam-mesh/tests/monitoring_test.yaml
+++ b/charts/agentmesh/tests/monitoring_test.yaml
@@ -2,8 +2,8 @@ suite: monitoring
templates:
- templates/monitoring.yaml
release:
- # collapses fullname to "sam-mesh" (see _helpers.tpl)
- name: sam-mesh
+ # collapses fullname to "agentmesh" (see _helpers.tpl)
+ name: agentmesh
tests:
- it: renders nothing by default, since both kinds are CRDs the cluster may lack
asserts:
@@ -22,7 +22,7 @@ tests:
of: monitoring.googleapis.com/v1
- equal:
path: spec.selector.matchLabels.app
- value: sam-mesh-control-plane
+ value: agentmesh-control-plane
documentIndex: 0
- equal:
path: spec.endpoints[0].port
@@ -30,7 +30,7 @@ tests:
documentIndex: 0
- equal:
path: spec.selector.matchLabels.app
- value: sam-mesh-router
+ value: agentmesh-router
documentIndex: 1
- equal:
path: spec.endpoints[0].port
@@ -73,7 +73,7 @@ tests:
count: 1
- equal:
path: spec.selector.matchLabels.app
- value: sam-mesh-control-plane
+ value: agentmesh-control-plane
- it: both collectors can be enabled at once
set:
diff --git a/charts/sam-mesh/tests/router-statefulset_test.yaml b/charts/agentmesh/tests/router-statefulset_test.yaml
similarity index 91%
rename from charts/sam-mesh/tests/router-statefulset_test.yaml
rename to charts/agentmesh/tests/router-statefulset_test.yaml
index e38f9a74..debf6d04 100644
--- a/charts/sam-mesh/tests/router-statefulset_test.yaml
+++ b/charts/agentmesh/tests/router-statefulset_test.yaml
@@ -2,8 +2,8 @@ suite: router statefulset
templates:
- templates/router-statefulset.yaml
release:
- # collapses fullname to "sam-mesh" (see _helpers.tpl)
- name: sam-mesh
+ # collapses fullname to "agentmesh" (see _helpers.tpl)
+ name: agentmesh
tests:
- it: pins the numeric distroless uid so runAsNonRoot is verifiable
documentSelector:
@@ -27,7 +27,7 @@ tests:
asserts:
- contains:
path: spec.template.spec.containers[0].args
- content: --external-addr=/dns4/sam-mesh-router/tcp/4501
+ content: --external-addr=/dns4/agentmesh-router/tcp/4501
- contains:
path: spec.template.spec.containers[0].args
content: --insecure-control-plane
@@ -43,7 +43,7 @@ tests:
asserts:
- contains:
path: spec.template.spec.containers[0].args
- content: --external-addr=/dns4/sam-mesh-router/tcp/9999
+ content: --external-addr=/dns4/agentmesh-router/tcp/9999
- it: hostPort binds both protocols and announces the node IP
set:
@@ -120,10 +120,10 @@ tests:
asserts:
- contains:
path: spec.template.spec.containers[0].args
- content: --jwt-path=/var/run/secrets/tokens/sam-token
+ content: --jwt-path=/var/run/secrets/tokens/agentmesh-token
- notContains:
path: spec.template.spec.containers[0].args
- content: --bootstrap-token-path=/var/run/secrets/sam-router/token
+ content: --bootstrap-token-path=/var/run/secrets/agentmesh-router/token
- exists:
path: spec.template.spec.volumes[0].projected
@@ -134,7 +134,7 @@ tests:
asserts:
- contains:
path: spec.template.spec.containers[0].args
- content: --bootstrap-token-path=/var/run/secrets/sam-router/token
+ content: --bootstrap-token-path=/var/run/secrets/agentmesh-router/token
- notContains:
path: spec.template.spec.containers[0].args
content: --bootstrap-token=$(BOOTSTRAP_TOKEN)
@@ -142,7 +142,7 @@ tests:
path: spec.template.spec.containers[0].env
- equal:
path: spec.template.spec.volumes[0].secret.secretName
- value: sam-mesh-router-token
+ value: agentmesh-router-token
- it: image.tag overrides global.imageTag for the router only
set:
@@ -153,7 +153,7 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].image
- value: sam-router:v9
+ value: agentmesh-router:v9
- it: serves metrics on a containerPort that probes use and no hostPort reaches
set:
diff --git a/charts/sam-mesh/values.yaml b/charts/agentmesh/values.yaml
similarity index 96%
rename from charts/sam-mesh/values.yaml
rename to charts/agentmesh/values.yaml
index 59dee9b7..bdd2dc12 100644
--- a/charts/sam-mesh/values.yaml
+++ b/charts/agentmesh/values.yaml
@@ -27,7 +27,7 @@ gateway:
controlPlane:
replicaCount: 2
image:
- repository: sam-control-plane
+ repository: agentmesh-control-plane
# Overrides global.imageTag for this image only.
tag: ""
logLevel: info
@@ -49,7 +49,7 @@ controlPlane:
# Optional: session TTL for workload OIDC enrollments (e.g. "48h"); empty uses
# the control plane default (48h).
workloadSessionTtl: ""
- allowedAudiences: "agentmesh-audience,sam-control-plane-audience"
+ allowedAudiences: "agentmesh-audience,agentmesh-control-plane-audience"
nodeSelector: {}
tolerations: []
affinity: {}
@@ -83,11 +83,11 @@ database:
image:
repository: postgres
tag: 16-alpine
- user: sam
+ user: agentmesh
# Leave empty to auto-generate a random password on first install (kept
# stable across upgrades). Set explicitly (e.g. via --set) to pin a known value.
password: ""
- database: sam_mesh
+ database: agentmesh
port: 5432
sslmode: disable
storageSize: 1Gi
@@ -142,7 +142,7 @@ router:
capabilities:
drop: ["ALL"]
image:
- repository: sam-router
+ repository: agentmesh-router
# Overrides global.imageTag for this image only.
tag: ""
useOidcToken: false
@@ -183,7 +183,7 @@ console:
# proxy that drops the header leaves session cookies without Secure.
externalUrl: ""
image:
- repository: sam-console
+ repository: agentmesh-console
# Overrides global.imageTag for this image only.
tag: ""
nodeSelector: {}
@@ -226,7 +226,7 @@ bootstrap:
# intentionally public mesh.
nodeServices: []
# Label patterns ("key=value" or "key=*") mesh:role:node may attest with the
- # labels in its sam-node.yaml. Empty means nodes cannot enroll with any label
+ # labels in its agentmesh-node.yaml. Empty means nodes cannot enroll with any label
# (fail closed).
nodeLabels: []
diff --git a/charts/sam-node/Chart.yaml b/charts/sam-node/Chart.yaml
deleted file mode 100644
index 0180780a..00000000
--- a/charts/sam-node/Chart.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-apiVersion: v2
-name: sam-node
-description: A Helm chart for deploying a SAM node, optionally hosting a service as a sidecar
-type: application
-version: 0.1.0
-appVersion: "1.0.0"
diff --git a/charts/sam-node/templates/configmap.yaml b/charts/sam-node/templates/configmap.yaml
deleted file mode 100644
index 6c7fde64..00000000
--- a/charts/sam-node/templates/configmap.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "sam-node.fullname" . }}-config
- labels:
- {{- include "sam-node.labels" . | nindent 4 }}
-data:
- sam-node.yaml: |
- {{- .Values.config | toYaml | nindent 4 }}
diff --git a/deploy/skypilot/sam-one.yaml b/deploy/skypilot/agentmesh-one.yaml
similarity index 58%
rename from deploy/skypilot/sam-one.yaml
rename to deploy/skypilot/agentmesh-one.yaml
index a8bd65a5..d310175c 100644
--- a/deploy/skypilot/sam-one.yaml
+++ b/deploy/skypilot/agentmesh-one.yaml
@@ -1,13 +1,13 @@
-# SkyPilot recipe for deploying a standalone SAM control plane + router (sam-one)
+# SkyPilot recipe for deploying a standalone SAM control plane + router (agentmesh-one)
# on any cloud provider (GCP, AWS, Azure, OCI, or Kubernetes).
#
# Production deployment with a permanent custom domain:
-# sky launch -y -c sam-hub deploy/skypilot/sam-one.yaml --detach-run \
-# --env SAM_EXTERNAL_URL=https://mesh.example.com \
-# --secret SAM_TUNNEL_TOKEN
+# sky launch -y -c sam-hub deploy/skypilot/agentmesh-one.yaml --detach-run \
+# --env AGENTMESH_EXTERNAL_URL=https://mesh.example.com \
+# --secret AGENTMESH_TUNNEL_TOKEN
#
# Quick deployment with an automatic HTTPS tunnel:
-# sky launch -y -c sam-hub deploy/skypilot/sam-one.yaml --detach-run
+# sky launch -y -c sam-hub deploy/skypilot/agentmesh-one.yaml --detach-run
# sky logs sam-hub 1 --no-follow
#
# Note: For lightweight testing, you can lower `cpus: 0.25+` and `memory: 1+`
@@ -25,43 +25,43 @@ resources:
memory: 4+
envs:
- SAM_EXTERNAL_URL: ""
+ AGENTMESH_EXTERNAL_URL: ""
secrets:
- SAM_TUNNEL_TOKEN: ""
+ AGENTMESH_TUNNEL_TOKEN: ""
setup: |
set -euo pipefail
- if ! command -v sam-one >/dev/null 2>&1; then
+ if ! command -v agentmesh-one >/dev/null 2>&1; then
ARCH="$(uname -m)"
case "${ARCH}" in
x86_64*) ARCH_NAME="x86_64" ;;
aarch64*|arm64*) ARCH_NAME="arm64" ;;
*) echo "Unsupported architecture: ${ARCH}" >&2; exit 1 ;;
esac
- VERSION=$(curl -fsSL -o /dev/null -w "%{url_effective}" "https://github.com/google/sam/releases/latest" | sed 's|.*/||')
+ VERSION=$(curl -fsSL -o /dev/null -w "%{url_effective}" "https://github.com/google/agentmesh/releases/latest" | sed 's|.*/||')
if [[ -z "${VERSION}" || "${VERSION}" == "releases" ]]; then
- VERSION=$(curl -fsSL "https://api.github.com/repos/google/sam/releases?per_page=1" | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')
+ VERSION=$(curl -fsSL "https://api.github.com/repos/google/agentmesh/releases?per_page=1" | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')
fi
TMP_DIR=$(mktemp -d)
- curl -fsSL -o "${TMP_DIR}/sam.tar.gz" "https://github.com/google/sam/releases/download/${VERSION}/sam_Linux_${ARCH_NAME}.tar.gz"
+ curl -fsSL -o "${TMP_DIR}/sam.tar.gz" "https://github.com/google/agentmesh/releases/download/${VERSION}/sam_Linux_${ARCH_NAME}.tar.gz"
tar -xzf "${TMP_DIR}/sam.tar.gz" -C "${TMP_DIR}"
- sudo mv "${TMP_DIR}/sam-one" "${TMP_DIR}/sam-node" /usr/local/bin/
+ sudo mv "${TMP_DIR}/agentmesh-one" "${TMP_DIR}/agentmesh-node" /usr/local/bin/
rm -rf "${TMP_DIR}"
fi
run: |
set -euo pipefail
- mkdir -p "${HOME}/sam-one"
+ mkdir -p "${HOME}/agentmesh-one"
ARGS=(
- --data-dir "${HOME}/sam-one"
+ --data-dir "${HOME}/agentmesh-one"
--port 8080
--tunnel cloudflare
--tunnel-install
)
- if [[ -n "${SAM_EXTERNAL_URL:-}" ]]; then
- ARGS+=(--external-url "${SAM_EXTERNAL_URL}")
+ if [[ -n "${AGENTMESH_EXTERNAL_URL:-}" ]]; then
+ ARGS+=(--external-url "${AGENTMESH_EXTERNAL_URL}")
fi
- exec sam-one "${ARGS[@]}"
+ exec agentmesh-one "${ARGS[@]}"
diff --git a/development/deploy-kind-service.sh b/development/deploy-kind-service.sh
index 9f6366e9..ced42618 100755
--- a/development/deploy-kind-service.sh
+++ b/development/deploy-kind-service.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Build, load and install a service into the kind mesh from a directory holding
-# a Dockerfile and a charts/sam-node values.yaml (e.g. development/examples/calc-mcp).
+# a Dockerfile and a charts/agentmesh-node values.yaml (e.g. development/examples/calc-mcp).
# --release-name deploys the same directory as several nodes; anything else
# after the directory passes to helm (e.g. --set replicaCount=3).
set -euo pipefail
@@ -32,9 +32,9 @@ fi
set -x
docker build -t "${NAME}:local" "${DIR}"
-kind load docker-image --name sam-kind "${NAME}:local"
-"${HELM}" --kube-context kind-sam-kind -n sam-kind upgrade --install "${RELEASE}" "${PROJECT_ROOT}/charts/sam-node" \
- -f "${PROJECT_ROOT}/development/kind/sam-node.values.yaml" \
+kind load docker-image --name agentmesh-kind "${NAME}:local"
+"${HELM}" --kube-context kind-agentmesh-kind -n agentmesh-kind upgrade --install "${RELEASE}" "${PROJECT_ROOT}/charts/agentmesh-node" \
+ -f "${PROJECT_ROOT}/development/kind/agentmesh-node.values.yaml" \
-f "${DIR}/values.yaml" ${HELM_ARGS[@]+"${HELM_ARGS[@]}"}
-kubectl --context kind-sam-kind -n sam-kind rollout status deployment \
- -l "app.kubernetes.io/name=sam-node,app.kubernetes.io/instance=${RELEASE}" --timeout=180s
+kubectl --context kind-agentmesh-kind -n agentmesh-kind rollout status deployment \
+ -l "app.kubernetes.io/name=agentmesh-node,app.kubernetes.io/instance=${RELEASE}" --timeout=180s
diff --git a/development/examples/chat-a2a/README.md b/development/examples/chat-a2a/README.md
index 3d5f1270..f72da525 100644
--- a/development/examples/chat-a2a/README.md
+++ b/development/examples/chat-a2a/README.md
@@ -13,12 +13,12 @@ Edit `Dockerfile` and replace `<API_KEY>` in `ENV GEMINI_API_KEY=<API_KEY>`
## 2. Bring the mesh up and deploy the agent
```sh
-make build # builds ./bin/sam-node (once)
-make kind-up # control plane + router (no sam-nodes yet)
+make build # builds ./bin/agentmesh-node (once)
+make kind-up # control plane + router (no agentmesh-nodes yet)
docker build -t chat-a2a:local development/examples/chat-a2a
-kind load docker-image --name sam-kind chat-a2a:local
-helm --kube-context kind-sam-kind -n sam-kind install chat-a2a charts/sam-node \
- -f development/kind/sam-node.values.yaml \
+kind load docker-image --name agentmesh-kind chat-a2a:local
+helm --kube-context kind-agentmesh-kind -n agentmesh-kind install chat-a2a charts/agentmesh-node \
+ -f development/kind/agentmesh-node.values.yaml \
-f development/examples/chat-a2a/values.yaml
```
diff --git a/development/examples/chat-a2a/chat.py b/development/examples/chat-a2a/chat.py
index c63e7921..e1b72383 100644
--- a/development/examples/chat-a2a/chat.py
+++ b/development/examples/chat-a2a/chat.py
@@ -11,7 +11,7 @@ from a2a.types import Message, Part, Role, SendMessageRequest
async def main(url: str) -> None:
- token = os.environ.get("SAM_API_TOKEN", "devtoken")
+ token = os.environ.get("AGENTMESH_API_TOKEN", "devtoken")
async with httpx.AsyncClient(timeout=120, headers={"X-Mesh-Authentication": f"Bearer {token}"}) as http:
card = await A2ACardResolver(http, url).get_agent_card()
print(f"{card.name}: {card.description}")
diff --git a/development/examples/code-reviewer-pool/manager/server.mjs b/development/examples/code-reviewer-pool/manager/server.mjs
index df506665..d7f30cfa 100644
--- a/development/examples/code-reviewer-pool/manager/server.mjs
+++ b/development/examples/code-reviewer-pool/manager/server.mjs
@@ -7,13 +7,13 @@ import { z } from "zod";
import { mintToken } from "./lease-token.mjs";
const PORT = Number(process.env.PORT ?? 7780);
-const NODE_URL = process.env.SAM_NODE_URL ?? "http://127.0.0.1:8080/mcp";
-const API_TOKEN = process.env.SAM_API_TOKEN ?? "devtoken";
-const POOL_SERVICE = process.env.SAM_POOL_SERVICE ?? "code-reviewer";
-const DISCOVERY_MS = Number(process.env.SAM_DISCOVERY_MS ?? 3000);
-const LEASE_MS = Number(process.env.SAM_LEASE_MS ?? 60000);
-const GRACE_MISSES = Number(process.env.SAM_GRACE_MISSES ?? 2);
-const POOL_SECRET = process.env.SAM_POOL_SECRET ?? "sam-dev-pool-secret"; // shared dev secret; enforcement always on
+const NODE_URL = process.env.AGENTMESH_NODE_URL ?? "http://127.0.0.1:8080/mcp";
+const API_TOKEN = process.env.AGENTMESH_API_TOKEN ?? "devtoken";
+const POOL_SERVICE = process.env.AGENTMESH_POOL_SERVICE ?? "code-reviewer";
+const DISCOVERY_MS = Number(process.env.AGENTMESH_DISCOVERY_MS ?? 3000);
+const LEASE_MS = Number(process.env.AGENTMESH_LEASE_MS ?? 60000);
+const GRACE_MISSES = Number(process.env.AGENTMESH_GRACE_MISSES ?? 2);
+const POOL_SECRET = process.env.AGENTMESH_POOL_SECRET ?? "sam-dev-pool-secret"; // shared dev secret; enforcement always on
const ACQUIRE_POLL_MS = 200;
// roster: peer_id -> { tool, leasedUntil, leaseId, missCount }.
diff --git a/development/examples/code-reviewer-pool/reviewer/review_server.mjs b/development/examples/code-reviewer-pool/reviewer/review_server.mjs
index cb24dd9c..faa8e439 100644
--- a/development/examples/code-reviewer-pool/reviewer/review_server.mjs
+++ b/development/examples/code-reviewer-pool/reviewer/review_server.mjs
@@ -14,7 +14,7 @@ const REVIEW_PROMPT =
// Single-flight backstop: reject a concurrent call so the one-at-a-time pool
// invariant holds even if a manager lease race hands this worker out twice.
const POOL_BUSY = "POOL_BUSY";
-const POOL_SECRET = process.env.SAM_POOL_SECRET ?? "sam-dev-pool-secret"; // shared dev secret; enforcement always on
+const POOL_SECRET = process.env.AGENTMESH_POOL_SECRET ?? "sam-dev-pool-secret"; // shared dev secret; enforcement always on
const NO_LEASE = "NO_LEASE";
let busy = false;
diff --git a/development/examples/multi-tier-guardrails/Makefile b/development/examples/multi-tier-guardrails/Makefile
index a1a8d788..16882ce6 100644
--- a/development/examples/multi-tier-guardrails/Makefile
+++ b/development/examples/multi-tier-guardrails/Makefile
@@ -6,13 +6,13 @@
WORK_DIR ?= /tmp/sam-record-guardrails
CP_URL ?= http://127.0.0.1:18190
REPO_BIN := $(abspath ../../../bin)
-SAM_ONE ?= $(if $(wildcard $(REPO_BIN)/sam-one),$(REPO_BIN)/sam-one,sam-one)
-SAM_NODE ?= $(if $(wildcard $(REPO_BIN)/sam-node),$(REPO_BIN)/sam-node,sam-node)
+AGENTMESH_ONE ?= $(if $(wildcard $(REPO_BIN)/agentmesh-one),$(REPO_BIN)/agentmesh-one,agentmesh-one)
+AGENTMESH_NODE ?= $(if $(wildcard $(REPO_BIN)/agentmesh-node),$(REPO_BIN)/agentmesh-node,agentmesh-node)
.PHONY: node-v1-staging node-v1-prod
node-v1-staging:
- $(SAM_NODE) run --control-plane "$(CP_URL)" --insecure-control-plane \
+ $(AGENTMESH_NODE) run --control-plane "$(CP_URL)" --insecure-control-plane \
--bootstrap-token-path "$(WORK_DIR)/dev-v1.token" \
--config node-v1.yaml --secrets-dir "$(WORK_DIR)/secrets" \
--data-dir "$(WORK_DIR)/node-v1" --bind-addr 127.0.0.1:19101 --socket-path="" \
@@ -21,7 +21,7 @@ node-v1-staging:
--allow-loopback --control-plane-sync-interval 5s
node-v1-prod:
- $(SAM_NODE) run --control-plane "$(CP_URL)" --insecure-control-plane \
+ $(AGENTMESH_NODE) run --control-plane "$(CP_URL)" --insecure-control-plane \
--bootstrap-token-path "$(WORK_DIR)/dev-v1-prod.token" \
--config "$(WORK_DIR)/node-v1-prod.yaml" --secrets-dir "$(WORK_DIR)/secrets" \
--data-dir "$(WORK_DIR)/node-v1" --bind-addr 127.0.0.1:19101 --socket-path="" \
diff --git a/development/examples/multi-tier-guardrails/SCRIPT.md b/development/examples/multi-tier-guardrails/SCRIPT.md
index 9dbf9b7f..7bf33477 100644
--- a/development/examples/multi-tier-guardrails/SCRIPT.md
+++ b/development/examples/multi-tier-guardrails/SCRIPT.md
@@ -1,6 +1,6 @@
# Multi-Tier Guardrails & Quality Gates — Recording Script
-A ~3.5-minute terminal recording demonstrating how SAM serves all **5 enterprise personas** across **4 acts** with real backends (`gemma3:1b` on Ollama, official `a2a-sdk`, official `mcp` SDK + SQLite, and `api.github.com`). Every config file (`node-v1.yaml`, `node-caller.yaml`, `node-v2.yaml`, `node-contractor.yaml`, `policy.json`) and every command (`sam-node join`, `make node-v1-staging`, `curl`, `python3 a2a_client.py`, `mcp-client`, `sam-one admin ban`) is shown directly on screen.
+A ~3.5-minute terminal recording demonstrating how SAM serves all **5 enterprise personas** across **4 acts** with real backends (`gemma3:1b` on Ollama, official `a2a-sdk`, official `mcp` SDK + SQLite, and `api.github.com`). Every config file (`node-v1.yaml`, `node-caller.yaml`, `node-v2.yaml`, `node-contractor.yaml`, `policy.json`) and every command (`agentmesh-node join`, `make node-v1-staging`, `curl`, `python3 a2a_client.py`, `mcp-client`, `agentmesh-one admin ban`) is shown directly on screen.
## Scenes
@@ -14,7 +14,7 @@ cat node-v1.yaml
# admin (Label Point 1 — Mesh Enforcement)
jq -c '.roles[0].allowed_labels' policy.json
sed 's/staging/prod/' node-v1.yaml > $WORK_DIR/node-v1-prod.yaml && \
- sam-node join $CP_URL --insecure-control-plane \
+ agentmesh-node join $CP_URL --insecure-control-plane \
--bootstrap-token-path $WORK_DIR/dev-spoof.token \
--config $WORK_DIR/node-v1-prod.yaml --data-dir $WORK_DIR/spoof
@@ -60,10 +60,10 @@ python3 a2a_client.py http://127.0.0.1:19102/mesh/$V2_PEER/a2a/support.acme \
# Layer 1 — Central Security (Org HTTP Policy + Secret Brokering)
jq -c '.roles[0].http[0], .egress[0]' policy.json
curl -s -H 'X-Mesh-Authentication: Bearer caller-secret' \
- "http://127.0.0.1:19102/mesh/$V1_PEER/egress/api.github.com/repos/google/sam/pulls?state=open&per_page=1" | \
+ "http://127.0.0.1:19102/mesh/$V1_PEER/egress/api.github.com/repos/google/agentmesh/pulls?state=open&per_page=1" | \
jq -c '.[0] | {number, title}'
curl -i -s -X POST -H 'X-Mesh-Authentication: Bearer caller-secret' \
- http://127.0.0.1:19102/mesh/$V1_PEER/egress/api.github.com/repos/google/sam/pulls -d '{}' | head -n 5
+ http://127.0.0.1:19102/mesh/$V1_PEER/egress/api.github.com/repos/google/agentmesh/pulls -d '{}' | head -n 5
# Layer 2 — Department Lead (Label Point 2b — Egress Node Positive Check)
cat node-contractor.yaml
@@ -85,7 +85,7 @@ mcp-client -url http://127.0.0.1:19102/mcp -token $TASK_BISCUIT -tool call_remot
```bash
# admin
-sam-one admin ban $CONTRACTOR_PEER --server $CP_URL --data-dir $WORK_DIR/one
+agentmesh-one admin ban $CONTRACTOR_PEER --server $CP_URL --data-dir $WORK_DIR/one
```
## Recording
diff --git a/development/examples/multi-tier-guardrails/a2a_client.py b/development/examples/multi-tier-guardrails/a2a_client.py
index fa8bff99..7a6a3cda 100755
--- a/development/examples/multi-tier-guardrails/a2a_client.py
+++ b/development/examples/multi-tier-guardrails/a2a_client.py
@@ -27,7 +27,7 @@ from a2a.types import Message, Part, Role, SendMessageRequest
async def send_once(url: str, prompt: str, context_id: str, required_labels: str = "") -> None:
- token = os.environ.get("SAM_API_TOKEN", "")
+ token = os.environ.get("AGENTMESH_API_TOKEN", "")
headers = {"X-Mesh-Authentication": f"Bearer {token}"}
if required_labels:
headers["X-Mesh-Required-Labels"] = required_labels
diff --git a/development/examples/multi-tier-guardrails/audit.py b/development/examples/multi-tier-guardrails/audit.py
index 548b64f5..731a3f0d 100644
--- a/development/examples/multi-tier-guardrails/audit.py
+++ b/development/examples/multi-tier-guardrails/audit.py
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-"""Reads a sam-node log on stdin and prints one line per authorization or task decision."""
+"""Reads a agentmesh-node log on stdin and prints one line per authorization or task decision."""
import json
import re
@@ -20,7 +20,7 @@ import sys
AUDIT = re.compile(r"Audit Traceability\s+(\{.*\})\s*$")
TAR_DENY = re.compile(r'task authorization denied tool "([^"]+)".*tar_block\[1\] \("([^"]+)"\)')
-KEEP = re.compile(r"\[Egress\] (Serving|Withdrawn)|peer banned|SAM Node Online|PeerID:")
+KEEP = re.compile(r"\[Egress\] (Serving|Withdrawn)|peer banned|Agent Mesh Node Online|PeerID:")
for raw_line in sys.stdin:
line = raw_line.rstrip("\n")
diff --git a/development/examples/multi-tier-guardrails/orders_mcp.py b/development/examples/multi-tier-guardrails/orders_mcp.py
index cb3f507c..d73df184 100755
--- a/development/examples/multi-tier-guardrails/orders_mcp.py
+++ b/development/examples/multi-tier-guardrails/orders_mcp.py
@@ -13,13 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-"""Orders & Refunds MCP server backed by SQLite, exposed via sam-node."""
+"""Orders & Refunds MCP server backed by SQLite, exposed via agentmesh-node."""
import os
import sqlite3
from mcp.server.mcpserver import MCPServer
-DB_PATH = os.environ.get("ORDERS_DB_PATH", "/tmp/sam-multi-tier-orders.db")
+DB_PATH = os.environ.get("ORDERS_DB_PATH", "/tmp/agentmesh-multi-tier-orders.db")
PORT = int(os.environ.get("ORDERS_MCP_PORT", "18888"))
diff --git a/development/examples/multi-tier-guardrails/policy.json b/development/examples/multi-tier-guardrails/policy.json
index baddce2e..6c618acd 100644
--- a/development/examples/multi-tier-guardrails/policy.json
+++ b/development/examples/multi-tier-guardrails/policy.json
@@ -21,7 +21,7 @@
{
"service": "egress://api.github.com",
"methods": ["GET"],
- "paths": ["/repos/google/sam/pulls*"]
+ "paths": ["/repos/google/agentmesh/pulls*"]
}
]
}
diff --git a/development/examples/multi-tier-guardrails/record.sh b/development/examples/multi-tier-guardrails/record.sh
index dd232fa4..a5aaf00d 100755
--- a/development/examples/multi-tier-guardrails/record.sh
+++ b/development/examples/multi-tier-guardrails/record.sh
@@ -15,9 +15,9 @@
# Records SCRIPT.md for the Multi-Tier Guardrails & Quality Gates example.
# Every config file (node-v1.yaml, node-caller.yaml, node-v2.yaml,
-# node-contractor.yaml, policy.json) and every command (sam-node join,
+# node-contractor.yaml, policy.json) and every command (agentmesh-node join,
# make node-v1-staging, curl, python3 a2a_client.py, mcp-client,
-# sam-one admin ban) is typed directly in the panes — no hidden wrapper
+# agentmesh-one admin ban) is typed directly in the panes — no hidden wrapper
# functions.
set -o errexit
@@ -42,11 +42,11 @@ PYTHON=$VENV_DIR/bin/python
export ORDERS_DB_PATH=$WORK_DIR/orders.db
export LLM_MODEL=${LLM_MODEL:-gemma3:1b}
-SAM_ONE=$REPO_ROOT/bin/sam-one
-SAM_NODE=$REPO_ROOT/bin/sam-node
+AGENTMESH_ONE=$REPO_ROOT/bin/agentmesh-one
+AGENTMESH_NODE=$REPO_ROOT/bin/agentmesh-node
MCP_CLIENT=$REPO_ROOT/bin/mcp-client
-if [[ ! -x "$SAM_ONE" || ! -x "$SAM_NODE" || ! -x "$MCP_CLIENT" ]]; then
+if [[ ! -x "$AGENTMESH_ONE" || ! -x "$AGENTMESH_NODE" || ! -x "$MCP_CLIENT" ]]; then
make -C "$REPO_ROOT" build
fi
@@ -57,10 +57,10 @@ fi
"$VENV_DIR/bin/pip" install -q -r "$HERE/requirements.txt"
if ! curl -sf http://127.0.0.1:11434/v1/models >/dev/null 2>&1; then
- docker start sam-demo-ollama >/dev/null 2>&1 || \
- docker run -d --name sam-demo-ollama -p 127.0.0.1:11434:11434 -v sam-demo-ollama:/root/.ollama ollama/ollama >/dev/null
+ docker start agentmesh-demo-ollama >/dev/null 2>&1 || \
+ docker run -d --name agentmesh-demo-ollama -p 127.0.0.1:11434:11434 -v agentmesh-demo-ollama:/root/.ollama ollama/ollama >/dev/null
for _ in $(seq 1 30); do curl -sf http://127.0.0.1:11434/ >/dev/null && break; sleep 1; done
- docker exec sam-demo-ollama ollama pull "$LLM_MODEL" >/dev/null
+ docker exec agentmesh-demo-ollama ollama pull "$LLM_MODEL" >/dev/null
fi
mkdir -p "$OUT"
@@ -177,16 +177,16 @@ for _ in $(seq 1 120); do
sleep 0.25
done
-# Start sam-one control plane + router in background
+# Start agentmesh-one control plane + router in background
CP_URL="http://127.0.0.1:18190"
-"$SAM_ONE" \
+"$AGENTMESH_ONE" \
--data-dir "$WORK_DIR/one" \
--port 18190 \
--policy-file "$HERE/policy.json" \
--no-join-token \
--enroll-qr=false \
- --log-level warn > "$WORK_DIR/sam-one.log" 2>&1 &
-echo $! > "$WORK_DIR/sam-one.pid"
+ --log-level warn > "$WORK_DIR/agentmesh-one.log" 2>&1 &
+echo $! > "$WORK_DIR/agentmesh-one.pid"
for _ in $(seq 1 80); do
if [[ -s "$WORK_DIR/one/admin-token" ]] && curl -sf "$CP_URL/readyz" >/dev/null; then
@@ -197,7 +197,7 @@ done
ADMIN_TOKEN=$(cat "$WORK_DIR/one/admin-token")
mint_tok() {
- "$SAM_ONE" token create --server "$CP_URL" --data-dir "$WORK_DIR/one" \
+ "$AGENTMESH_ONE" token create --server "$CP_URL" --data-dir "$WORK_DIR/one" \
--max-usages 1 --description "$1" 2>/dev/null | awk '/^Token:/ {print $2}' > "$2"
chmod 600 "$2"
}
@@ -209,7 +209,7 @@ mint_tok "cloudrun-v2-prod" "$WORK_DIR/dev-v2.token"
mint_tok "contractor-node" "$WORK_DIR/contractor.token"
# Start Input / Caller Node with node-caller.yaml (egress.require_labels: {env: prod})
-"$SAM_NODE" run \
+"$AGENTMESH_NODE" run \
--control-plane "$CP_URL" --insecure-control-plane \
--bootstrap-token-path "$WORK_DIR/caller.token" \
--config "$HERE/node-caller.yaml" \
@@ -221,7 +221,7 @@ mint_tok "contractor-node" "$WORK_DIR/contractor.token"
echo $! > "$WORK_DIR/node-caller.pid"
# Start Contractor Node with node-contractor.yaml (labels: {team: contractor})
-"$SAM_NODE" run \
+"$AGENTMESH_NODE" run \
--control-plane "$CP_URL" --insecure-control-plane \
--bootstrap-token-path "$WORK_DIR/contractor.token" \
--config "$HERE/node-contractor.yaml" \
@@ -233,8 +233,8 @@ echo $! > "$WORK_DIR/node-caller.pid"
echo $! > "$WORK_DIR/node-contractor.pid"
for _ in $(seq 1 40); do
- if grep -q "SAM Node Online" "$WORK_DIR/node-caller.log" 2>/dev/null && \
- grep -q "SAM Node Online" "$WORK_DIR/node-contractor.log" 2>/dev/null; then
+ if grep -q "Agent Mesh Node Online" "$WORK_DIR/node-caller.log" 2>/dev/null && \
+ grep -q "Agent Mesh Node Online" "$WORK_DIR/node-contractor.log" 2>/dev/null; then
break
fi
sleep 0.25
@@ -282,7 +282,7 @@ while True:
EOF
tmux send-keys -t "$CAPTION" "python3 /tmp/samguardrails-caption.py $CAPTION_FILE $COLS $CAPTION_CPS" Enter
-ENV_SETUP="export PATH=$REPO_ROOT/bin:$VENV_DIR/bin:\$PATH CP_URL=$CP_URL ADMIN_TOKEN=$ADMIN_TOKEN WORK_DIR=$WORK_DIR NODE=http://127.0.0.1:19102 SAM_API_TOKEN=caller-secret CONTRACTOR_PEER=$CONTRACTOR_PEER"
+ENV_SETUP="export PATH=$REPO_ROOT/bin:$VENV_DIR/bin:\$PATH CP_URL=$CP_URL ADMIN_TOKEN=$ADMIN_TOKEN WORK_DIR=$WORK_DIR NODE=http://127.0.0.1:19102 AGENTMESH_API_TOKEN=caller-secret CONTRACTOR_PEER=$CONTRACTOR_PEER"
tmux send-keys -t "$NODE" "$ENV_SETUP; PS1='node-v1\$ '; clear" Enter
tmux send-keys -t "$ADMIN" "$ENV_SETUP; PS1='admin\$ '; clear" Enter
tmux send-keys -t "$CALLER" "$ENV_SETUP CURL_HOME=$WORK_DIR; PS1='caller\$ '; clear" Enter
@@ -307,12 +307,12 @@ pause 2.5
caption "Why can't Alice just put 'env: prod' in node-v1.yaml? Point 1 is Mesh Enforcement (policy.json allowed_labels): the Control Plane rejects ungranted labels at enrollment."
expect "$ADMIN" "jq -c '.roles[0].allowed_labels' policy.json" 'env=staging' 15
-expect "$ADMIN" "sed 's/staging/prod/' node-v1.yaml > \$WORK_DIR/node-v1-prod.yaml && sam-node join \$CP_URL --insecure-control-plane --bootstrap-token-path \$WORK_DIR/dev-spoof.token --config \$WORK_DIR/node-v1-prod.yaml --data-dir \$WORK_DIR/spoof" 'Label not permitted' 30
+expect "$ADMIN" "sed 's/staging/prod/' node-v1.yaml > \$WORK_DIR/node-v1-prod.yaml && agentmesh-node join \$CP_URL --insecure-control-plane --bootstrap-token-path \$WORK_DIR/dev-spoof.token --config \$WORK_DIR/node-v1-prod.yaml --data-dir \$WORK_DIR/spoof" 'Label not permitted' 30
pause 3
caption "Alice starts her node with node-v1.yaml in env=staging. Meanwhile, on the caller side (Point 2a — Input Node Enforcement), node-caller.yaml requires egress.require_labels: env=prod."
type_in "$NODE" "make node-v1-staging 2>&1 | python3 audit.py"
-wait_for "$NODE" 'SAM Node Online' 30
+wait_for "$NODE" 'Agent Mesh Node Online' 30
V1_STAGING=$(tmux capture-pane -J -p -t "$NODE" -S -50 | awk '/PeerID:/ {print $2; exit}')
tmux send-keys -t "$CALLER" "V1_PEER=$V1_STAGING; clear" Enter
wait_for "$CALLER" 'caller\$' 10
@@ -327,7 +327,7 @@ sleep 0.5
rm -rf "$WORK_DIR/node-v1"
wait_prompt "$NODE"
type_in "$NODE" "make node-v1-prod 2>&1 | python3 audit.py"
-wait_for "$NODE" 'SAM Node Online' 30
+wait_for "$NODE" 'Agent Mesh Node Online' 30
V1_PROD=$(tmux capture-pane -J -p -t "$NODE" -S -30 | awk '/PeerID:/ {p=$2} END {print p}')
tmux send-keys -t "$CALLER" "V1_PEER=$V1_PROD" Enter
wait_for "$CALLER" 'caller\$' 10
@@ -347,7 +347,7 @@ pause 3
caption "A Cloud Run replica (node-v2.yaml, replica=v2-cloudrun) joins the mesh. On Turn 2, the caller passes X-Mesh-Required-Labels: replica=v2-cloudrun and keeps full conversation context."
expect "$CALLER" "cat node-v2.yaml" 'v2-cloudrun' 15
-"$SAM_NODE" run \
+"$AGENTMESH_NODE" run \
--control-plane "$CP_URL" --insecure-control-plane \
--bootstrap-token-path "$WORK_DIR/dev-v2.token" --config "$HERE/node-v2.yaml" \
--data-dir "$WORK_DIR/node-v2" --bind-addr 127.0.0.1:19103 --socket-path="" \
@@ -355,7 +355,7 @@ expect "$CALLER" "cat node-v2.yaml" 'v2-cloudrun' 15
--api-token-path "$WORK_DIR/dev2-api.token" --allow-loopback --control-plane-sync-interval 5s > "$WORK_DIR/node-v2.log" 2>&1 &
echo $! > "$WORK_DIR/node-v2.pid"
for _ in $(seq 1 40); do
- grep -q "SAM Node Online" "$WORK_DIR/node-v2.log" 2>/dev/null && break
+ grep -q "Agent Mesh Node Online" "$WORK_DIR/node-v2.log" 2>/dev/null && break
sleep 0.25
done
V2_PEER=$(awk '/PeerID:/ {print $2; exit}' "$WORK_DIR/node-v2.log")
@@ -371,10 +371,10 @@ pause 3
# --- Act 3: 3-Tier Guardrails -----------------------------------------------
-caption "Act 3, Layer 1 (Central Security): policy.json grants GET /repos/google/sam/pulls* on egress://api.github.com and injects secrets/github-ro. POST is blocked with 403."
+caption "Act 3, Layer 1 (Central Security): policy.json grants GET /repos/google/agentmesh/pulls* on egress://api.github.com and injects secrets/github-ro. POST is blocked with 403."
expect "$ADMIN" "jq -c '.roles[0].http[0], .egress[0]' policy.json" 'github-ro' 15
-expect "$CALLER" "curl -s \"\$NODE/mesh/\$V1_PEER/egress/api.github.com/repos/google/sam/pulls?state=open&per_page=1\" | jq -c '.[0] | {number, title}'" 'number' 30
-expect "$CALLER" "curl -i -s -X POST \$NODE/mesh/\$V1_PEER/egress/api.github.com/repos/google/sam/pulls -d '{}' | head -n 5" '403 Forbidden' 30
+expect "$CALLER" "curl -s \"\$NODE/mesh/\$V1_PEER/egress/api.github.com/repos/google/agentmesh/pulls?state=open&per_page=1\" | jq -c '.[0] | {number, title}'" 'number' 30
+expect "$CALLER" "curl -i -s -X POST \$NODE/mesh/\$V1_PEER/egress/api.github.com/repos/google/agentmesh/pulls -d '{}' | head -n 5" '403 Forbidden' 30
pause 3
caption "Act 3, Layer 2 (Department Lead — Point 2b, Egress Node Label Check): node-v1.yaml requires positive 'check if label(\"team\", \"support\")', so node-contractor.yaml (team=contractor) is rejected."
@@ -390,8 +390,8 @@ pause 3.5
# --- Act 4: Day-2 Ops & Ban -------------------------------------------------
-caption "Act 4 (Day-2 Operations): Every ALLOW and DENY across all three layers is logged in the left pane. Finally, the admin bans the contractor peer with sam-one admin ban."
-expect "$ADMIN" "sam-one admin ban \$CONTRACTOR_PEER --server \$CP_URL --data-dir \$WORK_DIR/one" 'banned' 30
+caption "Act 4 (Day-2 Operations): Every ALLOW and DENY across all three layers is logged in the left pane. Finally, the admin bans the contractor peer with agentmesh-one admin ban."
+expect "$ADMIN" "agentmesh-one admin ban \$CONTRACTOR_PEER --server \$CP_URL --data-dir \$WORK_DIR/one" 'banned' 30
pause 3.5
caption "sam-mesh.dev"
diff --git a/development/examples/multi-tier-guardrails/run.sh b/development/examples/multi-tier-guardrails/run.sh
index 7dbd8ddd..8520dd6a 100755
--- a/development/examples/multi-tier-guardrails/run.sh
+++ b/development/examples/multi-tier-guardrails/run.sh
@@ -35,8 +35,8 @@ fi
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
-SAM_ONE="${REPO_ROOT}/bin/sam-one"
-SAM_NODE="${REPO_ROOT}/bin/sam-node"
+AGENTMESH_ONE="${REPO_ROOT}/bin/agentmesh-one"
+AGENTMESH_NODE="${REPO_ROOT}/bin/agentmesh-node"
MCP_CLIENT="${REPO_ROOT}/bin/mcp-client"
WORK_DIR="${WORK_DIR:-$(mktemp -d /tmp/sam-multi-tier-XXXXXX)}"
VENV_DIR="${VENV_DIR:-/tmp/sam-multi-tier-venv}"
@@ -62,8 +62,8 @@ cleanup() {
}
trap cleanup EXIT
-if [[ ! -x "${SAM_ONE}" || ! -x "${SAM_NODE}" || ! -x "${MCP_CLIENT}" ]]; then
- echo "Building sam-one, sam-node, and mcp-client..."
+if [[ ! -x "${AGENTMESH_ONE}" || ! -x "${AGENTMESH_NODE}" || ! -x "${MCP_CLIENT}" ]]; then
+ echo "Building agentmesh-one, agentmesh-node, and mcp-client..."
make -C "${REPO_ROOT}" build
fi
@@ -75,10 +75,10 @@ fi
if [[ "${LLM_BASE_URL:-http://127.0.0.1:11434/v1}" == "http://127.0.0.1:11434/v1" ]]; then
if ! curl -sf http://127.0.0.1:11434/v1/models >/dev/null 2>&1; then
- docker start sam-demo-ollama >/dev/null 2>&1 || \
- docker run -d --name sam-demo-ollama -p 127.0.0.1:11434:11434 -v sam-demo-ollama:/root/.ollama ollama/ollama >/dev/null
+ docker start agentmesh-demo-ollama >/dev/null 2>&1 || \
+ docker run -d --name agentmesh-demo-ollama -p 127.0.0.1:11434:11434 -v agentmesh-demo-ollama:/root/.ollama ollama/ollama >/dev/null
for _ in $(seq 1 30); do curl -sf http://127.0.0.1:11434/ >/dev/null && break; sleep 1; done
- docker exec sam-demo-ollama ollama pull "${LLM_MODEL}" >/dev/null
+ docker exec agentmesh-demo-ollama ollama pull "${LLM_MODEL}" >/dev/null
fi
fi
@@ -114,14 +114,14 @@ done
CP_PORT=18090
CP_URL="http://127.0.0.1:${CP_PORT}"
-"${SAM_ONE}" \
+"${AGENTMESH_ONE}" \
--data-dir "${WORK_DIR}/one" \
--port "${CP_PORT}" \
--policy-file "${SCRIPT_DIR}/policy.json" \
--no-join-token \
--enroll-qr=false \
- --log-level info >"${WORK_DIR}/sam-one.log" 2>&1 &
-echo $! > "${WORK_DIR}/sam-one.pid"
+ --log-level info >"${WORK_DIR}/agentmesh-one.log" 2>&1 &
+echo $! > "${WORK_DIR}/agentmesh-one.pid"
for _ in $(seq 1 80); do
if [[ -s "${WORK_DIR}/one/admin-token" ]] && curl -sf "${CP_URL}/readyz" >/dev/null; then
@@ -140,7 +140,7 @@ chmod 600 "${WORK_DIR}"/*.token
create_bootstrap_token() {
local desc="$1"
local out="$2"
- "${SAM_ONE}" token create \
+ "${AGENTMESH_ONE}" token create \
--server "${CP_URL}" \
--data-dir "${WORK_DIR}/one" \
--max-usages 1 \
@@ -155,7 +155,7 @@ create_bootstrap_token "cloudrun-v2-prod" "${WORK_DIR}/dev-v2.token"
create_bootstrap_token "contractor-node" "${WORK_DIR}/contractor.token"
# Start Input / Caller Node with node-caller.yaml (egress.require_labels: {env: prod})
-"${SAM_NODE}" run \
+"${AGENTMESH_NODE}" run \
--control-plane "${CP_URL}" \
--insecure-control-plane \
--bootstrap-token-path "${WORK_DIR}/caller.token" \
@@ -176,7 +176,7 @@ echo " (Personas: Agent Developer Alice + Central Security / Platform)"
echo "================================================================================"
echo ""
echo "--> Alice (Developer) enrolls her node in staging quarantine (env=staging, team=support)..."
-"${SAM_NODE}" run \
+"${AGENTMESH_NODE}" run \
--control-plane "${CP_URL}" \
--insecure-control-plane \
--bootstrap-token-path "${WORK_DIR}/dev-v1.token" \
@@ -208,7 +208,7 @@ echo "--> Why can't Alice just set 'env: prod' in her node YAML, or the caller s
echo " [Label Point 1 — Mesh Enforcement (policy.json allowed_labels)]:"
sed 's/env: staging/env: prod/' "${SCRIPT_DIR}/node-v1.yaml" > "${WORK_DIR}/node-v1-prod.yaml"
set +e
-SPOOF_OUT="$("${SAM_NODE}" join "${CP_URL}" \
+SPOOF_OUT="$("${AGENTMESH_NODE}" join "${CP_URL}" \
--insecure-control-plane \
--bootstrap-token-path "${WORK_DIR}/dev-spoof.token" \
--config "${WORK_DIR}/node-v1-prod.yaml" \
@@ -238,7 +238,7 @@ kill -9 "$(cat "${WORK_DIR}/node-v1.pid")" 2>/dev/null || true
rm -rf "${WORK_DIR}/node-v1"
create_bootstrap_token "dev-laptop-v1-prod" "${WORK_DIR}/dev-v1.token"
-"${SAM_NODE}" run \
+"${AGENTMESH_NODE}" run \
--control-plane "${CP_URL}" \
--insecure-control-plane \
--bootstrap-token-path "${WORK_DIR}/dev-v1.token" \
@@ -291,7 +291,7 @@ echo ""
echo "--> [Label Point 3 — End-User/Agent Intent (X-Mesh-Required-Labels)]:"
echo " Within the Input Node's mandatory env=prod floor, the calling agent passes"
echo " 'X-Mesh-Required-Labels: replica=v1-laptop' on Turn 1 to express replica intent:"
-TURN1_REPLY="$(SAM_API_TOKEN=caller-secret "${PYTHON}" "${SCRIPT_DIR}/a2a_client.py" \
+TURN1_REPLY="$(AGENTMESH_API_TOKEN=caller-secret "${PYTHON}" "${SCRIPT_DIR}/a2a_client.py" \
"http://127.0.0.1:19002/mesh/${V1_PEER}/a2a/support.acme" \
"ctx-acme-1042" \
"Check order #1042 for [email protected] and tell me the item and status." \
@@ -300,7 +300,7 @@ echo " Turn 1 Reply: ${TURN1_REPLY}"
echo ""
echo "--> Starting Cloud Run v2 replica serving a2a://support.acme (env=prod, replica=v2-cloudrun)..."
-"${SAM_NODE}" run \
+"${AGENTMESH_NODE}" run \
--control-plane "${CP_URL}" \
--insecure-control-plane \
--bootstrap-token-path "${WORK_DIR}/dev-v2.token" \
@@ -330,7 +330,7 @@ echo " Discovered Cloud Run v2 PeerID: ${V2_PEER}"
echo ""
echo "--> Sending Turn 2 (preserving contextId=ctx-acme-1042) with 'X-Mesh-Required-Labels: replica=v2-cloudrun'..."
-TURN2_REPLY="$(SAM_API_TOKEN=caller-secret "${PYTHON}" "${SCRIPT_DIR}/a2a_client.py" \
+TURN2_REPLY="$(AGENTMESH_API_TOKEN=caller-secret "${PYTHON}" "${SCRIPT_DIR}/a2a_client.py" \
"http://127.0.0.1:19002/mesh/${V2_PEER}/a2a/support.acme" \
"ctx-acme-1042" \
"Based on our previous turn, what item did Alice order and has it shipped?" \
@@ -347,25 +347,25 @@ echo ""
echo "--> [Layer 1: Central Security Org Policy + Secret Broker] Calling real egress://api.github.com..."
GH_ALLOW="$(curl -sf -H "X-Mesh-Authentication: Bearer caller-secret" \
-H "Accept: application/vnd.github+json" \
- -H "User-Agent: sam-multi-tier-demo" \
- "http://127.0.0.1:19002/mesh/${V1_PEER}/egress/api.github.com/repos/google/sam/pulls?state=open&per_page=1")"
+ -H "User-Agent: agentmesh-multi-tier-demo" \
+ "http://127.0.0.1:19002/mesh/${V1_PEER}/egress/api.github.com/repos/google/agentmesh/pulls?state=open&per_page=1")"
PR_SUMMARY="$(echo "${GH_ALLOW}" | jq -r 'if type=="array" and length>0 then "#\(.[0].number) \(.[0].title)" else "200 OK (open PRs queried)" end')"
-echo " Allowed Path (GET /repos/google/sam/pulls): HTTP 200 OK — ${PR_SUMMARY} (node injected secrets/github-ro)"
+echo " Allowed Path (GET /repos/google/agentmesh/pulls): HTTP 200 OK — ${PR_SUMMARY} (node injected secrets/github-ro)"
GH_DENY_CODE="$(curl -s -o "${WORK_DIR}/gh-deny.out" -w '%{http_code}' \
-X POST \
-H "X-Mesh-Authentication: Bearer caller-secret" \
-H "Accept: application/vnd.github+json" \
- -H "User-Agent: sam-multi-tier-demo" \
- "http://127.0.0.1:19002/mesh/${V1_PEER}/egress/api.github.com/repos/google/sam/pulls" \
+ -H "User-Agent: agentmesh-multi-tier-demo" \
+ "http://127.0.0.1:19002/mesh/${V1_PEER}/egress/api.github.com/repos/google/agentmesh/pulls" \
-d '{}')"
-echo " Forbidden Path (POST /repos/google/sam/pulls): HTTP ${GH_DENY_CODE} — blocked by Block 0 Org HTTP Policy before GitHub hears of it!"
+echo " Forbidden Path (POST /repos/google/agentmesh/pulls): HTTP ${GH_DENY_CODE} — blocked by Block 0 Org HTTP Policy before GitHub hears of it!"
echo ""
echo "--> [Layer 2: Department Lead Local Node Enforcement (Label Point 2b: Egress/Provider Node)]"
echo " Support Dept's node-v1.yaml requires positive 'check if label(\"team\", \"support\")'."
echo " Contractor node (attested team=contractor) attempts to call mcp://orders-db..."
-"${SAM_NODE}" run \
+"${AGENTMESH_NODE}" run \
--control-plane "${CP_URL}" \
--insecure-control-plane \
--bootstrap-token-path "${WORK_DIR}/contractor.token" \
@@ -380,7 +380,7 @@ echo " Contractor node (attested team=contractor) attempts to call mcp://orde
echo $! > "${WORK_DIR}/node-contractor.pid"
for _ in $(seq 1 30); do
- grep -q "SAM Node Online" "${WORK_DIR}/node-contractor.log" 2>/dev/null && break
+ grep -q "Agent Mesh Node Online" "${WORK_DIR}/node-contractor.log" 2>/dev/null && break
sleep 0.25
done
CONTRACTOR_PEER="$(awk '/PeerID:/ {print $2; exit}' "${WORK_DIR}/node-contractor.log")"
@@ -439,8 +439,8 @@ echo "--> Hosting Node (node-v1) Structured Audit Trail (python3 audit.py):"
"${PYTHON}" "${SCRIPT_DIR}/audit.py" < "${WORK_DIR}/node-v1.log" | sed 's/^/ /'
echo ""
-echo "--> Executing Instant Kill-Switch: banning contractor PeerID via sam-one admin ban..."
-BAN_OUT="$("${SAM_ONE}" admin ban "${CONTRACTOR_PEER}" --server "${CP_URL}" --data-dir "${WORK_DIR}/one" 2>&1)"
+echo "--> Executing Instant Kill-Switch: banning contractor PeerID via agentmesh-one admin ban..."
+BAN_OUT="$("${AGENTMESH_ONE}" admin ban "${CONTRACTOR_PEER}" --server "${CP_URL}" --data-dir "${WORK_DIR}/one" 2>&1)"
echo " ${BAN_OUT}"
echo ""
diff --git a/development/examples/multi-tier-guardrails/support_agent.py b/development/examples/multi-tier-guardrails/support_agent.py
index 3be8579d..36a3a1b2 100755
--- a/development/examples/multi-tier-guardrails/support_agent.py
+++ b/development/examples/multi-tier-guardrails/support_agent.py
@@ -47,7 +47,7 @@ from starlette.applications import Starlette
REPLICA_ID = sys.argv[1] if len(sys.argv) > 1 else os.environ.get("REPLICA_ID", "v1-laptop")
PORT = int(sys.argv[2]) if len(sys.argv) > 2 else int(os.environ.get("PORT", "17771"))
-DB_PATH = os.environ.get("ORDERS_DB_PATH", "/tmp/sam-multi-tier-orders.db")
+DB_PATH = os.environ.get("ORDERS_DB_PATH", "/tmp/agentmesh-multi-tier-orders.db")
LLM_BASE_URL = os.environ.get("LLM_BASE_URL", "http://127.0.0.1:11434/v1")
LLM_API_KEY = os.environ.get("LLM_API_KEY", "ollama")
LLM_MODEL = os.environ.get("LLM_MODEL", "gemma3:1b")
diff --git a/development/examples/sandboxed-agent/Makefile b/development/examples/sandboxed-agent/Makefile
index 067de227..df44a208 100644
--- a/development/examples/sandboxed-agent/Makefile
+++ b/development/examples/sandboxed-agent/Makefile
@@ -5,68 +5,68 @@
#
# make ollama the office model, in Docker
# make mcp the MCP reference server on :3001
-# make mesh sam-one on a public https URL (banner prints it)
+# make mesh agentmesh-one on a public https URL (banner prints it)
# make tokens URL=https://... one token for the node, one for the agent
# make pep URL=https://... the node, with the GitHub credential on its host
# make revoke URL=https://... take api.github.com off the mesh
# make ban URL=... PEER=12D3... cut one member off
# make clean forget everything
-DEMO_DIR ?= $(HOME)/sam-demo
+DEMO_DIR ?= $(HOME)/agentmesh-demo
REPO_BIN := $(abspath ../../../bin)
-SAM_ONE ?= $(if $(wildcard $(REPO_BIN)/sam-one),$(REPO_BIN)/sam-one,sam-one)
-SAM_NODE ?= $(if $(wildcard $(REPO_BIN)/sam-node),$(REPO_BIN)/sam-node,sam-node)
+AGENTMESH_ONE ?= $(if $(wildcard $(REPO_BIN)/agentmesh-one),$(REPO_BIN)/agentmesh-one,agentmesh-one)
+AGENTMESH_NODE ?= $(if $(wildcard $(REPO_BIN)/agentmesh-node),$(REPO_BIN)/agentmesh-node,agentmesh-node)
# The read-only GitHub token the node presents. Never a flag value: a file.
-GITHUB_TOKEN_FILE ?= $(HOME)/.config/sam-demo/github-ro
+GITHUB_TOKEN_FILE ?= $(HOME)/.config/agentmesh-demo/github-ro
MODEL ?= gemma3:1b
PORT ?= 8090
.PHONY: ollama mcp mesh tokens secrets pep policy revoke ban clean
ollama:
- docker start sam-demo-ollama 2>/dev/null || \
- docker run -d --name sam-demo-ollama -p 127.0.0.1:11434:11434 -v sam-demo-ollama:/root/.ollama ollama/ollama >/dev/null
+ docker start agentmesh-demo-ollama 2>/dev/null || \
+ docker run -d --name agentmesh-demo-ollama -p 127.0.0.1:11434:11434 -v agentmesh-demo-ollama:/root/.ollama ollama/ollama >/dev/null
@for _ in $$(seq 1 30); do curl -sf http://127.0.0.1:11434/ >/dev/null && break; sleep 1; done
- docker exec sam-demo-ollama ollama pull $(MODEL)
+ docker exec agentmesh-demo-ollama ollama pull $(MODEL)
curl -s http://127.0.0.1:11434/v1/models
mcp:
npx -y @modelcontextprotocol/server-everything streamableHttp
mesh:
- $(SAM_ONE) --data-dir "$(DEMO_DIR)/one" --port $(PORT) \
+ $(AGENTMESH_ONE) --data-dir "$(DEMO_DIR)/one" --port $(PORT) \
--tunnel cloudflare --tunnel-install \
--policy-file policy.json --no-join-token --enroll-qr=false --log-level warn
tokens:
- @test -n "$(URL)" || { echo "make tokens URL=https://... (the API URL from the sam-one banner)"; exit 1; }
+ @test -n "$(URL)" || { echo "make tokens URL=https://... (the API URL from the agentmesh-one banner)"; exit 1; }
@mkdir -p "$(DEMO_DIR)"
- @$(SAM_ONE) token create --server "$(URL)" --data-dir "$(DEMO_DIR)/one" \
+ @$(AGENTMESH_ONE) token create --server "$(URL)" --data-dir "$(DEMO_DIR)/one" \
--max-usages 1 --description "office node" 2>/dev/null \
| awk '/^Token:/ {print $$2}' > "$(DEMO_DIR)/pep-token"
- @$(SAM_ONE) token create --server "$(URL)" --data-dir "$(DEMO_DIR)/one" \
+ @$(AGENTMESH_ONE) token create --server "$(URL)" --data-dir "$(DEMO_DIR)/one" \
--role agent --max-usages 1 --description "agent in the dev sandbox" 2>/dev/null \
| awk '/^Token:/ {print $$2}' > "$(DEMO_DIR)/agent-token"
@test -s "$(DEMO_DIR)/pep-token" -a -s "$(DEMO_DIR)/agent-token" || { echo "token create failed"; exit 1; }
@echo "tokens in $(DEMO_DIR)/pep-token (role mesh:role:node) and $(DEMO_DIR)/agent-token (role agent)"
secrets:
- @test -s "$(GITHUB_TOKEN_FILE)" || { echo "GITHUB_TOKEN_FILE=$(GITHUB_TOKEN_FILE) is missing: a read-only fine-grained token for google/sam"; exit 1; }
+ @test -s "$(GITHUB_TOKEN_FILE)" || { echo "GITHUB_TOKEN_FILE=$(GITHUB_TOKEN_FILE) is missing: a read-only fine-grained token for google/agentmesh"; exit 1; }
@mkdir -p "$(DEMO_DIR)/secrets"
@install -m 600 "$(GITHUB_TOKEN_FILE)" "$(DEMO_DIR)/secrets/github-ro"
@echo "credential github-ro in $(DEMO_DIR)/secrets"
pep: secrets
@test -n "$(URL)" || { echo "make pep URL=https://..."; exit 1; }
- $(SAM_NODE) run --control-plane "$(URL)" \
+ $(AGENTMESH_NODE) run --control-plane "$(URL)" \
--bootstrap-token-path "$(DEMO_DIR)/pep-token" \
--config pep.yaml --secrets-dir "$(DEMO_DIR)/secrets" \
--data-dir "$(DEMO_DIR)/pep" --bind-addr= \
--control-plane-sync-interval 30s
-# The admin token: the one sam-one generated into the data dir, unless the
+# The admin token: the one agentmesh-one generated into the data dir, unless the
# environment supplies it (then the banner does not show it either).
-ADMIN_TOKEN = $${SAM_ADMIN_TOKEN:-$$(cat "$(DEMO_DIR)/one/admin-token")}
+ADMIN_TOKEN = $${AGENTMESH_ADMIN_TOKEN:-$$(cat "$(DEMO_DIR)/one/admin-token")}
policy:
@test -n "$(URL)" || { echo "make policy URL=https://..."; exit 1; }
@@ -84,8 +84,8 @@ revoke:
ban:
@test -n "$(URL)" -a -n "$(PEER)" || { echo "make ban URL=https://... PEER=12D3KooW..."; exit 1; }
- @$(SAM_ONE) admin ban "$(PEER)" --server "$(URL)" --data-dir "$(DEMO_DIR)/one"
+ @$(AGENTMESH_ONE) admin ban "$(PEER)" --server "$(URL)" --data-dir "$(DEMO_DIR)/one"
clean:
rm -rf "$(DEMO_DIR)"
- docker rm -f sam-demo-ollama >/dev/null 2>&1 || true
+ docker rm -f agentmesh-demo-ollama >/dev/null 2>&1 || true
diff --git a/development/examples/sandboxed-agent/SCRIPT.md b/development/examples/sandboxed-agent/SCRIPT.md
index fafac4a9..c77570b6 100644
--- a/development/examples/sandboxed-agent/SCRIPT.md
+++ b/development/examples/sandboxed-agent/SCRIPT.md
@@ -12,14 +12,14 @@ what it says.
On the workstation:
```bash
-make build # ./bin/sam-one and ./bin/sam-node
+make build # ./bin/agentmesh-one and ./bin/agentmesh-node
cd development/examples/sandboxed-agent
make ollama # the office model, in Docker
make mcp & # the MCP reference server on :3001
-export GITHUB_TOKEN_FILE=~/.config/sam-demo/github-ro # read-only, google/sam pull requests
+export GITHUB_TOKEN_FILE=~/.config/agentmesh-demo/github-ro # read-only, google/agentmesh pull requests
```
-The sandbox: a codespace on `google/sam` (any configuration with Python),
+The sandbox: a codespace on `google/agentmesh` (any configuration with Python),
with the SDK installed and `agent.py` in `~/sandbox`:
```bash
@@ -76,7 +76,7 @@ make pep URL=$URL 2>&1 | python3 audit.py
> on loopback, and `api.github.com` with a read-only token in a file on
> this machine. The policy assigns the destination to the node by its
> label, `site=office`. The role `agent` may call the three by name, and
-> `api.github.com` only with `GET` under `/repos/google/sam/`.
+> `api.github.com` only with `GET` under `/repos/google/agentmesh/`.
`policy.json` is on screen here, shortened to the `agent` role and the
`egress` entry.
@@ -85,7 +85,7 @@ make pep URL=$URL 2>&1 | python3 audit.py
```bash
# sandbox
-export SAM_CONTROL_PLANE_URL=$URL SAM_BOOTSTRAP_TOKEN_PATH=~/sandbox/agent-token
+export AGENTMESH_CONTROL_PLANE_URL=$URL AGENTMESH_BOOTSTRAP_TOKEN_PATH=~/sandbox/agent-token
python agent.py models
```
@@ -109,7 +109,7 @@ python agent.py tool
```bash
# sandbox
-python agent.py github GET '/repos/google/sam/pulls?state=open&per_page=1'
+python agent.py github GET '/repos/google/agentmesh/pulls?state=open&per_page=1'
```
> GitHub answers 200. The node presented the office's token; the request
@@ -117,7 +117,7 @@ python agent.py github GET '/repos/google/sam/pulls?state=open&per_page=1'
```bash
# sandbox
-python agent.py github POST /repos/google/sam/pulls
+python agent.py github POST /repos/google/agentmesh/pulls
python agent.py github GET /user
```
@@ -130,7 +130,7 @@ python agent.py github GET /user
# office
make revoke URL=$URL
# sandbox
-python agent.py github GET '/repos/google/sam/pulls?state=open&per_page=1'
+python agent.py github GET '/repos/google/agentmesh/pulls?state=open&per_page=1'
```
> One policy change. The node withdraws `api.github.com` within seconds,
diff --git a/development/examples/sandboxed-agent/agent.py b/development/examples/sandboxed-agent/agent.py
index f2f354a9..0cf7dce1 100644
--- a/development/examples/sandboxed-agent/agent.py
+++ b/development/examples/sandboxed-agent/agent.py
@@ -8,12 +8,12 @@ model, an MCP server and an external API whose credential it never holds.
python agent.py models list the office model
python agent.py ask "..." one chat completion
python agent.py tool call an MCP tool
- python agent.py github GET /repos/google/sam/pulls?state=open&per_page=1
- python agent.py github POST /repos/google/sam/pulls
+ python agent.py github GET /repos/google/agentmesh/pulls?state=open&per_page=1
+ python agent.py github POST /repos/google/agentmesh/pulls
python agent.py github GET /user
-SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the token in
-SAM_BOOTSTRAP_TOKEN_PATH and keeps identity and credential in SAM_STATE_DIR.
+AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the token in
+AGENTMESH_BOOTSTRAP_TOKEN_PATH and keeps identity and credential in AGENTMESH_STATE_DIR.
"""
import json
@@ -29,17 +29,17 @@ TOOLS = "mcp://tools"
GITHUB = "egress://api.github.com"
# py-libp2p narrates every failed dial over several lines; the verdicts this
-# program prints are the story. SAM_DEBUG=1 brings the narration back.
-if not os.environ.get("SAM_DEBUG"):
+# program prints are the story. AGENTMESH_DEBUG=1 brings the narration back.
+if not os.environ.get("AGENTMESH_DEBUG"):
logging.getLogger("libp2p").setLevel(logging.CRITICAL)
mesh = AgentMesh.enroll(
- os.environ.get("SAM_CONTROL_PLANE_URL", "https://mesh.example.com"),
- bootstrap_token_path=os.environ.get("SAM_BOOTSTRAP_TOKEN_PATH"),
+ os.environ.get("AGENTMESH_CONTROL_PLANE_URL", "https://mesh.example.com"),
+ bootstrap_token_path=os.environ.get("AGENTMESH_BOOTSTRAP_TOKEN_PATH"),
# The role the token was minted for; the policy's grants hang off it.
- role=os.environ.get("SAM_ROLE", "agent"),
- state_dir=os.environ.get("SAM_STATE_DIR", "~/.config/sam-mesh/sandboxed-agent"),
- allow_insecure=os.environ.get("SAM_INSECURE_CONTROL_PLANE") == "true",
+ role=os.environ.get("AGENTMESH_ROLE", "agent"),
+ state_dir=os.environ.get("AGENTMESH_STATE_DIR", "~/.config/agentmesh/sandboxed-agent"),
+ allow_insecure=os.environ.get("AGENTMESH_INSECURE_CONTROL_PLANE") == "true",
)
@@ -111,7 +111,7 @@ async def github(session, method, path):
pep, GITHUB, path,
method=method,
# GitHub refuses requests without a User-Agent; the node forwards it.
- headers={"Accept": "application/vnd.github+json", "User-Agent": "sam-sandboxed-agent"},
+ headers={"Accept": "application/vnd.github+json", "User-Agent": "agentmesh-sandboxed-agent"},
body=b"{}" if method in ("POST", "PUT", "PATCH") else None,
)
if resp.status == 200:
@@ -140,8 +140,8 @@ async def run(session, argv):
await models(session)
await ask(session, "In one sentence, in English: why should an agent never hold API credentials?")
await tool(session)
- await github(session, "GET", "/repos/google/sam/pulls?state=open&per_page=1")
- await github(session, "POST", "/repos/google/sam/pulls")
+ await github(session, "GET", "/repos/google/agentmesh/pulls?state=open&per_page=1")
+ await github(session, "POST", "/repos/google/agentmesh/pulls")
await github(session, "GET", "/user")
else:
raise SystemExit(__doc__)
diff --git a/development/examples/sandboxed-agent/audit.py b/development/examples/sandboxed-agent/audit.py
index 478adb1d..403821b5 100644
--- a/development/examples/sandboxed-agent/audit.py
+++ b/development/examples/sandboxed-agent/audit.py
@@ -1,4 +1,4 @@
-"""Reads a sam-node log on stdin and prints the lines an admin watches: what
+"""Reads a agentmesh-node log on stdin and prints the lines an admin watches: what
the node serves, and one line per authorization decision.
make pep URL=https://... 2>&1 | python3 audit.py
@@ -11,7 +11,7 @@ import sys
from contextlib import nullcontext
AUDIT = re.compile(r"Audit Traceability\s+(\{.*\})\s*$")
-KEEP = re.compile(r"\[Egress\] (Serving|Withdrawn|Assignments)|peer banned|SAM Node Online|PeerID:")
+KEEP = re.compile(r"\[Egress\] (Serving|Withdrawn|Assignments)|peer banned|Agent Mesh Node Online|PeerID:")
def verdict(line):
diff --git a/development/examples/sandboxed-agent/policy.json b/development/examples/sandboxed-agent/policy.json
index 733c87d4..a501732c 100644
--- a/development/examples/sandboxed-agent/policy.json
+++ b/development/examples/sandboxed-agent/policy.json
@@ -11,7 +11,7 @@
"allowed_services": ["inference://office-llm", "mcp://tools", "egress://api.github.com"],
"allowed_targets": ["*"],
"http": [
- { "service": "egress://api.github.com", "methods": ["GET"], "paths": ["/repos/google/sam/*"] }
+ { "service": "egress://api.github.com", "methods": ["GET"], "paths": ["/repos/google/agentmesh/*"] }
]
}
],
diff --git a/development/examples/sandboxed-agent/record.sh b/development/examples/sandboxed-agent/record.sh
index 1e42bf88..07d27d39 100755
--- a/development/examples/sandboxed-agent/record.sh
+++ b/development/examples/sandboxed-agent/record.sh
@@ -45,8 +45,8 @@ CAPTION_CPS=${CAPTION_CPS:-24}
CAPTION_FILE=/tmp/samdemo-caption.txt
CAPTIONS=$OUT/captions.tsv
SRT=$OUT/demo.srt
-GITHUB_TOKEN_FILE=${GITHUB_TOKEN_FILE:-$HOME/.config/sam-demo/github-ro}
-DEMO_DIR=${DEMO_DIR:-$HOME/sam-demo}
+GITHUB_TOKEN_FILE=${GITHUB_TOKEN_FILE:-$HOME/.config/agentmesh-demo/github-ro}
+DEMO_DIR=${DEMO_DIR:-$HOME/agentmesh-demo}
mkdir -p "$OUT"
rm -f "$SRT" "$CAPTIONS"
@@ -150,7 +150,7 @@ CAPTION=$(tmux split-window -P -F '#{pane_id}' -v -l 4 -t "$MESH" -c "$HERE")
SANDBOX=$(tmux split-window -P -F '#{pane_id}' -h -l 50% -t "$MESH" -c "$HERE")
NODE=$(tmux split-window -P -F '#{pane_id}' -v -l 20 -t "$MESH" -c "$HERE")
ADMIN=$(tmux split-window -P -F '#{pane_id}' -v -l 12 -t "$MESH" -c "$HERE")
-tmux select-pane -t "$MESH" -T 'office · mesh (sam-one)'
+tmux select-pane -t "$MESH" -T 'office · mesh (agentmesh-one)'
tmux select-pane -t "$ADMIN" -T 'office · admin'
tmux select-pane -t "$NODE" -T 'office · node (what it serves, every decision)'
tmux select-pane -t "$SANDBOX" -T 'developer sandbox · a codespace, no VPN'
@@ -185,12 +185,12 @@ tmux send-keys -t "$CAPTION" "python3 /tmp/samdemo-caption.py $CAPTION_FILE $COL
# names its source instead of showing it.
ADMIN_TOKEN=$(openssl rand -hex 16)
for p in "$MESH" "$ADMIN" "$NODE"; do
- tmux send-keys -t "$p" "export SAM_ADMIN_TOKEN=$ADMIN_TOKEN GITHUB_TOKEN_FILE=$GITHUB_TOKEN_FILE DEMO_DIR=$DEMO_DIR AUDIT_RAW=$OUT/node.log PS1='office\$ '; clear" Enter
+ tmux send-keys -t "$p" "export AGENTMESH_ADMIN_TOKEN=$ADMIN_TOKEN GITHUB_TOKEN_FILE=$GITHUB_TOKEN_FILE DEMO_DIR=$DEMO_DIR AUDIT_RAW=$OUT/node.log PS1='office\$ '; clear" Enter
done
rm -f "$OUT/node.log"
tmux send-keys -t "$SANDBOX" "gh codespace ssh -c $CODESPACE" Enter
wait_for "$SANDBOX" '\$\s*$' 120
-tmux send-keys -t "$SANDBOX" "PS1='sandbox\$ '; cd ~/sandbox && source ~/venv/bin/activate && rm -rf ~/.config/sam-mesh/sandboxed-agent ~/sandbox/state && clear" Enter
+tmux send-keys -t "$SANDBOX" "PS1='sandbox\$ '; cd ~/sandbox && source ~/venv/bin/activate && rm -rf ~/.config/agentmesh/sandboxed-agent ~/sandbox/state && clear" Enter
wait_for "$SANDBOX" 'sandbox\$' 30
# A fresh mesh every take; the downloaded cloudflared is kept.
rm -rf "$DEMO_DIR/pep"
@@ -217,7 +217,7 @@ pause 2
# 2. The mesh and the policy
caption "The admin starts a mesh: a control plane, a router and a console, on a public https URL, with the policy in policy.json. No standing join token."
-expect "$MESH" "make mesh" 'SAM standalone mesh is ready' 120
+expect "$MESH" "make mesh" 'Agent Mesh standalone mesh is ready' 120
URL=$(grab "$MESH" 'https://[a-z0-9-]+\.trycloudflare\.com')
# A quick tunnel is routed a few seconds after cloudflared prints it, and
# once in a while it dies at once; either way, do not type into a dead URL.
@@ -236,17 +236,17 @@ gh codespace ssh -c "$CODESPACE" -- 'cat > ~/sandbox/agent-token; chmod 600 ~/sa
pause 1
type_in "$ADMIN" "jq -c '.roles[1].allowed_services, .roles[1].http[0], .egress[0]' policy.json"
-caption "The policy: the agent may call the model, the MCP server and api.github.com by name, and api.github.com only with GET under /repos/google/sam/. The destination is served by nodes labelled site=office."
+caption "The policy: the agent may call the model, the MCP server and api.github.com by name, and api.github.com only with GET under /repos/google/agentmesh/. The destination is served by nodes labelled site=office."
pause 1
caption "The office node fronts a model and an MCP server on loopback. api.github.com is assigned to it by the policy; its read-only token is a file on this machine, read by the node, never by an agent."
type_in "$NODE" "export URL=$URL"
-expect "$NODE" "make pep URL=\$URL 2>&1 | python3 audit.py" 'SAM Node Online' 60
+expect "$NODE" "make pep URL=\$URL 2>&1 | python3 audit.py" 'Agent Mesh Node Online' 60
pause 2
# 3. The developer's program joins
caption "The agent is an ordinary Python program with the SDK. The admin handed the developer the single-use token out of band. It enrolls once and gets an identity: no sidecar, no proxy variables, no VPN."
-type_in "$SANDBOX" "export SAM_CONTROL_PLANE_URL=$URL SAM_BOOTSTRAP_TOKEN_PATH=~/sandbox/agent-token"
+type_in "$SANDBOX" "export AGENTMESH_CONTROL_PLANE_URL=$URL AGENTMESH_BOOTSTRAP_TOKEN_PATH=~/sandbox/agent-token"
expect "$SANDBOX" "python agent.py models" '← 200 gemma3' 90
PEER=$(grab "$SANDBOX" 'on the mesh as 12D3KooW[A-Za-z0-9]+' | awk '{print $NF}')
pause 1
@@ -259,9 +259,9 @@ caption "A tool call reaches the MCP server in the office. On the left, every de
pause 1
# 5. External API
-expect "$SANDBOX" "python agent.py github GET '/repos/google/sam/pulls?state=open&per_page=1'" '← 200 #' 60
+expect "$SANDBOX" "python agent.py github GET '/repos/google/agentmesh/pulls?state=open&per_page=1'" '← 200 #' 60
caption "An external API. GitHub answers 200: the node presented the office's token. The request the sandbox sent had none."
-expect "$SANDBOX" "python agent.py github POST /repos/google/sam/pulls" 'http_request_denied' 60
+expect "$SANDBOX" "python agent.py github POST /repos/google/agentmesh/pulls" 'http_request_denied' 60
expect "$SANDBOX" "python agent.py github GET /user" 'http_request_denied' 60
wait_for "$NODE" 'DENY.*GET /user' 30
caption "The agent may try anything. POST is outside the grant; /user is outside the grant. The network answers 403 before GitHub hears of it."
@@ -271,7 +271,7 @@ pause 1
caption "The admin takes api.github.com off the mesh: one policy change. The node withdraws it within seconds."
expect "$ADMIN" "make revoke URL=\$URL" 'success' 30
wait_for "$NODE" 'Withdrawn egress://api.github.com' 60
-expect "$SANDBOX" "python agent.py github GET '/repos/google/sam/pulls?state=open&per_page=1'" '← 404' 60
+expect "$SANDBOX" "python agent.py github GET '/repos/google/agentmesh/pulls?state=open&per_page=1'" '← 404' 60
caption "The same request finds no service. Nothing to revoke in the sandbox: it never had anything."
pause 1
diff --git a/development/kind/sam-node.values.yaml b/development/kind/agentmesh-node.values.yaml
similarity index 59%
rename from development/kind/sam-node.values.yaml
rename to development/kind/agentmesh-node.values.yaml
index edf92310..3881f1dc 100644
--- a/development/kind/sam-node.values.yaml
+++ b/development/kind/agentmesh-node.values.yaml
@@ -1,6 +1,6 @@
-# Kind-mesh wiring shared by every sam-node release; stack an example's
-# values on top: helm install <name> charts/sam-node -f this-file -f <example>/values.yaml
-controlPlaneUrl: http://sam-mesh-control-plane:8080
+# Kind-mesh wiring shared by every agentmesh-node release; stack an example's
+# values on top: helm install <name> charts/agentmesh-node -f this-file -f <example>/values.yaml
+controlPlaneUrl: http://agentmesh-control-plane:8080
extraArgs: ["--discovery-interval=200ms"]
# Keep nodes off the router's worker: a pod dialing its own node's
@@ -10,6 +10,6 @@ affinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- - key: sam-role
+ - key: agentmesh-role
operator: NotIn
values: ["control-plane"]
diff --git a/development/kind/dex.yaml b/development/kind/dex.yaml
index a5529b6a..8fe8785a 100644
--- a/development/kind/dex.yaml
+++ b/development/kind/dex.yaml
@@ -4,7 +4,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: sam-mesh-dex-config
+ name: agentmesh-dex-config
data:
config.yaml: |
issuer: ${DEX_ISSUER}
@@ -15,17 +15,17 @@ data:
oauth2:
skipApprovalScreen: true
staticClients:
- - id: sam-console
+ - id: agentmesh-console
redirectURIs:
- ${CONSOLE_REDIRECT_URI}
- # The sam-node CLI and the mobile app log in through Dex's device flow or a
+ # The agentmesh-node CLI and the mobile app log in through Dex's device flow or a
# loopback browser callback; Dex rejects both unless listed here.
- /device/callback
- # Fixed ports from internal/node/oidc.go and mobile/sam-node-app/lib/main.dart.
+ # Fixed ports from internal/node/oidc.go and mobile/agentmesh-node-app/lib/main.dart.
- http://127.0.0.1:13000/callback
- http://127.0.0.1:13001/callback
- http://127.0.0.1:13002/callback
- name: 'SAM Console'
+ name: 'Agent Mesh Console'
public: true
enablePasswordDB: true
staticPasswords:
@@ -40,19 +40,19 @@ data:
apiVersion: apps/v1
kind: Deployment
metadata:
- name: sam-mesh-dex
+ name: agentmesh-dex
spec:
replicas: 1
selector:
matchLabels:
- app: sam-mesh-dex
+ app: agentmesh-dex
template:
metadata:
labels:
- app: sam-mesh-dex
+ app: agentmesh-dex
spec:
nodeSelector:
- sam-role: control-plane
+ agentmesh-role: control-plane
containers:
- name: dex
image: dexidp/dex:v2.39.0
@@ -69,15 +69,15 @@ spec:
volumes:
- name: config
configMap:
- name: sam-mesh-dex-config
+ name: agentmesh-dex-config
---
apiVersion: v1
kind: Service
metadata:
- name: sam-mesh-dex
+ name: agentmesh-dex
spec:
selector:
- app: sam-mesh-dex
+ app: agentmesh-dex
ports:
- name: http
port: 5556
@@ -86,7 +86,7 @@ spec:
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
- name: sam-mesh-dex-gateway
+ name: agentmesh-dex-gateway
spec:
gatewayClassName: cloud-provider-kind
listeners:
@@ -100,15 +100,15 @@ spec:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
- name: sam-mesh-dex-route
+ name: agentmesh-dex-route
spec:
parentRefs:
- - name: sam-mesh-dex-gateway
+ - name: agentmesh-dex-gateway
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- - name: sam-mesh-dex
+ - name: agentmesh-dex
port: 5556
diff --git a/development/kind/kind-config.yaml b/development/kind/kind-config.yaml
index 070caa0d..68f9c094 100644
--- a/development/kind/kind-config.yaml
+++ b/development/kind/kind-config.yaml
@@ -4,5 +4,5 @@ nodes:
- role: control-plane
- role: worker
labels:
- sam-role: control-plane
+ agentmesh-role: control-plane
- role: worker
diff --git a/development/kind/run-local-node.sh b/development/kind/run-local-node.sh
index a118fd40..da2a6fb2 100755
--- a/development/kind/run-local-node.sh
+++ b/development/kind/run-local-node.sh
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
-# Enroll a locally-built ./bin/sam-node into the kind mesh the way a real external node joins:
+# Enroll a locally-built ./bin/agentmesh-node into the kind mesh the way a real external node joins:
# a bootstrap token over the control plane's gateway address, peer traffic through the router's
# node-IP multiaddrs. Extra args pass through, e.g. to host a service:
# ARGS="--config my-node.yaml"
set -euo pipefail
-CLUSTER="sam-kind"
-NAMESPACE="sam-kind"
+CLUSTER="agentmesh-kind"
+NAMESPACE="agentmesh-kind"
KCTX="kind-${CLUSTER}"
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
@@ -18,28 +18,28 @@ for bin in kubectl kind curl jq; do
done
kind get clusters 2>/dev/null | grep -qx "${CLUSTER}" || {
echo "kind cluster '${CLUSTER}' not found; start it first: make kind-up" >&2; exit 1; }
-[[ -x ./bin/sam-node ]] || { echo "./bin/sam-node not found; build it first: make build" >&2; exit 1; }
+[[ -x ./bin/agentmesh-node ]] || { echo "./bin/agentmesh-node not found; build it first: make build" >&2; exit 1; }
-MAIN_IP="$(kubectl --context "${KCTX}" -n "${NAMESPACE}" get gateway sam-mesh-gateway \
+MAIN_IP="$(kubectl --context "${KCTX}" -n "${NAMESPACE}" get gateway agentmesh-gateway \
-o jsonpath='{.status.addresses[0].value}' 2>/dev/null || true)"
[[ -n "${MAIN_IP}" ]] || {
- echo "gateway 'sam-mesh-gateway' has no LoadBalancer address; is cloud-provider-kind running?" >&2
+ echo "gateway 'agentmesh-gateway' has no LoadBalancer address; is cloud-provider-kind running?" >&2
exit 1; }
CONTROL_PLANE_URL="http://${MAIN_IP}"
# Mint an enrollment credential the way an operator would, through the dev-routed /admin API.
-ADMIN_TOKEN="$(kubectl --context "${KCTX}" -n "${NAMESPACE}" get secret sam-mesh-secrets \
+ADMIN_TOKEN="$(kubectl --context "${KCTX}" -n "${NAMESPACE}" get secret agentmesh-secrets \
-o jsonpath='{.data.admin-token}' | base64 -d)"
TOKEN_RESPONSE="$(curl -s -X POST "${CONTROL_PLANE_URL}/admin/bootstrap-tokens" \
-H "Authorization: Bearer ${ADMIN_TOKEN}" \
-H "Content-Type: application/json" \
- -d '{"role":"mesh:role:node","ttl_hours":1,"max_usages":1,"description":"local sam-node"}' || true)"
+ -d '{"role":"mesh:role:node","ttl_hours":1,"max_usages":1,"description":"local agentmesh-node"}' || true)"
BOOTSTRAP_TOKEN="$(printf '%s' "${TOKEN_RESPONSE}" | jq -r '.token // empty' 2>/dev/null || true)"
[[ -n "${BOOTSTRAP_TOKEN}" ]] || {
echo "could not mint a bootstrap token at ${CONTROL_PLANE_URL}/admin/bootstrap-tokens: ${TOKEN_RESPONSE}" >&2
exit 1; }
-echo "Enrolling local ./bin/sam-node into the mesh control plane at ${CONTROL_PLANE_URL}…"
+echo "Enrolling local ./bin/agentmesh-node into the mesh control plane at ${CONTROL_PLANE_URL}…"
echo " MCP/sidecar API on 127.0.0.1:9099"
# Throwaway identity per run: the default data-dir keeps the biscuit from a
@@ -48,10 +48,10 @@ DATA_DIR="$(mktemp -d)"
cleanup() { [[ -n "${NODE_PID:-}" ]] && kill "${NODE_PID}" 2>/dev/null || true; [[ -n "${DATA_DIR:-}" && -d "${DATA_DIR}" ]] && rm -rf "${DATA_DIR}"; }
trap cleanup EXIT INT TERM
-export SAM_API_TOKEN=devtoken
+export AGENTMESH_API_TOKEN=devtoken
# Plaintext to the kind LoadBalancer IP: the docker bridge on this machine is
# the trust boundary here, and the admin token above travelled the same hop.
-./bin/sam-node run \
+./bin/agentmesh-node run \
--control-plane "${CONTROL_PLANE_URL}" \
--insecure-control-plane \
--bootstrap-token "${BOOTSTRAP_TOKEN}" \
diff --git a/development/kind/run.sh b/development/kind/run.sh
index c2cd7842..0b11a6ad 100755
--- a/development/kind/run.sh
+++ b/development/kind/run.sh
@@ -1,15 +1,15 @@
#!/usr/bin/env bash
# Kind dev mesh: control plane, router, console and Dex, with live per-pod logs in named tmux
-# panes. No sam-nodes are deployed — put services on the mesh with charts/sam-node (see the
+# panes. No agentmesh-nodes are deployed — put services on the mesh with charts/agentmesh-node (see the
# epilogue below) or enroll a local node. Gateway addresses come from cloud-provider-kind.
set -euo pipefail
-CLUSTER="sam-kind"
-NAMESPACE="sam-kind"
-SESSION="sam-kind"
+CLUSTER="agentmesh-kind"
+NAMESPACE="agentmesh-kind"
+SESSION="agentmesh-kind"
KCTX="kind-${CLUSTER}"
IMAGE_TAG="local"
-CONTROL_PLANE_URL="http://sam-mesh-control-plane:8080"
+CONTROL_PLANE_URL="http://agentmesh-control-plane:8080"
HELM="helm"
# Serves the gateway LoadBalancer IPs. It installs the Gateway API CRDs and the
# cloud-provider-kind GatewayClass itself, so the cluster needs no CRD step.
@@ -97,7 +97,7 @@ gateway_ip() {
# nodes host whatever example service is being tested, so grant them everything
# explicitly here rather than weakening the chart default.
deploy_chart() {
- "${HELM}" --kube-context "${KCTX}" upgrade --install sam-mesh "${PROJECT_ROOT}/charts/sam-mesh" --timeout 10m \
+ "${HELM}" --kube-context "${KCTX}" upgrade --install agentmesh "${PROJECT_ROOT}/charts/agentmesh" --timeout 10m \
--namespace "${NAMESPACE}" \
--set global.imageTag="${IMAGE_TAG}" \
--set controlPlane.oidcIssuer="${CONTROL_PLANE_ISSUERS//,/\\,}" \
@@ -110,7 +110,7 @@ deploy_chart() {
--set gateway.className=cloud-provider-kind \
--set gateway.adminRoute=true \
--set router.hostPort=4501 \
- --set router.nodeSelector.sam-role=control-plane \
+ --set router.nodeSelector.agentmesh-role=control-plane \
--set router.useOidcToken=true \
"$@"
}
@@ -135,11 +135,11 @@ show_cluster_logs() {
# Looked up here, not inherited, so `-l` gets the header too; one direct query rather
# than gateway_ip's polling, so the logs still open when a gateway has no address.
local main_ip dex_ip
- main_ip="$(kubectl --context "${KCTX}" -n "${NAMESPACE}" get gateway sam-mesh-gateway -o jsonpath='{.status.addresses[0].value}' 2>/dev/null || true)"
- dex_ip="$(kubectl --context "${KCTX}" -n "${NAMESPACE}" get gateway sam-mesh-dex-gateway -o jsonpath='{.status.addresses[0].value}' 2>/dev/null || true)"
+ main_ip="$(kubectl --context "${KCTX}" -n "${NAMESPACE}" get gateway agentmesh-gateway -o jsonpath='{.status.addresses[0].value}' 2>/dev/null || true)"
+ dex_ip="$(kubectl --context "${KCTX}" -n "${NAMESPACE}" get gateway agentmesh-dex-gateway -o jsonpath='{.status.addresses[0].value}' 2>/dev/null || true)"
- tmuxs new-session -d -s "${SESSION}" -n mesh "$(logs control-plane 'deploy/sam-mesh-control-plane')" \; set -t "${SESSION}" destroy-unattached off
- tmuxs split-window -t "${SESSION}:0" "$(logs router 'statefulset/sam-mesh-router')"
+ tmuxs new-session -d -s "${SESSION}" -n mesh "$(logs control-plane 'deploy/agentmesh-control-plane')" \; set -t "${SESSION}" destroy-unattached off
+ tmuxs split-window -t "${SESSION}:0" "$(logs router 'statefulset/agentmesh-router')"
tmuxs set-option -t "${SESSION}" -g pane-border-status top
tmuxs set-option -t "${SESSION}" -g pane-border-format ' #{pane_title} '
tmuxs set-option -t "${SESSION}" status-position top
@@ -186,10 +186,10 @@ kind create cluster --name "${CLUSTER}" --config "${SCRIPT_DIR}/kind-config.yaml
echo "== Starting cloud-provider-kind =="
start_cloud_provider_kind
-echo "== Building sam images =="
-make docker-build-control-plane docker-build-router docker-build-node docker-build-sam-console
-echo "== Loading sam images into kind =="
-kind load docker-image --name "${CLUSTER}" "sam-control-plane:${IMAGE_TAG}" "sam-router:${IMAGE_TAG}" "sam-node:${IMAGE_TAG}" "sam-console:${IMAGE_TAG}"
+echo "== Building agentmesh images =="
+make docker-build-control-plane docker-build-router docker-build-node docker-build-agentmesh-console
+echo "== Loading agentmesh images into kind =="
+kind load docker-image --name "${CLUSTER}" "agentmesh-control-plane:${IMAGE_TAG}" "agentmesh-router:${IMAGE_TAG}" "agentmesh-node:${IMAGE_TAG}" "agentmesh-console:${IMAGE_TAG}"
# Apply the control plane and router, and wait until they accept connections
ISSUER="$(kubectl --context "${KCTX}" get --raw /.well-known/openid-configuration | jq -r .issuer)"
@@ -201,7 +201,7 @@ CONTROL_PLANE_ISSUERS="${ISSUER}"
# The first audience is what the control plane reports as the OIDC client id, so it has to
# match Dex's static client.
-ALLOWED_AUDIENCES="sam-console,agentmesh-audience,sam-control-plane-audience"
+ALLOWED_AUDIENCES="agentmesh-console,agentmesh-audience,agentmesh-control-plane-audience"
# 00-namespace-rbac.yaml's envsubst reads this from the environment.
export NAMESPACE
@@ -209,19 +209,19 @@ export NAMESPACE
echo "== Applying namespace and RBAC cluster rules =="
envsubst '${NAMESPACE}' < "${SCRIPT_DIR}/00-namespace-rbac.yaml" | kubectl --context "${KCTX}" apply -f -
-echo "== Deploying SAM Mesh via Helm =="
+echo "== Deploying Agent Mesh via Helm =="
deploy_chart
# The real URLs aren't known until Dex's gateway exists, so deploy it with placeholders
# first and rewire it below.
echo "== Deploying Dex =="
-apply_dex "http://sam-mesh-dex:5556/dex" "http://127.0.0.1${CONSOLE_BASE_PATH}/auth/callback"
+apply_dex "http://agentmesh-dex:5556/dex" "http://127.0.0.1${CONSOLE_BASE_PATH}/auth/callback"
# The OIDC URLs are the gateway addresses, which only exist once the gateways do — so
# resolve them, then redeploy with the URLs everything must agree on.
echo "== Waiting for gateway LoadBalancer addresses =="
-MAIN_IP="$(gateway_ip sam-mesh-gateway)"
-DEX_IP="$(gateway_ip sam-mesh-dex-gateway)"
+MAIN_IP="$(gateway_ip agentmesh-gateway)"
+DEX_IP="$(gateway_ip agentmesh-dex-gateway)"
CONSOLE_URL="http://${MAIN_IP}${CONSOLE_BASE_PATH}/"
echo "control plane: http://${MAIN_IP} console: ${CONSOLE_URL} dex: http://${DEX_IP}"
@@ -230,8 +230,8 @@ OIDC_ISSUER="http://${DEX_IP}/dex"
echo "== Wiring the OIDC URLs into Dex =="
apply_dex "${OIDC_ISSUER}" "http://${MAIN_IP}${CONSOLE_BASE_PATH}/auth/callback"
# A config-only change doesn't roll the pods, and Dex reads its config at startup.
-kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout restart deployment/sam-mesh-dex
-kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout status deployment/sam-mesh-dex --timeout=180s
+kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout restart deployment/agentmesh-dex
+kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout status deployment/agentmesh-dex --timeout=180s
# The control plane discovers the issuer at startup and refuses to start if it can't, so
# prove a pod can reach the gateway address before pinning the mesh to it.
@@ -252,24 +252,24 @@ CONTROL_PLANE_ISSUERS="${OIDC_ISSUER},${ISSUER}"
deploy_chart
echo "== Waiting for database to be ready =="
-kubectl --context "${KCTX}" -n "${NAMESPACE}" wait --for=condition=ready --timeout=180s pod -l app=sam-mesh-db
+kubectl --context "${KCTX}" -n "${NAMESPACE}" wait --for=condition=ready --timeout=180s pod -l app=agentmesh-db
echo "== Waiting for control plane to be ready =="
# rollout status, not wait --for=available: every pod must serve the Dex issuer before
# the console reads it below.
-kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout status deployment/sam-mesh-control-plane --timeout=180s
+kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout status deployment/agentmesh-control-plane --timeout=180s
# Policy seeding is handled automatically by the Helm chart bootstrap job, we just wait for it to complete.
echo "== Waiting for bootstrap job to complete =="
-kubectl --context "${KCTX}" -n "${NAMESPACE}" wait --for=condition=complete --timeout=120s job/sam-mesh-bootstrap
+kubectl --context "${KCTX}" -n "${NAMESPACE}" wait --for=condition=complete --timeout=120s job/agentmesh-bootstrap
echo "== Waiting for router to be ready =="
-kubectl --context "${KCTX}" -n "${NAMESPACE}" wait --for=condition=ready --timeout=180s pod -l app=sam-mesh-router
+kubectl --context "${KCTX}" -n "${NAMESPACE}" wait --for=condition=ready --timeout=180s pod -l app=agentmesh-router
# The console discovers the issuer from the control plane's /info once, at startup, so
# restart it now that the control plane serves the Dex issuer.
echo "== Restarting the console with the final issuer =="
-kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout restart deployment/sam-mesh-console
-kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout status deployment/sam-mesh-console --timeout=180s
+kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout restart deployment/agentmesh-console
+kubectl --context "${KCTX}" -n "${NAMESPACE}" rollout status deployment/agentmesh-console --timeout=180s
echo
echo "Mesh up."
@@ -277,7 +277,7 @@ echo " console: ${CONSOLE_URL}"
echo " control plane: http://${MAIN_IP}"
echo " dex: ${OIDC_ISSUER}"
echo
-echo "To put a service on the mesh, deploy an example with charts/sam-node:"
+echo "To put a service on the mesh, deploy an example with charts/agentmesh-node:"
echo " ./development/deploy-kind-service.sh development/examples/calc-mcp"
echo "(it prints the docker build / kind load / helm install commands as it runs them)"
echo
diff --git a/development/kind/test-mesh-e2e.sh b/development/kind/test-mesh-e2e.sh
index ce38e7aa..873a3652 100755
--- a/development/kind/test-mesh-e2e.sh
+++ b/development/kind/test-mesh-e2e.sh
@@ -15,21 +15,21 @@
set -euo pipefail
-echo "== Deploying calc-mcp via charts/sam-node =="
+echo "== Deploying calc-mcp via charts/agentmesh-node =="
./development/deploy-kind-service.sh development/examples/calc-mcp
# If running locally, we might want to store logs in a temp dir
LOG_DIR="${RUNNER_TEMP:-$(mktemp -d)}"
-echo "== Enrolling a local sam-node =="
+echo "== Enrolling a local agentmesh-node =="
./development/kind/run-local-node.sh > "$LOG_DIR/local-node.log" 2>&1 &
PID=$!
for _ in $(seq 1 60); do
- grep -q "SAM Node Online" "$LOG_DIR/local-node.log" && break
+ grep -q "Agent Mesh Node Online" "$LOG_DIR/local-node.log" && break
kill -0 "$PID" 2>/dev/null || { echo "local node exited early:"; cat "$LOG_DIR/local-node.log"; exit 1; }
sleep 1
done
-grep -q "SAM Node Online" "$LOG_DIR/local-node.log" \
+grep -q "Agent Mesh Node Online" "$LOG_DIR/local-node.log" \
|| { echo "local node did not come online:"; cat "$LOG_DIR/local-node.log"; exit 1; }
echo "local node online"
diff --git a/mobile/sam-node-app/.gitignore b/mobile/agentmesh-node-app/.gitignore
similarity index 100%
rename from mobile/sam-node-app/.gitignore
rename to mobile/agentmesh-node-app/.gitignore
diff --git a/mobile/sam-node-app/.metadata b/mobile/agentmesh-node-app/.metadata
similarity index 100%
rename from mobile/sam-node-app/.metadata
rename to mobile/agentmesh-node-app/.metadata
diff --git a/mobile/sam-node-app/README.md b/mobile/agentmesh-node-app/README.md
similarity index 74%
rename from mobile/sam-node-app/README.md
rename to mobile/agentmesh-node-app/README.md
index a4addd4a..0de0e348 100644
--- a/mobile/sam-node-app/README.md
+++ b/mobile/agentmesh-node-app/README.md
@@ -1,13 +1,13 @@
-# SAM Connect (Android)
+# Agent Mesh Connect (Android)
-This folder contains a Flutter application that packages and runs the native Go-based `sam-node` mesh client on Android using Go's CGO compiler and Dart FFI (Foreign Function Interface).
+This folder contains a Flutter application that packages and runs the native Go-based `agentmesh-node` mesh client on Android using Go's CGO compiler and Dart FFI (Foreign Function Interface).
-SAM Connect currently supports Android only. The repository has an iOS FFI
+Agent Mesh Connect currently supports Android only. The repository has an iOS FFI
library build target, but no iOS app project or release.
For manual testing, follow the [Android tester tutorial](../../site/content/docs/preview/mobile.md#android-tester-tutorial).
Choose browser enrollment on `https://bananas.sam-mesh.dev` or
-`https://hub.sam-mesh.dev`, or scan the QR code from your own `sam-one` mesh.
+`https://hub.sam-mesh.dev`, or scan the QR code from your own `agentmesh-one` mesh.
Both paths include connection checks and instructions for reporting failures.
---
@@ -43,22 +43,22 @@ Run one of the following from the **repository root directory**. The `mobile-ffi
* **For Android ARM64 (physical phones, and emulators on Apple Silicon hosts)**:
```bash
make mobile-ffi-android
- mkdir -p mobile/sam-node-app/android/app/src/main/jniLibs/arm64-v8a
- cp bin/android/libsam.so mobile/sam-node-app/android/app/src/main/jniLibs/arm64-v8a/
+ mkdir -p mobile/agentmesh-node-app/android/app/src/main/jniLibs/arm64-v8a
+ cp bin/android/libsam.so mobile/agentmesh-node-app/android/app/src/main/jniLibs/arm64-v8a/
```
* **For Android x86_64 emulators (Intel and Linux hosts)**:
```bash
make mobile-ffi-android-x86_64
- mkdir -p mobile/sam-node-app/android/app/src/main/jniLibs/x86_64
- cp bin/android-x86_64/libsam.so mobile/sam-node-app/android/app/src/main/jniLibs/x86_64/
+ mkdir -p mobile/agentmesh-node-app/android/app/src/main/jniLibs/x86_64
+ cp bin/android-x86_64/libsam.so mobile/agentmesh-node-app/android/app/src/main/jniLibs/x86_64/
```
### 2. Run the App
Connect your device or start your emulator, then run:
```bash
-cd mobile/sam-node-app
+cd mobile/agentmesh-node-app
flutter run
```
@@ -71,7 +71,7 @@ Google Play takes an Android App Bundle (`.aab`) signed with an **upload key**;
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
```
Back the file up: with [Play App Signing](https://support.google.com/googleplay/android-developer/answer/9842756) Google holds the app signing key and this is only the upload key, but losing it still means a key-reset request.
-2. Tell Gradle where it is, in `mobile/sam-node-app/android/key.properties`:
+2. Tell Gradle where it is, in `mobile/agentmesh-node-app/android/key.properties`:
```properties
storeFile=/home/you/upload-keystore.jks
storePassword=...
@@ -83,7 +83,7 @@ Google Play takes an Android App Bundle (`.aab`) signed with an **upload key**;
```bash
make mobile-app-bundle MOBILE_BUILD_NAME=1.2.3 MOBILE_BUILD_NUMBER=42
```
- The bundle lands in `mobile/sam-node-app/build/app/outputs/bundle/release/app-release.aab`. `MOBILE_BUILD_NAME`/`MOBILE_BUILD_NUMBER` override the `version: X.Y.Z+N` in `pubspec.yaml`; Play refuses a `versionCode` (`N`) it has already seen, so bump it on every upload.
+ The bundle lands in `mobile/agentmesh-node-app/build/app/outputs/bundle/release/app-release.aab`. `MOBILE_BUILD_NAME`/`MOBILE_BUILD_NUMBER` override the `version: X.Y.Z+N` in `pubspec.yaml`; Play refuses a `versionCode` (`N`) it has already seen, so bump it on every upload.
4. Upload the `.aab` in the Play Console (**Release → Testing/Production → Create new release**).
#### From CI
@@ -101,10 +101,10 @@ Publishing is keyless: [`hack/publish-play.sh`](../../hack/publish-play.sh) driv
## How to Use the Application
-Once launched, the app (installed as **SAM Connect**, application id `dev.sammesh.connect`) asks you to enroll, then shows the dashboard:
+Once launched, the app (installed as **Agent Mesh Connect**, application id `dev.sammesh.connect`) asks you to enroll, then shows the dashboard:
-1. **Scan enrollment code**: The primary path. `sam-one` prints a single-use `mesh://enroll?server=...&token=...` QR code at startup (and on demand with `sam-one token qr`); scan it, confirm the control plane hostname, and the app enrolls through `POST /enroll` with no identity provider involved. The phone's stock camera app can scan it too: the `mesh://` link opens SAM Connect. Only `https://` control planes are accepted (plaintext `http://` for loopback only), because the control plane is the device's trust root. See [Your own mesh](../../site/content/docs/getting-started/your-own-mesh.md).
-2. **Enter details manually**: Paste a whole `mesh://enroll` link or a bare bootstrap token together with the **Control plane URL**, then **Join with token**. On a full control plane, mint the token with `POST /admin/bootstrap-tokens` (see `development/kind/run-local-node.sh`); on `sam-one`, `sam-one token create`. Below it, **Login & Enroll (Browser)** and **Device Login** are the OIDC alternatives: the app reads the issuer from the control plane's `/info` endpoint and opens a login.
+1. **Scan enrollment code**: The primary path. `agentmesh-one` prints a single-use `mesh://enroll?server=...&token=...` QR code at startup (and on demand with `agentmesh-one token qr`); scan it, confirm the control plane hostname, and the app enrolls through `POST /enroll` with no identity provider involved. The phone's stock camera app can scan it too: the `mesh://` link opens Agent Mesh Connect. Only `https://` control planes are accepted (plaintext `http://` for loopback only), because the control plane is the device's trust root. See [Your own mesh](../../site/content/docs/getting-started/your-own-mesh.md).
+2. **Enter details manually**: Paste a whole `mesh://enroll` link or a bare bootstrap token together with the **Control plane URL**, then **Join with token**. On a full control plane, mint the token with `POST /admin/bootstrap-tokens` (see `development/kind/run-local-node.sh`); on `agentmesh-one`, `agentmesh-one token create`. Below it, **Login & Enroll (Browser)** and **Device Login** are the OIDC alternatives: the app reads the issuer from the control plane's `/info` endpoint and opens a login.
3. **Local API Token**: The bearer token that secures the local sidecar REST API. It is generated on first launch and kept in the app's private storage; view, copy or regenerate it on the **Config** tab. There is no default: Android loopback is shared by every installed app, so a fixed value would let any of them act as this node.
4. **Labels**: Set on the **Config** tab *before* enrolling; they are attested into the node's Biscuit at that point.
5. **Start Node**: Launches the Go node runtime in the background. It will bind its local MCP sidecar to `127.0.0.1:5005`.
@@ -139,7 +139,7 @@ Exposes capabilities directly to the OS registry, allowing native assistants (li
1. **Dashboard Tab**: Displays current status, Node ID, connected peers, and DHT size.
2. **Services Tab**: Allows enabling/disabling embedded sensors (Battery/Location) and bridging external local MCP servers.
-3. **Config Tab**: The node's labels and attenuation, the app's stand-in for `sam-node.yaml`. Labels (comma-separated `key=value`) are set here; the control plane attests them into the node's Biscuit at enrollment, so changing them later means pressing Re-enroll, which re-attests them with the login session saved at enrollment (the browser opens only if that session has expired) and keeps the node's identity. A node that joined with a token or QR code has no login session and the control plane re-mints from the labels already on record, so Re-enroll is disabled for it: unenroll and join again with the new labels. Attenuation is Datalog rules, policies and checks that limit who may call this node, one statement per line (e.g. `check if label("region", "eu-west-1");`). They are read when the node starts, and a syntax error fails the start. Same syntax and same errors as the `attenuation` block of `sam-node.yaml`; see [Node configuration](../../site/content/docs/reference/node-config.md#attenuation).
+3. **Config Tab**: The node's labels and attenuation, the app's stand-in for `agentmesh-node.yaml`. Labels (comma-separated `key=value`) are set here; the control plane attests them into the node's Biscuit at enrollment, so changing them later means pressing Re-enroll, which re-attests them with the login session saved at enrollment (the browser opens only if that session has expired) and keeps the node's identity. A node that joined with a token or QR code has no login session and the control plane re-mints from the labels already on record, so Re-enroll is disabled for it: unenroll and join again with the new labels. Attenuation is Datalog rules, policies and checks that limit who may call this node, one statement per line (e.g. `check if label("region", "eu-west-1");`). They are read when the node starts, and a syntax error fails the start. Same syntax and same errors as the `attenuation` block of `agentmesh-node.yaml`; see [Node configuration](../../site/content/docs/reference/node-config.md#attenuation).
---
@@ -155,7 +155,7 @@ You can query the phone's telemetry from a remote machine (or another node) usin
# (-token is your own node's API token, not the phone's)
go run cmd/mcp-client/main.go \
-url "http://localhost:8080/mesh/<PHONE_PEER_ID>/mcp/phone-sensors" \
- -token "$(cat ~/.config/sam-mesh/api-token)" \
+ -token "$(cat ~/.config/agentmesh/api-token)" \
-list
```
*Output:*
@@ -166,7 +166,7 @@ You can query the phone's telemetry from a remote machine (or another node) usin
```bash
go run cmd/mcp-client/main.go \
-url "http://localhost:8080/mesh/<PHONE_PEER_ID>/mcp/phone-sensors" \
- -token "$(cat ~/.config/sam-mesh/api-token)" \
+ -token "$(cat ~/.config/agentmesh/api-token)" \
-tool "get_location"
```
*Output:* `{"latitude": 42.28, "longitude": -8.61, "precision_km": 1}`
diff --git a/mobile/sam-node-app/analysis_options.yaml b/mobile/agentmesh-node-app/analysis_options.yaml
similarity index 100%
rename from mobile/sam-node-app/analysis_options.yaml
rename to mobile/agentmesh-node-app/analysis_options.yaml
diff --git a/mobile/sam-node-app/android/.gitignore b/mobile/agentmesh-node-app/android/.gitignore
similarity index 100%
rename from mobile/sam-node-app/android/.gitignore
rename to mobile/agentmesh-node-app/android/.gitignore
diff --git a/mobile/sam-node-app/android/app/build.gradle.kts b/mobile/agentmesh-node-app/android/app/build.gradle.kts
similarity index 100%
rename from mobile/sam-node-app/android/app/build.gradle.kts
rename to mobile/agentmesh-node-app/android/app/build.gradle.kts
diff --git a/mobile/sam-node-app/android/app/google-services.json.tmpl b/mobile/agentmesh-node-app/android/app/google-services.json.tmpl
similarity index 100%
rename from mobile/sam-node-app/android/app/google-services.json.tmpl
rename to mobile/agentmesh-node-app/android/app/google-services.json.tmpl
diff --git a/mobile/sam-node-app/android/app/src/debug/AndroidManifest.xml b/mobile/agentmesh-node-app/android/app/src/debug/AndroidManifest.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/debug/AndroidManifest.xml
rename to mobile/agentmesh-node-app/android/app/src/debug/AndroidManifest.xml
diff --git a/mobile/sam-node-app/android/app/src/debug/res/xml/network_security_config.xml b/mobile/agentmesh-node-app/android/app/src/debug/res/xml/network_security_config.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/debug/res/xml/network_security_config.xml
rename to mobile/agentmesh-node-app/android/app/src/debug/res/xml/network_security_config.xml
diff --git a/mobile/sam-node-app/android/app/src/main/AndroidManifest.xml b/mobile/agentmesh-node-app/android/app/src/main/AndroidManifest.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/AndroidManifest.xml
rename to mobile/agentmesh-node-app/android/app/src/main/AndroidManifest.xml
diff --git a/mobile/sam-node-app/android/app/src/main/kotlin/dev/sammesh/connect/MainActivity.kt b/mobile/agentmesh-node-app/android/app/src/main/kotlin/dev/sammesh/connect/MainActivity.kt
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/kotlin/dev/sammesh/connect/MainActivity.kt
rename to mobile/agentmesh-node-app/android/app/src/main/kotlin/dev/sammesh/connect/MainActivity.kt
diff --git a/mobile/sam-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamApplication.kt b/mobile/agentmesh-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamApplication.kt
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamApplication.kt
rename to mobile/agentmesh-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamApplication.kt
diff --git a/mobile/sam-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamFunctions.kt b/mobile/agentmesh-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamFunctions.kt
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamFunctions.kt
rename to mobile/agentmesh-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamFunctions.kt
diff --git a/mobile/sam-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamNodeForegroundService.kt b/mobile/agentmesh-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamNodeForegroundService.kt
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamNodeForegroundService.kt
rename to mobile/agentmesh-node-app/android/app/src/main/kotlin/dev/sammesh/connect/SamNodeForegroundService.kt
diff --git a/mobile/sam-node-app/android/app/src/main/res/drawable-v21/launch_background.xml b/mobile/agentmesh-node-app/android/app/src/main/res/drawable-v21/launch_background.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/drawable-v21/launch_background.xml
rename to mobile/agentmesh-node-app/android/app/src/main/res/drawable-v21/launch_background.xml
diff --git a/mobile/sam-node-app/android/app/src/main/res/drawable/launch_background.xml b/mobile/agentmesh-node-app/android/app/src/main/res/drawable/launch_background.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/drawable/launch_background.xml
rename to mobile/agentmesh-node-app/android/app/src/main/res/drawable/launch_background.xml
diff --git a/mobile/sam-node-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/mobile/agentmesh-node-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to mobile/agentmesh-node-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/mobile/sam-node-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/mobile/agentmesh-node-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to mobile/agentmesh-node-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/mobile/sam-node-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/mobile/agentmesh-node-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to mobile/agentmesh-node-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/mobile/sam-node-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/mobile/agentmesh-node-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to mobile/agentmesh-node-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/mobile/sam-node-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/mobile/agentmesh-node-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to mobile/agentmesh-node-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/mobile/sam-node-app/android/app/src/main/res/values-night/styles.xml b/mobile/agentmesh-node-app/android/app/src/main/res/values-night/styles.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/values-night/styles.xml
rename to mobile/agentmesh-node-app/android/app/src/main/res/values-night/styles.xml
diff --git a/mobile/sam-node-app/android/app/src/main/res/values/strings.xml b/mobile/agentmesh-node-app/android/app/src/main/res/values/strings.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/values/strings.xml
rename to mobile/agentmesh-node-app/android/app/src/main/res/values/strings.xml
diff --git a/mobile/sam-node-app/android/app/src/main/res/values/styles.xml b/mobile/agentmesh-node-app/android/app/src/main/res/values/styles.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/values/styles.xml
rename to mobile/agentmesh-node-app/android/app/src/main/res/values/styles.xml
diff --git a/mobile/sam-node-app/android/app/src/main/res/xml/app_metadata.xml b/mobile/agentmesh-node-app/android/app/src/main/res/xml/app_metadata.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/main/res/xml/app_metadata.xml
rename to mobile/agentmesh-node-app/android/app/src/main/res/xml/app_metadata.xml
diff --git a/mobile/sam-node-app/android/app/src/profile/AndroidManifest.xml b/mobile/agentmesh-node-app/android/app/src/profile/AndroidManifest.xml
similarity index 100%
rename from mobile/sam-node-app/android/app/src/profile/AndroidManifest.xml
rename to mobile/agentmesh-node-app/android/app/src/profile/AndroidManifest.xml
diff --git a/mobile/sam-node-app/android/build.gradle.kts b/mobile/agentmesh-node-app/android/build.gradle.kts
similarity index 100%
rename from mobile/sam-node-app/android/build.gradle.kts
rename to mobile/agentmesh-node-app/android/build.gradle.kts
diff --git a/mobile/sam-node-app/android/gradle.properties b/mobile/agentmesh-node-app/android/gradle.properties
similarity index 100%
rename from mobile/sam-node-app/android/gradle.properties
rename to mobile/agentmesh-node-app/android/gradle.properties
diff --git a/mobile/sam-node-app/android/gradle/wrapper/gradle-wrapper.properties b/mobile/agentmesh-node-app/android/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from mobile/sam-node-app/android/gradle/wrapper/gradle-wrapper.properties
rename to mobile/agentmesh-node-app/android/gradle/wrapper/gradle-wrapper.properties
diff --git a/mobile/sam-node-app/android/settings.gradle.kts b/mobile/agentmesh-node-app/android/settings.gradle.kts
similarity index 100%
rename from mobile/sam-node-app/android/settings.gradle.kts
rename to mobile/agentmesh-node-app/android/settings.gradle.kts
diff --git a/mobile/sam-node-app/integration_test/e2e_test.dart b/mobile/agentmesh-node-app/integration_test/e2e_test.dart
similarity index 100%
rename from mobile/sam-node-app/integration_test/e2e_test.dart
rename to mobile/agentmesh-node-app/integration_test/e2e_test.dart
diff --git a/mobile/sam-node-app/lib/enroll_link.dart b/mobile/agentmesh-node-app/lib/enroll_link.dart
similarity index 100%
rename from mobile/sam-node-app/lib/enroll_link.dart
rename to mobile/agentmesh-node-app/lib/enroll_link.dart
diff --git a/mobile/sam-node-app/lib/main.dart b/mobile/agentmesh-node-app/lib/main.dart
similarity index 99%
rename from mobile/sam-node-app/lib/main.dart
rename to mobile/agentmesh-node-app/lib/main.dart
index b100f982..0fbacdde 100644
--- a/mobile/sam-node-app/lib/main.dart
+++ b/mobile/agentmesh-node-app/lib/main.dart
@@ -81,7 +81,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
- title: 'SAM Connect',
+ title: 'Agent Mesh Connect',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: true,
@@ -1182,7 +1182,7 @@ class _NodeControlPageState extends State<NodeControlPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: AppBar(title: const Text('SAM Connect')),
+ appBar: AppBar(title: const Text('Agent Mesh Connect')),
body: _selectedTab == 0
? _buildBody()
: _selectedTab == 1
@@ -1546,7 +1546,7 @@ class _NodeControlPageState extends State<NodeControlPage> {
}
// Landing screen. The primary path is the QR code a control plane prints
- // (sam-one's terminal, `sam-one token qr`); everything else sits behind
+ // (agentmesh-one's terminal, `agentmesh-one token qr`); everything else sits behind
// "Enter details manually": a bootstrap token, or the OIDC logins.
Widget _buildEnrollmentView() {
final busy = _loggingIn;
diff --git a/mobile/sam-node-app/lib/mcp_server.dart b/mobile/agentmesh-node-app/lib/mcp_server.dart
similarity index 100%
rename from mobile/sam-node-app/lib/mcp_server.dart
rename to mobile/agentmesh-node-app/lib/mcp_server.dart
diff --git a/mobile/sam-node-app/lib/oidc.dart b/mobile/agentmesh-node-app/lib/oidc.dart
similarity index 100%
rename from mobile/sam-node-app/lib/oidc.dart
rename to mobile/agentmesh-node-app/lib/oidc.dart
diff --git a/mobile/sam-node-app/lib/sam_ffi.dart b/mobile/agentmesh-node-app/lib/sam_ffi.dart
similarity index 100%
rename from mobile/sam-node-app/lib/sam_ffi.dart
rename to mobile/agentmesh-node-app/lib/sam_ffi.dart
diff --git a/mobile/sam-node-app/lib/scan_page.dart b/mobile/agentmesh-node-app/lib/scan_page.dart
similarity index 100%
rename from mobile/sam-node-app/lib/scan_page.dart
rename to mobile/agentmesh-node-app/lib/scan_page.dart
diff --git a/mobile/sam-node-app/pubspec.lock b/mobile/agentmesh-node-app/pubspec.lock
similarity index 100%
rename from mobile/sam-node-app/pubspec.lock
rename to mobile/agentmesh-node-app/pubspec.lock
diff --git a/mobile/sam-node-app/pubspec.yaml b/mobile/agentmesh-node-app/pubspec.yaml
similarity index 100%
rename from mobile/sam-node-app/pubspec.yaml
rename to mobile/agentmesh-node-app/pubspec.yaml
diff --git a/mobile/sam-node-app/test/enroll_link_test.dart b/mobile/agentmesh-node-app/test/enroll_link_test.dart
similarity index 91%
rename from mobile/sam-node-app/test/enroll_link_test.dart
rename to mobile/agentmesh-node-app/test/enroll_link_test.dart
index 93d35fbf..138b212a 100644
--- a/mobile/sam-node-app/test/enroll_link_test.dart
+++ b/mobile/agentmesh-node-app/test/enroll_link_test.dart
@@ -2,11 +2,11 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:sam_agent/enroll_link.dart';
void main() {
- // Byte-for-byte the payload sam-one prints under its QR code.
+ // Byte-for-byte the payload agentmesh-one prints under its QR code.
const printed =
'mesh://enroll?server=https%3A%2F%2Fabc-def-123.trycloudflare.com&token=mesh_dev_0123456789abcdef';
- test('parses the link sam-one prints, tolerating pasted whitespace', () {
+ test('parses the link agentmesh-one prints, tolerating pasted whitespace', () {
final link = parseEnrollLink(' $printed\n');
expect(link, isNotNull);
expect(link!.server, 'https://abc-def-123.trycloudflare.com');
@@ -17,7 +17,7 @@ void main() {
test('accepts plaintext http only to loopback (emulator over adb reverse)', () {
final link = parseEnrollLink(
- 'mesh://enroll?server=http%3A%2F%2F127.0.0.1%3A18432&token=sam-bt-abc');
+ 'mesh://enroll?server=http%3A%2F%2F127.0.0.1%3A18432&token=mesh-bt-abc');
expect(link?.server, 'http://127.0.0.1:18432');
expect(link?.serverHost, '127.0.0.1');
expect(isTrustedControlPlaneUrl('http://localhost:8080'), isTrue);
diff --git a/mobile/sam-node-app/test/mcp_server_test.dart b/mobile/agentmesh-node-app/test/mcp_server_test.dart
similarity index 100%
rename from mobile/sam-node-app/test/mcp_server_test.dart
rename to mobile/agentmesh-node-app/test/mcp_server_test.dart
diff --git a/mobile/sam-node-app/test/oidc_test.dart b/mobile/agentmesh-node-app/test/oidc_test.dart
similarity index 100%
rename from mobile/sam-node-app/test/oidc_test.dart
rename to mobile/agentmesh-node-app/test/oidc_test.dart
diff --git a/mobile/sam-node-ffi/ffi/dns_android.go b/mobile/agentmesh-node-ffi/ffi/dns_android.go
similarity index 100%
rename from mobile/sam-node-ffi/ffi/dns_android.go
rename to mobile/agentmesh-node-ffi/ffi/dns_android.go
diff --git a/mobile/sam-node-ffi/ffi/dns_android_test.go b/mobile/agentmesh-node-ffi/ffi/dns_android_test.go
similarity index 100%
rename from mobile/sam-node-ffi/ffi/dns_android_test.go
rename to mobile/agentmesh-node-ffi/ffi/dns_android_test.go
diff --git a/mobile/sam-node-ffi/ffi/ffi.go b/mobile/agentmesh-node-ffi/ffi/ffi.go
similarity index 99%
rename from mobile/sam-node-ffi/ffi/ffi.go
rename to mobile/agentmesh-node-ffi/ffi/ffi.go
index fbdedbb3..4a7cbe34 100644
--- a/mobile/sam-node-ffi/ffi/ffi.go
+++ b/mobile/agentmesh-node-ffi/ffi/ffi.go
@@ -43,7 +43,7 @@ var (
unauthSrv *http.Server
mu sync.Mutex
- logger = golog.Logger("sam-node-ffi")
+ logger = golog.Logger("agentmesh-node-ffi")
)
// MobileConfig holds simple configuration options for the mobile agent.
@@ -246,7 +246,7 @@ func StartNode(configJSON string) error {
}
activeNode = samNode
- // Register the declared services, like cmd/sam-node does after Start.
+ // Register the declared services, like cmd/agentmesh-node does after Start.
// In the background with retries: on mobile the first router connection
// can take minutes, and RegisterStaticServices waits only briefly for
// mesh connectivity before giving up.
diff --git a/mobile/sam-node-ffi/ffi/ffi_test.go b/mobile/agentmesh-node-ffi/ffi/ffi_test.go
similarity index 100%
rename from mobile/sam-node-ffi/ffi/ffi_test.go
rename to mobile/agentmesh-node-ffi/ffi/ffi_test.go
diff --git a/mobile/sam-node-ffi/main.go b/mobile/agentmesh-node-ffi/main.go
similarity index 98%
rename from mobile/sam-node-ffi/main.go
rename to mobile/agentmesh-node-ffi/main.go
index 770169e7..95cbdce4 100644
--- a/mobile/sam-node-ffi/main.go
+++ b/mobile/agentmesh-node-ffi/main.go
@@ -22,7 +22,7 @@ import (
"unsafe"
"github.com/google/agentmesh/internal/version"
- "github.com/google/agentmesh/mobile/sam-node-ffi/ffi"
+ "github.com/google/agentmesh/mobile/agentmesh-node-ffi/ffi"
)
func main() {}
diff --git a/scripts/README.md b/scripts/README.md
index beaa2001..0dd86e78 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -1,6 +1,6 @@
-# SAM Scale Experiment Scripts
+# Agent Mesh Scale Experiment Scripts
-This directory contains the automation scripts to run massive scale experiments of the SAM mesh network using Google Cloud Platform (GCP) and Firecracker microVMs.
+This directory contains the automation scripts to run massive scale experiments of the Agent Mesh network using Google Cloud Platform (GCP) and Firecracker microVMs.
## Architecture Overview
@@ -16,19 +16,19 @@ Run the `build-rootfs.sh` script locally. This uses Docker to create an Alpine L
```bash
# Build locally and automatically upload to your Google Cloud Storage bucket
-./scripts/build-rootfs.sh gs://my-sam-bucket/scale-test
+./scripts/build-rootfs.sh gs://my-agentmesh-bucket/scale-test
```
### 2. Provision the Cloud Minions
-Use the `provision-scale-vm.sh` script to bulk-create your GCP Minion VMs. The script automatically compiles your local `sam-node` and `sam-box` binaries, uploads them, and configures the VMs via `cloud-init.yaml`.
+Use the `provision-scale-vm.sh` script to bulk-create your GCP Minion VMs. The script automatically compiles your local `agentmesh-node` and `agentmesh-box` binaries, uploads them, and configures the VMs via `cloud-init.yaml`.
```bash
# Provision 100 VMs using your local binaries and rootfs
-./scripts/provision-scale-vm.sh --prefix sam-minions --count 100 --local-binaries gs://my-sam-bucket/scale-test
+./scripts/provision-scale-vm.sh --prefix agentmesh-minions --count 100 --local-binaries gs://my-agentmesh-bucket/scale-test
```
### 3. Launch MicroVMs
-Once the GCP Minions boot up, their `cloud-init` automatically downloads Firecracker, your rootfs, and the latest SAM binaries.
+Once the GCP Minions boot up, their `cloud-init` automatically downloads Firecracker, your rootfs, and the latest Agent Mesh binaries.
SSH into a Minion VM (or use a startup-script wrapper) and run the launcher:
```bash
@@ -36,4 +36,4 @@ SSH into a Minion VM (or use a startup-script wrapper) and run the launcher:
/opt/microvm/launch-microvms.sh 20
```
-Each microVM is spawned with a dedicated `sam-box` running on the host. Network traffic is transparently routed out of the guest using `tun2proxy` over Firecracker VSOCK, hitting the local `sam-box` UDS endpoint.
+Each microVM is spawned with a dedicated `agentmesh-box` running on the host. Network traffic is transparently routed out of the guest using `tun2proxy` over Firecracker VSOCK, hitting the local `agentmesh-box` UDS endpoint.
diff --git a/scripts/launch-microvms.sh b/scripts/launch-microvms.sh
index ba4dbfa3..33259829 100755
--- a/scripts/launch-microvms.sh
+++ b/scripts/launch-microvms.sh
@@ -2,12 +2,12 @@
# Launch N agent sandboxes on one host.
#
# The shape here is the point, and it is not what this script used to do. It
-# ran one sam-node per microVM, which made every agent a mesh member: its own
+# ran one agentmesh-node per microVM, which made every agent a mesh member: its own
# enrolment, its own libp2p host, its own place in the DHT. That does not reach
# a thousand agents on a host, and it measures the wrong thing besides. An
# agent is a principal, not a peer.
#
-# So: one sam-node for the host, which is the mesh member, and one sam-box per
+# So: one agentmesh-node for the host, which is the mesh member, and one agentmesh-box per
# agent, which holds no mesh identity at all and names its agent on every
# request. Adding an agent costs a boundary, not an enrolment.
set -euo pipefail
@@ -30,7 +30,7 @@ AGENT_DOMAIN="${AGENT_DOMAIN:-scale.sam-mesh.dev}"
# Worth knowing when budgeting: mem_size_mib is a ceiling, not an allocation.
# The host only pays for pages the guest touches, so raising it is cheap and
# the real cost per agent is roughly the guest's working set plus about 18 MiB
-# for its sam-box.
+# for its agentmesh-box.
VM_MEM_MIB="${VM_MEM_MIB:-160}"
VM_VCPUS="${VM_VCPUS:-1}"
@@ -45,7 +45,7 @@ SANDBOX_LINGER="${SANDBOX_LINGER:-0}"
# variables. Model names and durations are safe; prompts are not, which is why
# the task stays in the init script.
AGENT_ENV=""
-for v in SAM_MODEL CHAOS_SLEEP CHAOS_ROUNDS; do
+for v in AGENTMESH_MODEL CHAOS_SLEEP CHAOS_ROUNDS; do
eval "val=\${$v:-}"
[ -z "$val" ] && continue
case "$val" in
@@ -62,13 +62,13 @@ fi
# Everything the host writes is overridable, so this can be exercised on a
# workstation before it is trusted on a fleet. The defaults are the paths a
# provisioned VM has.
-NODE_UDS="${NODE_UDS:-/var/run/sam-node.sock}"
-NODE_DIR="${NODE_DIR:-/var/lib/sam-node}"
+NODE_UDS="${NODE_UDS:-/var/run/agentmesh-node.sock}"
+NODE_DIR="${NODE_DIR:-/var/lib/agentmesh-node}"
RUN_DIR="${RUN_DIR:-/var/run}"
LOG_DIR="${LOG_DIR:-/var/log}"
-SAM_NODE="${SAM_NODE:-sam-node}"
-SAM_BOX="${SAM_BOX:-sam-box}"
-BOOTSTRAP_TOKEN_PATH="${BOOTSTRAP_TOKEN_PATH:-/etc/sam-bootstrap-token}"
+AGENTMESH_NODE="${AGENTMESH_NODE:-agentmesh-node}"
+AGENTMESH_BOX="${AGENTMESH_BOX:-agentmesh-box}"
+BOOTSTRAP_TOKEN_PATH="${BOOTSTRAP_TOKEN_PATH:-/etc/agentmesh-bootstrap-token}"
# Everything is checked before anything is started. Launching a thousand
# sandboxes against a node that turned out to be unenrollable wastes the whole
@@ -82,7 +82,7 @@ command -v firecracker >/dev/null 2>&1 || fail "firecracker is not installed"
[ -w /dev/kvm ] || fail "/dev/kvm is not writable; nested virtualisation is required"
[ -f "$WORKDIR/vmlinux.bin" ] || fail "no guest kernel at $WORKDIR/vmlinux.bin"
[ -f "$WORKDIR/rootfs.ext4" ] || fail "no guest rootfs at $WORKDIR/rootfs.ext4"
-command -v "$SAM_BOX" >/dev/null 2>&1 || [ -x "$SAM_BOX" ] || fail "sam-box not found ($SAM_BOX)"
+command -v "$AGENTMESH_BOX" >/dev/null 2>&1 || [ -x "$AGENTMESH_BOX" ] || fail "agentmesh-box not found ($AGENTMESH_BOX)"
# An agent sandbox has no network device and reaches the mesh through a tun, so
# a kernel without the driver gives every sandbox no route at all.
@@ -98,7 +98,7 @@ fi
# A node that is already serving needs no credential. One that has to be
# started does, and finding that out after a fleet is up is too late.
if [ ! -S "$NODE_UDS" ]; then
- command -v "$SAM_NODE" >/dev/null 2>&1 || [ -x "$SAM_NODE" ] || fail "sam-node not found ($SAM_NODE)"
+ command -v "$AGENTMESH_NODE" >/dev/null 2>&1 || [ -x "$AGENTMESH_NODE" ] || fail "agentmesh-node not found ($AGENTMESH_NODE)"
if [ ! -s "$BOOTSTRAP_TOKEN_PATH" ]; then
fail "no bootstrap token at $BOOTSTRAP_TOKEN_PATH (set BOOTSTRAP_TOKEN_PATH), and no node already serving $NODE_UDS"
fi
@@ -119,13 +119,13 @@ if [ -S "${NODE_UDS}" ]; then
echo "Using the node already serving ${NODE_UDS}"
else
mkdir -p "${NODE_DIR}"
- "${SAM_NODE}" run \
+ "${AGENTMESH_NODE}" run \
--data-dir "${NODE_DIR}" \
--control-plane "$CONTROL_PLANE" \
--bootstrap-token-path "${BOOTSTRAP_TOKEN_PATH}" \
--bind-addr "" \
--socket-path "${NODE_UDS}" \
- > "${LOG_DIR}/sam-node.log" 2>&1 &
+ > "${LOG_DIR}/agentmesh-node.log" 2>&1 &
# The boundaries are useless before the node answers, and starting a
# thousand of them against a socket that does not exist yet produces a
@@ -136,7 +136,7 @@ else
done
[ -S "${NODE_UDS}" ] || {
echo "node never bound ${NODE_UDS}" >&2
- tail -20 "${LOG_DIR}/sam-node.log" >&2
+ tail -20 "${LOG_DIR}/agentmesh-node.log" >&2
exit 1
}
@@ -153,7 +153,7 @@ else
done
[ "${enrolled}" -eq 1 ] || {
echo "node bound its socket but never enrolled; is the bootstrap token valid?" >&2
- tail -20 "${LOG_DIR}/sam-node.log" >&2
+ tail -20 "${LOG_DIR}/agentmesh-node.log" >&2
exit 1
}
echo "Node ready at ${NODE_UDS}"
@@ -177,10 +177,10 @@ for i in $(seq 1 "$COUNT"); do
# Firecracker's vsock multiplexes guest connections onto
# "<uds_path>_<port>", so the boundary must listen on that exact name for
# the guest's connections to CID 2 port 1080 to arrive.
- VSOCK_UDS="${RUN_DIR}/sam-$VM_ID.vsock"
+ VSOCK_UDS="${RUN_DIR}/agentmesh-$VM_ID.vsock"
BOUNDARY_UDS="${VSOCK_UDS}_1080"
API_SOCKET="/tmp/firecracker-$VM_ID.socket"
- BUNDLE="${RUN_DIR}/sam-$VM_ID.bundle.yaml"
+ BUNDLE="${RUN_DIR}/agentmesh-$VM_ID.bundle.yaml"
rm -f "$VSOCK_UDS" "$BOUNDARY_UDS" "$API_SOCKET"
@@ -202,12 +202,12 @@ EOF
# There is no credential issuer in this harness, and the flag says so
# rather than a default quietly meaning it.
- "${SAM_BOX}" run \
+ "${AGENTMESH_BOX}" run \
--socket "$BOUNDARY_UDS" \
--sidecar-socket "${NODE_UDS}" \
--bundle "$BUNDLE" \
--insecure-unverified-bundle \
- > "${LOG_DIR}/sam-box-$VM_ID.log" 2>&1 &
+ > "${LOG_DIR}/agentmesh-box-$VM_ID.log" 2>&1 &
firecracker --api-sock "$API_SOCKET" > "${LOG_DIR}/fc-$VM_ID.log" 2>&1 &
@@ -256,4 +256,4 @@ done
echo "=== $COUNT sandboxes running against one node ==="
echo "How many agents the node thinks it is serving:"
-echo " grep sam_node_agents_seen <(curl -s --unix-socket $NODE_UDS http://localhost/metrics)"
+echo " grep agentmesh_node_agents_seen <(curl -s --unix-socket $NODE_UDS http://localhost/metrics)"
diff --git a/scripts/microvm-init.sh b/scripts/microvm-init.sh
index a6e929ca..22787b33 100755
--- a/scripts/microvm-init.sh
+++ b/scripts/microvm-init.sh
@@ -9,7 +9,7 @@
#
# The boundary is a Unix socket on the host. Firecracker's vsock multiplexes
# guest connections onto "<uds_path>_<port>", so a guest connection to CID 2
-# port 1080 arrives on the host at the path sam-box serves.
+# port 1080 arrives on the host at the path agentmesh-box serves.
set -eu
# Best effort, not preconditions: a kernel configured with devtmpfs has already
diff --git a/scripts/provision-scale-vm.sh b/scripts/provision-scale-vm.sh
index ca9c8f30..af9105aa 100755
--- a/scripts/provision-scale-vm.sh
+++ b/scripts/provision-scale-vm.sh
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
-VM_NAME_PREFIX="sam-minions"
+VM_NAME_PREFIX="agentmesh-minions"
ZONE="us-central1-a"
PROJECT="ipv6-project-379110"
GCS_URL=""
@@ -41,12 +41,12 @@ METADATA="enable-osconfig=TRUE"
if [ -n "$GCS_URL" ]; then
echo "Building local binaries for injection..."
# Make sure we build for Linux x86_64 since the VM is Debian x86_64
- GOOS=linux GOARCH=amd64 go build -o /tmp/sam-node ./cmd/sam-node
- GOOS=linux GOARCH=amd64 go build -o /tmp/sam-box ./cmd/sam-box
+ GOOS=linux GOARCH=amd64 go build -o /tmp/agentmesh-node ./cmd/agentmesh-node
+ GOOS=linux GOARCH=amd64 go build -o /tmp/agentmesh-box ./cmd/agentmesh-box
echo "Uploading binaries to GCS: $GCS_URL"
- gcloud storage cp /tmp/sam-node "$GCS_URL/sam-node"
- gcloud storage cp /tmp/sam-box "$GCS_URL/sam-box"
+ gcloud storage cp /tmp/agentmesh-node "$GCS_URL/agentmesh-node"
+ gcloud storage cp /tmp/agentmesh-box "$GCS_URL/agentmesh-box"
echo "Uploading rootfs.ext4 and launch script to GCS..."
if [ ! -f "rootfs.ext4" ]; then
@@ -58,7 +58,7 @@ if [ -n "$GCS_URL" ]; then
# A run that cannot report on itself is not worth the machine it ran on.
gcloud storage cp tests/scale/collect-fleet.sh "$GCS_URL/collect-fleet.sh"
- METADATA="enable-osconfig=TRUE,sam-binaries-url=$GCS_URL"
+ METADATA="enable-osconfig=TRUE,agentmesh-binaries-url=$GCS_URL"
fi
echo "Provisioning $COUNT GCP Scale Experiment VM(s) with prefix '${VM_NAME_PREFIX}' in ${ZONE} (${PROJECT})..."
@@ -128,6 +128,6 @@ gcloud compute instances ops-agents policies create "goog-ops-agent-v2-template-
--file=/tmp/ops-agent-config.yaml || echo "Warning: Ops Agent policy creation returned an error (it might already exist)."
echo ""
-echo "Done! The VM ${VM_NAME} is booting. cloud-init is running in the background to install Firecracker, Go, and sam-box."
+echo "Done! The VM ${VM_NAME} is booting. cloud-init is running in the background to install Firecracker, Go, and agentmesh-box."
echo "You can view the cloud-init logs by SSHing into the VM and running:"
echo " sudo tail -f /var/log/cloud-init-output.log"
diff --git a/scripts/startup-script.sh b/scripts/startup-script.sh
index 600f1e1d..34d224a5 100644
--- a/scripts/startup-script.sh
+++ b/scripts/startup-script.sh
@@ -3,7 +3,7 @@ set -e
# Redirect all output to log file
exec > >(tee -a /var/log/startup-script.log) 2>&1
-echo "Starting SAM Host VM bootstrap..."
+echo "Starting Agent Mesh Host VM bootstrap..."
# Kill unattended-upgrades to avoid apt lock
systemctl stop unattended-upgrades.service || true
@@ -34,16 +34,16 @@ rm -rf release-v1.16.1-x86_64 firecracker-v1.16.1-x86_64.tgz
sysctl -w net.ipv4.ip_forward=1
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.d/99-ipforward.conf
-# 4. Install SAM Mesh binaries & MicroVM files
+# 4. Install Agent Mesh binaries & MicroVM files
# Check if custom binaries/rootfs were injected via GCP metadata (GCS URL)
-BIN_URL=$(curl --retry 5 --retry-connrefused --retry-delay 5 -s -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/attributes/sam-binaries-url" || true)
+BIN_URL=$(curl --retry 5 --retry-connrefused --retry-delay 5 -s -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/attributes/agentmesh-binaries-url" || true)
if [ -n "$BIN_URL" ] && [ "$BIN_URL" != "null" ]; then
echo "Found custom artifacts URL: $BIN_URL. Downloading from GCS..."
- # Download SAM binaries
- gcloud storage cp "$BIN_URL/sam-node" /usr/local/bin/
- gcloud storage cp "$BIN_URL/sam-box" /usr/local/bin/
- chmod +x /usr/local/bin/sam-*
+ # Download Agent Mesh binaries
+ gcloud storage cp "$BIN_URL/agentmesh-node" /usr/local/bin/
+ gcloud storage cp "$BIN_URL/agentmesh-box" /usr/local/bin/
+ chmod +x /usr/local/bin/agentmesh-*
# Download the pre-built MicroVM rootfs
mkdir -p /opt/microvm
@@ -54,7 +54,7 @@ if [ -n "$BIN_URL" ] && [ "$BIN_URL" != "null" ]; then
chmod +x /opt/microvm/collect-fleet.sh 2>/dev/null || true
else
echo "No custom binaries specified. Installing latest release from github..."
- export SAM_INSTALL_DIR=/usr/local/bin
+ export AGENTMESH_INSTALL_DIR=/usr/local/bin
curl --retry 5 --retry-connrefused --retry-delay 5 -sL https://sam-mesh.dev/install.sh | bash
fi
@@ -78,4 +78,4 @@ fi
# Ensure launch script is executable (if it was downloaded via GCS)
chmod +x /opt/microvm/launch-microvms.sh || true
-echo "SAM Host bootstrap finished successfully."
+echo "Agent Mesh Host bootstrap finished successfully."
diff --git a/site/content/docs/snippets/agent_demo.py b/site/content/docs/snippets/agent_demo.py
index c29fcb49..82dc6040 100644
--- a/site/content/docs/snippets/agent_demo.py
+++ b/site/content/docs/snippets/agent_demo.py
@@ -8,11 +8,11 @@ from mcp.client.streamable_http import streamable_http_client
async def main():
- # Connect to the local SAM node's MCP endpoint.
+ # Connect to the local Agent Mesh node's MCP endpoint.
# By default, sam-node listens at 127.0.0.1:8080.
url = os.environ.get("SAM_MCP_URL", "http://127.0.0.1:8080/mcp")
token = os.environ.get("SAM_API_TOKEN", "")
- print(f"Connecting to SAM Node at {url}")
+ print(f"Connecting to Agent Mesh Node at {url}")
headers = {"X-Mesh-Authentication": f"Bearer {token}"} if token else {}
try:
@@ -21,7 +21,7 @@ async def main():
async with ClientSession(read, write) as session:
await session.initialize()
- # Discover available tools provided by the SAM node
+ # Discover available tools provided by the Agent Mesh node
tools = (await session.list_tools()).tools
print(f"Discovered {len(tools)} tools:")
for tool in tools:
diff --git a/tests/e2e/a2a_mesh.bats b/tests/e2e/a2a_mesh.bats
index cad55a37..8d68ec17 100644
--- a/tests/e2e/a2a_mesh.bats
+++ b/tests/e2e/a2a_mesh.bats
@@ -2,7 +2,7 @@
load "lib/container_mesh.bash"
-A2A_ECHO_IMAGE="sam-a2a-echo:local"
+A2A_ECHO_IMAGE="agentmesh-a2a-echo:local"
build_a2a_echo_image() {
if ! docker image inspect "${A2A_ECHO_IMAGE}" >/dev/null 2>&1; then
@@ -51,7 +51,7 @@ teardown() {
echo "[$(date +%T)] Starting Node 2 (provider, region=eu) with the echo service"
mesh_start_node 2 \
"--log-level debug" \
- "tests/e2e/docker/a2a-echo/sam-node-config.yaml"
+ "tests/e2e/docker/a2a-echo/agentmesh-node-config.yaml"
mesh_wait_for_mcp_ready 2 30
local node2_peer_id
@@ -69,7 +69,7 @@ teardown() {
# the regenerated URLs, the gRPC drop and streaming-off) and gets an echo.
echo "[$(date +%T)] Running stock a2a-sdk client against ${mesh_base}"
run docker run --rm --network "${MESH_NETWORK}" \
- -e SAM_API_TOKEN="secret-token" \
+ -e AGENTMESH_API_TOKEN="secret-token" \
"${A2A_ECHO_IMAGE}" python3 /workspace/client.py "${mesh_base}" "hello mesh"
echo "client output: $output"
[[ "$status" -eq 0 ]]
@@ -86,8 +86,8 @@ teardown() {
local attempt
for attempt in 1 2 3; do
run docker run --rm --network "${MESH_NETWORK}" \
- -e SAM_API_TOKEN="secret-token" \
- -e SAM_REQUIRED_LABELS="region=eu" \
+ -e AGENTMESH_API_TOKEN="secret-token" \
+ -e AGENTMESH_REQUIRED_LABELS="region=eu" \
"${A2A_ECHO_IMAGE}" python3 /workspace/client.py "${mesh_base}" "hello eu"
[[ "$status" -eq 0 ]] && break
echo "labelled attempt ${attempt} failed, node-1 label gate verdicts:"
diff --git a/tests/e2e/sam.bats b/tests/e2e/agentmesh.bats
similarity index 62%
rename from tests/e2e/sam.bats
rename to tests/e2e/agentmesh.bats
index 02bc1aea..22c5361b 100644
--- a/tests/e2e/sam.bats
+++ b/tests/e2e/agentmesh.bats
@@ -1,9 +1,9 @@
#!/usr/bin/env bats
setup() {
- export SAM_NODE_BINARY="${SAM_NODE_BINARY:-./bin/sam-node}"
- export SAM_CONTROL_PLANE_BINARY="${SAM_CONTROL_PLANE_BINARY:-./bin/sam-control-plane}"
- export SAM_ROUTER_BINARY="${SAM_ROUTER_BINARY:-./bin/sam-router}"
+ export AGENTMESH_NODE_BINARY="${AGENTMESH_NODE_BINARY:-./bin/agentmesh-node}"
+ export AGENTMESH_CONTROL_PLANE_BINARY="${AGENTMESH_CONTROL_PLANE_BINARY:-./bin/agentmesh-control-plane}"
+ export AGENTMESH_ROUTER_BINARY="${AGENTMESH_ROUTER_BINARY:-./bin/agentmesh-router}"
export MCP_CLIENT_BINARY="${MCP_CLIENT_BINARY:-./bin/mcp-client}"
# Kept so helpers built with "go run" reuse the real module cache instead of
@@ -55,17 +55,17 @@ wait_for_socket() {
return 1
}
-@test "sam-node --help returns success" {
- run "$SAM_NODE_BINARY" --help
+@test "agentmesh-node --help returns success" {
+ run "$AGENTMESH_NODE_BINARY" --help
[[ "$status" -eq 0 ]]
[[ "$output" == *"Agent Mesh Node"* ]]
}
-@test "sam-node run without identity starts unauthenticated sidecar and serves mcp" {
- # Start sam-node in background with a specific port to avoid conflicts
- "$SAM_NODE_BINARY" run --bind-addr "127.0.0.1:8085" > "$TEST_TMPDIR/unauth-node.log" 2>&1 &
+@test "agentmesh-node run without identity starts unauthenticated sidecar and serves mcp" {
+ # Start agentmesh-node in background with a specific port to avoid conflicts
+ "$AGENTMESH_NODE_BINARY" run --bind-addr "127.0.0.1:8085" > "$TEST_TMPDIR/unauth-node.log" 2>&1 &
local node_pid=$!
# Give it a moment to start
@@ -81,7 +81,7 @@ wait_for_socket() {
# Check the output of mcp-client
[[ "$status" -eq 0 ]]
[[ "$output" == *"The node is unauthenticated. Please open a regular terminal and run:"* ]]
- [[ "$output" == *"sam-node join"* ]]
+ [[ "$output" == *"agentmesh-node join"* ]]
# Check node logs for the initial message
local log_output
@@ -89,11 +89,11 @@ wait_for_socket() {
[[ "$log_output" == *"No identity found. Starting unauthenticated sidecar for enrollment over MCP"* ]]
}
-@test "sam-node run answers on a Unix socket in the data dir with no token" {
+@test "agentmesh-node run answers on a Unix socket in the data dir with no token" {
local data_dir="$TEST_TMPDIR/socket-node"
- local socket="$data_dir/sam.sock"
+ local socket="$data_dir/agentmesh.sock"
- "$SAM_NODE_BINARY" run --data-dir "$data_dir" --bind-addr "127.0.0.1:8087" > "$TEST_TMPDIR/socket-node.log" 2>&1 &
+ "$AGENTMESH_NODE_BINARY" run --data-dir "$data_dir" --bind-addr "127.0.0.1:8087" > "$TEST_TMPDIR/socket-node.log" 2>&1 &
local node_pid=$!
run wait_for_socket "$socket"
@@ -113,11 +113,11 @@ wait_for_socket() {
[[ ! -e "$socket" ]]
}
-@test "sam-node run --bind-addr \"\" serves only on the Unix socket" {
+@test "agentmesh-node run --bind-addr \"\" serves only on the Unix socket" {
local data_dir="$TEST_TMPDIR/socket-only"
local socket="$TEST_TMPDIR/custom.sock"
- "$SAM_NODE_BINARY" run --data-dir "$data_dir" --bind-addr "" --socket-path "$socket" > "$TEST_TMPDIR/socket-only.log" 2>&1 &
+ "$AGENTMESH_NODE_BINARY" run --data-dir "$data_dir" --bind-addr "" --socket-path "$socket" > "$TEST_TMPDIR/socket-only.log" 2>&1 &
local node_pid=$!
run wait_for_socket "$socket"
@@ -136,13 +136,13 @@ wait_for_socket() {
log_output=$(cat "$TEST_TMPDIR/socket-only.log")
[[ "$log_output" == *"Serving the local API on Unix socket $socket"* ]]
[[ "$log_output" != *"on TCP address"* ]]
- [[ ! -e "$data_dir/sam.sock" ]]
+ [[ ! -e "$data_dir/agentmesh.sock" ]]
}
-@test "sam-node run --socket-path \"\" leaves no socket behind" {
+@test "agentmesh-node run --socket-path \"\" leaves no socket behind" {
local data_dir="$TEST_TMPDIR/no-socket"
- "$SAM_NODE_BINARY" run --data-dir "$data_dir" --bind-addr "127.0.0.1:8088" --socket-path "" > "$TEST_TMPDIR/no-socket.log" 2>&1 &
+ "$AGENTMESH_NODE_BINARY" run --data-dir "$data_dir" --bind-addr "127.0.0.1:8088" --socket-path "" > "$TEST_TMPDIR/no-socket.log" 2>&1 &
local node_pid=$!
local log_output=""
@@ -157,39 +157,39 @@ wait_for_socket() {
[[ "$log_output" == *"on TCP address"* ]]
[[ "$log_output" != *"Unix socket"* ]]
- [[ ! -e "$data_dir/sam.sock" ]]
+ [[ ! -e "$data_dir/agentmesh.sock" ]]
}
-@test "sam-node skill install writes the agent skill and reports it as current" {
+@test "agentmesh-node skill install writes the agent skill and reports it as current" {
local skills_dir="$TEST_TMPDIR/skills"
- run "$SAM_NODE_BINARY" skill install --dir "$skills_dir"
+ run "$AGENTMESH_NODE_BINARY" skill install --dir "$skills_dir"
[[ "$status" -eq 0 ]]
[[ "$output" == *"installed"* ]]
- [[ -f "$skills_dir/sam-mesh/SKILL.md" ]]
- grep -q "^name: sam-mesh$" "$skills_dir/sam-mesh/SKILL.md"
+ [[ -f "$skills_dir/agentmesh/SKILL.md" ]]
+ grep -q "^name: agentmesh$" "$skills_dir/agentmesh/SKILL.md"
- run "$SAM_NODE_BINARY" skill list --dir "$skills_dir"
+ run "$AGENTMESH_NODE_BINARY" skill list --dir "$skills_dir"
[[ "$status" -eq 0 ]]
[[ "$output" == *"up to date"* ]]
}
-@test "sam-node run --daemonize without an identity points at join instead of backgrounding" {
- run "$SAM_NODE_BINARY" run --daemonize --bind-addr "127.0.0.1:8086"
+@test "agentmesh-node run --daemonize without an identity points at join instead of backgrounding" {
+ run "$AGENTMESH_NODE_BINARY" run --daemonize --bind-addr "127.0.0.1:8086"
[[ "$status" -eq 1 ]]
[[ "$output" == *"not enrolled yet"* ]]
- [[ "$output" == *"sam-node join --headless"* ]]
- [[ ! -f "$XDG_CONFIG_HOME/sam-mesh/sam-node.pid" ]]
+ [[ "$output" == *"agentmesh-node join --headless"* ]]
+ [[ ! -f "$XDG_CONFIG_HOME/agentmesh/agentmesh-node.pid" ]]
}
-@test "sam-node run --daemonize starts a background node and reports why it stopped" {
- HOME="$REAL_HOME" go run tests/e2e/gen_db.go "$XDG_CONFIG_HOME/sam-mesh/agent.db"
+@test "agentmesh-node run --daemonize starts a background node and reports why it stopped" {
+ HOME="$REAL_HOME" go run tests/e2e/gen_db.go "$XDG_CONFIG_HOME/agentmesh/agent.db"
# No control plane is reachable here, so the backgrounded node exits during
# startup: the parent must notice, surface the child's log, and fail.
- run "$SAM_NODE_BINARY" run --daemonize \
+ run "$AGENTMESH_NODE_BINARY" run --daemonize \
--bind-addr "127.0.0.1:8086" \
--router-connect-timeout 2s \
--listen /ip4/127.0.0.1/udp/0/quic-v1 --listen /ip4/127.0.0.1/tcp/0
@@ -198,39 +198,39 @@ wait_for_socket() {
[[ "$output" == *"Last lines of"* ]]
# The child ran detached with a generated token and its own log.
- [[ -f "$XDG_CONFIG_HOME/sam-mesh/api-token" ]]
- [[ -s "$XDG_CONFIG_HOME/sam-mesh/sam-node.log" ]]
- [[ "$(stat -c %a "$XDG_CONFIG_HOME/sam-mesh/api-token")" == "600" ]]
+ [[ -f "$XDG_CONFIG_HOME/agentmesh/api-token" ]]
+ [[ -s "$XDG_CONFIG_HOME/agentmesh/agentmesh-node.log" ]]
+ [[ "$(stat -c %a "$XDG_CONFIG_HOME/agentmesh/api-token")" == "600" ]]
}
-@test "sam-node reset --all needs confirmation and then clears the data directory" {
- HOME="$REAL_HOME" go run tests/e2e/gen_db.go "$XDG_CONFIG_HOME/sam-mesh/agent.db"
+@test "agentmesh-node reset --all needs confirmation and then clears the data directory" {
+ HOME="$REAL_HOME" go run tests/e2e/gen_db.go "$XDG_CONFIG_HOME/agentmesh/agent.db"
# </dev/null keeps this deterministic: with no terminal to prompt on, the
# command must refuse rather than block.
- run "$SAM_NODE_BINARY" reset --all </dev/null
+ run "$AGENTMESH_NODE_BINARY" reset --all </dev/null
[[ "$status" -eq 1 ]]
[[ "$output" == *"--yes"* ]]
- [[ -f "$XDG_CONFIG_HOME/sam-mesh/agent.db" ]]
+ [[ -f "$XDG_CONFIG_HOME/agentmesh/agent.db" ]]
- run "$SAM_NODE_BINARY" reset --all --yes </dev/null
+ run "$AGENTMESH_NODE_BINARY" reset --all --yes </dev/null
[[ "$status" -eq 0 ]]
[[ "$output" == *"Deleted all local node state"* ]]
- [[ ! -f "$XDG_CONFIG_HOME/sam-mesh/agent.db" ]]
+ [[ ! -f "$XDG_CONFIG_HOME/agentmesh/agent.db" ]]
- run "$SAM_NODE_BINARY" reset --all --yes </dev/null
+ run "$AGENTMESH_NODE_BINARY" reset --all --yes </dev/null
[[ "$status" -eq 0 ]]
[[ "$output" == *"No local node state found"* ]]
}
-@test "sam-control-plane --help returns success" {
- run "$SAM_CONTROL_PLANE_BINARY" --help
+@test "agentmesh-control-plane --help returns success" {
+ run "$AGENTMESH_CONTROL_PLANE_BINARY" --help
[[ "$status" -eq 0 ]]
[[ "$output" == *"Agent Mesh - Control Plane"* ]]
}
-@test "sam-router --help returns success" {
- run "$SAM_ROUTER_BINARY" --help
+@test "agentmesh-router --help returns success" {
+ run "$AGENTMESH_ROUTER_BINARY" --help
[[ "$status" -eq 0 ]]
[[ "$output" == *"Agent Mesh - libp2p Router Node"* ]]
}
diff --git a/tests/e2e/auth_flows.bats b/tests/e2e/auth_flows.bats
index 096b51df..7d801824 100644
--- a/tests/e2e/auth_flows.bats
+++ b/tests/e2e/auth_flows.bats
@@ -49,7 +49,7 @@ assert_enrolled() {
run mesh_start_router
[[ "$status" -eq 0 ]]
- # Run sam-node join to enroll and store identity. The sam-node image has
+ # Run agentmesh-node join to enroll and store identity. The agentmesh-node image has
# no browser to open, so the loopback flow can't complete; join falls back
# to the OAuth 2.0 Device Authorization Grant (RFC 8628), which the mock
# OIDC provider advertises and auto-approves on the first poll. The
@@ -66,15 +66,15 @@ assert_enrolled() {
# Labels are declared in the node config, never on the command line, so join
# is the path that has to carry them into enrollment.
local labels_config
- labels_config=$(realpath tests/e2e/fixtures/sam-node-labels.yaml)
+ labels_config=$(realpath tests/e2e/fixtures/agentmesh-node-labels.yaml)
docker run -d --name "${node_name}-join" \
--network "${MESH_NETWORK}" \
$(mesh_get_add_hosts) \
-v "${data_vol}:/data" \
- -v "${labels_config}:/etc/sam/node-config.yaml:ro" \
- "sam-node:local" \
- join --config /etc/sam/node-config.yaml --data-dir /data --insecure-control-plane "http://sam-control-plane:8080"
+ -v "${labels_config}:/etc/agentmesh/node-config.yaml:ro" \
+ "agentmesh-node:local" \
+ join --config /etc/agentmesh/node-config.yaml --data-dir /data --insecure-control-plane "http://agentmesh-control-plane:8080"
MESH_CONTAINERS+=("${node_name}-join")
# join is a command: it ends, and its exit code is its verdict.
@@ -92,12 +92,12 @@ assert_enrolled() {
--network "${MESH_NETWORK}" \
$(mesh_get_add_hosts) \
-v "${data_vol}:/data" \
- -e SAM_API_TOKEN="secret-token" \
- "sam-node:local" \
+ -e AGENTMESH_API_TOKEN="secret-token" \
+ "agentmesh-node:local" \
run \
--data-dir /data \
--bind-addr "0.0.0.0:8080" \
- --control-plane "http://sam-control-plane:8080" \
+ --control-plane "http://agentmesh-control-plane:8080" \
--insecure-control-plane
MESH_CONTAINERS+=("${node_name}")
@@ -117,7 +117,7 @@ assert_enrolled() {
local evidence="" biscuit=""
while ((SECONDS < deadline)); do
evidence=$(docker run --rm -v "${data_vol}:/data" python:3.12 \
- curl -s --unix-socket /data/sam.sock http://localhost/mesh/identity 2>&1)
+ curl -s --unix-socket /data/agentmesh.sock http://localhost/mesh/identity 2>&1)
biscuit=$(echo "${evidence}" | jq -r '.biscuit // empty' 2>/dev/null)
if [[ -n "${biscuit}" ]] && python3 -c "
import base64, sys
@@ -159,7 +159,7 @@ sys.exit(0 if b'\x05label' in raw and b'\x06region' in raw and b'\x02eu' in raw
busybox \
sh -c "echo \"${token}\" > /tokens/sa-token"
- # 3. Run sam-node with --jwt-path
+ # 3. Run agentmesh-node with --jwt-path
local node_name="${MESH_PREFIX}-node-wi"
local router_peer_id
router_peer_id=$(cat "/tmp/${MESH_PREFIX}-router-peer-id")
@@ -169,11 +169,11 @@ sys.exit(0 if b'\x05label' in raw and b'\x06region' in raw and b'\x02eu' in raw
--network "${MESH_NETWORK}" \
$(mesh_get_add_hosts) \
-v "${token_vol}:/var/run/secrets/tokens" \
- -e SAM_API_TOKEN="secret-token" \
- "sam-node:local" \
+ -e AGENTMESH_API_TOKEN="secret-token" \
+ "agentmesh-node:local" \
run \
--bind-addr "0.0.0.0:8080" \
- --control-plane "http://sam-control-plane:8080" \
+ --control-plane "http://agentmesh-control-plane:8080" \
--insecure-control-plane \
--jwt-path "/var/run/secrets/tokens/sa-token"
MESH_CONTAINERS+=("${node_name}")
@@ -200,7 +200,7 @@ sys.exit(0 if b'\x05label' in raw and b'\x06region' in raw and b'\x02eu' in raw
-H "Content-Type: application/json" \
-H "Authorization: Bearer super-secret-admin-token" \
-d '{"role": "mesh:role:node", "max_usages": 1}' \
- http://sam-control-plane:8080/admin/bootstrap-tokens
+ http://agentmesh-control-plane:8080/admin/bootstrap-tokens
if ! kubectl --context="${KUBECONTEXT}" wait --for=jsonpath='{.status.phase}'=Succeeded pod/curl-token-gen-node --timeout=15s; then
echo "ERROR: Token generation pod failed! Diagnostics:"
@@ -218,7 +218,7 @@ sys.exit(0 if b'\x05label' in raw and b'\x06region' in raw and b'\x02eu' in raw
node_token=$(echo "${token_json}" | jq -r .token)
[[ -n "${node_token}" && "${node_token}" != "null" ]]
- # 2. Run sam-node join with the bootstrap token; it is a command whose
+ # 2. Run agentmesh-node join with the bootstrap token; it is a command whose
# exit code is its verdict.
local node_name="${MESH_PREFIX}-node-bootstrap"
local data_vol="${MESH_PREFIX}-data-bootstrap"
@@ -229,8 +229,8 @@ sys.exit(0 if b'\x05label' in raw and b'\x06region' in raw and b'\x02eu' in raw
--network "${MESH_NETWORK}" \
$(mesh_get_add_hosts) \
-v "${data_vol}:/data" \
- "sam-node:local" \
- join --data-dir /data --bootstrap-token "${node_token}" --insecure-control-plane "http://sam-control-plane:8080"
+ "agentmesh-node:local" \
+ join --data-dir /data --bootstrap-token "${node_token}" --insecure-control-plane "http://agentmesh-control-plane:8080"
MESH_CONTAINERS+=("${node_name}-join")
echo "join output: $output"
[[ "$status" -eq 0 ]]
@@ -242,12 +242,12 @@ sys.exit(0 if b'\x05label' in raw and b'\x06region' in raw and b'\x02eu' in raw
--network "${MESH_NETWORK}" \
$(mesh_get_add_hosts) \
-v "${data_vol}:/data" \
- -e SAM_API_TOKEN="secret-token" \
- "sam-node:local" \
+ -e AGENTMESH_API_TOKEN="secret-token" \
+ "agentmesh-node:local" \
run \
--data-dir /data \
--bind-addr "0.0.0.0:8080" \
- --control-plane "http://sam-control-plane:8080" \
+ --control-plane "http://agentmesh-control-plane:8080" \
--insecure-control-plane
MESH_CONTAINERS+=("${node_name}")
diff --git a/tests/e2e/canary_manifests.bats b/tests/e2e/canary_manifests.bats
index 14da3c02..b3d55248 100644
--- a/tests/e2e/canary_manifests.bats
+++ b/tests/e2e/canary_manifests.bats
@@ -23,7 +23,7 @@ load "lib/container_mesh.bash"
# which in this cluster is the namespace helm installed into.
export ENV_NAME="e2e"
export NAMESPACE="default"
-export CANARY_NAMESPACE="sam-canary-${ENV_NAME}"
+export CANARY_NAMESPACE="agentmesh-canary-${ENV_NAME}"
setup_file() {
if ! command -v kind >/dev/null 2>&1 || ! command -v kubectl >/dev/null 2>&1; then
@@ -38,15 +38,15 @@ setup_file() {
# asynchronous, and a second test that recreates it races the first one's
# termination.
teardown_file() {
- local kubectl="kubectl --context=${KUBECONTEXT:-kind-${KUBERNETES_CLUSTER_NAME:-sam-wi-test}}"
+ local kubectl="kubectl --context=${KUBECONTEXT:-kind-${KUBERNETES_CLUSTER_NAME:-agentmesh-wi-test}}"
${kubectl} delete namespace "${CANARY_NAMESPACE}" --ignore-not-found --wait=false >/dev/null 2>&1 || true
- ${kubectl} -n "${NAMESPACE}" delete service "sam-control-plane-${ENV_NAME}" \
+ ${kubectl} -n "${NAMESPACE}" delete service "agentmesh-control-plane-${ENV_NAME}" \
--ignore-not-found --wait=false >/dev/null 2>&1 || true
}
setup() {
mesh_setup_env
- export KUBECTL="kubectl --context=${KUBECONTEXT:-kind-${KUBERNETES_CLUSTER_NAME:-sam-wi-test}}"
+ export KUBECTL="kubectl --context=${KUBECONTEXT:-kind-${KUBERNETES_CLUSTER_NAME:-agentmesh-wi-test}}"
${KUBECTL} create namespace "${CANARY_NAMESPACE}" --dry-run=client -o yaml | ${KUBECTL} apply -f - >/dev/null
}
diff --git a/tests/e2e/console.bats b/tests/e2e/console.bats
index b256b96f..c0f698c6 100644
--- a/tests/e2e/console.bats
+++ b/tests/e2e/console.bats
@@ -10,7 +10,7 @@ teardown() {
mesh_cleanup_env
}
-@test "sam-console starts and proxies to control plane" {
+@test "agentmesh-console starts and proxies to control plane" {
run mesh_start_mock_oidc
[[ "$status" -eq 0 ]]
@@ -24,9 +24,9 @@ teardown() {
--name "${console_name}" \
--network "${MESH_NETWORK}" \
$(mesh_get_add_hosts) \
- -e SAM_ADMIN_TOKEN="super-secret-admin-token" \
- "sam-console:local" \
- --control-plane "http://sam-control-plane:8080" \
+ -e AGENTMESH_ADMIN_TOKEN="super-secret-admin-token" \
+ "agentmesh-console:local" \
+ --control-plane "http://agentmesh-control-plane:8080" \
--bind-addr ":8081"
MESH_CONTAINERS+=("${console_name}")
@@ -37,7 +37,7 @@ teardown() {
# Test static index.html is served
run docker run --rm --network "${MESH_NETWORK}" curlimages/curl -s "http://${console_name}:8081/"
[[ "$status" -eq 0 ]]
- [[ "$output" == *"<title>SAM Console</title>"* ]]
+ [[ "$output" == *"<title>Agent Mesh Console</title>"* ]]
# Test proxy to control plane /admin/status (mapped under /api/)
run docker run --rm --network "${MESH_NETWORK}" curlimages/curl -s -f -H "Authorization: Bearer super-secret-admin-token" "http://${console_name}:8081/api/admin/status"
diff --git a/tests/e2e/docker/Dockerfile.sam-runtime b/tests/e2e/docker/Dockerfile.agentmesh-runtime
similarity index 100%
rename from tests/e2e/docker/Dockerfile.sam-runtime
rename to tests/e2e/docker/Dockerfile.agentmesh-runtime
diff --git a/tests/e2e/docker/a2a-echo/sam-node-config.yaml b/tests/e2e/docker/a2a-echo/agentmesh-node-config.yaml
similarity index 100%
rename from tests/e2e/docker/a2a-echo/sam-node-config.yaml
rename to tests/e2e/docker/a2a-echo/agentmesh-node-config.yaml
diff --git a/tests/e2e/docker/a2a-echo/client.py b/tests/e2e/docker/a2a-echo/client.py
index 83b03367..d98eb21f 100644
--- a/tests/e2e/docker/a2a-echo/client.py
+++ b/tests/e2e/docker/a2a-echo/client.py
@@ -14,9 +14,9 @@ from a2a.types import Message, Part, Role, SendMessageRequest
async def main(url: str, text: str) -> None:
- token = os.environ.get("SAM_API_TOKEN", "secret-token")
+ token = os.environ.get("AGENTMESH_API_TOKEN", "secret-token")
headers = {"X-Mesh-Authentication": f"Bearer {token}"}
- labels = os.environ.get("SAM_REQUIRED_LABELS")
+ labels = os.environ.get("AGENTMESH_REQUIRED_LABELS")
if labels:
headers["X-Mesh-Required-Labels"] = labels
async with httpx.AsyncClient(timeout=60, headers=headers) as http:
diff --git a/tests/e2e/docker/calc-mcp/sam-node-config.yaml b/tests/e2e/docker/calc-mcp/agentmesh-node-config.yaml
similarity index 100%
rename from tests/e2e/docker/calc-mcp/sam-node-config.yaml
rename to tests/e2e/docker/calc-mcp/agentmesh-node-config.yaml
diff --git a/tests/e2e/docker/mock_oidc.py b/tests/e2e/docker/mock_oidc.py
index e523dd6a..026936f3 100644
--- a/tests/e2e/docker/mock_oidc.py
+++ b/tests/e2e/docker/mock_oidc.py
@@ -93,7 +93,7 @@ class Handler(BaseHTTPRequestHandler):
client_id = params.get('client_id', [''])[0]
grant_type = params.get('grant_type', [''])[0]
- # Only the grants a SAM component drives are served, so a token
+ # Only the grants a Agent Mesh component drives are served, so a token
# is proof of which flow obtained it: client credentials for a
# configured node, the device grant, with the code handed out
# above, for an interactive join that has no browser.
diff --git a/tests/e2e/docs_snippets.bats b/tests/e2e/docs_snippets.bats
index 4dcb5b4e..b4a63f85 100644
--- a/tests/e2e/docs_snippets.bats
+++ b/tests/e2e/docs_snippets.bats
@@ -30,8 +30,8 @@ teardown() {
run docker run --rm \
--network "${MESH_NETWORK}" \
-v "$(pwd)/site/content/docs/snippets:/snippets" \
- -e SAM_MCP_URL="http://${node1_name}:8080/mcp" \
- -e SAM_API_TOKEN="secret-token" \
+ -e AGENTMESH_MCP_URL="http://${node1_name}:8080/mcp" \
+ -e AGENTMESH_API_TOKEN="secret-token" \
python:3.12 \
bash -c 'pip install "mcp>=2,<3" httpx && python3 /snippets/agent_demo.py'
@@ -43,7 +43,7 @@ teardown() {
fi
[[ "$status" -eq 0 ]]
- [[ "$output" == *"Connecting to SAM Node at"* ]]
+ [[ "$output" == *"Connecting to Agent Mesh Node at"* ]]
[[ "$output" == *"Discovered"* ]]
[[ "$output" == *"Calling get_mesh_info tool..."* ]]
[[ "$output" == *"Result:"* ]]
diff --git a/tests/e2e/find_remote_tools.bats b/tests/e2e/find_remote_tools.bats
index 2dddd5f4..f6990d43 100644
--- a/tests/e2e/find_remote_tools.bats
+++ b/tests/e2e/find_remote_tools.bats
@@ -2,7 +2,7 @@
load "lib/container_mesh.bash"
-CALC_MCP_IMAGE="sam-calc-mcp:local"
+CALC_MCP_IMAGE="agentmesh-calc-mcp:local"
build_calc_mcp_image() {
if ! docker image inspect "${CALC_MCP_IMAGE}" >/dev/null 2>&1; then
@@ -48,7 +48,7 @@ teardown() {
echo "[$(date +%T)] Starting Node 2 with calculator service"
mesh_start_node 2 \
"--log-level debug" \
- "tests/e2e/docker/calc-mcp/sam-node-config.yaml"
+ "tests/e2e/docker/calc-mcp/agentmesh-node-config.yaml"
mesh_wait_for_mcp_ready 2 30
local node2_peer_id
@@ -98,7 +98,7 @@ teardown() {
echo "[$(date +%T)] Starting Node 2 with calculator service"
mesh_start_node 2 \
"--log-level debug" \
- "tests/e2e/docker/calc-mcp/sam-node-config.yaml"
+ "tests/e2e/docker/calc-mcp/agentmesh-node-config.yaml"
mesh_wait_for_mcp_ready 2 30
local node2_peer_id
@@ -141,7 +141,7 @@ teardown() {
echo "[$(date +%T)] Starting Node 2 with calculator service"
mesh_start_node 2 \
"--log-level debug" \
- "tests/e2e/docker/calc-mcp/sam-node-config.yaml"
+ "tests/e2e/docker/calc-mcp/agentmesh-node-config.yaml"
mesh_wait_for_mcp_ready 2 30
local node2_peer_id
@@ -198,7 +198,7 @@ teardown() {
echo "[$(date +%T)] Starting Node 2 with calculator service"
mesh_start_node 2 \
"--log-level debug" \
- "tests/e2e/docker/calc-mcp/sam-node-config.yaml"
+ "tests/e2e/docker/calc-mcp/agentmesh-node-config.yaml"
mesh_wait_for_mcp_ready 2 30
local node2_peer_id
diff --git a/tests/e2e/fixtures/sam-node-labels.yaml b/tests/e2e/fixtures/agentmesh-node-labels.yaml
similarity index 57%
rename from tests/e2e/fixtures/sam-node-labels.yaml
rename to tests/e2e/fixtures/agentmesh-node-labels.yaml
index 14a626c0..5cd6042a 100644
--- a/tests/e2e/fixtures/sam-node-labels.yaml
+++ b/tests/e2e/fixtures/agentmesh-node-labels.yaml
@@ -1,4 +1,4 @@
-# Operator-declared labels only: this fixture exists to prove "sam-node join"
+# Operator-declared labels only: this fixture exists to prove "agentmesh-node join"
# carries them into enrollment, where the control plane attests them.
version: "v1alpha1"
labels:
diff --git a/tests/e2e/fixtures/mock-oidc.yaml b/tests/e2e/fixtures/mock-oidc.yaml
index b0cd3d59..0291d6e1 100644
--- a/tests/e2e/fixtures/mock-oidc.yaml
+++ b/tests/e2e/fixtures/mock-oidc.yaml
@@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: mock-oidc
- image: sam-mock-oidc:local
+ image: agentmesh-mock-oidc:local
ports:
- containerPort: 18080
hostPort: 18080
diff --git a/tests/e2e/lib/container_mesh.bash b/tests/e2e/lib/container_mesh.bash
index 5ad21420..024f3c24 100644
--- a/tests/e2e/lib/container_mesh.bash
+++ b/tests/e2e/lib/container_mesh.bash
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
-# Shared BATS helpers for containerized SAM mesh tests.
+# Shared BATS helpers for containerized Agent Mesh tests.
# Refactored to use Kind-hosted unified OIDC and control plane services.
if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
MESH_HELPERS_LOADED=1
- MESH_RUNTIME_IMAGE="${MESH_RUNTIME_IMAGE:-sam-e2e-runtime:local}"
+ MESH_RUNTIME_IMAGE="${MESH_RUNTIME_IMAGE:-agentmesh-e2e-runtime:local}"
MESH_NETWORK="kind"
MESH_CONTAINERS=()
MESH_PREFIX=""
@@ -29,7 +29,7 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
mesh_build_runtime_image() {
if ! docker image inspect "${MESH_RUNTIME_IMAGE}" >/dev/null 2>&1; then
docker build \
- -f tests/e2e/docker/Dockerfile.sam-runtime \
+ -f tests/e2e/docker/Dockerfile.agentmesh-runtime \
-t "${MESH_RUNTIME_IMAGE}" \
. >/dev/null
fi
@@ -239,7 +239,7 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
mesh_admin_status() {
docker run --rm --network "${MESH_NETWORK}" $(mesh_get_add_hosts) "${MESH_RUNTIME_IMAGE}" \
curl -sf --max-time 10 -H "Authorization: Bearer super-secret-admin-token" \
- "http://sam-control-plane:8080/admin/status"
+ "http://agentmesh-control-plane:8080/admin/status"
}
# mesh_enrolled_node prints the control plane's enrollment record for a
@@ -334,7 +334,7 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
local net="${MESH_NETWORK:-kind}"
# Resolve mock-oidc node IP
local oidc_node
- oidc_node=$(kubectl --context="${KUBECONTEXT:-kind-sam-wi-test}" get pod -l app=mock-oidc -o jsonpath='{.items[0].spec.nodeName}')
+ oidc_node=$(kubectl --context="${KUBECONTEXT:-kind-agentmesh-wi-test}" get pod -l app=mock-oidc -o jsonpath='{.items[0].spec.nodeName}')
local oidc_node_ip
oidc_node_ip=$(docker inspect -f "{{(index .NetworkSettings.Networks \"${net}\").IPAddress}}" "${oidc_node}")
@@ -348,14 +348,14 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
if docker inspect "${custom_cp}" >/dev/null 2>&1; then
cp_ip=$(docker inspect -f "{{(index .NetworkSettings.Networks \"${net}\").IPAddress}}" "${custom_cp}")
fi
- echo "--add-host mock-oidc:${oidc_node_ip} --add-host sam-router:${router_ip} --add-host sam-control-plane:${cp_ip}"
+ echo "--add-host mock-oidc:${oidc_node_ip} --add-host agentmesh-router:${router_ip} --add-host agentmesh-control-plane:${cp_ip}"
else
- # Resolve sam-router-0 node IP
+ # Resolve agentmesh-router-0 node IP
local router_node
- router_node=$(kubectl --context="${KUBECONTEXT:-kind-sam-wi-test}" get pod sam-router-0 -o jsonpath='{.spec.nodeName}')
+ router_node=$(kubectl --context="${KUBECONTEXT:-kind-agentmesh-wi-test}" get pod agentmesh-router-0 -o jsonpath='{.spec.nodeName}')
local router_node_ip
router_node_ip=$(docker inspect -f "{{(index .NetworkSettings.Networks \"${net}\").IPAddress}}" "${router_node}")
- echo "--add-host mock-oidc:${oidc_node_ip} --add-host sam-router:${router_node_ip} --add-host sam-control-plane:${router_node_ip} --add-host ${router_node}:${router_node_ip}"
+ echo "--add-host mock-oidc:${oidc_node_ip} --add-host agentmesh-router:${router_node_ip} --add-host agentmesh-control-plane:${router_node_ip} --add-host ${router_node}:${router_node_ip}"
fi
}
@@ -383,12 +383,12 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
make
make docker-build
- if [[ ! -x "./bin/sam-node" || ! -x "./bin/sam-control-plane" || ! -x "./bin/sam-router" || ! -x "./bin/mcp-client" ]]; then
+ if [[ ! -x "./bin/agentmesh-node" || ! -x "./bin/agentmesh-control-plane" || ! -x "./bin/agentmesh-router" || ! -x "./bin/mcp-client" ]]; then
echo "missing binaries; run: make build" >&2
return 1
fi
- export KUBERNETES_CLUSTER_NAME="sam-wi-test"
+ export KUBERNETES_CLUSTER_NAME="agentmesh-wi-test"
export KUBECONTEXT="kind-${KUBERNETES_CLUSTER_NAME}"
# Recreating is the default so a local run matches CI, which builds a cluster
@@ -403,10 +403,10 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
kind create cluster --name "${KUBERNETES_CLUSTER_NAME}" --config=tests/e2e/fixtures/kind-cluster.yaml
fi
- kind load docker-image sam-control-plane:local --name "${KUBERNETES_CLUSTER_NAME}"
- kind load docker-image sam-router:local --name "${KUBERNETES_CLUSTER_NAME}"
- kind load docker-image sam-node:local --name "${KUBERNETES_CLUSTER_NAME}"
- kind load docker-image sam-mock-oidc:local --name "${KUBERNETES_CLUSTER_NAME}"
+ kind load docker-image agentmesh-control-plane:local --name "${KUBERNETES_CLUSTER_NAME}"
+ kind load docker-image agentmesh-router:local --name "${KUBERNETES_CLUSTER_NAME}"
+ kind load docker-image agentmesh-node:local --name "${KUBERNETES_CLUSTER_NAME}"
+ kind load docker-image agentmesh-mock-oidc:local --name "${KUBERNETES_CLUSTER_NAME}"
kubectl --context="${KUBECONTEXT}" apply -f tests/e2e/fixtures/mock-oidc.yaml
mesh_wait_for_rollout deployment/mock-oidc
@@ -434,16 +434,16 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
fi
fi
- # router.externalAddrs: nodes resolve sam-router per-network via --add-host, so the router must
+ # router.externalAddrs: nodes resolve agentmesh-router per-network via --add-host, so the router must
# announce that name. Announcing a node IP instead is unroutable from an isolated test network.
# bootstrap.nodeServices: policy.bats asserts the control plane denies an ungranted service, so
# this lane pins the grants it tests rather than inheriting the chart default.
- local helm_args=(--kube-context="${KUBECONTEXT}" upgrade --install sam ./charts/sam-mesh
+ local helm_args=(--kube-context="${KUBECONTEXT}" upgrade --install sam ./charts/agentmesh
--namespace default
--set fullnameOverride="sam"
--set global.imageTag="local"
--set controlPlane.oidcIssuer="${ISSUERS//,/\\,}"
- --set controlPlane.allowedAudiences="agentmesh-audience\,sam-control-plane-audience"
+ --set controlPlane.allowedAudiences="agentmesh-audience\,agentmesh-control-plane-audience"
--set controlPlane.insecureSkipTlsVerify=true
--set controlPlane.adminToken="super-secret-admin-token"
--set controlPlane.replicaCount=2
@@ -451,27 +451,27 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
--set router.useOidcToken=false
--set router.hostPort=4501
--set console.enabled=false
- --set 'router.externalAddrs={/dns4/sam-router/tcp/4501}'
+ --set 'router.externalAddrs={/dns4/agentmesh-router/tcp/4501}'
--set 'bootstrap.nodeServices={mcp://calculator,mcp://db-agent,mcp://http-tool,mcp://stdio-tool,a2a://echo,system://mesh.catalog}'
--set 'bootstrap.nodeMembers={user:test-user}'
--set 'bootstrap.nodeLabels={region=*}')
if ! "${helm_bin}" "${helm_args[@]}"; then
# The reused cluster may hold StatefulSets whose immutable spec (e.g.
# volumeClaimTemplates) changed; drop them (PVCs survive) and retry.
- kubectl --context="${KUBECONTEXT}" delete statefulset sam-router sam-db --ignore-not-found
+ kubectl --context="${KUBECONTEXT}" delete statefulset agentmesh-router sam-db --ignore-not-found
"${helm_bin}" "${helm_args[@]}"
fi
mesh_wait_for_rollout statefulset/sam-db
- mesh_wait_for_rollout deployment/sam-control-plane
+ mesh_wait_for_rollout deployment/agentmesh-control-plane
mesh_wait_for_job job/sam-bootstrap
# A router surviving a reinstall holds a biscuit no current control plane key
# verifies and a bootstrap token past its 24h default, so it can never lease
# again. Restarting re-enrolls it against the state this run just installed.
if [[ "${reused_cluster}" == "1" ]]; then
- kubectl --context="${KUBECONTEXT}" rollout restart statefulset/sam-router
+ kubectl --context="${KUBECONTEXT}" rollout restart statefulset/agentmesh-router
fi
- mesh_wait_for_rollout statefulset/sam-router
+ mesh_wait_for_rollout statefulset/agentmesh-router
# The router pod reports Ready before its lease reaches the control plane,
# and a node's /register serves router addresses from that lease, so a
@@ -480,7 +480,7 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
# cluster the freshest renewal is the router that is running now.
local router_node_ip
router_node_ip=$(docker inspect -f "{{(index .NetworkSettings.Networks \"${MESH_NETWORK:-kind}\").IPAddress}}" \
- "$(kubectl --context="${KUBECONTEXT}" get pod sam-router-0 -o jsonpath='{.spec.nodeName}')")
+ "$(kubectl --context="${KUBECONTEXT}" get pod agentmesh-router-0 -o jsonpath='{.spec.nodeName}')")
local router_peer_id=""
local lease_deadline=$((SECONDS + 60))
while [[ -z "${router_peer_id}" ]]; do
@@ -496,14 +496,14 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
[[ -n "${router_peer_id}" ]] || sleep 1
done
- echo "${router_peer_id}" > "/tmp/sam-wi-test-router-peer-id"
+ echo "${router_peer_id}" > "/tmp/agentmesh-wi-test-router-peer-id"
return 0
}
mesh_teardown_suite() {
cd "${BATS_TEST_DIRNAME}/../.."
mesh_cleanup_stale_resources
- # kind delete cluster --name "${KUBERNETES_CLUSTER_NAME:-sam-wi-test}" >/dev/null 2>&1 || true
+ # kind delete cluster --name "${KUBERNETES_CLUSTER_NAME:-agentmesh-wi-test}" >/dev/null 2>&1 || true
echo "teardown suite"
}
@@ -529,8 +529,8 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
local staged_config="${MESH_SOCKET_DIR}/node-${idx}-config.yaml"
cp "${config_path}" "${staged_config}"
chmod 0644 "${staged_config}"
- mount_args+=(-v "${staged_config}:/etc/sam/node-config.yaml:ro")
- config_args+=(--config /etc/sam/node-config.yaml)
+ mount_args+=(-v "${staged_config}:/etc/agentmesh/node-config.yaml:ro")
+ config_args+=(--config /etc/agentmesh/node-config.yaml)
fi
docker run -d \
@@ -540,14 +540,14 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
${add_hosts} \
"${mount_args[@]}" \
${docker_args} \
- -e SAM_CLIENT_SECRET="sam-e2e-secret" \
- -e SAM_API_TOKEN="secret-token" \
+ -e AGENTMESH_CLIENT_SECRET="sam-e2e-secret" \
+ -e AGENTMESH_API_TOKEN="secret-token" \
"${MESH_RUNTIME_IMAGE}" \
- /usr/local/bin/sam-node run \
+ /usr/local/bin/agentmesh-node run \
${flags} \
--log-level debug \
--discovery-interval 2s \
- --control-plane "http://sam-control-plane:8080" \
+ --control-plane "http://agentmesh-control-plane:8080" \
--insecure-control-plane \
--client-id "agentmesh-audience" \
--oidc-issuer "http://mock-oidc:18080" \
@@ -570,7 +570,7 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
mesh_start_router() {
# No-op: router is running in k8s
local peer_id
- peer_id=$(cat "/tmp/sam-wi-test-router-peer-id")
+ peer_id=$(cat "/tmp/agentmesh-wi-test-router-peer-id")
echo "${peer_id}" > "/tmp/${MESH_PREFIX}-router-peer-id"
return 0
}
@@ -578,7 +578,7 @@ if [[ -z "${MESH_HELPERS_LOADED:-}" ]]; then
mesh_assert_container_running() {
local name="$1"
if [[ "${name}" == *"-router" ]]; then
- kubectl --context="${KUBECONTEXT:-kind-sam-wi-test}" get pod sam-router-0 -o jsonpath='{.status.phase}' | grep -q "Running"
+ kubectl --context="${KUBECONTEXT:-kind-agentmesh-wi-test}" get pod agentmesh-router-0 -o jsonpath='{.status.phase}' | grep -q "Running"
return $?
fi
local state
diff --git a/tests/e2e/policy.bats b/tests/e2e/policy.bats
index c6572949..eddb36ce 100644
--- a/tests/e2e/policy.bats
+++ b/tests/e2e/policy.bats
@@ -2,7 +2,7 @@
load "lib/container_mesh.bash"
-CALC_MCP_IMAGE="sam-calc-mcp:local"
+CALC_MCP_IMAGE="agentmesh-calc-mcp:local"
build_calc_mcp_image() {
if ! docker image inspect "${CALC_MCP_IMAGE}" >/dev/null 2>&1; then
diff --git a/tests/e2e/relay.bats b/tests/e2e/relay.bats
index fd9b6238..623e35d6 100644
--- a/tests/e2e/relay.bats
+++ b/tests/e2e/relay.bats
@@ -48,7 +48,7 @@ teardown() {
CLEANUP_NETWORKS+=("${MESH_NETWORK_2}")
local router_node
- router_node=$(kubectl --context="${KUBECONTEXT}" get pod sam-router-0 -o jsonpath='{.spec.nodeName}')
+ router_node=$(kubectl --context="${KUBECONTEXT}" get pod agentmesh-router-0 -o jsonpath='{.spec.nodeName}')
local oidc_node
oidc_node=$(kubectl --context="${KUBECONTEXT}" get pod -l app=mock-oidc -o jsonpath='{.items[0].spec.nodeName}')
diff --git a/tests/e2e/services.bats b/tests/e2e/services.bats
index e47bac04..25f82b8b 100644
--- a/tests/e2e/services.bats
+++ b/tests/e2e/services.bats
@@ -2,7 +2,7 @@
load "lib/container_mesh.bash"
-CALC_MCP_IMAGE="sam-calc-mcp:local"
+CALC_MCP_IMAGE="agentmesh-calc-mcp:local"
build_calc_mcp_image() {
if ! docker image inspect "${CALC_MCP_IMAGE}" >/dev/null 2>&1; then
@@ -49,7 +49,7 @@ teardown() {
echo "[$(date +%T)] Starting Node 2 (with calculator service config)"
mesh_start_node 2 \
"--log-level debug" \
- "tests/e2e/docker/calc-mcp/sam-node-config.yaml"
+ "tests/e2e/docker/calc-mcp/agentmesh-node-config.yaml"
local node2_name="${MESH_PREFIX}-node-2"
mesh_wait_for_mcp_ready 2 30
diff --git a/tests/e2e/standalone.bats b/tests/e2e/standalone.bats
index 231b7aca..e8f60f86 100644
--- a/tests/e2e/standalone.bats
+++ b/tests/e2e/standalone.bats
@@ -1,7 +1,7 @@
#!/usr/bin/env bats
-# Black-box CUJ for the sam-one all-in-one binary: boot on a random port
-# published in the banner, join real sam-nodes through it, drive the admin CLI
+# Black-box CUJ for the agentmesh-one all-in-one binary: boot on a random port
+# published in the banner, join real agentmesh-nodes through it, drive the admin CLI
# against the live server, and serve a model across the dataplane from an
# inference service declared in node A's configuration to node B's /v1
# endpoint (B -> router -> A). Mirrors docs/getting-started/your-own-mesh.
@@ -9,8 +9,8 @@
# only exercises what needs the real binaries.
setup() {
- export SAM_ONE_BINARY="${SAM_ONE_BINARY:-./bin/sam-one}"
- export SAM_NODE_BINARY="${SAM_NODE_BINARY:-./bin/sam-node}"
+ export AGENTMESH_ONE_BINARY="${AGENTMESH_ONE_BINARY:-./bin/agentmesh-one}"
+ export AGENTMESH_NODE_BINARY="${AGENTMESH_NODE_BINARY:-./bin/agentmesh-node}"
export TEST_TMPDIR
TEST_TMPDIR="$(mktemp -d)"
@@ -18,14 +18,14 @@ setup() {
export XDG_CONFIG_HOME="$HOME/.config"
mkdir -p "$XDG_CONFIG_HOME"
- export SAM_ONE_DATA="$TEST_TMPDIR/sam-one"
+ export AGENTMESH_ONE_DATA="$TEST_TMPDIR/agentmesh-one"
}
teardown() {
if [[ -n "${ENVOY_CONTAINER:-}" ]]; then
docker rm -f "$ENVOY_CONTAINER" >/dev/null 2>&1 || true
fi
- for pid in "${BACKEND_PID:-}" "${NODE_A_PID:-}" "${NODE_B_PID:-}" "${SAM_ONE_PID:-}"; do
+ for pid in "${BACKEND_PID:-}" "${NODE_A_PID:-}" "${NODE_B_PID:-}" "${AGENTMESH_ONE_PID:-}"; do
[[ -n "$pid" ]] && kill "$pid" 2>/dev/null || true
done
# Give the processes a moment to release the sqlite/bbolt locks.
@@ -60,7 +60,7 @@ wait_for_log() {
# once, with its log.
wait_for_node() {
local name="$1" pid_var="NODE_${1^^}_PID"
- local sock="$TEST_TMPDIR/node-$name/sam.sock"
+ local sock="$TEST_TMPDIR/node-$name/agentmesh.sock"
for _ in $(seq 1 150); do
if ! kill -0 "${!pid_var}" 2>/dev/null; then
echo "node $name exited before serving its API:" >&2
@@ -77,11 +77,11 @@ wait_for_node() {
# node_peer_id is the peer ID node $1 reports for itself.
node_peer_id() {
- curl -sf --unix-socket "$TEST_TMPDIR/node-$1/sam.sock" http://localhost/debug/mesh-info |
+ curl -sf --unix-socket "$TEST_TMPDIR/node-$1/agentmesh.sock" http://localhost/debug/mesh-info |
python3 -c 'import json, sys; print(json.load(sys.stdin)["peer_id"])'
}
-# start_node boots a background sam-node joined via the bootstrap token; sets
+# start_node boots a background agentmesh-node joined via the bootstrap token; sets
# NODE_<NAME>_PID for teardown. The sidecar serves only on the Unix socket so
# two nodes on one host never fight over the default TCP bind, and loopback
# addresses must be publishable or peers on one host cannot dial each other.
@@ -89,8 +89,8 @@ node_peer_id() {
start_node() {
local name="$1"
shift
- SAM_API_TOKEN=e2e-secret "$SAM_NODE_BINARY" run \
- --control-plane "$SAM_ONE_URL" \
+ AGENTMESH_API_TOKEN=e2e-secret "$AGENTMESH_NODE_BINARY" run \
+ --control-plane "$AGENTMESH_ONE_URL" \
--bootstrap-token "$JOIN_TOKEN" \
--data-dir "$TEST_TMPDIR/node-$name" \
--bind-addr= \
@@ -99,26 +99,26 @@ start_node() {
eval "NODE_${name^^}_PID=$!"
}
-@test "sam-one boots, nodes join over the single port, and the dataplane carries a service call" {
- "$SAM_ONE_BINARY" --bind-address 127.0.0.1 --port 0 \
- --data-dir "$SAM_ONE_DATA" > "$TEST_TMPDIR/sam-one.log" 2>&1 3>&- &
- SAM_ONE_PID=$!
+@test "agentmesh-one boots, nodes join over the single port, and the dataplane carries a service call" {
+ "$AGENTMESH_ONE_BINARY" --bind-address 127.0.0.1 --port 0 \
+ --data-dir "$AGENTMESH_ONE_DATA" > "$TEST_TMPDIR/agentmesh-one.log" 2>&1 3>&- &
+ AGENTMESH_ONE_PID=$!
# The random port is published in the banner, like the generated tokens.
- wait_for_log "$TEST_TMPDIR/sam-one.log" "Join Token:"
- grep -q "Admin Token: sam_adm_" "$TEST_TMPDIR/sam-one.log"
- SAM_ONE_PORT="$(grep -oE 'API URL:[[:space:]]+http://[^:]+:[0-9]+' "$TEST_TMPDIR/sam-one.log" | grep -oE '[0-9]+$')"
- [[ -n "$SAM_ONE_PORT" ]]
- export SAM_ONE_URL="http://127.0.0.1:${SAM_ONE_PORT}"
- wait_for_http "$SAM_ONE_URL/healthz"
+ wait_for_log "$TEST_TMPDIR/agentmesh-one.log" "Join Token:"
+ grep -q "Admin Token: mesh_adm_" "$TEST_TMPDIR/agentmesh-one.log"
+ AGENTMESH_ONE_PORT="$(grep -oE 'API URL:[[:space:]]+http://[^:]+:[0-9]+' "$TEST_TMPDIR/agentmesh-one.log" | grep -oE '[0-9]+$')"
+ [[ -n "$AGENTMESH_ONE_PORT" ]]
+ export AGENTMESH_ONE_URL="http://127.0.0.1:${AGENTMESH_ONE_PORT}"
+ wait_for_http "$AGENTMESH_ONE_URL/healthz"
# The embedded console is served from the same port.
- run curl -sf "$SAM_ONE_URL/console/"
+ run curl -sf "$AGENTMESH_ONE_URL/console/"
[[ "$status" -eq 0 ]]
[[ "$output" == *"<html"* ]]
# Two real nodes join through the single port with the persisted join token.
- JOIN_TOKEN="$(cat "$SAM_ONE_DATA/join-token")"
+ JOIN_TOKEN="$(cat "$AGENTMESH_ONE_DATA/join-token")"
[[ "$JOIN_TOKEN" == mesh_tok_* ]]
# An OpenAI-compatible and MCP backend on node A's host, declared in node A's
@@ -165,8 +165,8 @@ EOF
peer_b="$(node_peer_id b)"
[[ -n "$peer_a" && -n "$peer_b" ]]
- sock_a="$TEST_TMPDIR/node-a/sam.sock"
- sock_b="$TEST_TMPDIR/node-b/sam.sock"
+ sock_a="$TEST_TMPDIR/node-a/agentmesh.sock"
+ sock_b="$TEST_TMPDIR/node-b/agentmesh.sock"
[[ -S "$sock_a" && -S "$sock_b" ]]
# Node B's OpenAI-compatible endpoint lists the model with A as its owner:
@@ -220,7 +220,7 @@ EOF
# Real Envoy proxy CUJ: when Docker is available, place Envoy in front of node B
# with both ext_authz and ext_proc configured over gRPC h2c, and drive real
# inference (/v1/chat/completions) and MCP (/mesh/<peer_a>/mcp/github) calls
- # through Envoy -> Node B -> sam-one Router -> Node A -> Backend.
+ # through Envoy -> Node B -> agentmesh-one Router -> Node A -> Backend.
if command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; then
envoy_port="$(python3 -c 'import socket; s = socket.socket(); s.bind(("127.0.0.1", 0)); print(s.getsockname()[1]); s.close()')"
@@ -247,7 +247,7 @@ static_resources:
- match:
prefix: "/"
route:
- cluster: sam_node_b_sidecar
+ cluster: agentmesh_node_b_sidecar
http_filters:
- name: envoy.filters.http.ext_authz
typed_config:
@@ -255,14 +255,14 @@ static_resources:
transport_api_version: V3
grpc_service:
envoy_grpc:
- cluster_name: sam_node_b_h2c
+ cluster_name: agentmesh_node_b_h2c
timeout: 5s
- name: envoy.filters.http.ext_proc
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor
grpc_service:
envoy_grpc:
- cluster_name: sam_node_b_h2c
+ cluster_name: agentmesh_node_b_h2c
timeout: 5s
allow_mode_override: true
message_timeout: 5s
@@ -275,7 +275,7 @@ static_resources:
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- - name: sam_node_b_h2c
+ - name: agentmesh_node_b_h2c
type: STATIC
connect_timeout: 2s
typed_extension_protocol_options:
@@ -284,7 +284,7 @@ static_resources:
explicit_http_config:
http2_protocol_options: {}
load_assignment:
- cluster_name: sam_node_b_h2c
+ cluster_name: agentmesh_node_b_h2c
endpoints:
- lb_endpoints:
- endpoint:
@@ -292,11 +292,11 @@ static_resources:
socket_address:
address: 127.0.0.1
port_value: ${node_b_tcp_port}
- - name: sam_node_b_sidecar
+ - name: agentmesh_node_b_sidecar
type: STATIC
connect_timeout: 2s
load_assignment:
- cluster_name: sam_node_b_sidecar
+ cluster_name: agentmesh_node_b_sidecar
endpoints:
- lb_endpoints:
- endpoint:
@@ -403,16 +403,16 @@ EOF
[[ "$output" != *"$peer_a"* ]]
# The admin CLI works against the live server using the persisted admin token.
- run "$SAM_ONE_BINARY" token create --server "$SAM_ONE_URL" \
- --data-dir "$SAM_ONE_DATA" --description "e2e token"
+ run "$AGENTMESH_ONE_BINARY" token create --server "$AGENTMESH_ONE_URL" \
+ --data-dir "$AGENTMESH_ONE_DATA" --description "e2e token"
[[ "$status" -eq 0 ]]
- [[ "$output" == *"Token: sam-bt-"* ]]
+ [[ "$output" == *"Token: mesh-bt-"* ]]
- run "$SAM_ONE_BINARY" token list --server "$SAM_ONE_URL" --data-dir "$SAM_ONE_DATA"
+ run "$AGENTMESH_ONE_BINARY" token list --server "$AGENTMESH_ONE_URL" --data-dir "$AGENTMESH_ONE_DATA"
[[ "$status" -eq 0 ]]
[[ "$output" == *"e2e token"* ]]
# The two node enrollments above consumed join token usages.
- join_row="$(echo "$output" | grep "sam-one join token")"
+ join_row="$(echo "$output" | grep "agentmesh-one join token")"
[[ "$join_row" == *" 2/"* ]]
}
diff --git a/tests/e2e/watch.bats b/tests/e2e/watch.bats
index 784aafb6..621a6f48 100644
--- a/tests/e2e/watch.bats
+++ b/tests/e2e/watch.bats
@@ -1,7 +1,7 @@
#!/usr/bin/env bats
setup() {
- export SAM_NODE_BINARY="${SAM_NODE_BINARY:-./bin/sam-node}"
+ export AGENTMESH_NODE_BINARY="${AGENTMESH_NODE_BINARY:-./bin/agentmesh-node}"
export TEST_TMPDIR
@@ -11,7 +11,7 @@ setup() {
mkdir -p "$XDG_CONFIG_HOME"
# Generate mock DB
- go run tests/e2e/gen_db.go "$XDG_CONFIG_HOME/sam-mesh/agent.db"
+ go run tests/e2e/gen_db.go "$XDG_CONFIG_HOME/agentmesh/agent.db"
}
teardown() {
@@ -19,8 +19,8 @@ teardown() {
rm -rf "$TEST_TMPDIR"
}
-@test "sam-node run with stored identity fails if the control plane is unreachable" {
- run "$SAM_NODE_BINARY" run --listen /ip4/127.0.0.1/udp/0/quic-v1 --listen /ip4/127.0.0.1/tcp/0
+@test "agentmesh-node run with stored identity fails if the control plane is unreachable" {
+ run "$AGENTMESH_NODE_BINARY" run --listen /ip4/127.0.0.1/udp/0/quic-v1 --listen /ip4/127.0.0.1/tcp/0
if [[ "$status" -eq 0 ]]; then
echo "Test failed: Node was expected to exit with non-zero status"
diff --git a/tests/integration/sdk_canary_test.go b/tests/integration/sdk_canary_test.go
index eee8a4b7..340f1288 100644
--- a/tests/integration/sdk_canary_test.go
+++ b/tests/integration/sdk_canary_test.go
@@ -29,7 +29,7 @@ import (
"github.com/google/agentmesh/api"
)
-const sdkCanaryTemplate = ".github/k8s/sam-sdk-canary-template.yaml"
+const sdkCanaryTemplate = ".github/k8s/agentmesh-sdk-canary-template.yaml"
// canaryVerdict is one line the canary script prints per call.
type canaryVerdict struct {
@@ -41,7 +41,7 @@ type canaryVerdict struct {
}
// TestSDKCanaryScript runs the testnet's SDK canary script, taken from
-// .github/k8s/sam-sdk-canary-template.yaml, the way its pod runs it: an
+// .github/k8s/agentmesh-sdk-canary-template.yaml, the way its pod runs it: an
// agent example in one language writes its output to the directory the pod
// shares, and the script calls it with the other language's A2A example,
// both enrolled with the same projected token, the caller resuming its
diff --git a/tests/scale/collect-fleet.sh b/tests/scale/collect-fleet.sh
index ace65d26..cd12f6c3 100755
--- a/tests/scale/collect-fleet.sh
+++ b/tests/scale/collect-fleet.sh
@@ -28,12 +28,12 @@
# an agent cost rather than what was left over.
#
# Usage:
-# tests/scale/collect-fleet.sh --node-socket /var/run/sam-node.sock \
+# tests/scale/collect-fleet.sh --node-socket /var/run/agentmesh-node.sock \
# --duration 300 --out results.jsonl
set -euo pipefail
-NODE_SOCKET="/var/run/sam-node.sock"
+NODE_SOCKET="/var/run/agentmesh-node.sock"
DURATION=300
INTERVAL=5
OUT=""
@@ -87,7 +87,7 @@ scrape() {
}
agents_seen() {
- scrape | awk '/^sam_node_agents_seen /{printf "%d", $2; found=1} END{if(!found) printf "0"}'
+ scrape | awk '/^agentmesh_node_agents_seen /{printf "%d", $2; found=1} END{if(!found) printf "0"}'
}
node_metric() {
@@ -107,10 +107,10 @@ while :; do
agents="$(agents_seen)"
vms="$(count_of 'firecracker --api-sock')"
- boxes="$(count_of 'sam-box run --socket')"
+ boxes="$(count_of 'agentmesh-box run --socket')"
vm_rss_kb="$(rss_total 'firecracker --api-sock')"
- box_rss_kb="$(rss_total 'sam-box run --socket')"
- node_rss_kb="$(rss_total 'sam-node run')"
+ box_rss_kb="$(rss_total 'agentmesh-box run --socket')"
+ node_rss_kb="$(rss_total 'agentmesh-node run')"
mem_avail_kb="$(awk '/MemAvailable/ {print $2}' /proc/meminfo)"
load="$(awk '{print $1}' /proc/loadavg)"
@@ -119,7 +119,7 @@ while :; do
printf '"guest_rss_kb":%s,"boundary_rss_kb":%s,"node_rss_kb":%s,' \
"${vm_rss_kb}" "${box_rss_kb}" "${node_rss_kb}" >> "${OUT}"
printf '"mem_available_kb":%s,"load1":%s,"requests_in_flight":%s}\n' \
- "${mem_avail_kb}" "${load}" "$(node_metric sam_node_requests_in_flight)" >> "${OUT}"
+ "${mem_avail_kb}" "${load}" "$(node_metric agentmesh_node_requests_in_flight)" >> "${OUT}"
printf '%-9s %-8s %-8s %-10s %-10s\n' \
"${elapsed}s" "${agents:-0}" "${vms:-0}" \
diff --git a/tests/scale/load-fleet.sh b/tests/scale/load-fleet.sh
index 91cc70b7..79b2d318 100755
--- a/tests/scale/load-fleet.sh
+++ b/tests/scale/load-fleet.sh
@@ -22,7 +22,7 @@
# counted rather than against a fresh, empty host.
#
# The important detail is that load goes through one boundary per agent rather
-# than many connections through one. Each sam-box carries its own agent's
+# than many connections through one. Each agentmesh-box carries its own agent's
# identity, so the node sees N distinct principals and the admission path is
# exercised the way it would be in practice. Pointing a single load generator at
# a single boundary would measure a socket, not a mesh.
@@ -45,10 +45,10 @@ REQUESTS=200
CONCURRENCY=2
WARMUP=5
OUT="/var/log/load"
-TARGET="http://mesh.sam.alt/v1/models"
-SOCKET_PREFIX="/var/run/sam-vm"
+TARGET="http://mesh.alt/v1/models"
+SOCKET_PREFIX="/var/run/agentmesh-vm"
SOCKET_SUFFIX=".vsock_1080"
-SAM_BENCH="${SAM_BENCH:-sam-bench}"
+AGENTMESH_BENCH="${AGENTMESH_BENCH:-agentmesh-bench}"
REPORT_ONLY=""
usage() {
@@ -60,7 +60,7 @@ Options:
--requests N requests per agent (default 200)
--concurrency N in-flight requests per agent (default 2)
--warmup N unmeasured requests per agent (default 5)
- --target URL mesh URL to request (default http://mesh.sam.alt/v1/models)
+ --target URL mesh URL to request (default http://mesh.alt/v1/models)
--out DIR where per-agent JSON lands (default /var/log/load)
--report DIR aggregate an existing result directory and exit
EOF
@@ -125,8 +125,8 @@ if [[ -n "$REPORT_ONLY" ]]; then
exit 0
fi
-command -v "$SAM_BENCH" >/dev/null 2>&1 || {
- echo "sam-bench not found; build it with 'go build ./cmd/sam-bench' or set SAM_BENCH" >&2
+command -v "$AGENTMESH_BENCH" >/dev/null 2>&1 || {
+ echo "agentmesh-bench not found; build it with 'go build ./cmd/agentmesh-bench' or set AGENTMESH_BENCH" >&2
exit 1
}
@@ -137,7 +137,7 @@ for i in $(seq 1 "$AGENTS"); do
done
if (( missing > 0 )); then
echo "missing $missing of $AGENTS boundary sockets under ${SOCKET_PREFIX}-N${SOCKET_SUFFIX}" >&2
- echo "is the fleet still resident? check with: pgrep -c sam-box" >&2
+ echo "is the fleet still resident? check with: pgrep -c agentmesh-box" >&2
exit 1
fi
@@ -146,7 +146,7 @@ rm -f "$OUT"/agent-*.json
echo "driving $AGENTS agents x $REQUESTS requests at $TARGET"
for i in $(seq 1 "$AGENTS"); do
- "$SAM_BENCH" run \
+ "$AGENTMESH_BENCH" run \
--socket "${SOCKET_PREFIX}-${i}${SOCKET_SUFFIX}" \
--target "$TARGET" \
--requests "$REQUESTS" \
diff --git a/tests/scale/measure-guest.sh b/tests/scale/measure-guest.sh
index b6438180..44913f0b 100755
--- a/tests/scale/measure-guest.sh
+++ b/tests/scale/measure-guest.sh
@@ -62,7 +62,7 @@ for mem in ${SIZES}; do
dir="$(mktemp -d /tmp/sam-guest-size-XXXXXX)"
cp "${ROOTFS}" "${dir}/rootfs.ext4"
- # Stands in for sam-box: the flow only has to arrive, because what is being
+ # Stands in for agentmesh-box: the flow only has to arrive, because what is being
# measured is whether the guest had enough memory to get that far.
socat -u "UNIX-LISTEN:${dir}/vm.vsock_1080,fork" "CREATE:${dir}/arrived" &
socat_pid=$!
diff --git a/tests/scale/member-journey-summary.py b/tests/scale/member-journey-summary.py
index fa99d201..d49b1c43 100644
--- a/tests/scale/member-journey-summary.py
+++ b/tests/scale/member-journey-summary.py
@@ -137,14 +137,14 @@ def p99_of_delta(before, after, name):
return float("inf")
-cp_before, cp_after = parse_all("sam-control-plane", "before"), parse_all("sam-control-plane", "after")
+cp_before, cp_after = parse_all("agentmesh-control-plane", "before"), parse_all("agentmesh-control-plane", "after")
if cp_before and cp_after:
print()
- codes = delta_by(cp_before, cp_after, "sam_control_plane_http_requests_total", "code")
+ codes = delta_by(cp_before, cp_after, "agentmesh_control_plane_http_requests_total", "code")
errors = sum(v for c, v in codes.items() if c and c.startswith("5"))
- p99 = p99_of_delta(cp_before, cp_after, "sam_control_plane_http_request_duration_seconds")
+ p99 = p99_of_delta(cp_before, cp_after, "agentmesh_control_plane_http_request_duration_seconds")
# Both replicas export the same store-derived gauge; take one.
- nodes = tuple(max([v for (n, labels), v in s.items() if n == "sam_control_plane_enrolled_nodes" and dict(labels).get("role") == "mesh:role:node"] or [0])
+ nodes = tuple(max([v for (n, labels), v in s.items() if n == "agentmesh_control_plane_enrolled_nodes" and dict(labels).get("role") == "mesh:role:node"] or [0])
for s in (cp_before, cp_after))
print(f"control plane: requests by code {codes}; p99 <= {p99} s; enrolled nodes {nodes[0]:.0f} -> {nodes[1]:.0f}")
check("control plane: no 5xx during the run", errors == 0, f"{errors:.0f} responses")
@@ -152,16 +152,16 @@ if cp_before and cp_after:
check(f"control plane: request p99 <= {t_cp_p99:g} s", p99 <= t_cp_p99, f"<= {p99} s bucket")
routers = sorted({re.sub(r"-(before|after|resident|rolled)\.prom$", "", os.path.basename(p))
- for p in glob.glob(os.path.join(out, "sam-router-*.prom"))})
+ for p in glob.glob(os.path.join(out, "agentmesh-router-*.prom"))})
refused_total = 0
for r in routers:
b, a = parse(os.path.join(out, f"{r}-before.prom")), parse(os.path.join(out, f"{r}-after.prom"))
if not (b and a):
continue
- refused = delta_by(b, a, "sam_router_inbound_connections_refused_total", "reason")
- handshakes = delta_by(b, a, "sam_router_auth_handshakes_total", "result")
+ refused = delta_by(b, a, "agentmesh_router_inbound_connections_refused_total", "reason")
+ handshakes = delta_by(b, a, "agentmesh_router_auth_handshakes_total", "result")
rss = (total(b, "process_resident_memory_bytes") / 2**20, total(a, "process_resident_memory_bytes") / 2**20)
- peers = total(a, "sam_router_authenticated_peers")
+ peers = total(a, "agentmesh_router_authenticated_peers")
refused_total += sum(refused.values())
print(f"{r}: refused {refused}; handshakes {handshakes}; rss {rss[0]:.0f} -> {rss[1]:.0f} MiB; authenticated peers now {peers:.0f}")
if routers:
diff --git a/tests/scale/member-journey.sh b/tests/scale/member-journey.sh
index 2f2e2129..fe7a62df 100755
--- a/tests/scale/member-journey.sh
+++ b/tests/scale/member-journey.sh
@@ -17,7 +17,7 @@
# What does the Nth member experience?
#
# The density and fleet runs say how many agents one member can carry. This
-# run is about members: N sam-node processes join a real mesh from one host,
+# run is about members: N agentmesh-node processes join a real mesh from one host,
# each is timed from start to its first call of a service through the mesh,
# the fleet then stays resident while more members join and, if asked, while
# the routers are restarted under it. Every member on this host shares one
@@ -65,8 +65,8 @@ ROLLOUT=0
NODE_ARGS=()
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
-SAM_NODE="${SAM_NODE:-${REPO_ROOT}/bin/sam-node}"
-SAM_BENCH="${SAM_BENCH:-${REPO_ROOT}/bin/sam-bench}"
+AGENTMESH_NODE="${AGENTMESH_NODE:-${REPO_ROOT}/bin/agentmesh-node}"
+AGENTMESH_BENCH="${AGENTMESH_BENCH:-${REPO_ROOT}/bin/agentmesh-bench}"
# May carry arguments, e.g. KUBECTL="kubectl --context my-cluster".
KUBECTL="${KUBECTL:-kubectl}"
@@ -91,7 +91,7 @@ Options:
--hold DURATION how long the burst fleet stays resident (default ${HOLD})
--rollout restart the router StatefulSet while the fleet is resident (needs --env)
--service NAME MCP service each member finds and calls (default ${SERVICE})
- --node-arg ARG extra sam-node argument, repeatable
+ --node-arg ARG extra agentmesh-node argument, repeatable
--out DIR where observations, logs and member state land (required)
EOF
}
@@ -119,8 +119,8 @@ fail() { echo "member-journey: $*" >&2; exit 1; }
log() { echo "$(date -u +%FT%TZ) $*"; }
[[ -n "$OUT" ]] || fail "--out is required"
-[[ -x "$SAM_NODE" ]] || fail "sam-node not found at $SAM_NODE; run make or set SAM_NODE"
-[[ -x "$SAM_BENCH" ]] || fail "sam-bench not found at $SAM_BENCH; run make or set SAM_BENCH"
+[[ -x "$AGENTMESH_NODE" ]] || fail "agentmesh-node not found at $AGENTMESH_NODE; run make or set AGENTMESH_NODE"
+[[ -x "$AGENTMESH_BENCH" ]] || fail "agentmesh-bench not found at $AGENTMESH_BENCH; run make or set AGENTMESH_BENCH"
command -v python3 >/dev/null || fail "python3 is needed for the summary"
if [[ -n "$ENV_NAME" ]]; then
NS="sam-${ENV_NAME}"
@@ -174,11 +174,11 @@ admin_api() {
local port
port=$(python3 -c 'import socket; s=socket.socket(); s.bind(("127.0.0.1",0)); print(s.getsockname()[1])')
if [[ ! -s "$OUT/admin-header" ]]; then
- $KUBECTL get secret "sam-control-plane-secret-${ENV_NAME}" -n "$NS" -o jsonpath='{.data.admin-token}' \
+ $KUBECTL get secret "agentmesh-control-plane-secret-${ENV_NAME}" -n "$NS" -o jsonpath='{.data.admin-token}' \
| base64 -d | sed 's/^/Authorization: Bearer /' > "$OUT/admin-header"
chmod 600 "$OUT/admin-header"
fi
- $KUBECTL port-forward "deployment/sam-control-plane-${ENV_NAME}" -n "$NS" "${port}:8080" >/dev/null 2>&1 &
+ $KUBECTL port-forward "deployment/agentmesh-control-plane-${ENV_NAME}" -n "$NS" "${port}:8080" >/dev/null 2>&1 &
PF_PID=$!
for _ in $(seq 1 30); do
curl -fsS -o /dev/null "http://127.0.0.1:${port}/healthz" 2>/dev/null && break
@@ -228,12 +228,12 @@ revoke_token() {
snapshot() {
local tag="$1" pod name
[[ -n "$ENV_NAME" ]] || return 0
- for pod in $($KUBECTL get pods -n "$NS" -l "app=sam-control-plane-${ENV_NAME}" -o name 2>/dev/null); do
+ for pod in $($KUBECTL get pods -n "$NS" -l "app=agentmesh-control-plane-${ENV_NAME}" -o name 2>/dev/null); do
name="${pod#pod/}"
$KUBECTL get --raw "/api/v1/namespaces/${NS}/pods/${name}:8080/proxy/metrics" \
> "$OUT/${name}-${tag}.prom" 2>/dev/null || log "could not read ${name} metrics (${tag})"
done
- for pod in $($KUBECTL get pods -n "$NS" -l "app=sam-router-${ENV_NAME}" -o name 2>/dev/null); do
+ for pod in $($KUBECTL get pods -n "$NS" -l "app=agentmesh-router-${ENV_NAME}" -o name 2>/dev/null); do
name="${pod#pod/}"
$KUBECTL get --raw "/api/v1/namespaces/${NS}/pods/${name}:9090/proxy/metrics" \
> "$OUT/${name}-${tag}.prom" 2>/dev/null || log "could not read ${name} metrics (${tag})"
@@ -254,7 +254,7 @@ summarize() {
"$T_JOURNEY_P50_MS" "$T_JOURNEY_P95_MS" "$T_OUTAGE_MAX_MS" "$T_CP_P99_S"
}
-# join_cmd fills JOIN_CMD with one phase's sam-bench invocation. It is an
+# join_cmd fills JOIN_CMD with one phase's agentmesh-bench invocation. It is an
# array rather than a function so the burst can be backgrounded directly:
# a backgrounded function is a subshell, and a signal to it would not reach
# the run inside.
@@ -262,8 +262,8 @@ JOIN_CMD=()
join_cmd() { # phase count base-port extra...
local phase="$1" count="$2" base="$3" a
shift 3
- JOIN_CMD=("$SAM_BENCH" join
- --node-bin "$SAM_NODE"
+ JOIN_CMD=("$AGENTMESH_BENCH" join
+ --node-bin "$AGENTMESH_NODE"
--control-plane "$CONTROL_PLANE"
--bootstrap-token-path "$BOOTSTRAP_TOKEN_PATH"
--service "$SERVICE"
@@ -282,7 +282,7 @@ rm -f "$OUT/resident"
{
echo "control_plane=$CONTROL_PLANE"
echo "host=$(hostname) nproc=$(nproc) mem_kib=$(awk '/MemTotal/{print $2}' /proc/meminfo)"
- echo "sam_node=$("$SAM_NODE" --version 2>/dev/null | head -1)"
+ echo "sam_node=$("$AGENTMESH_NODE" --version 2>/dev/null | head -1)"
} > "$OUT/environment.txt"
snapshot before
@@ -316,9 +316,9 @@ fi
if (( ROLLOUT )); then
event rollout-start
- log "rollout: restarting statefulset/sam-router-${ENV_NAME} under the resident fleet"
- $KUBECTL rollout restart "statefulset/sam-router-${ENV_NAME}" -n "$NS"
- $KUBECTL rollout status "statefulset/sam-router-${ENV_NAME}" -n "$NS" --timeout=600s || log "rollout did not finish in 600s"
+ log "rollout: restarting statefulset/agentmesh-router-${ENV_NAME} under the resident fleet"
+ $KUBECTL rollout restart "statefulset/agentmesh-router-${ENV_NAME}" -n "$NS"
+ $KUBECTL rollout status "statefulset/agentmesh-router-${ENV_NAME}" -n "$NS" --timeout=600s || log "rollout did not finish in 600s"
event rollout-end
snapshot rolled
if (( LATE > 0 )); then
diff --git a/tests/scale/member-ladder-summary.py b/tests/scale/member-ladder-summary.py
index 4c60de13..5853b908 100755
--- a/tests/scale/member-ladder-summary.py
+++ b/tests/scale/member-ladder-summary.py
@@ -118,20 +118,20 @@ for n in notes:
print(n)
for i in range(1, len(steps) + 1):
- b, a = parse_all("sam-control-plane", f"step{i}-before"), parse_all("sam-control-plane", f"step{i}-after")
+ b, a = parse_all("agentmesh-control-plane", f"step{i}-before"), parse_all("agentmesh-control-plane", f"step{i}-after")
if not (b and a):
continue
- codes = delta_by(b, a, "sam_control_plane_http_requests_total", "code")
- p99 = p99_of_delta(b, a, "sam_control_plane_http_request_duration_seconds")
- nodes = max([v for (n, labels), v in a.items() if n == "sam_control_plane_enrolled_nodes" and dict(labels).get("role") == "mesh:role:node"] or [0])
- peers = max([v for (n, labels), v in a.items() if n == "sam_control_plane_mesh_connected_peers"] or [0])
+ codes = delta_by(b, a, "agentmesh_control_plane_http_requests_total", "code")
+ p99 = p99_of_delta(b, a, "agentmesh_control_plane_http_request_duration_seconds")
+ nodes = max([v for (n, labels), v in a.items() if n == "agentmesh_control_plane_enrolled_nodes" and dict(labels).get("role") == "mesh:role:node"] or [0])
+ peers = max([v for (n, labels), v in a.items() if n == "agentmesh_control_plane_mesh_connected_peers"] or [0])
print(f"\nstep {i} control plane: requests {codes}; p99 <= {p99} s; enrolled nodes {nodes:.0f}; mesh peers seen {peers:.0f}")
- for r in sorted({re.sub(r"-step\d+-(before|after)\.prom$", "", os.path.basename(p)) for p in glob.glob(os.path.join(out, f"sam-router-*-step{i}-after.prom"))}):
- rb = {k: v for k, v in parse_all("sam-router", f"step{i}-before").items() if dict(k[1]).get("pod") == r}
- ra = {k: v for k, v in parse_all("sam-router", f"step{i}-after").items() if dict(k[1]).get("pod") == r}
- refused = delta_by(rb, ra, "sam_router_inbound_connections_refused_total", "reason")
- hs = delta_by(rb, ra, "sam_router_auth_handshakes_total", "result")
- print(f" {r}: authenticated peers {total(ra, 'sam_router_authenticated_peers'):.0f}, connected {total(ra, 'sam_router_connected_peers'):.0f}, "
+ for r in sorted({re.sub(r"-step\d+-(before|after)\.prom$", "", os.path.basename(p)) for p in glob.glob(os.path.join(out, f"agentmesh-router-*-step{i}-after.prom"))}):
+ rb = {k: v for k, v in parse_all("agentmesh-router", f"step{i}-before").items() if dict(k[1]).get("pod") == r}
+ ra = {k: v for k, v in parse_all("agentmesh-router", f"step{i}-after").items() if dict(k[1]).get("pod") == r}
+ refused = delta_by(rb, ra, "agentmesh_router_inbound_connections_refused_total", "reason")
+ hs = delta_by(rb, ra, "agentmesh_router_auth_handshakes_total", "result")
+ print(f" {r}: authenticated peers {total(ra, 'agentmesh_router_authenticated_peers'):.0f}, connected {total(ra, 'agentmesh_router_connected_peers'):.0f}, "
f"rss {total(rb, 'process_resident_memory_bytes')/2**20:.0f} -> {total(ra, 'process_resident_memory_bytes')/2**20:.0f} MiB, "
f"handshakes {dict((k, v) for k, v in hs.items() if v)}, refused {dict((k, v) for k, v in refused.items() if v) or 'none'}")
diff --git a/tests/scale/member-ladder.sh b/tests/scale/member-ladder.sh
index bc1106b4..eb11ee10 100755
--- a/tests/scale/member-ladder.sh
+++ b/tests/scale/member-ladder.sh
@@ -23,7 +23,7 @@
# members; the ladder is therefore in minions, and a step of two minions is
# a thousand members more.
#
-# Each minion runs `sam-bench join` with a long --hold; the join report it
+# Each minion runs `agentmesh-bench join` with a long --hold; the join report it
# writes the moment its fleet is resident is pulled back here, so a step is
# judged while its members stay. The control plane and every router are read
# before and after each step, through the API server. At the end, or on
@@ -36,7 +36,7 @@
# "sam-ladder-06 sam-ladder-07 sam-ladder-08 sam-ladder-09 sam-ladder-10" \
# --out /tmp/ladder
#
-# The minions need sam-node and sam-bench on their PATH and a bootstrap token
+# The minions need agentmesh-node and agentmesh-bench on their PATH and a bootstrap token
# at --remote-token-path; the token is minted here with enough usages for the
# whole ladder and revoked on exit, as member-journey.sh does. The minions are
# reached with gcloud over IAP in $ZONE (default us-central1-a) and $PROJECT
@@ -100,10 +100,10 @@ admin_api() {
local port
port=$(python3 -c 'import socket; s=socket.socket(); s.bind(("127.0.0.1",0)); print(s.getsockname()[1])')
if [[ ! -s "$OUT/admin-header" ]]; then
- $KUBECTL get secret "sam-control-plane-secret-${ENV_NAME}" -n "$NS" -o json \
+ $KUBECTL get secret "agentmesh-control-plane-secret-${ENV_NAME}" -n "$NS" -o json \
| python3 -c 'import json,sys,base64,os; d=json.load(sys.stdin)["data"]["admin-token"]; p=sys.argv[1]; open(p,"w").write("Authorization: Bearer "+base64.b64decode(d).decode()+"\n"); os.chmod(p,0o600)' "$OUT/admin-header"
fi
- $KUBECTL port-forward "deployment/sam-control-plane-${ENV_NAME}" -n "$NS" "${port}:8080" >/dev/null 2>&1 &
+ $KUBECTL port-forward "deployment/agentmesh-control-plane-${ENV_NAME}" -n "$NS" "${port}:8080" >/dev/null 2>&1 &
PF_PID=$!
for _ in $(seq 1 30); do curl -fsS -o /dev/null "http://127.0.0.1:${port}/healthz" 2>/dev/null && break; sleep 0.5; done
local status=0
@@ -114,11 +114,11 @@ admin_api() {
snapshot() {
local tag="$1" pod name
- for pod in $($KUBECTL get pods -n "$NS" -l "app=sam-control-plane-${ENV_NAME}" -o name 2>/dev/null); do
+ for pod in $($KUBECTL get pods -n "$NS" -l "app=agentmesh-control-plane-${ENV_NAME}" -o name 2>/dev/null); do
name="${pod#pod/}"
$KUBECTL get --raw "/api/v1/namespaces/${NS}/pods/${name}:8080/proxy/metrics" > "$OUT/${name}-${tag}.prom" 2>/dev/null || log "could not read ${name} (${tag})"
done
- for pod in $($KUBECTL get pods -n "$NS" -l "app=sam-router-${ENV_NAME}" -o name 2>/dev/null); do
+ for pod in $($KUBECTL get pods -n "$NS" -l "app=agentmesh-router-${ENV_NAME}" -o name 2>/dev/null); do
name="${pod#pod/}"
$KUBECTL get --raw "/api/v1/namespaces/${NS}/pods/${name}:9090/proxy/metrics" > "$OUT/${name}-${tag}.prom" 2>/dev/null || log "could not read ${name} (${tag})"
done
@@ -128,11 +128,11 @@ STARTED_MINIONS=()
collect_holds() {
local m
for m in "${STARTED_MINIONS[@]}"; do
- rssh "$m" "pkill -INT -x sam-bench || true" || true
+ rssh "$m" "pkill -INT -x agentmesh-bench || true" || true
done
for m in "${STARTED_MINIONS[@]}"; do
for _ in $(seq 1 60); do
- rssh "$m" "pgrep -x sam-bench >/dev/null" || break
+ rssh "$m" "pgrep -x agentmesh-bench >/dev/null" || break
sleep 2
done
rscp_from "$m" "/var/log/ladder/${m}.json" "$OUT/${m}.json" || log "no final report from $m"
@@ -173,7 +173,7 @@ log "minted bootstrap token ${TOKEN_ID} for ${uses} enrollments"
log "placing the token on ${#ALL_MINIONS[@]} minions"
for m in "${ALL_MINIONS[@]}"; do
- rssh "$m" "test -x /usr/local/bin/sam-bench && test -x /usr/local/bin/sam-node" || fail "$m has no binaries yet (startup script still running?)"
+ rssh "$m" "test -x /usr/local/bin/agentmesh-bench && test -x /usr/local/bin/agentmesh-node" || fail "$m has no binaries yet (startup script still running?)"
rscp_to "$OUT/bootstrap-token" "$m" /tmp/bootstrap-token
rssh "$m" "sudo install -m 0644 /tmp/bootstrap-token ${REMOTE_TOKEN_PATH} && rm -f /tmp/bootstrap-token" || fail "could not place the token on $m"
done
@@ -192,7 +192,7 @@ for step in "${STEPS[@]}"; do
event "step${step_no}-start"
for m in "${minions[@]}"; do
# The run detaches from the ssh session; its stderr is the progress log.
- rssh "$m" "ulimit -n 1048576; rm -rf /var/lib/ladder/${m} /var/log/ladder/${m}.json /var/log/ladder/resident; nohup sam-bench join --node-bin /usr/local/bin/sam-node --control-plane ${CONTROL_PLANE} --bootstrap-token-path ${REMOTE_TOKEN_PATH} --service ${SERVICE} --count ${PER_MINION} --ramp ${RAMP} --hold ${HOLD} --dir /var/lib/ladder/${m} --label minion=${m} --label step=${step_no} --label resident_before=${resident} --resident-marker /var/log/ladder/resident --out /var/log/ladder/${m}.json > /var/log/ladder/${m}.log 2>&1 < /dev/null &" || fail "could not start the run on $m"
+ rssh "$m" "ulimit -n 1048576; rm -rf /var/lib/ladder/${m} /var/log/ladder/${m}.json /var/log/ladder/resident; nohup agentmesh-bench join --node-bin /usr/local/bin/agentmesh-node --control-plane ${CONTROL_PLANE} --bootstrap-token-path ${REMOTE_TOKEN_PATH} --service ${SERVICE} --count ${PER_MINION} --ramp ${RAMP} --hold ${HOLD} --dir /var/lib/ladder/${m} --label minion=${m} --label step=${step_no} --label resident_before=${resident} --resident-marker /var/log/ladder/resident --out /var/log/ladder/${m}.json > /var/log/ladder/${m}.log 2>&1 < /dev/null &" || fail "could not start the run on $m"
STARTED_MINIONS+=("$m")
done
# Resident means every member's journey has ended, one way or the other.
@@ -200,7 +200,7 @@ for step in "${STEPS[@]}"; do
for m in "${minions[@]}"; do
until rssh "$m" "test -f /var/log/ladder/resident"; do
[[ $(date +%s) -lt $deadline ]] || fail "$m was not resident within 15 minutes; see /var/log/ladder/${m}.log on it"
- rssh "$m" "pgrep -x sam-bench >/dev/null" || fail "the run on $m ended before its fleet was resident"
+ rssh "$m" "pgrep -x agentmesh-bench >/dev/null" || fail "the run on $m ended before its fleet was resident"
sleep 10
done
rscp_from "$m" "/var/log/ladder/${m}.json" "$OUT/step${step_no}-${m}.json" || fail "could not fetch the join report from $m"
@@ -216,4 +216,4 @@ done
log "ladder complete: ${resident} members resident; holding until Ctrl-C or ${HOLD}"
# Stay until the first minion's hold ends or the operator interrupts.
-while rssh "${STARTED_MINIONS[0]}" "pgrep -x sam-bench >/dev/null"; do sleep 60; done
+while rssh "${STARTED_MINIONS[0]}" "pgrep -x agentmesh-bench >/dev/null"; do sleep 60; done
diff --git a/tests/scale/results/fleet-1k/load-200x200.json b/tests/scale/results/fleet-1k/load-200x200.json
index 16534274..7c98bfb5 100644
--- a/tests/scale/results/fleet-1k/load-200x200.json
+++ b/tests/scale/results/fleet-1k/load-200x200.json
@@ -9,8 +9,8 @@
"note": "the other 800 sandboxes stayed resident and idle during the load"
},
"driver": {
- "tool": "sam-bench",
- "target": "http://mesh.sam.alt/v1/models",
+ "tool": "agentmesh-bench",
+ "target": "http://mesh.alt/v1/models",
"boundaries": 200,
"requests_per_agent": 200,
"concurrency_per_agent": 2,
diff --git a/tests/scale/results/table.md b/tests/scale/results/table.md
index 000d413a..752e859b 100644
--- a/tests/scale/results/table.md
+++ b/tests/scale/results/table.md
@@ -12,7 +12,7 @@
### New flow per request: what admission costs
-| agents | requests | conc | ok | failed | rps | ttfb p50 | ttfb p95 | ttfb p99 | ttfb max | sam_box_flows_total{outcome=allowed,route=mesh-entrypoint} |
+| agents | requests | conc | ok | failed | rps | ttfb p50 | ttfb p95 | ttfb p99 | ttfb max | agentmesh_box_flows_total{outcome=allowed,route=mesh-entrypoint} |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | 500 | 4 | 500 | 0 | 1154 | 1.55 | 2.71 | 78.15 | 85.25 | 520 |
| 2 | 500 | 4 | 500 | 0 | 1991 | 1.40 | 2.20 | 3.19 | 70.09 | 520 |
@@ -24,7 +24,7 @@
### Denied: what enforcement costs, and that it held
-| agents | requests | conc | ok | failed | rps | ttfb p50 | ttfb p95 | ttfb p99 | ttfb max | sam_box_flows_total{outcome=denied,route=unresolved} |
+| agents | requests | conc | ok | failed | rps | ttfb p50 | ttfb p95 | ttfb p99 | ttfb max | agentmesh_box_flows_total{outcome=denied,route=unresolved} |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | 500 | 4 | 0 | 500 | 26225 | 0.00 | 0.00 | 0.00 | 0.00 | 500 |
| 2 | 500 | 4 | 0 | 500 | 28274 | 0.00 | 0.00 | 0.00 | 0.00 | 500 |
diff --git a/tests/scale/run-density.sh b/tests/scale/run-density.sh
index c48a9f01..a1c8756b 100755
--- a/tests/scale/run-density.sh
+++ b/tests/scale/run-density.sh
@@ -23,7 +23,7 @@
# whether the ones already running got slower.
#
# It deliberately runs the boundaries as host processes rather than containers.
-# The question is what sam-box costs, and wrapping each one in a container would
+# The question is what agentmesh-box costs, and wrapping each one in a container would
# measure the container runtime instead.
#
# Usage:
@@ -63,7 +63,7 @@ BOX_DIR="$(mktemp -d /tmp/sam-scale-XXXXXX)"
# Pick a metrics port range that is actually free. A previous run that leaked
# its processes would otherwise make this one fail on its first sandbox, and
-# that failure reads as a defect in sam-box rather than in the harness.
+# that failure reads as a defect in agentmesh-box rather than in the harness.
pick_port_base() {
local base
for base in 19600 19700 19800 19900 20000; do
@@ -94,7 +94,7 @@ cleanup() {
# The recorded pids are the reliable path; this catches anything that
# outlived its record, so a failed run cannot leave sandboxes holding ports
# and make the next run look broken.
- pkill -f "sam-box run --socket ${BOX_DIR}/" 2>/dev/null || true
+ pkill -f "agentmesh-box run --socket ${BOX_DIR}/" 2>/dev/null || true
mesh_cleanup_test_resources 2>/dev/null || true
[[ "${KEEP}" -eq 1 ]] || rm -rf "${BOX_DIR}"
exit "${status}"
@@ -131,7 +131,7 @@ start_box() {
local started
started="$(date +%s%N)"
- "${REPO_ROOT}/bin/sam-box" run \
+ "${REPO_ROOT}/bin/agentmesh-box" run \
--socket "${socket}" \
--sidecar-socket "${MESH_SOCKET_DIR}/node.sock" \
--metrics-addr "127.0.0.1:${port}" \
@@ -169,7 +169,7 @@ mesh_start_mock_oidc
mesh_start_router
mesh_start_node 1 "--socket-path /sockets/node.sock --data-dir /sockets/node-data" "" \
"-v ${MESH_SOCKET_DIR}:/sockets --user $(id -u):$(id -g) -e HOME=/sockets"
-mesh_wait_for_log "${MESH_PREFIX}-node-1" "SAM Node Online" 120
+mesh_wait_for_log "${MESH_PREFIX}-node-1" "Agent Mesh Node Online" 120
mesh_wait_for_mcp_ready 1 30
echo "==> Sweeping ${STEPS} sandboxes"
@@ -182,7 +182,7 @@ echo "index,startup_ms" >> "${OUT_DIR}/startup.csv"
# socket directly, because putting a relay there to give it a TCP address would
# add a userspace hop to the baseline and flatter everything compared to it.
echo "==> Measuring the baseline, no boundary"
-"${REPO_ROOT}/bin/sam-bench" run \
+"${REPO_ROOT}/bin/agentmesh-bench" run \
--target-unix "${MESH_SOCKET_DIR}/node.sock" \
--target "http://localhost/v1/models" \
--requests "${REQUESTS}" \
@@ -221,9 +221,9 @@ for step in ${STEPS//,/ }; do
flag=()
[[ "${condition}" == "new-flow-per-request" ]] && flag=(--new-flow-per-request)
- "${REPO_ROOT}/bin/sam-bench" run \
+ "${REPO_ROOT}/bin/agentmesh-bench" run \
--socket "${BOX_DIR}/agent-1.sock" \
- --target "http://mesh.sam.alt/v1/models" \
+ --target "http://mesh.alt/v1/models" \
--requests "${REQUESTS}" \
--concurrency "${CONCURRENCY}" \
--warmup "${WARMUP}" \
@@ -239,7 +239,7 @@ for step in ${STEPS//,/ }; do
# must fail, and a run where any succeeded is a security result, not a
# performance one, so it is recorded next to the latencies rather than in a
# separate place nobody reads.
- "${REPO_ROOT}/bin/sam-bench" run \
+ "${REPO_ROOT}/bin/agentmesh-bench" run \
--socket "${BOX_DIR}/agent-1.sock" \
--target "http://blocked.example.com/v1/models" \
--requests "${REQUESTS}" \
@@ -255,25 +255,25 @@ echo "==> Results in ${OUT_DIR}"
{
echo "### Reused flow: what an agent normally experiences"
echo
- "${REPO_ROOT}/bin/sam-bench" report \
+ "${REPO_ROOT}/bin/agentmesh-bench" report \
--gauge "process_resident_memory_bytes" \
"${OUT_DIR}"/reused-flow-*.json
echo
echo "### New flow per request: what admission costs"
echo
- "${REPO_ROOT}/bin/sam-bench" report \
- --metric "sam_box_flows_total{outcome=allowed,route=mesh-entrypoint}" \
+ "${REPO_ROOT}/bin/agentmesh-bench" report \
+ --metric "agentmesh_box_flows_total{outcome=allowed,route=mesh-entrypoint}" \
"${OUT_DIR}"/new-flow-per-request-*.json
echo
echo "### Denied: what enforcement costs, and that it held"
echo
- "${REPO_ROOT}/bin/sam-bench" report \
- --metric "sam_box_flows_total{outcome=denied,route=unresolved}" \
+ "${REPO_ROOT}/bin/agentmesh-bench" report \
+ --metric "agentmesh_box_flows_total{outcome=denied,route=unresolved}" \
"${OUT_DIR}"/denied-*.json
if [[ -f "${OUT_DIR}/baseline.json" ]]; then
echo
echo "### Baseline: the same node, no boundary"
echo
- "${REPO_ROOT}/bin/sam-bench" report "${OUT_DIR}/baseline.json"
+ "${REPO_ROOT}/bin/agentmesh-bench" report "${OUT_DIR}/baseline.json"
fi
} | tee "${OUT_DIR}/table.md"
diff --git a/tests/scale/validate-launcher.sh b/tests/scale/validate-launcher.sh
index 16aa0c94..7414868b 100755
--- a/tests/scale/validate-launcher.sh
+++ b/tests/scale/validate-launcher.sh
@@ -43,7 +43,7 @@ source "${REPO_ROOT}/tests/e2e/lib/container_mesh.bash"
cleanup() {
local status=$?
echo "==> Tearing down"
- pkill -f "sam-box run --socket ${WORK}/" 2>/dev/null || true
+ pkill -f "agentmesh-box run --socket ${WORK}/" 2>/dev/null || true
pkill -f "firecracker --api-sock /tmp/firecracker-vm-" 2>/dev/null || true
mesh_cleanup_test_resources 2>/dev/null || true
rm -rf "${WORK}"
@@ -61,7 +61,7 @@ mesh_start_mock_oidc
mesh_start_router
mesh_start_node 1 "--socket-path /sockets/node.sock --data-dir /sockets/node-data" "" \
"-v ${MESH_SOCKET_DIR}:/sockets --user $(id -u):$(id -g) -e HOME=/sockets"
-mesh_wait_for_log "${MESH_PREFIX}-node-1" "SAM Node Online" 120
+mesh_wait_for_log "${MESH_PREFIX}-node-1" "Agent Mesh Node Online" 120
mesh_wait_for_mcp_ready 1 30
echo "==> Running the fleet launcher for ${COUNT} sandboxes"
@@ -71,7 +71,7 @@ NODE_UDS="${MESH_SOCKET_DIR}/node.sock" \
NODE_DIR="${WORK}/node-data" \
RUN_DIR="${WORK}" \
LOG_DIR="${WORK}" \
-SAM_BOX="${REPO_ROOT}/bin/sam-box" \
+AGENTMESH_BOX="${REPO_ROOT}/bin/agentmesh-box" \
WORKDIR="${FC_WORKDIR:-/tmp/microvm}" \
AGENT_DOMAIN="validate.sam-mesh.dev" \
bash "${REPO_ROOT}/scripts/launch-microvms.sh" "${COUNT}"
@@ -93,7 +93,7 @@ echo
echo "agents the node is serving: ${seen:-0} (expected ${COUNT})"
if [[ "${seen:-0}" -lt "${COUNT}" ]]; then
echo "--- boundary logs ---"
- tail -n 5 "${WORK}"/sam-box-vm-*.log 2>/dev/null || true
+ tail -n 5 "${WORK}"/agentmesh-box-vm-*.log 2>/dev/null || true
echo "--- guest consoles ---"
grep -ahvE "^\[ *[0-9]+\.[0-9]+\]|^2026-" "${WORK}"/fc-vm-*.log 2>/dev/null | tail -20 || true
exit 1
diff --git a/tests/ui/browser-sdk.spec.js b/tests/ui/browser-sdk.spec.js
index 94809917..ce5abdce 100644
--- a/tests/ui/browser-sdk.spec.js
+++ b/tests/ui/browser-sdk.spec.js
@@ -13,15 +13,15 @@
// limitations under the License.
// The JS SDK in a browser page (sdk/js/examples/browser) as a member of a
-// sam-one mesh: the page enrolls with the join token from an origin of its
+// agentmesh-one mesh: the page enrolls with the join token from an origin of its
// own, joins the router over WebSocket and Noise, answers A2A requests from
// a Node member, calls a Node agent, and after a reload resumes the saved
-// enrollment without a token. Once against sam-one directly and once behind
-// a TLS-terminating edge reached by name, the topology `sam-one --tunnel`
+// enrollment without a token. Once against agentmesh-one directly and once behind
+// a TLS-terminating edge reached by name, the topology `agentmesh-one --tunnel`
// leaves the page in, where the router is advertised as wss.
const { test, expect } = require('@playwright/test');
-const stack = require('./lib/sam-one');
+const stack = require('./lib/agentmesh-one');
test.use({ ignoreHTTPSErrors: true });
test.describe.configure({ mode: 'serial' });
@@ -33,7 +33,7 @@ const topologies = [
];
for (const topology of topologies) {
- test(`a browser page is a member of a sam-one mesh (${topology.name})`, async ({ page }) => {
+ test(`a browser page is a member of a agentmesh-one mesh (${topology.name})`, async ({ page }) => {
const why = stack.missing();
test.skip(why !== '', why);
@@ -45,8 +45,8 @@ for (const topology of topologies) {
const cert = stack.selfSignedCert('localhost');
test.skip(cert === null, 'openssl is not installed');
caFile = cert.certFile;
- // The edge's port must be known before sam-one starts, since sam-one
- // advertises it; the edge then proxies to wherever sam-one bound.
+ // The edge's port must be known before agentmesh-one starts, since agentmesh-one
+ // advertises it; the edge then proxies to wherever agentmesh-one bound.
const edgePort = await stack.freePort();
samOne = await stack.startSamOne({ externalUrl: `https://localhost:${edgePort}` });
stops.push(() => samOne.stop());
diff --git a/tests/ui/console.spec.js b/tests/ui/console.spec.js
index b125d216..9003cb93 100644
--- a/tests/ui/console.spec.js
+++ b/tests/ui/console.spec.js
@@ -14,7 +14,7 @@
const { test, expect } = require('@playwright/test');
-const ADMIN_TOKEN = process.env.SAM_ADMIN_TOKEN || 'ui-test-admin-token';
+const ADMIN_TOKEN = process.env.AGENTMESH_ADMIN_TOKEN || 'ui-test-admin-token';
// Tests run serially with a single worker, so one collector is enough.
let jsFailures = [];
@@ -79,7 +79,7 @@ test('generating a token shows a copyable value and lists it', async ({ page })
const tokenField = page.locator('#token-result-value');
await expect(page.locator('#token-result')).toBeVisible();
- await expect(tokenField).toHaveValue(/^sam-bt-[0-9a-f]{32}$/);
+ await expect(tokenField).toHaveValue(/^mesh-bt-[0-9a-f]{32}$/);
const token = await tokenField.inputValue();
await expect(page.locator('#token-result-owner')).toHaveText('root-admin');
@@ -115,8 +115,8 @@ test('the session credential is never exposed to JavaScript', async ({ page, con
expect(storage).not.toContain(ADMIN_TOKEN);
expect(await page.evaluate(() => document.cookie)).not.toContain(ADMIN_TOKEN);
- const session = (await context.cookies()).find((c) => c.name === 'sam_session');
- expect(session, 'sam_session cookie was not set').toBeTruthy();
+ const session = (await context.cookies()).find((c) => c.name === 'agentmesh_session');
+ expect(session, 'agentmesh_session cookie was not set').toBeTruthy();
expect(session.httpOnly).toBe(true);
});
diff --git a/tests/ui/dev.sh b/tests/ui/dev.sh
index c48fa251..e21bf3da 100755
--- a/tests/ui/dev.sh
+++ b/tests/ui/dev.sh
@@ -30,7 +30,7 @@ cd "${REPO_ROOT}"
trap stack_cleanup EXIT INT TERM
-for binary in sam-control-plane sam-console sam-router sam-node; do
+for binary in agentmesh-control-plane agentmesh-console agentmesh-router agentmesh-node; do
if [[ ! -x "${REPO_ROOT}/bin/${binary}" ]]; then
echo "missing ${REPO_ROOT}/bin/${binary}; run 'make build' first" >&2
exit 1
@@ -50,14 +50,14 @@ api() {
echo "Seeding mesh policy..."
api POST /policies -H "Content-Type: application/json" -d '{
"roles": [
- {"name": "sam-admin", "allowed_services": ["*"], "allowed_targets": ["*"]},
+ {"name": "mesh-admin", "allowed_services": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:router", "allowed_services": ["*"], "allowed_targets": ["*"]},
{"name": "mesh:role:node", "allowed_services": ["mcp://*", "system://mesh.catalog"], "allowed_targets": ["*"]}
],
"bindings": [
{"role": "mesh:role:router", "members": ["group:routers"]},
{"role": "mesh:role:node", "members": ["group:users"]},
- {"role": "sam-admin", "members": ["user:root-admin"]}
+ {"role": "mesh-admin", "members": ["user:root-admin"]}
]
}' >/dev/null
@@ -72,7 +72,7 @@ mint_token() {
echo "Enrolling a router..."
ROUTER_TOKEN=$(mint_token "mesh:role:router" "ui-dev router")
-"${REPO_ROOT}/bin/sam-router" \
+"${REPO_ROOT}/bin/agentmesh-router" \
--control-plane "${STACK_CP_URL}" \
--listen "/ip4/127.0.0.1/tcp/5101" \
--keys-path "${WORK_DIR}/router.key" \
@@ -85,14 +85,14 @@ echo "Enrolling a node..."
NODE_TOKEN=$(mint_token "mesh:role:node" "ui-dev node")
NODE_DIR="${WORK_DIR}/node"
mkdir -p "${NODE_DIR}"
-cat >"${NODE_DIR}/sam-node.yaml" <<'EOF'
+cat >"${NODE_DIR}/agentmesh-node.yaml" <<'EOF'
version: "v1alpha1"
services: []
EOF
-"${REPO_ROOT}/bin/sam-node" join "${STACK_CP_URL}" \
+"${REPO_ROOT}/bin/agentmesh-node" join "${STACK_CP_URL}" \
--bootstrap-token "${NODE_TOKEN}" \
--data-dir "${NODE_DIR}" \
- --config "${NODE_DIR}/sam-node.yaml" \
+ --config "${NODE_DIR}/agentmesh-node.yaml" \
--allow-loopback \
>"${WORK_DIR}/node-join.log" 2>&1 || echo " node join failed, see ${WORK_DIR}/node-join.log" >&2
diff --git a/tests/ui/lib/sam-one.js b/tests/ui/lib/agentmesh-one.js
similarity index 91%
rename from tests/ui/lib/sam-one.js
rename to tests/ui/lib/agentmesh-one.js
index e906730a..05dc17df 100644
--- a/tests/ui/lib/sam-one.js
+++ b/tests/ui/lib/agentmesh-one.js
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// The pieces the browser SDK test stands up around Chromium: sam-one from
+// The pieces the browser SDK test stands up around Chromium: agentmesh-one from
// bin/, a TLS-terminating edge in front of it that routes by name the way
-// `sam-one --tunnel` puts one there, a static server for the page, and the
+// `agentmesh-one --tunnel` puts one there, a static server for the page, and the
// Node example programs from sdk/js as the other members.
const { spawn, spawnSync } = require('node:child_process');
@@ -32,8 +32,8 @@ const PAGE_DIR = path.join(SDK_JS, 'build', 'browser-example');
/** Why the test cannot run here, or '' when everything is in place. */
function missing() {
- if (!fs.existsSync(path.join(REPO_ROOT, 'bin', 'sam-one'))) {
- return 'bin/sam-one is not built (make build)';
+ if (!fs.existsSync(path.join(REPO_ROOT, 'bin', 'agentmesh-one'))) {
+ return 'bin/agentmesh-one is not built (make build)';
}
if (!fs.existsSync(path.join(PAGE_DIR, 'index.html')) || !fs.existsSync(path.join(SDK_JS, 'build', 'examples', 'a2a-call.js'))) {
return 'the sdk/js browser example is not built (tests/ui/run.sh builds it)';
@@ -67,21 +67,21 @@ async function waitFor(url, what, tries = 100) {
throw new Error(`timed out waiting for ${what} at ${url}`);
}
-/** Runs bin/sam-one on a free loopback port; externalUrl is what it advertises. */
+/** Runs bin/agentmesh-one on a free loopback port; externalUrl is what it advertises. */
async function startSamOne({ externalUrl } = {}) {
const port = await freePort();
- const dataDir = fs.mkdtempSync(path.join(os.tmpdir(), 'sam-one-ui-'));
+ const dataDir = fs.mkdtempSync(path.join(os.tmpdir(), 'agentmesh-one-ui-'));
const args = ['--bind-address', '127.0.0.1', '--port', String(port), '--data-dir', dataDir, '--log-level', 'warn'];
if (externalUrl) {
args.push('--external-url', externalUrl);
}
- const proc = spawn(path.join(REPO_ROOT, 'bin', 'sam-one'), args, { stdio: ['ignore', 'pipe', 'pipe'] });
+ const proc = spawn(path.join(REPO_ROOT, 'bin', 'agentmesh-one'), args, { stdio: ['ignore', 'pipe', 'pipe'] });
let output = '';
proc.stdout.on('data', (d) => (output += d));
proc.stderr.on('data', (d) => (output += d));
const localUrl = `http://127.0.0.1:${port}`;
try {
- await waitFor(`${localUrl}/readyz`, 'sam-one');
+ await waitFor(`${localUrl}/readyz`, 'agentmesh-one');
} catch (err) {
proc.kill();
throw new Error(`${err.message}\n${output}`);
@@ -234,14 +234,14 @@ function startExampleAgent(name, env, ready = /accepting a2a:\/\/agent as (\S+)/
});
}
-/** The environment the Node examples take to join sam-one at publicUrl. */
+/** The environment the Node examples take to join agentmesh-one at publicUrl. */
function exampleEnv({ publicUrl, joinToken, caFile }, stateName) {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), `sam-${stateName}-`));
fs.writeFileSync(path.join(dir, 'join-token'), joinToken + '\n', { mode: 0o600 });
return {
- SAM_CONTROL_PLANE_URL: publicUrl,
- SAM_BOOTSTRAP_TOKEN_PATH: path.join(dir, 'join-token'),
- SAM_STATE_DIR: path.join(dir, 'state'),
+ AGENTMESH_CONTROL_PLANE_URL: publicUrl,
+ AGENTMESH_BOOTSTRAP_TOKEN_PATH: path.join(dir, 'join-token'),
+ AGENTMESH_STATE_DIR: path.join(dir, 'state'),
...(caFile ? { NODE_EXTRA_CA_CERTS: caFile } : {}),
};
}
diff --git a/tests/ui/lib/stack.sh b/tests/ui/lib/stack.sh
index 8840e4d2..b8e36d37 100644
--- a/tests/ui/lib/stack.sh
+++ b/tests/ui/lib/stack.sh
@@ -28,7 +28,7 @@ STACK_CONSOLE_URL="http://${STACK_CONSOLE_ADDR}"
STACK_OIDC_ISSUER="http://127.0.0.1:${STACK_OIDC_PORT}"
# Both the control plane and the console read this from the environment.
-export SAM_ADMIN_TOKEN="${STACK_ADMIN_TOKEN}"
+export AGENTMESH_ADMIN_TOKEN="${STACK_ADMIN_TOKEN}"
REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)
WORK_DIR=$(mktemp -d)
@@ -88,7 +88,7 @@ EOF
stack_start_control_plane() {
echo "Starting control plane..."
- "${REPO_ROOT}/bin/sam-control-plane" \
+ "${REPO_ROOT}/bin/agentmesh-control-plane" \
--bind-address "${STACK_CP_ADDR}" \
--db-dsn "${WORK_DIR}/console-ui.db" \
--issuer "${STACK_OIDC_ISSUER}" \
@@ -102,7 +102,7 @@ stack_start_console() {
echo "Starting console..."
# Served straight from the working tree, so a browser refresh picks up edits to
# the HTML, CSS and JS without a rebuild.
- "${REPO_ROOT}/bin/sam-console" \
+ "${REPO_ROOT}/bin/agentmesh-console" \
--control-plane "${STACK_CP_URL}" \
--bind-addr "${STACK_CONSOLE_ADDR}" \
--static-dir "${REPO_ROOT}/internal/console/public" \
diff --git a/tests/ui/package-lock.json b/tests/ui/package-lock.json
index 0ed4bd92..3c272de8 100644
--- a/tests/ui/package-lock.json
+++ b/tests/ui/package-lock.json
@@ -1,10 +1,10 @@
{
- "name": "sam-console-ui-tests",
+ "name": "agentmesh-console-ui-tests",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
- "name": "sam-console-ui-tests",
+ "name": "agentmesh-console-ui-tests",
"devDependencies": {
"@playwright/test": "1.63.0"
}
diff --git a/tests/ui/package.json b/tests/ui/package.json
index 467ec0c9..271acf51 100644
--- a/tests/ui/package.json
+++ b/tests/ui/package.json
@@ -1,5 +1,5 @@
{
- "name": "sam-console-ui-tests",
+ "name": "agentmesh-console-ui-tests",
"private": true,
"description": "Playwright smoke test for the SAM console UI",
"scripts": {
diff --git a/tests/ui/playwright.config.js b/tests/ui/playwright.config.js
index fa8adb05..b7df3f41 100644
--- a/tests/ui/playwright.config.js
+++ b/tests/ui/playwright.config.js
@@ -24,7 +24,7 @@ module.exports = defineConfig({
workers: 1,
reporter: process.env.CI ? [['list'], ['html', { open: 'never' }]] : 'list',
use: {
- baseURL: process.env.SAM_CONSOLE_URL || 'http://127.0.0.1:8091',
+ baseURL: process.env.AGENTMESH_CONSOLE_URL || 'http://127.0.0.1:8091',
permissions: ['clipboard-read', 'clipboard-write'],
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
diff --git a/tests/ui/run.sh b/tests/ui/run.sh
index 6b64471c..1b032f5b 100755
--- a/tests/ui/run.sh
+++ b/tests/ui/run.sh
@@ -27,13 +27,13 @@ cd "${REPO_ROOT}"
trap stack_cleanup EXIT INT TERM
-export SAM_ADMIN_TOKEN="${STACK_ADMIN_TOKEN}"
-export SAM_CONSOLE_URL="${STACK_CONSOLE_URL}"
+export AGENTMESH_ADMIN_TOKEN="${STACK_ADMIN_TOKEN}"
+export AGENTMESH_CONSOLE_URL="${STACK_CONSOLE_URL}"
stack_start
# The browser SDK test (browser-sdk.spec.js) runs sdk/js in a page against
-# bin/sam-one; the page and the Node examples it talks to are built here.
+# bin/agentmesh-one; the page and the Node examples it talks to are built here.
cd "${REPO_ROOT}/sdk/js"
npm ci --no-audit --no-fund
npm run build