Skip to content

Agent Mesh

refactor(cmd,internal): rename CLI binaries, env vars, and default paths to agentmesh

Antonio Ojea8078bf7fd08c
diff --git a/.github/k8s/sam-sdk-canary-template.yaml b/.github/k8s/sam-sdk-canary-template.yaml
index e1b619db..6b511852 100644
--- a/.github/k8s/sam-sdk-canary-template.yaml
+++ b/.github/k8s/sam-sdk-canary-template.yaml
@@ -34,13 +34,13 @@ spec:
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"]
env:
- - name: SAM_CONTROL_PLANE_URL
+ - name: AGENTMESH_CONTROL_PLANE_URL
value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
+ - name: AGENTMESH_JWT_PATH
value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
+ - name: AGENTMESH_STATE_DIR
value: /var/run/sam/agent
securityContext:
allowPrivilegeEscalation: false
@@ -63,13 +63,13 @@ spec:
image: ghcr.io/google/sam-sdk-python:${IMAGE_TAG}
command: ["/bin/sh", "/etc/sam-canary/canary.sh"]
env:
- - name: SAM_CONTROL_PLANE_URL
+ - name: AGENTMESH_CONTROL_PLANE_URL
value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
+ - name: AGENTMESH_JWT_PATH
value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
+ - name: AGENTMESH_STATE_DIR
value: /var/run/sam/caller
- name: PYTHONUNBUFFERED
value: "1"
@@ -140,13 +140,13 @@ spec:
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"]
env:
- - name: SAM_CONTROL_PLANE_URL
+ - name: AGENTMESH_CONTROL_PLANE_URL
value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
+ - name: AGENTMESH_JWT_PATH
value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
+ - name: AGENTMESH_STATE_DIR
value: /var/run/sam/agent
- name: PYTHONUNBUFFERED
value: "1"
@@ -171,13 +171,13 @@ spec:
image: ghcr.io/google/sam-sdk-js:${IMAGE_TAG}
command: ["/bin/sh", "/etc/sam-canary/canary.sh"]
env:
- - name: SAM_CONTROL_PLANE_URL
+ - name: AGENTMESH_CONTROL_PLANE_URL
value: "http://sam-control-plane-${ENV_NAME}.${NAMESPACE}.svc.cluster.local:8080"
- - name: SAM_INSECURE_CONTROL_PLANE
+ - name: AGENTMESH_INSECURE_CONTROL_PLANE
value: "true"
- - name: SAM_JWT_PATH
+ - name: AGENTMESH_JWT_PATH
value: /var/run/secrets/tokens/sam-token
- - name: SAM_STATE_DIR
+ - name: AGENTMESH_STATE_DIR
value: /var/run/sam/caller
- name: CANARY
value: js-calls-python-agent
@@ -233,15 +233,15 @@ data:
#!/bin/sh
# Sends the agent beside this container a message with the A2A SDK's
# client every INTERVAL seconds, by the peer ID it printed to
- # $SAM_CANARY_DIR/agent.log, and keeps $SAM_CANARY_DIR/reachable present
+ # $AGENTMESH_CANARY_DIR/agent.log, and keeps $AGENTMESH_CANARY_DIR/reachable present
# while the last call succeeded; the readiness probe reads it. One JSON
# line per call, for a log-based metric. The first call enrolls with the
- # projected token; the later ones resume from SAM_STATE_DIR.
+ # projected token; the later ones resume from AGENTMESH_STATE_DIR.
# tests/integration runs this script against the example programs.
set -u
INTERVAL=${INTERVAL:-300}
- LOG=${SAM_CANARY_DIR:-/var/run/sam}/agent.log
- REACHABLE=${SAM_CANARY_DIR:-/var/run/sam}/reachable
+ LOG=${AGENTMESH_CANARY_DIR:-/var/run/sam}/agent.log
+ REACHABLE=${AGENTMESH_CANARY_DIR:-/var/run/sam}/reachable
verdict() {
printf '{"canary":"%s","ok":%s,"agent_peer":"%s","call_s":%d,"error":"%s","detail":"%s"}\n' \
diff --git a/.gitignore b/.gitignore
index ff00ee42..0edc3dad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,20 +35,20 @@ go.work.sum
bin/
dist/
# State of `make testnet` (database, router key, tokens)
-.sam-one/
+.agentmesh-one/
# Stray binaries from `go build ./cmd/<name>/` in the repo root
-/sam-node
-/sam-one
-/sam-box
-/sam-router
-/sam-console
+/agentmesh-node
+/agentmesh-one
+/agentmesh-box
+/agentmesh-router
+/agentmesh-console
# Playwright console UI tests
node_modules/
tests/ui/playwright-report/
tests/ui/test-results/
-/sam-control-plane
-/sam-bench
+/agentmesh-control-plane
+/agentmesh-bench
/mcp-client
/nano-init
tests/e2e/logs/
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 8488a16b..58ad3cca 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -1,12 +1,12 @@
version: 2
-project_name: sam
-# Deliberately not released: sam-bench (a measurement instrument for people
+project_name: agentmesh
+# Deliberately not released: agentmesh-bench (a measurement instrument for people
# working on the mesh, built from the repo, not something operators install)
# and chaos-agent (a Python dev tool).
builds:
- - id: sam-node
- main: ./cmd/sam-node
- binary: sam-node
+ - id: agentmesh-node
+ main: ./cmd/agentmesh-node
+ binary: agentmesh-node
env:
- CGO_ENABLED=0
goos:
@@ -18,9 +18,9 @@ builds:
- arm64
ldflags:
- -s -w -X github.com/google/agentmesh/internal/version.Version={{ .Tag }}
- - id: sam-control-plane
- main: ./cmd/sam-control-plane
- binary: sam-control-plane
+ - id: agentmesh-control-plane
+ main: ./cmd/agentmesh-control-plane
+ binary: agentmesh-control-plane
env:
- CGO_ENABLED=0
goos:
@@ -32,9 +32,9 @@ builds:
- arm64
ldflags:
- -s -w -X github.com/google/agentmesh/internal/version.Version={{ .Tag }}
- - id: sam-router
- main: ./cmd/sam-router
- binary: sam-router
+ - id: agentmesh-router
+ main: ./cmd/agentmesh-router
+ binary: agentmesh-router
env:
- CGO_ENABLED=0
goos:
@@ -60,9 +60,9 @@ builds:
- arm64
ldflags:
- -s -w -X github.com/google/agentmesh/internal/version.Version={{ .Tag }}
- - id: sam-console
- main: ./cmd/sam-console
- binary: sam-console
+ - id: agentmesh-console
+ main: ./cmd/agentmesh-console
+ binary: agentmesh-console
env:
- CGO_ENABLED=0
goos:
@@ -74,9 +74,9 @@ builds:
- arm64
ldflags:
- -s -w -X github.com/google/agentmesh/internal/version.Version={{ .Tag }}
- - id: sam-one
- main: ./cmd/sam-one
- binary: sam-one
+ - id: agentmesh-one
+ main: ./cmd/agentmesh-one
+ binary: agentmesh-one
env:
- CGO_ENABLED=0
goos:
diff --git a/Dockerfile.sam-console b/Dockerfile.agentmesh-console
similarity index 76%
rename from Dockerfile.sam-console
rename to Dockerfile.agentmesh-console
index db45d8a5..1d073cf4 100644
--- a/Dockerfile.sam-console
+++ b/Dockerfile.agentmesh-console
@@ -10,14 +10,14 @@ ARG TARGETOS=linux
ARG TARGETARCH
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
- CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o /bin/sam-console ./cmd/sam-console
+ CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o /bin/agentmesh-console ./cmd/agentmesh-console
FROM gcr.io/distroless/static:nonroot@sha256:e2e927ec666bae08560abb3c55d0659eceabb657f56b6782ab500a9fc7f555e3
WORKDIR /app
-COPY --from=builder --chown=nonroot:nonroot /bin/sam-console /usr/local/bin/sam-console
+COPY --from=builder --chown=nonroot:nonroot /bin/agentmesh-console /usr/local/bin/agentmesh-console
COPY --chown=nonroot:nonroot internal/console/public /app/public
USER nonroot:nonroot
EXPOSE 8081
-ENTRYPOINT ["/usr/local/bin/sam-console"]
+ENTRYPOINT ["/usr/local/bin/agentmesh-console"]
diff --git a/Dockerfile.sam-control-plane b/Dockerfile.agentmesh-control-plane
similarity index 82%
rename from Dockerfile.sam-control-plane
rename to Dockerfile.agentmesh-control-plane
index dfe1d921..adca0e50 100644
--- a/Dockerfile.sam-control-plane
+++ b/Dockerfile.agentmesh-control-plane
@@ -9,7 +9,7 @@ ARG TARGETOS=linux
ARG TARGETARCH
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
- CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o sam-control-plane ./cmd/sam-control-plane
+ CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o agentmesh-control-plane ./cmd/agentmesh-control-plane
# Pre-create the sqlite data dir owned by the nonroot UID so that a fresh
# named/anonymous volume mounted over it inherits writable ownership instead
# of defaulting to root.
@@ -18,7 +18,7 @@ RUN mkdir -p /data-seed && chown 65532:65532 /data-seed
# Stage 2: Final
FROM gcr.io/distroless/static:nonroot@sha256:e2e927ec666bae08560abb3c55d0659eceabb657f56b6782ab500a9fc7f555e3
WORKDIR /tmp
-COPY --from=builder --chown=nonroot:nonroot /app/sam-control-plane /
+COPY --from=builder --chown=nonroot:nonroot /app/agentmesh-control-plane /
COPY --from=builder --chown=nonroot:nonroot /data-seed /data
USER nonroot:nonroot
-ENTRYPOINT ["/sam-control-plane"]
+ENTRYPOINT ["/agentmesh-control-plane"]
diff --git a/Dockerfile.sam-node b/Dockerfile.agentmesh-node
similarity index 85%
rename from Dockerfile.sam-node
rename to Dockerfile.agentmesh-node
index 586cd87a..3a22bab5 100644
--- a/Dockerfile.sam-node
+++ b/Dockerfile.agentmesh-node
@@ -9,7 +9,7 @@ ARG TARGETOS=linux
ARG TARGETARCH
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
- CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o sam-node ./cmd/sam-node
+ CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o agentmesh-node ./cmd/agentmesh-node
# Pre-create the default data dir owned by the nonroot UID so that a fresh
# named/anonymous volume mounted over it inherits writable ownership instead
# of defaulting to root.
@@ -18,7 +18,7 @@ RUN mkdir -p /data-seed && chown 65532:65532 /data-seed
# Stage 2: Final
FROM gcr.io/distroless/static:nonroot@sha256:e2e927ec666bae08560abb3c55d0659eceabb657f56b6782ab500a9fc7f555e3
WORKDIR /tmp
-COPY --from=builder --chown=nonroot:nonroot /app/sam-node /
+COPY --from=builder --chown=nonroot:nonroot /app/agentmesh-node /
COPY --from=builder --chown=nonroot:nonroot /data-seed /data
USER nonroot:nonroot
-ENTRYPOINT ["/sam-node"]
+ENTRYPOINT ["/agentmesh-node"]
diff --git a/Dockerfile.sam-one b/Dockerfile.agentmesh-one
similarity index 88%
rename from Dockerfile.sam-one
rename to Dockerfile.agentmesh-one
index c0b8bbcb..8f438ab6 100644
--- a/Dockerfile.sam-one
+++ b/Dockerfile.agentmesh-one
@@ -9,7 +9,7 @@ ARG TARGETOS=linux
ARG TARGETARCH
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
- CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o sam-one ./cmd/sam-one
+ CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o agentmesh-one ./cmd/agentmesh-one
# Pre-create the data dir owned by the nonroot UID so that a fresh
# named/anonymous volume mounted over it inherits writable ownership instead
# of defaulting to root.
@@ -18,10 +18,10 @@ RUN mkdir -p /data-seed && chown 65532:65532 /data-seed
# Stage 2: Final
FROM gcr.io/distroless/static:nonroot@sha256:e2e927ec666bae08560abb3c55d0659eceabb657f56b6782ab500a9fc7f555e3
WORKDIR /tmp
-COPY --from=builder --chown=nonroot:nonroot /app/sam-one /
+COPY --from=builder --chown=nonroot:nonroot /app/agentmesh-one /
COPY --from=builder --chown=nonroot:nonroot /data-seed /data
USER nonroot:nonroot
-ENTRYPOINT ["/sam-one"]
+ENTRYPOINT ["/agentmesh-one"]
# Default args only: a container needs a stable published port, and overriding
# the command line must re-point --data-dir at a writable mount or the sqlite
# db lands on the container filesystem.
diff --git a/Dockerfile.sam-router b/Dockerfile.agentmesh-router
similarity index 84%
rename from Dockerfile.sam-router
rename to Dockerfile.agentmesh-router
index 344ff89e..9bb08c22 100644
--- a/Dockerfile.sam-router
+++ b/Dockerfile.agentmesh-router
@@ -9,7 +9,7 @@ ARG TARGETOS=linux
ARG TARGETARCH
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
- CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o sam-router ./cmd/sam-router
+ CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -buildvcs=false -ldflags="-X github.com/google/agentmesh/internal/version.Version=${VERSION}" -o agentmesh-router ./cmd/agentmesh-router
# Pre-create the keys/data dir owned by the nonroot UID so that a fresh
# named/anonymous volume mounted over it inherits writable ownership instead
# of defaulting to root.
@@ -18,7 +18,7 @@ RUN mkdir -p /data-seed && chown 65532:65532 /data-seed
# Stage 2: Final
FROM gcr.io/distroless/static:nonroot@sha256:e2e927ec666bae08560abb3c55d0659eceabb657f56b6782ab500a9fc7f555e3
WORKDIR /tmp
-COPY --from=builder --chown=nonroot:nonroot /app/sam-router /
+COPY --from=builder --chown=nonroot:nonroot /app/agentmesh-router /
COPY --from=builder --chown=nonroot:nonroot /data-seed /data
USER nonroot:nonroot
-ENTRYPOINT ["/sam-router"]
+ENTRYPOINT ["/agentmesh-router"]
diff --git a/Dockerfile.sam-sdk-js b/Dockerfile.agentmesh-sdk-js
similarity index 100%
rename from Dockerfile.sam-sdk-js
rename to Dockerfile.agentmesh-sdk-js
diff --git a/Dockerfile.sam-sdk-python b/Dockerfile.agentmesh-sdk-python
similarity index 100%
rename from Dockerfile.sam-sdk-python
rename to Dockerfile.agentmesh-sdk-python
diff --git a/Makefile b/Makefile
index 6863a28c..a71f2e9a 100644
--- a/Makefile
+++ b/Makefile
@@ -25,13 +25,13 @@ ANDROID_CC_X86_64=$(ANDROID_NDK_TOOLCHAIN)/x86_64-linux-android30-clang
build:
- go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/sam-node" ./cmd/sam-node
- go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/sam-control-plane" ./cmd/sam-control-plane
- go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/sam-router" ./cmd/sam-router
- go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/sam-one" ./cmd/sam-one
+ go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/agentmesh-node" ./cmd/agentmesh-node
+ go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/agentmesh-control-plane" ./cmd/agentmesh-control-plane
+ go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/agentmesh-router" ./cmd/agentmesh-router
+ go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/agentmesh-one" ./cmd/agentmesh-one
go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/mcp-client" ./cmd/mcp-client
- go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/sam-bench" ./cmd/sam-bench
- go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/sam-console" ./cmd/sam-console
+ go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/agentmesh-bench" ./cmd/agentmesh-bench
+ go build -v -ldflags "$(VERSION_LDFLAGS)" -o "$(OUT_DIR)/agentmesh-console" ./cmd/agentmesh-console
.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
@@ -147,14 +147,14 @@ kind-e2e-mesh: build
# A mesh of your own on port 8080. In a GitHub codespace the port is
# published on the codespace's https URL; anywhere else this is a local
-# sam-one. Uses ./bin/sam-one when built, else sam-one on PATH. State lives
-# in ./.sam-one (ignored by git; in a codespace it survives rebuilds). Extra
+# agentmesh-one. Uses ./bin/agentmesh-one when built, else agentmesh-one on PATH. State lives
+# in ./.agentmesh-one (ignored by git; in a codespace it survives rebuilds). Extra
# flags pass through: make testnet ARGS="--issuer https://accounts.google.com".
-SAM_ONE_BIN ?= $(if $(wildcard $(OUT_DIR)/sam-one),$(OUT_DIR)/sam-one,sam-one)
-SAM_ONE_DATA_DIR ?= $(REPO_ROOT)/.sam-one
+AGENTMESH_ONE_BIN ?= $(if $(wildcard $(OUT_DIR)/agentmesh-one),$(OUT_DIR)/agentmesh-one,agentmesh-one)
+AGENTMESH_ONE_DATA_DIR ?= $(REPO_ROOT)/.agentmesh-one
.PHONY: testnet
testnet:
- $(SAM_ONE_BIN) --data-dir "$(SAM_ONE_DATA_DIR)" --port 8080 $(if $(CODESPACE_NAME),--tunnel codespaces) $(ARGS)
+ $(AGENTMESH_ONE_BIN) --data-dir "$(AGENTMESH_ONE_DATA_DIR)" --port 8080 $(if $(CODESPACE_NAME),--tunnel codespaces) $(ARGS)
test:
CGO_ENABLED=1 go test -v -race -count 1 $(if $(WHAT),-run $(WHAT)) ./...
@@ -208,7 +208,7 @@ test-e2e: build docker-build
exit 1; \
fi; \
}
- SAM_NODE_BINARY=$(OUT_DIR)/sam-node SAM_CONTROL_PLANE_BINARY=$(OUT_DIR)/sam-control-plane SAM_ROUTER_BINARY=$(OUT_DIR)/sam-router bats --verbose-run tests/e2e/
+ AGENTMESH_NODE_BINARY=$(OUT_DIR)/agentmesh-node AGENTMESH_CONTROL_PLANE_BINARY=$(OUT_DIR)/agentmesh-control-plane AGENTMESH_ROUTER_BINARY=$(OUT_DIR)/agentmesh-router bats --verbose-run tests/e2e/
test-e2e-container: build docker-build
@command -v docker >/dev/null 2>&1 || { echo "docker not found"; exit 1; }
@@ -259,26 +259,26 @@ update:
go mod tidy
docker-build-control-plane:
- docker build --load --build-arg VERSION="$(VERSION)" -t sam-control-plane:local -f Dockerfile.sam-control-plane .
+ docker build --load --build-arg VERSION="$(VERSION)" -t agentmesh-control-plane:local -f Dockerfile.agentmesh-control-plane .
docker-build-router:
- docker build --load --build-arg VERSION="$(VERSION)" -t sam-router:local -f Dockerfile.sam-router .
+ docker build --load --build-arg VERSION="$(VERSION)" -t agentmesh-router:local -f Dockerfile.agentmesh-router .
docker-build-node:
- docker build --load --build-arg VERSION="$(VERSION)" -t sam-node:local -f Dockerfile.sam-node .
+ docker build --load --build-arg VERSION="$(VERSION)" -t agentmesh-node:local -f Dockerfile.agentmesh-node .
docker-build-one:
- docker build --load --build-arg VERSION="$(VERSION)" -t sam-one:local -f Dockerfile.sam-one .
+ docker build --load --build-arg VERSION="$(VERSION)" -t agentmesh-one:local -f Dockerfile.agentmesh-one .
docker-build-mock-oidc:
- docker build --load -t sam-mock-oidc:local -f tests/e2e/docker/Dockerfile.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 sam-e2e-runtime:local -f tests/e2e/docker/Dockerfile.sam-runtime .
+ docker build --load -t agentmesh-e2e-runtime:local -f tests/e2e/docker/Dockerfile.sam-runtime .
-docker-build-sam-console:
- docker build --load --build-arg VERSION="$(VERSION)" -t sam-console:local -f Dockerfile.sam-console .
+docker-build-agentmesh-console:
+ docker build --load --build-arg VERSION="$(VERSION)" -t agentmesh-console:local -f Dockerfile.agentmesh-console .
-docker-build: docker-build-control-plane docker-build-router docker-build-node docker-build-one docker-build-mock-oidc docker-build-e2e-runtime docker-build-sam-console
+docker-build: docker-build-control-plane docker-build-router docker-build-node docker-build-one docker-build-mock-oidc docker-build-e2e-runtime docker-build-agentmesh-console
-.PHONY: docker-build-control-plane docker-build-router docker-build-node docker-build-one docker-build-mock-oidc docker-build-e2e-runtime docker-build-sam-console docker-build
+.PHONY: docker-build-control-plane docker-build-router docker-build-node docker-build-one docker-build-mock-oidc docker-build-e2e-runtime docker-build-agentmesh-console docker-build
diff --git a/agents/skills/sam-mesh/SKILL.md b/agents/skills/agentmesh/SKILL.md
similarity index 82%
rename from agents/skills/sam-mesh/SKILL.md
rename to agents/skills/agentmesh/SKILL.md
index 4a44a624..2e8f091c 100644
--- a/agents/skills/sam-mesh/SKILL.md
+++ b/agents/skills/agentmesh/SKILL.md
@@ -1,17 +1,17 @@
---
-name: sam-mesh
-description: "Use when local tools cannot provide a needed capability and an Agent Mesh (SAM) network can: inspect mesh state, discover reachable services/tools, describe and call namespaced remote MCP tools, reach OpenAI-compatible inference models hosted by mesh peers, and hand work to A2A agents on the mesh through the official a2a CLI. Also use to set up, join, or reconnect a sam-node when its MCP tools are not callable yet."
+name: agentmesh
+description: "Use when local tools cannot provide a needed capability and an Agent Mesh network can: inspect mesh state, discover reachable services/tools, describe and call namespaced remote MCP tools, reach OpenAI-compatible inference models hosted by mesh peers, and hand work to A2A agents on the mesh through the official a2a CLI. Also use to set up, join, or reconnect a agentmesh-node when its MCP tools are not callable yet."
---
-# Agent Mesh (SAM) Skill
+# Agent Mesh Skill
-Use this skill when local tools cannot satisfy the task and the Agent Mesh (SAM)
-can. Prefer local tools first. Reach into the SAM mesh only for the capability needed
+Use this skill when local tools cannot satisfy the task and the Agent Mesh
+can. Prefer local tools first. Reach into the Agent Mesh only for the capability needed
to complete the task.
Pick the path that matches the need:
-- The `sam-node` MCP tools are not callable yet:
+- The `agentmesh-node` MCP tools are not callable yet:
[Bootstrap A Node](#bootstrap-a-node).
- The task needs a plain HTTP call to the node, such as inference or a
`local_proxy_url`: [Talk To The Node Over HTTP](#talk-to-the-node-over-http).
@@ -25,23 +25,23 @@ Pick the path that matches the need:
## Bootstrap A Node
-The mesh is reached through a local `sam-node`. When its MCP tools are missing,
+The mesh is reached through a local `agentmesh-node`. When its MCP tools are missing,
guide the user through these steps. Propose each shell command and let the user
approve it before running anything.
-1. Check the CLI: `sam-node --help`. If it is missing, install it with
+1. Check the CLI: `agentmesh-node --help`. If it is missing, install it with
`curl -sL https://sam-mesh.dev/install.sh | bash` or
- `go install github.com/google/sam/cmd/sam-node@latest`.
-2. Start the node in the background: `sam-node run --daemonize`. It returns as
+ `go install github.com/google/agentmesh/cmd/agentmesh-node@latest`.
+2. Start the node in the background: `agentmesh-node run --daemonize`. It returns as
soon as the node answers, and prints the endpoint, the API token file, the
log file, and how to stop it. It is idempotent, so run it again whenever you
need to confirm a node is up.
3. If step 2 reports that the node is not enrolled, run the command it prints,
- `sam-node join --headless <control-plane-url>`. In headless mode SAM now
+ `agentmesh-node join --headless <control-plane-url>`. In headless mode Agent Mesh now
prefers OAuth device flow automatically when the OIDC provider supports it,
so no pasted callback code is required: it prints a verification URL/code
and polls until login completes. If the provider does not expose a device
- endpoint, SAM falls back to OOB code-paste flow; show the URL/code to the
+ endpoint, Agent Mesh falls back to OOB code-paste flow; show the URL/code to the
user, wait for completion, then repeat step 2. For deterministic automation,
force the flow with `--auth-mode device` (also `oob`, `browser`, or the
default `auto`); `--auth-mode device` fails fast if the provider has no
@@ -49,7 +49,7 @@ approve it before running anything.
4. Read the node API token from the file named in step 2, then register the MCP
endpoint `http://127.0.0.1:8080/mcp` with the header
`X-Mesh-Authentication: Bearer <token>`. Claude Code:
- `claude mcp add --transport http sam-mesh http://127.0.0.1:8080/mcp --header "X-Mesh-Authentication: Bearer <token>"`.
+ `claude mcp add --transport http agentmesh http://127.0.0.1:8080/mcp --header "X-Mesh-Authentication: Bearer <token>"`.
Antigravity: add the same URL as `serverUrl` with the same header to
`~/.gemini/config/mcp_config.json`.
5. Tell the user to restart the agent session, since MCP tools load at startup.
@@ -60,7 +60,7 @@ direct HTTP calls to the node — see
you in without a token.
If setup is stuck in a half-configured state, ask the user before starting over:
-stop the node, run `sam-node reset --all --yes` for a clean slate, then go back
+stop the node, run `agentmesh-node reset --all --yes` for a clean slate, then go back
to step 2. That deletes the node's identity and its PeerID, and enrolling again
needs another login, so never do it to work around an unexplained error.
@@ -76,13 +76,13 @@ request to the node: the OpenAI-compatible `/v1` endpoints, or a
There are two ways in. Try them in this order.
**1. The Unix socket, whenever there is one.** `get_mesh_info` reports it as
-`local_api_socket`, by default `~/.config/sam-mesh/sam.sock`. It serves the same
+`local_api_socket`, by default `~/.config/agentmesh/agentmesh.sock`. It serves the same
API and takes no token at all: only the user who owns the socket can connect to
it, so the filesystem has already done the authenticating. Prefer it, because no
secret reaches a command line, the shell history, or the transcript.
```bash
-curl --unix-socket ~/.config/sam-mesh/sam.sock http://localhost/v1/models
+curl --unix-socket ~/.config/agentmesh/agentmesh.sock http://localhost/v1/models
```
The host in the URL is a placeholder that curl ignores once it dials a socket.
@@ -93,17 +93,17 @@ run, for example a node inside a container. Do not read your MCP client
configuration to recover it: those files hold the headers of every other server
you are connected to, and reading them puts all of those secrets into the
transcript. A daemonized node writes its token to
-`~/.config/sam-mesh/api-token`; let curl read that file itself so the value
+`~/.config/agentmesh/api-token`; let curl read that file itself so the value
never appears in an argument, the shell history, or your output:
```bash
-curl http://127.0.0.1:8080/v1/models -H @<(printf 'X-Mesh-Authentication: Bearer %s' "$(cat ~/.config/sam-mesh/api-token)")
+curl http://127.0.0.1:8080/v1/models -H @<(printf 'X-Mesh-Authentication: Bearer %s' "$(cat ~/.config/agentmesh/api-token)")
```
`<(...)` needs bash or zsh; in a plain `sh`, write the header line to a file
with mode 0600 and pass `-H @that-file` instead.
-If the node was started with `--api-token-path` or `SAM_API_TOKEN`, ask the
+If the node was started with `--api-token-path` or `AGENTMESH_API_TOKEN`, ask the
user where the token lives rather than searching for it.
Never print the token or echo it into the transcript. `Authorization` is not the
@@ -113,23 +113,23 @@ it passes through to that service untouched.
## Diagnose The Node
Operator diagnostics are not MCP tools, so they never appear in the tool list.
-A running node serves them under `/debug`, and the `sam-node` CLI wraps each
+A running node serves them under `/debug`, and the `agentmesh-node` CLI wraps each
endpoint over the node's Unix socket — no token involved:
```bash
-sam-node debug mesh-info # connected peers, DHT size, router peer ID
-sam-node debug connectivity [peer-id] # ping the SAM router, or a specific peer
-sam-node debug network-info # listen and announced addresses
-sam-node debug token-info # local auth token expiration and status
-sam-node debug logs # recent log lines
-sam-node debug connect-peer <multiaddr> # manually dial a peer
+agentmesh-node debug mesh-info # connected peers, DHT size, router peer ID
+agentmesh-node debug connectivity [peer-id] # ping the Agent Mesh router, or a specific peer
+agentmesh-node debug network-info # listen and announced addresses
+agentmesh-node debug token-info # local auth token expiration and status
+agentmesh-node debug logs # recent log lines
+agentmesh-node debug connect-peer <multiaddr> # manually dial a peer
```
Each command prints the endpoint's raw JSON, so it composes with `jq`. The same
data is one `curl` away when the CLI is not at hand:
```bash
-curl --unix-socket ~/.config/sam-mesh/sam.sock http://localhost/debug/mesh-info
+curl --unix-socket ~/.config/agentmesh/agentmesh.sock http://localhost/debug/mesh-info
```
These endpoints answer even while the mesh is unreachable — that is the state
@@ -161,7 +161,7 @@ Use service discovery when you need to inventory reachable service providers:
Use tool discovery when you need remote MCP tools:
- Use `find_remote_tools` to discover reachable aggregated MCP tools advertised
- by remote SAM services.
+ by remote Agent Mesh services.
- Narrow `find_remote_tools` with `service_name` or `peer_id` when you already
know the target.
- Mesh-wide searches fetch each peer's catalog on a best-effort basis and may
@@ -236,7 +236,7 @@ there is one, otherwise with the token from your own MCP configuration. The
pass it as its `api_key`.
```bash
-curl --unix-socket ~/.config/sam-mesh/sam.sock \
+curl --unix-socket ~/.config/agentmesh/agentmesh.sock \
http://localhost/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model": "<model>", "messages": [{"role": "user", "content": "..."}]}'
@@ -264,14 +264,14 @@ let the user approve each command.
`local_proxy_url` of the provider you want.
2. Point the CLI at the agent card under that URL. The node regenerates the
card so its interface URL is the proxy path itself; every later request
- then goes through the mesh with no further SAM-specific setup.
+ then goes through the mesh with no further Agent Mesh-specific setup.
3. The CLI speaks TCP only, so it needs the node API token from
[Talk To The Node Over HTTP](#talk-to-the-node-over-http) as a service
parameter. Pass it through the CLI's environment, never as a flag, so the
value stays out of the process arguments and the shell history:
```bash
-A2ACLI_SVC_PARAM="X-Mesh-Authentication=Bearer $(cat ~/.config/sam-mesh/api-token)" \
+A2ACLI_SVC_PARAM="X-Mesh-Authentication=Bearer $(cat ~/.config/agentmesh/api-token)" \
a2a card get <local_proxy_url>/.well-known/agent-card.json
```
@@ -290,11 +290,11 @@ say which peer will receive it.
## Minimal Workflow
1. Confirm no local tool can satisfy the task.
-2. If the `sam-node` MCP tools are unavailable, follow
+2. If the `agentmesh-node` MCP tools are unavailable, follow
[Bootstrap A Node](#bootstrap-a-node) and stop until the user restarts the
agent session.
3. Call `get_mesh_info` with `{}`.
-4. If a local SAM service may be
+4. If a local Agent Mesh service may be
relevant, call `list_local_services` with `{}`.
5. Call `find_remote_tools` with `service_name` or `peer_id` when known. Use
`{}` only when the user asked to inventory the mesh or no narrower target
@@ -315,7 +315,7 @@ For a model completion rather than a tool, skip steps 5-7 and follow
- Do not call mesh tools when a local tool is sufficient.
- Do not guess remote tool names or arguments.
- Ask before side-effecting or sensitive remote calls.
-- Do not send secrets or private data through SAM unless the user explicitly
+- Do not send secrets or private data through Agent Mesh unless the user explicitly
approves the data and destination.
- Treat remote capabilities as networked and potentially unavailable.
- Surface peer, service, discovery, schema, and tool-call errors clearly.
diff --git a/agents/skills/sam-mesh/embed.go b/agents/skills/agentmesh/embed.go
similarity index 87%
rename from agents/skills/sam-mesh/embed.go
rename to agents/skills/agentmesh/embed.go
index 1d4d17ee..a1de2097 100644
--- a/agents/skills/sam-mesh/embed.go
+++ b/agents/skills/agentmesh/embed.go
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package samskill embeds the SAM agent skill document so it ships inside the
+// Package agentmeshskill embeds the Agent Mesh agent skill document so it ships inside the
// binaries that install it. SKILL.md stays the single source of truth.
-package samskill
+package agentmeshskill
import _ "embed"
diff --git a/api/datalog.go b/api/datalog.go
index f5d74333..88d33ae1 100644
--- a/api/datalog.go
+++ b/api/datalog.go
@@ -25,10 +25,10 @@ import (
)
// ============================================================================
-// SAM Datalog Authorization Concepts & Predicates
+// Agent Mesh Datalog Authorization Concepts & Predicates
// ============================================================================
//
-// SAM enforces security policies using Biscuit tokens containing Datalog facts,
+// Agent Mesh enforces security policies using Biscuit tokens containing Datalog facts,
// rules, and checks. Here are the core concepts used in our Datalog engine:
//
// 1. Replay Defense Facts:
@@ -79,7 +79,7 @@ const (
// Example Datalog: check if client_peer_id($id), connection_peer_id($id)
FactClientPeerID = "client_peer_id"
- // FactActorNode names the origin sam-node PeerID that exchanged a delegated
+ // FactActorNode names the origin agentmesh-node PeerID that exchanged a delegated
// subject credential at POST /token/exchange, for audit logs, for act.sub in
// border JWTs, and for ext_proc attributes["mesh"].actor_node. It grants
// nothing: no baseline rule and no policy binding reads it.
@@ -90,7 +90,7 @@ const (
// Example Datalog: allow if group("data-science")
FactGroup = "group"
- // FactRole defines a custom SAM role assigned to the user or node.
+ // FactRole defines a custom Agent Mesh role assigned to the user or node.
// Contains: biscuit.String(roleName)
// Example Datalog: allow if role("mesh-member")
//
@@ -419,7 +419,7 @@ var (
// BaselineSources is the Datalog text every variable above is parsed from.
// The SDKs embed this text (see hack/gen-sdk-datalog) so that a provider
- // written in another language evaluates the same authorizer as sam-node.
+ // written in another language evaluates the same authorizer as agentmesh-node.
BaselineSources DatalogSources
)
diff --git a/api/enroll_uri.go b/api/enroll_uri.go
index 96ad8c5b..ca75008e 100644
--- a/api/enroll_uri.go
+++ b/api/enroll_uri.go
@@ -32,9 +32,9 @@ import (
//
// The token is an ordinary bootstrap token (POST /enroll spends it), so the
// URI grants exactly what the token grants: one enrollment, in the token's
-// role, until it expires, against any control plane deployment — sam-one or
-// a full sam-control-plane. The server URL is the same base URL a node
-// passes to `sam-node join`, and the same transport rule applies
+// role, until it expires, against any control plane deployment — agentmesh-one or
+// a full agentmesh-control-plane. The server URL is the same base URL a node
+// passes to `agentmesh-node join`, and the same transport rule applies
// (ValidateControlPlaneTransport): https, or plaintext http only to a
// loopback host, because whoever answers that URL becomes the device's trust
// root. Clients (the mobile app, CLIs) parse the URI with ParseEnrollURI and
diff --git a/api/labels.go b/api/labels.go
index 06545e22..58323d96 100644
--- a/api/labels.go
+++ b/api/labels.go
@@ -24,12 +24,12 @@ import (
// Labels are free-form, control-plane-attested key=value metadata a node's
// identity carries (e.g. region="us-east-1", team="platform"). Cloud
// providers, on-prem operators, and countries all name things differently,
-// so SAM imposes no taxonomy or hierarchy on keys or values: composition
+// so Agent Mesh imposes no taxonomy or hierarchy on keys or values: composition
// (e.g. attesting both a precise and a coarser value so a coarser
// requirement also matches) is entirely up to the operator. Matching is
// exact and case-sensitive on both key and value (see LabelCheck).
//
-// Keys are plain conventions agreed by operators (e.g. "region"); SAM does
+// Keys are plain conventions agreed by operators (e.g. "region"); Agent Mesh does
// not reserve or interpret any key beyond ValidateLabelKey/ValidateLabelValue.
// labelKeySyntax bounds label keys to a safe, portable charset.
diff --git a/api/network.go b/api/network.go
index e5c213a5..53757546 100644
--- a/api/network.go
+++ b/api/network.go
@@ -119,14 +119,14 @@ func RouterLeaseChallenge(peerID string, ts int64) []byte {
return []byte("mesh:routers-lease:" + peerID + ":" + strconv.FormatInt(ts, 10))
}
-// TokenExchangeChallenge is the payload an enrolled sam-node signs with its
+// TokenExchangeChallenge is the payload an enrolled agentmesh-node signs with its
// identity key at POST /token/exchange to prove possession of the channel key
// that will carry the minted Delegated Session Biscuit.
func TokenExchangeChallenge(peerID string, ts int64) []byte {
return []byte("mesh:token-exchange:" + peerID + ":" + strconv.FormatInt(ts, 10))
}
-// STSTokenChallenge is the payload an enrolled egress sam-node signs with its
+// STSTokenChallenge is the payload an enrolled egress agentmesh-node signs with its
// identity key at POST /sts/token when asking the control plane to mint an
// ES256 border JWT for an outbound destination.
func STSTokenChallenge(peerID string, ts int64) []byte {
@@ -178,7 +178,7 @@ const (
// GrantTypeAuthorizationCode is the standard OAuth 2.1 authorization_code grant type.
GrantTypeAuthorizationCode = "authorization_code"
- // TokenTypeBiscuit is the token type URI identifying a SAM Biscuit token in RFC 8693 exchanges.
+ // TokenTypeBiscuit is the token type URI identifying a Agent Mesh Biscuit token in RFC 8693 exchanges.
TokenTypeBiscuit = "urn:agentmesh:params:oauth:token-type:biscuit"
// TokenTypeJWT is the RFC 8693 JWT token type URI.
@@ -192,7 +192,7 @@ const (
)
// ============================================================================
-// SAM Custom HTTP Headers
+// Agent Mesh Custom HTTP Headers
// ============================================================================
const (
@@ -200,7 +200,7 @@ const (
// Biscuit token containing the node's identity credentials when forwarding requests
// over libp2p HTTP between nodes in the mesh.
//
- // This header is internal to the SAM mesh datapath and is stripped before requests
+ // This header is internal to the Agent Mesh datapath and is stripped before requests
// are forwarded to backend services.
HeaderMeshBiscuit = "X-Mesh-Biscuit"
@@ -222,8 +222,8 @@ const (
// HeaderMeshAuthentication is the custom HTTP header used to authenticate a local
// process to this node's sidecar API (the shared secret configured via
- // "--api-token-path" or the SAM_API_TOKEN environment variable). Using a
- // SAM-specific header name — instead of the standard
+ // "--api-token-path" or the AGENTMESH_API_TOKEN environment variable). Using a
+ // Agent Mesh-specific header name — instead of the standard
// "Authorization" header — leaves "Authorization" free to always mean what
// every HTTP client expects: the credential for the destination being called.
// The sidecar strips this header before forwarding any request off-node, so
diff --git a/api/policy.go b/api/policy.go
index aa8a146f..2b82dc6d 100644
--- a/api/policy.go
+++ b/api/policy.go
@@ -34,7 +34,7 @@ type ServiceConfig struct {
Env map[string]string `yaml:"env,omitempty"`
}
-// NodeConfig defines the optional attenuation rules and static services for a specific SAM Node.
+// NodeConfig defines the optional attenuation rules and static services for a specific Agent Mesh Node.
type NodeConfig struct {
Version string `yaml:"version"`
Attenuation Attenuation `yaml:"attenuation"`
diff --git a/api/trust_test.go b/api/trust_test.go
index 41e64c46..c07b78cb 100644
--- a/api/trust_test.go
+++ b/api/trust_test.go
@@ -42,10 +42,10 @@ func TestValidateControlPlaneTransport(t *testing.T) {
{"http://127.1:8080", false, true, ErrInsecureControlPlaneURL},
{"http://localhost.:8080", false, true, ErrInsecureControlPlaneURL},
{"http://0.0.0.0:8080", false, true, ErrInsecureControlPlaneURL},
- {"http://sam-control-plane:8080", false, true, ErrInsecureControlPlaneURL},
+ {"http://agentmesh-control-plane:8080", false, true, ErrInsecureControlPlaneURL},
{"http://10.0.0.5:8080", false, true, ErrInsecureControlPlaneURL},
{"http://127.0.0.1.evil.example:8080", false, true, ErrInsecureControlPlaneURL},
- {"http://sam-control-plane:8080", true, false, nil},
+ {"http://agentmesh-control-plane:8080", true, false, nil},
{"https://", false, true, nil},
{"https://:8443", false, true, nil},
{"http://", true, true, nil},
diff --git a/cmd/sam-bench/main.go b/cmd/agentmesh-bench/main.go
similarity index 94%
rename from cmd/sam-bench/main.go
rename to cmd/agentmesh-bench/main.go
index 7643b9f9..c875dbe8 100644
--- a/cmd/sam-bench/main.go
+++ b/cmd/agentmesh-bench/main.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Command sam-bench measures what an agent experiences when it reaches the
+// Command agentmesh-bench measures what an agent experiences when it reaches the
// mesh through a sandbox boundary.
//
// It issues a fixed workload rather than an interesting one. The chaos agent
@@ -78,7 +78,7 @@ func main() {
)
rootCmd := &cobra.Command{
- Use: "sam-bench",
+ Use: "agentmesh-bench",
Version: version.String(),
Short: "Measure the mesh from where an agent stands",
}
@@ -135,7 +135,7 @@ func main() {
flags := runCmd.Flags()
flags.StringVar(&socket, "socket", "", "Sandbox boundary Unix socket (HTTP CONNECT) to measure through; omit to measure the same workload without a boundary, which is the baseline")
flags.StringVar(&unixTarget, "target-unix", "", "Dial the target over this Unix socket rather than resolving its host, so a baseline needs no relay in the path")
- flags.StringVar(&target, "target", "", "URL to request, e.g. http://mesh.sam.alt/v1/models (required)")
+ flags.StringVar(&target, "target", "", "URL to request, e.g. http://mesh.alt/v1/models (required)")
flags.StringVar(&method, "method", "GET", "HTTP method")
flags.StringVar(&body, "body", "", "Request body")
flags.StringArrayVar(&headers, "header", nil, "Request header as Name: value, repeatable")
@@ -156,7 +156,7 @@ func main() {
defer stop()
if err := rootCmd.ExecuteContext(ctx); err != nil {
- fmt.Fprintf(os.Stderr, "sam-bench: %v\n", err)
+ fmt.Fprintf(os.Stderr, "agentmesh-bench: %v\n", err)
os.Exit(1)
}
}
@@ -218,7 +218,7 @@ func newJoinCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "join",
Short: "Start a fleet of members and record what joining cost each of them",
- Long: "Starts N sam-node processes from one bootstrap token and times each one from start\n" +
+ Long: "Starts N agentmesh-node processes from one bootstrap token and times each one from start\n" +
"to an authenticated router connection to its first call of a service through the\n" +
"mesh. With --hold the fleet then stays resident and every member's readiness is\n" +
"sampled, so a router rollout or a key rotation that happens meanwhile shows up as\n" +
@@ -230,7 +230,7 @@ func newJoinCmd() *cobra.Command {
return err
}
if opts.Dir == "" {
- if opts.Dir, err = os.MkdirTemp("", "sam-join-"); err != nil {
+ if opts.Dir, err = os.MkdirTemp("", "agentmesh-join-"); err != nil {
return err
}
}
@@ -243,13 +243,13 @@ func newJoinCmd() *cobra.Command {
obs.Join = r
if out != "" {
if err := write(out, obs); err != nil {
- fmt.Fprintf(os.Stderr, "sam-bench: %v\n", err)
+ fmt.Fprintf(os.Stderr, "agentmesh-bench: %v\n", err)
}
}
if marker != "" {
stamp := []byte(time.Now().UTC().Format(time.RFC3339) + "\n")
if err := os.WriteFile(marker, stamp, 0o600); err != nil {
- fmt.Fprintf(os.Stderr, "sam-bench: %v\n", err)
+ fmt.Fprintf(os.Stderr, "agentmesh-bench: %v\n", err)
}
}
}
@@ -264,13 +264,13 @@ func newJoinCmd() *cobra.Command {
// The fleet is gone by now; a scrape that fails here would lose the
// report over a metrics endpoint, so it is reported and not fatal.
if obs.After, err = scrapeAll(context.Background(), scrape); err != nil {
- fmt.Fprintf(os.Stderr, "sam-bench: metrics after the run: %v\n", err)
+ fmt.Fprintf(os.Stderr, "agentmesh-bench: metrics after the run: %v\n", err)
}
return write(out, obs)
},
}
flags := cmd.Flags()
- flags.StringVar(&opts.NodeBin, "node-bin", "sam-node", "sam-node binary to start one process of per member")
+ flags.StringVar(&opts.NodeBin, "node-bin", "agentmesh-node", "agentmesh-node binary to start one process of per member")
flags.IntVar(&opts.Count, "count", 10, "Members to start")
flags.StringVar(&opts.Dir, "dir", "", "Empty directory for member state, sockets and logs; default a new temporary one")
flags.StringVar(&opts.ControlPlane, "control-plane", "", "Control plane URL every member enrolls with (required)")
@@ -282,7 +282,7 @@ func newJoinCmd() *cobra.Command {
flags.DurationVar(&opts.Hold, "hold", 0, "Keep the fleet resident this long after the journeys end, sampling readiness; 0 tears it down at once")
flags.DurationVar(&opts.SampleInterval, "sample-interval", 10*time.Second, "How often each resident member's readiness is read during --hold")
flags.IntVar(&opts.MetricsBasePort, "metrics-base-port", 20000, "Member i serves /readyz on 127.0.0.1:(port+i)")
- flags.StringArrayVar(&opts.NodeArgs, "node-arg", nil, "Extra argument for every sam-node, repeatable (e.g. --node-arg=--insecure-control-plane)")
+ flags.StringArrayVar(&opts.NodeArgs, "node-arg", nil, "Extra argument for every agentmesh-node, repeatable (e.g. --node-arg=--insecure-control-plane)")
flags.StringVar(&marker, "resident-marker", "", "File to create once the fleet is resident and the hold has begun")
flags.StringArrayVar(&scrape, "scrape", nil, "Metrics endpoint to record before and after the run, repeatable")
flags.StringArrayVar(&labels, "label", nil, "Condition to record with the observation as name=value, repeatable")
diff --git a/cmd/sam-bench/report.go b/cmd/agentmesh-bench/report.go
similarity index 98%
rename from cmd/sam-bench/report.go
rename to cmd/agentmesh-bench/report.go
index fba69886..53448160 100644
--- a/cmd/sam-bench/report.go
+++ b/cmd/agentmesh-bench/report.go
@@ -39,7 +39,7 @@ func newReportCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "report <observation.json>...",
Short: "Turn recorded observations into a table",
- Long: "Reads observations written by `sam-bench run` and renders them as a Markdown\n" +
+ Long: "Reads observations written by `agentmesh-bench run` and renders them as a Markdown\n" +
"table, ordered by the label that was varied across the runs.",
Args: cobra.MinimumNArgs(1),
SilenceUsage: true,
diff --git a/cmd/sam-bench/report_test.go b/cmd/agentmesh-bench/report_test.go
similarity index 93%
rename from cmd/sam-bench/report_test.go
rename to cmd/agentmesh-bench/report_test.go
index 71c401ee..8ca25957 100644
--- a/cmd/sam-bench/report_test.go
+++ b/cmd/agentmesh-bench/report_test.go
@@ -55,16 +55,16 @@ func TestDeltaSumsTheMovementAcrossEverySource(t *testing.T) {
// count is the movement summed over all of them, not any single value.
obs := observation{
Before: map[string]map[string]float64{
- "box-1": {"sam_box_flows_total{outcome=allowed}": 10},
- "box-2": {"sam_box_flows_total{outcome=allowed}": 5},
+ "box-1": {"agentmesh_box_flows_total{outcome=allowed}": 10},
+ "box-2": {"agentmesh_box_flows_total{outcome=allowed}": 5},
},
After: map[string]map[string]float64{
- "box-1": {"sam_box_flows_total{outcome=allowed}": 60},
- "box-2": {"sam_box_flows_total{outcome=allowed}": 45},
+ "box-1": {"agentmesh_box_flows_total{outcome=allowed}": 60},
+ "box-2": {"agentmesh_box_flows_total{outcome=allowed}": 45},
},
}
- if got := delta(obs, "sam_box_flows_total{outcome=allowed}"); got != 90 {
+ if got := delta(obs, "agentmesh_box_flows_total{outcome=allowed}"); got != 90 {
t.Errorf("delta = %v, want 90 (50 + 40)", got)
}
}
diff --git a/cmd/sam-console/main.go b/cmd/agentmesh-console/main.go
similarity index 93%
rename from cmd/sam-console/main.go
rename to cmd/agentmesh-console/main.go
index 724723c4..cad05bc0 100644
--- a/cmd/sam-console/main.go
+++ b/cmd/agentmesh-console/main.go
@@ -32,8 +32,8 @@ import (
func main() {
var (
- controlPlaneURL = flag.String("control-plane", "http://localhost:8080", "URL of the SAM control plane")
- adminTokenPath = flag.String("admin-token-path", "", "Path to file containing the admin token (or env SAM_ADMIN_TOKEN)")
+ controlPlaneURL = flag.String("control-plane", "http://localhost:8080", "URL of the Agent Mesh control plane")
+ adminTokenPath = flag.String("admin-token-path", "", "Path to file containing the admin token (or env AGENTMESH_ADMIN_TOKEN)")
bindAddr = flag.String("bind-addr", ":8081", "Address to bind the console server")
staticDir = flag.String("static-dir", "", "Directory containing static frontend files (default: assets embedded in the binary)")
basePath = flag.String("base-path", "", "Base path prefix for the console (e.g. /console)")
@@ -46,12 +46,12 @@ func main() {
return
}
- adminToken, err := secrets.FromPathOrEnv("admin-token", *adminTokenPath, "SAM_ADMIN_TOKEN")
+ adminToken, err := secrets.FromPathOrEnv("admin-token", *adminTokenPath, "AGENTMESH_ADMIN_TOKEN")
if err != nil {
log.Fatalf("%v", err)
}
if adminToken == "" {
- log.Fatal("Admin token is required (via --admin-token-path or env SAM_ADMIN_TOKEN)")
+ log.Fatal("Admin token is required (via --admin-token-path or env AGENTMESH_ADMIN_TOKEN)")
}
if *externalURL == "" {
log.Print("WARNING: --external-url is not set; the OIDC redirect_uri and the session cookie's Secure flag follow the Host and X-Forwarded-Proto request headers, which a client controls. Set --external-url when the console is reachable beyond localhost.")
@@ -80,7 +80,7 @@ func main() {
}
go func() {
- log.Printf("SAM Console listening on %s", *bindAddr)
+ log.Printf("Agent Mesh Console listening on %s", *bindAddr)
if err := httpSrv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
log.Fatalf("Console server error: %v", err)
}
diff --git a/cmd/sam-control-plane/main.go b/cmd/agentmesh-control-plane/main.go
similarity index 95%
rename from cmd/sam-control-plane/main.go
rename to cmd/agentmesh-control-plane/main.go
index b5e7e267..87049ab1 100644
--- a/cmd/sam-control-plane/main.go
+++ b/cmd/agentmesh-control-plane/main.go
@@ -57,16 +57,16 @@ var (
autoApproveEnrollment bool
)
-var logger = golog.Logger("sam-control-plane-cli")
+var logger = golog.Logger("agentmesh-control-plane-cli")
func main() {
rootCmd := &cobra.Command{
- Use: "sam-control-plane",
+ Use: "agentmesh-control-plane",
Short: "Agent Mesh - Control Plane",
Version: version.String(),
// Resolve the DB DSN (may embed a password) before any subcommand runs.
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
- resolved, err := secrets.FromPathOrEnv("db-dsn", dbDSNPath, "SAM_DB_DSN")
+ resolved, err := secrets.FromPathOrEnv("db-dsn", dbDSNPath, "AGENTMESH_DB_DSN")
if err != nil {
return err
}
@@ -95,12 +95,12 @@ func main() {
logger.Warnf("--insecure-skip-tls-verify is set: identity provider TLS certificates are not verified, so anyone on the path to the provider can forge the identities this control plane admits. For development only.")
}
- adminToken, err := secrets.FromPathOrEnv("admin-token", adminTokenPath, "SAM_ADMIN_TOKEN")
+ adminToken, err := secrets.FromPathOrEnv("admin-token", adminTokenPath, "AGENTMESH_ADMIN_TOKEN")
if err != nil {
logger.Fatalf("%v", err)
}
if stsIssuerURL == "" {
- stsIssuerURL = strings.TrimSpace(os.Getenv("SAM_STS_ISSUER_URL"))
+ stsIssuerURL = strings.TrimSpace(os.Getenv("AGENTMESH_STS_ISSUER_URL"))
}
var auds []string
@@ -174,15 +174,15 @@ func main() {
logger.Fatalf("Failed to start control plane: %v", err)
}
- logger.Infof("SAM Control Plane Online on %s", bindAddress)
+ logger.Infof("Agent Mesh Control Plane Online on %s", bindAddress)
<-cmd.Context().Done()
},
}
rootCmd.Flags().StringVar(&bindAddress, "bind-address", "0.0.0.0:8080", "Address to listen on for web API services")
rootCmd.PersistentFlags().StringVar(&dbDriver, "db-driver", "sqlite", "Database driver (sqlite or postgres)")
- rootCmd.PersistentFlags().StringVar(&dbDSN, "db-dsn", "control-plane.db", "Database DSN/Connection URL (avoid for postgres: embeds a password; prefer --db-dsn-path or SAM_DB_DSN)")
- rootCmd.PersistentFlags().StringVar(&dbDSNPath, "db-dsn-path", "", "Path to file containing the database DSN/Connection URL (overrides --db-dsn; or env SAM_DB_DSN)")
+ rootCmd.PersistentFlags().StringVar(&dbDSN, "db-dsn", "control-plane.db", "Database DSN/Connection URL (avoid for postgres: embeds a password; prefer --db-dsn-path or AGENTMESH_DB_DSN)")
+ rootCmd.PersistentFlags().StringVar(&dbDSNPath, "db-dsn-path", "", "Path to file containing the database DSN/Connection URL (overrides --db-dsn; or env AGENTMESH_DB_DSN)")
rootCmd.Flags().StringVar(&oidcIssuer, "issuer", "", "OIDC Issuer URL (comma-separated)")
rootCmd.Flags().StringVar(&workloadIssuer, "workload-issuer", "", "Workload OIDC Issuer URL or '<issuer>=<email-suffix>' (comma-separated); accepted at /register, /refresh and /token/exchange, refused at /user/* and /oauth/authorize")
rootCmd.Flags().StringVar(&oidcClientID, "oidc-client-id", "", "OAuth client ID advertised to joining nodes via /info (defaults to the first allowed audience)")
@@ -195,8 +195,8 @@ func main() {
rootCmd.Flags().DurationVar(&workloadSessionTTL, "workload-session-ttl", controlplane.DefaultWorkloadSessionTTL, "How long a workload-issuer enrollment stays refreshable without presenting a fresh platform JWT on /refresh.")
rootCmd.Flags().DurationVar(&nodeRetention, "node-retention", controlplane.DefaultNodeRetention, "How long an enrolled node's record is kept after its session expired before it is deleted. Banned nodes are always kept. 0 keeps every record forever.")
rootCmd.Flags().DurationVar(&meshReconnectInterval, "mesh-reconnect-interval", controlplane.DefaultMeshReconnectInterval, "How often the event publisher re-reads the router leases and dials any router it is not connected to.")
- rootCmd.Flags().StringVar(&adminTokenPath, "admin-token-path", "", "Path to file containing the token for authenticating policy REST API requests (or env SAM_ADMIN_TOKEN)")
- rootCmd.Flags().StringVar(&stsIssuerURL, "sts-issuer-url", "", "Canonical external URL of this control plane for OIDC/STS issuer and discovery metadata (or env SAM_STS_ISSUER_URL)")
+ rootCmd.Flags().StringVar(&adminTokenPath, "admin-token-path", "", "Path to file containing the token for authenticating policy REST API requests (or env AGENTMESH_ADMIN_TOKEN)")
+ rootCmd.Flags().StringVar(&stsIssuerURL, "sts-issuer-url", "", "Canonical external URL of this control plane for OIDC/STS issuer and discovery metadata (or env AGENTMESH_STS_ISSUER_URL)")
rootCmd.Flags().BoolVar(&insecureSkipTLSVerify, "insecure-skip-tls-verify", false, "Skip TLS verification for OIDC providers")
rootCmd.Flags().StringVar(&logLevel, "log-level", "info", "Log level (debug, info, warn, error)")
rootCmd.Flags().BoolVar(&autoApproveEnrollment, "auto-approve-enrollment", false, "Auto-approve valid bootstrap token enrollment requests")
diff --git a/cmd/sam-node/daemonize.go b/cmd/agentmesh-node/daemonize.go
similarity index 95%
rename from cmd/sam-node/daemonize.go
rename to cmd/agentmesh-node/daemonize.go
index 43525d8f..db71f5aa 100644
--- a/cmd/sam-node/daemonize.go
+++ b/cmd/agentmesh-node/daemonize.go
@@ -35,8 +35,8 @@ import (
)
const (
- daemonPIDFile = "sam-node.pid"
- daemonLogFile = "sam-node.log"
+ daemonPIDFile = "agentmesh-node.pid"
+ daemonLogFile = "agentmesh-node.log"
daemonTokenFile = "api-token"
daemonReadyTimeout = 90 * time.Second
daemonPollInterval = 200 * time.Millisecond
@@ -50,13 +50,13 @@ func daemonizeRun(socketPath string) error {
probe := probeTarget{addr: localProbeAddr(bindAddrFlag), socketPath: socketPath}
if probe.ready(time.Second) {
- fmt.Printf("sam-node is already running and listening on %s\n", probe)
+ fmt.Printf("agentmesh-node is already running and listening on %s\n", probe)
return nil
}
enrolled, controlPlane, err := storedEnrollment(dataDir)
if errors.Is(err, node.ErrStoreLocked) {
- fmt.Printf("sam-node is already running%s: %s is in use.\n", runningPIDSuffix(dataDir), dataDir)
+ fmt.Printf("agentmesh-node is already running%s: %s is in use.\n", runningPIDSuffix(dataDir), dataDir)
return nil
}
if err != nil {
@@ -68,8 +68,8 @@ func daemonizeRun(socketPath string) error {
target = "<control-plane-url>"
}
return fmt.Errorf("this node is not enrolled yet, and enrolling needs a one-time login you have to approve:\n"+
- " sam-node join --headless %s\n"+
- "then re-run 'sam-node run --daemonize'", target)
+ " agentmesh-node join --headless %s\n"+
+ "then re-run 'agentmesh-node run --daemonize'", target)
}
tokenArgs, tokenPath, err := ensureDaemonToken(dataDir)
@@ -93,7 +93,7 @@ func daemonizeRun(socketPath string) error {
exe, err := os.Executable()
if err != nil {
- return fmt.Errorf("locating the sam-node binary: %w", err)
+ return fmt.Errorf("locating the agentmesh-node binary: %w", err)
}
child := exec.Command(exe, append(withoutDaemonizeFlag(os.Args[1:]), tokenArgs...)...) // #nosec G204 -- re-executes this same binary with this process's own arguments
@@ -143,7 +143,7 @@ func ensureDaemonToken(dataDir string) ([]string, string, error) {
if apiTokenPathFlag != "" {
return nil, apiTokenPathFlag, nil
}
- if os.Getenv("SAM_API_TOKEN") != "" {
+ if os.Getenv("AGENTMESH_API_TOKEN") != "" {
return nil, "", nil
}
tokenPath := filepath.Join(dataDir, daemonTokenFile)
@@ -330,7 +330,7 @@ func ensureNodeStopped(dataDir string) error {
}
store, err := node.NewStore(dataDir)
if errors.Is(err, node.ErrStoreLocked) {
- return fmt.Errorf("a sam-node is still running%s: stop it before resetting %s", runningPIDSuffix(dataDir), dataDir)
+ return fmt.Errorf("a agentmesh-node is still running%s: stop it before resetting %s", runningPIDSuffix(dataDir), dataDir)
}
if err != nil {
// Any other failure, such as a corrupt database, is itself a reason to reset.
@@ -414,7 +414,7 @@ func tailFile(path string, maxBytes int64, maxLines int) string {
}
func printDaemonSummary(pid int, probe probeTarget, tokenPath, logPath string) {
- fmt.Printf("sam-node is running in the background.\n")
+ fmt.Printf("agentmesh-node is running in the background.\n")
fmt.Printf(" PID %d\n", pid)
if probe.addr != "" {
fmt.Printf(" Endpoint http://%s/mcp\n", probe.addr)
diff --git a/cmd/sam-node/daemonize_test.go b/cmd/agentmesh-node/daemonize_test.go
similarity index 95%
rename from cmd/sam-node/daemonize_test.go
rename to cmd/agentmesh-node/daemonize_test.go
index 4011e16d..9736d346 100644
--- a/cmd/sam-node/daemonize_test.go
+++ b/cmd/agentmesh-node/daemonize_test.go
@@ -78,7 +78,7 @@ func TestProbeReady(t *testing.T) {
}
func TestEnsureDaemonToken(t *testing.T) {
- t.Setenv("SAM_API_TOKEN", "")
+ t.Setenv("AGENTMESH_API_TOKEN", "")
apiTokenPathFlag = ""
dir := t.TempDir()
@@ -118,10 +118,10 @@ func TestEnsureDaemonToken(t *testing.T) {
t.Error("an existing token must be reused, not rotated")
}
- t.Setenv("SAM_API_TOKEN", "from-env")
+ t.Setenv("AGENTMESH_API_TOKEN", "from-env")
args, path, err = ensureDaemonToken(t.TempDir())
if err != nil || args != nil || path != "" {
- t.Errorf("a configured SAM_API_TOKEN must be left alone: got %v, %q, %v", args, path, err)
+ t.Errorf("a configured AGENTMESH_API_TOKEN must be left alone: got %v, %q, %v", args, path, err)
}
}
@@ -164,7 +164,7 @@ func TestPurgeDataDir(t *testing.T) {
}
func TestTailFile(t *testing.T) {
- path := filepath.Join(t.TempDir(), "sam-node.log")
+ path := filepath.Join(t.TempDir(), "agentmesh-node.log")
if err := os.WriteFile(path, []byte("one\ntwo\nthree\nfour\n"), 0600); err != nil {
t.Fatalf("seeding log: %v", err)
}
diff --git a/cmd/sam-node/daemonize_unix.go b/cmd/agentmesh-node/daemonize_unix.go
similarity index 100%
rename from cmd/sam-node/daemonize_unix.go
rename to cmd/agentmesh-node/daemonize_unix.go
diff --git a/cmd/sam-node/daemonize_windows.go b/cmd/agentmesh-node/daemonize_windows.go
similarity index 100%
rename from cmd/sam-node/daemonize_windows.go
rename to cmd/agentmesh-node/daemonize_windows.go
diff --git a/cmd/sam-node/debug.go b/cmd/agentmesh-node/debug.go
similarity index 97%
rename from cmd/sam-node/debug.go
rename to cmd/agentmesh-node/debug.go
index 63909780..71f65cb8 100644
--- a/cmd/sam-node/debug.go
+++ b/cmd/agentmesh-node/debug.go
@@ -48,7 +48,7 @@ func newDebugCmd() *cobra.Command {
debugCmd.AddCommand(&cobra.Command{
Use: "connectivity [peer-id]",
- Short: "Ping the SAM router, or a specific peer",
+ Short: "Ping the Agent Mesh router, or a specific peer",
Args: cobra.MaximumNArgs(1),
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
@@ -95,7 +95,7 @@ func newDebugGetCmd(use, short, path string) *cobra.Command {
func debugRequest(cmd *cobra.Command, method, path string, body io.Reader) error {
socketPath := resolveSocketPath(cmd)
if socketPath == "" {
- return fmt.Errorf("no Unix socket configured (--socket-path is empty); sam-node debug needs the node to serve one")
+ return fmt.Errorf("no Unix socket configured (--socket-path is empty); agentmesh-node debug needs the node to serve one")
}
req, err := http.NewRequestWithContext(cmd.Context(), method, "http://localhost"+path, body)
if err != nil {
diff --git a/cmd/sam-node/forward.go b/cmd/agentmesh-node/forward.go
similarity index 95%
rename from cmd/sam-node/forward.go
rename to cmd/agentmesh-node/forward.go
index 4ade58d8..5f68376b 100644
--- a/cmd/sam-node/forward.go
+++ b/cmd/agentmesh-node/forward.go
@@ -61,7 +61,7 @@ func newForwardCmd() *cobra.Command {
apiAddr := strings.TrimSpace(forwardAPIAddr)
if apiAddr == "" {
- apiAddr = strings.TrimSpace(os.Getenv("SAM_API_ADDR"))
+ apiAddr = strings.TrimSpace(os.Getenv("AGENTMESH_API_ADDR"))
}
var dialNode func(context.Context) (net.Conn, error)
@@ -76,7 +76,7 @@ func newForwardCmd() *cobra.Command {
sock = resolveSocketPath(cmd)
}
if sock == "" {
- return fmt.Errorf("no Unix socket or --api-addr configured for sam-node forward")
+ return fmt.Errorf("no Unix socket or --api-addr configured for agentmesh-node forward")
}
dialNode = func(ctx context.Context) (net.Conn, error) {
return (&net.Dialer{Timeout: 10 * time.Second}).DialContext(ctx, "unix", sock)
@@ -88,8 +88,8 @@ func newForwardCmd() *cobra.Command {
}
cmd.Flags().StringVar(&forwardSocketPath, "socket-path", "", "Unix socket of the running node (defaults to <data-dir>/"+node.DefaultSocketName+")")
- cmd.Flags().StringVar(&forwardAPIAddr, "api-addr", "", "TCP address of the running node sidecar (alternative to --socket-path, or env SAM_API_ADDR)")
- cmd.Flags().StringVar(&forwardAPITokenPath, "api-token-path", "", "Path to file containing Bearer token for sidecar authentication (or env SAM_TASK_TOKEN / SAM_API_TOKEN)")
+ cmd.Flags().StringVar(&forwardAPIAddr, "api-addr", "", "TCP address of the running node sidecar (alternative to --socket-path, or env AGENTMESH_API_ADDR)")
+ cmd.Flags().StringVar(&forwardAPITokenPath, "api-token-path", "", "Path to file containing Bearer token for sidecar authentication (or env AGENTMESH_TASK_TOKEN / AGENTMESH_API_TOKEN)")
return cmd
}
@@ -132,10 +132,10 @@ func resolveForwardToken(tokenPath string) (string, error) {
}
return strings.TrimSpace(string(b)), nil
}
- if tok := strings.TrimSpace(os.Getenv("SAM_TASK_TOKEN")); tok != "" {
+ if tok := strings.TrimSpace(os.Getenv("AGENTMESH_TASK_TOKEN")); tok != "" {
return tok, nil
}
- if tok := strings.TrimSpace(os.Getenv("SAM_API_TOKEN")); tok != "" {
+ if tok := strings.TrimSpace(os.Getenv("AGENTMESH_API_TOKEN")); tok != "" {
return tok, nil
}
return "", nil
diff --git a/cmd/sam-node/forward_test.go b/cmd/agentmesh-node/forward_test.go
similarity index 100%
rename from cmd/sam-node/forward_test.go
rename to cmd/agentmesh-node/forward_test.go
diff --git a/cmd/sam-node/main.go b/cmd/agentmesh-node/main.go
similarity index 96%
rename from cmd/sam-node/main.go
rename to cmd/agentmesh-node/main.go
index ce6af8fe..351d7a9c 100644
--- a/cmd/sam-node/main.go
+++ b/cmd/agentmesh-node/main.go
@@ -41,7 +41,7 @@ import (
)
func init() {
- if dnsServer := os.Getenv("SAM_TEST_DNS_SERVER"); dnsServer != "" {
+ if dnsServer := os.Getenv("AGENTMESH_TEST_DNS_SERVER"); dnsServer != "" {
customResolver := &net.Resolver{
PreferGo: true,
Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
@@ -110,7 +110,7 @@ var (
cloudProviderFlag string
)
-var logger = golog.Logger("sam-node-cli")
+var logger = golog.Logger("agentmesh-node-cli")
// resolveSecretFlag folds a --<name>-path file variant into its value flag
// and warns when the secret was passed on the command line, where it leaks
@@ -247,7 +247,7 @@ func parseRouterAddrs(addrs []string) []multiaddr.Multiaddr {
// "run --join"; targetControlPlane must already be a normalized URL. store is
// used to persist the OIDC refresh token when --offline-access is set.
func interactiveJoin(ctx context.Context, store *node.Store, targetControlPlane string) (string, *api.ControlPlaneInfoResponse, error) {
- dummyNode := &node.SamNode{Store: store}
+ dummyNode := &node.AgentMeshNode{Store: store}
fmt.Printf("Discovering control plane info from %s...\n", targetControlPlane)
info, err := node.FetchControlPlaneInfo(ctx, targetControlPlane)
@@ -282,7 +282,7 @@ func interactiveJoin(ctx context.Context, store *node.Store, targetControlPlane
func main() {
rootCmd := &cobra.Command{
- Use: "sam-node",
+ Use: "agentmesh-node",
Short: "Agent Mesh Node",
Version: version.String(),
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
@@ -327,9 +327,9 @@ func main() {
_ = golog.SetLogLevel("dht", "fatal")
_ = golog.SetLogLevel("dht/RtRefreshManager", "fatal")
- apiTokenFlag = resolveDaemonSecret("api-token", apiTokenPathFlag, "SAM_API_TOKEN")
+ apiTokenFlag = resolveDaemonSecret("api-token", apiTokenPathFlag, "AGENTMESH_API_TOKEN")
bootstrapTokenFlag = resolveSecretFlag("bootstrap-token", bootstrapTokenFlag, bootstrapTokenPathFlag)
- clientSecretFlag = resolveDaemonSecret("client-secret", clientSecretPathFlag, "SAM_CLIENT_SECRET")
+ clientSecretFlag = resolveDaemonSecret("client-secret", clientSecretPathFlag, "AGENTMESH_CLIENT_SECRET")
if jwtFlag != "" {
logger.Warn("--jwt passes a secret on the command line; prefer --jwt-path")
}
@@ -371,7 +371,7 @@ func main() {
controlPlanePubKey = pubBytes
}
- var meshNode *node.SamNode
+ var meshNode *node.AgentMeshNode
var jwtStr string
var controlPlaneInfo *api.ControlPlaneInfoResponse
@@ -410,7 +410,7 @@ func main() {
case joinSkip:
logger.Debug("--join set but a usable identity is already stored; ignoring")
case joinFatalMismatchNoTTY:
- logger.Fatalf("--control-plane %q does not match the mesh this node is enrolled with (%s); switching meshes needs to be confirmed interactively. Run %q first, or re-run this interactively.", controlPlaneAddr, stored, "sam-node reset")
+ logger.Fatalf("--control-plane %q does not match the mesh this node is enrolled with (%s); switching meshes needs to be confirmed interactively. Run %q first, or re-run this interactively.", controlPlaneAddr, stored, "agentmesh-node reset")
case joinFallbackNoTTY:
logger.Warn("--join set but no interactive terminal available; falling back to out-of-band enrollment via the unauthenticated MCP sidecar")
case joinNeedsConfirmSwitch:
@@ -500,7 +500,7 @@ func main() {
stored, _ := store.LoadControlPlaneURL()
normalizedAddr := normalizeControlPlaneURL(controlPlaneAddr)
if stored != "" && normalizedAddr != normalizeControlPlaneURL(stored) {
- logger.Fatalf("--control-plane %q does not match the mesh this node's stored identity was enrolled with (%s). A node's identity is only valid for the mesh that issued it: re-run with --join to switch interactively (%q clears it non-interactively), rather than pointing this one at a different mesh.", controlPlaneAddr, stored, "sam-node reset")
+ logger.Fatalf("--control-plane %q does not match the mesh this node's stored identity was enrolled with (%s). A node's identity is only valid for the mesh that issued it: re-run with --join to switch interactively (%q clears it non-interactively), rather than pointing this one at a different mesh.", controlPlaneAddr, stored, "agentmesh-node reset")
}
}
@@ -508,7 +508,7 @@ func main() {
logger.Fatal("Control plane public key not found in store and not provided. Re-run with --join to re-enroll, or pass --control-plane-public-key explicitly.")
}
priv := node.GetOrGenerateKey(store)
- meshNode, err = node.NewSamNode(buildRuntimeNodeOptions(priv, controlPlanePubKey, routerAddrs))
+ meshNode, err = node.NewAgentMeshNode(buildRuntimeNodeOptions(priv, controlPlanePubKey, routerAddrs))
if err != nil {
logger.Fatalf("Failed to initialize mesh node: %v", err)
}
@@ -553,7 +553,7 @@ func main() {
priv := node.GetOrGenerateKey(store)
enrollCtx, enrollCancel := context.WithCancel(context.Background())
- meshNode, err = node.NewSamNode(buildRuntimeNodeOptions(priv, nil, initRouterAddrs))
+ meshNode, err = node.NewAgentMeshNode(buildRuntimeNodeOptions(priv, nil, initRouterAddrs))
if err != nil {
enrollCancel()
logger.Fatalf("Failed to initialize node for enrollment: %v", err)
@@ -598,7 +598,7 @@ func main() {
}
logger.Debugf("listenAddrs: %v, allowLoopback: %v", listenAddrs, allowLoopbackFlag)
- meshNode, err = node.NewSamNode(buildRuntimeNodeOptions(priv, controlPlanePubKey, parseRouterAddrs(storedAddrs)))
+ meshNode, err = node.NewAgentMeshNode(buildRuntimeNodeOptions(priv, controlPlanePubKey, parseRouterAddrs(storedAddrs)))
if err != nil {
logger.Fatalf("Failed to initialize node after enrollment: %v", err)
}
@@ -651,7 +651,7 @@ func main() {
}()
}
- fmt.Printf("SAM Node Online.\nPeerID: %s\nListening on: %v\n", meshNode.Host.ID(), meshNode.Host.Addrs())
+ fmt.Printf("Agent Mesh Node Online.\nPeerID: %s\nListening on: %v\n", meshNode.Host.ID(), meshNode.Host.Addrs())
// Block forever
<-ctx.Done()
@@ -671,7 +671,7 @@ func main() {
}
if targetControlPlane == "" {
- logger.Fatal("No control plane specified: sam-node join <control-plane-url>")
+ logger.Fatal("No control plane specified: agentmesh-node join <control-plane-url>")
}
targetControlPlane = normalizeControlPlaneURL(targetControlPlane)
@@ -733,7 +733,7 @@ func main() {
}
priv := node.GetOrGenerateKey(store)
- meshNode, err := node.NewSamNode(node.Options{
+ meshNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: priv,
RouterAddrs: initRouterAddrs,
Store: store,
@@ -830,7 +830,7 @@ func main() {
if err := store.ResetMeshIdentity(); err != nil {
logger.Fatalf("Failed to reset stored identity: %v", err)
}
- fmt.Println("Cleared stored mesh identity (PeerID unchanged). Run 'sam-node join <control-plane-url>' or 'sam-node run --join' to enroll again.")
+ fmt.Println("Cleared stored mesh identity (PeerID unchanged). Run 'agentmesh-node join <control-plane-url>' or 'agentmesh-node run --join' to enroll again.")
},
}
resetCmd.Flags().BoolVar(&resetAllFlag, "all", false, "Delete every file the node keeps in its data directory, not just the mesh identity")
@@ -845,7 +845,7 @@ func main() {
runCmd.Flags().StringVar(&bootstrapTokenFlag, "bootstrap-token", "", "Pre-shared bootstrap token for enrollment")
runCmd.Flags().StringVar(&bootstrapTokenPathFlag, "bootstrap-token-path", "", "Path to file containing the bootstrap token (recommended over --bootstrap-token)")
runCmd.Flags().StringVar(&clientIDFlag, "client-id", "", "OIDC Client ID for M2M")
- runCmd.Flags().StringVar(&clientSecretPathFlag, "client-secret-path", "", "Path to file containing the OIDC client secret (or env SAM_CLIENT_SECRET)")
+ runCmd.Flags().StringVar(&clientSecretPathFlag, "client-secret-path", "", "Path to file containing the OIDC client secret (or env AGENTMESH_CLIENT_SECRET)")
runCmd.Flags().StringVar(&controlPlanePublicKeyFlag, "control-plane-public-key", "", "Control plane public key (32-byte Hex)")
runCmd.Flags().StringVar(&bindAddrFlag, "bind-addr", "127.0.0.1:8080", "Local TCP address for the HTTP server (MCP and Sidecar API); pass an empty value to serve only on the Unix socket")
runCmd.Flags().StringVar(&socketPathFlag, "socket-path", "", "Unix socket serving the same API, where the socket's owner-only permissions replace the API token (defaults to <data-dir>/"+node.DefaultSocketName+"; pass an empty value to disable)")
@@ -859,7 +859,7 @@ func main() {
runCmd.Flags().DurationVar(&autoRelayBackoffFlag, "autorelay-backoff", 3*time.Second, "AutoRelay Backoff")
runCmd.Flags().DurationVar(&routerConnectTimeoutFlag, "router-connect-timeout", node.DefaultRouterConnectTimeout, "Timeout for dialing each router address")
runCmd.Flags().BoolVar(&enableRelayFlag, "enable-relay", false, "Allow this node to serve as a relay for others")
- runCmd.Flags().BoolVar(&daemonizeFlag, "daemonize", false, "Run the node in the background and return once its local API answers (writes sam-node.log and sam-node.pid to the data directory, and generates an API token there if none is configured)")
+ runCmd.Flags().BoolVar(&daemonizeFlag, "daemonize", false, "Run the node in the background and return once its local API answers (writes agentmesh-node.log and agentmesh-node.pid to the data directory, and generates an API token there if none is configured)")
runCmd.Flags().StringVar(&logLevelFlag, "log-level", "info", "Log level (debug, info, warn, error)")
runCmd.Flags().DurationVar(&keyGracePeriodFlag, "key-grace-period", 24*time.Hour, "Key grace period for old keys (e.g. 24h)")
runCmd.Flags().BoolVar(&allowLoopbackFlag, "allow-loopback", false, "Allow publishing and connecting to loopback/link-local addresses")
@@ -872,7 +872,7 @@ func main() {
joinCmd.Flags().BoolVar(&offlineAccessFlag, "offline-access", false, "Request OIDC offline access/refresh token for automatic renewal")
joinCmd.Flags().StringVar(&bootstrapTokenFlag, "bootstrap-token", "", "Pre-shared bootstrap token for enrollment")
joinCmd.Flags().StringVar(&bootstrapTokenPathFlag, "bootstrap-token-path", "", "Path to file containing the bootstrap token (recommended over --bootstrap-token)")
- runCmd.Flags().StringVar(&apiTokenPathFlag, "api-token-path", "", "Path to file containing the static Bearer token for API authorization (or env SAM_API_TOKEN)")
+ runCmd.Flags().StringVar(&apiTokenPathFlag, "api-token-path", "", "Path to file containing the static Bearer token for API authorization (or env AGENTMESH_API_TOKEN)")
runCmd.Flags().StringVar(&tlsCertFlag, "tls-cert", "", "Path to TLS certificate for sidecar API")
runCmd.Flags().StringVar(&tlsKeyFlag, "tls-key", "", "Path to TLS key for sidecar API")
runCmd.Flags().StringVar(&tlsCAFlag, "tls-ca", "", "Path to TLS CA for sidecar API mTLS")
@@ -885,7 +885,7 @@ func main() {
runCmd.Flags().StringVar(&secretsDirFlag, "secrets-dir", node.DefaultSecretsDir, "Directory holding the credentials named by the control plane's egress destinations, one file per credential name")
rootCmd.PersistentFlags().StringVar(&controlPlaneAddr, "control-plane", "", "Control plane URL")
rootCmd.PersistentFlags().BoolVar(&insecureControlPlaneFlag, "insecure-control-plane", false, "Accept a plaintext http:// control plane URL to a non-loopback host (whoever answers it becomes this node's trust root; only for networks you already trust)")
- rootCmd.PersistentFlags().StringVar(&configFile, "config", node.DefaultConfigFile, "Path to sam-node.yaml configuration file")
+ rootCmd.PersistentFlags().StringVar(&configFile, "config", node.DefaultConfigFile, "Path to agentmesh-node.yaml configuration file")
rootCmd.PersistentFlags().StringVar(&oidcIssuerFlag, "oidc-issuer", "", "OIDC Issuer URL")
rootCmd.PersistentFlags().StringVar(&deviceAuthURLFlag, "device-auth-url", "", "OIDC Device Authorization URL")
rootCmd.PersistentFlags().StringVar(&audienceFlag, "audience", api.DefaultAudience, "OIDC Audience")
@@ -918,12 +918,12 @@ func main() {
}
}
-// resolveDataDir honors --data-dir / $SAM_DATA_DIR if set, else falls back to GetDefaultDataDir().
+// resolveDataDir honors --data-dir / $AGENTMESH_DATA_DIR if set, else falls back to GetDefaultDataDir().
func resolveDataDir() string {
var dir string
if dataDirFlag != "" {
dir = dataDirFlag
- } else if envDir := strings.TrimSpace(os.Getenv("SAM_DATA_DIR")); envDir != "" {
+ } else if envDir := strings.TrimSpace(os.Getenv("AGENTMESH_DATA_DIR")); envDir != "" {
dir = envDir
} else {
d, err := node.GetDefaultDataDir()
diff --git a/cmd/sam-node/main_test.go b/cmd/agentmesh-node/main_test.go
similarity index 100%
rename from cmd/sam-node/main_test.go
rename to cmd/agentmesh-node/main_test.go
diff --git a/cmd/sam-node/skill.go b/cmd/agentmesh-node/skill.go
similarity index 89%
rename from cmd/sam-node/skill.go
rename to cmd/agentmesh-node/skill.go
index 11b12923..79e7b39a 100644
--- a/cmd/sam-node/skill.go
+++ b/cmd/agentmesh-node/skill.go
@@ -27,7 +27,7 @@ import (
"github.com/spf13/cobra"
)
-// newSkillCmd builds `sam-node skill`, which teaches local AI agents how to
+// newSkillCmd builds `agentmesh-node skill`, which teaches local AI agents how to
// bootstrap a node and use the mesh.
func newSkillCmd() *cobra.Command {
var (
@@ -37,15 +37,15 @@ func newSkillCmd() *cobra.Command {
skillCmd := &cobra.Command{
Use: "skill",
- Short: "Manage the SAM skill that teaches local AI agents to use the mesh",
- Long: "Install the SAM agent skill into the directories AI coding agents scan.\n" +
+ Short: "Manage the Agent Mesh skill that teaches local AI agents to use the mesh",
+ Long: "Install the Agent Mesh agent skill into the directories AI coding agents scan.\n" +
"Agents load the skill on their own and use it to bootstrap a node,\n" +
"discover mesh services, and call remote tools.",
}
installCmd := &cobra.Command{
Use: "install",
- Short: "Install the SAM skill for local AI agents",
+ Short: "Install the Agent Mesh skill for local AI agents",
Args: cobra.NoArgs,
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
@@ -59,7 +59,7 @@ func newSkillCmd() *cobra.Command {
listCmd := &cobra.Command{
Use: "list",
- Short: "Show where the SAM skill is installed and whether it is current",
+ Short: "Show where the Agent Mesh skill is installed and whether it is current",
Args: cobra.NoArgs,
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
@@ -118,7 +118,7 @@ func resolveSkillTargets(dir string, project bool) ([]skill.Target, string, erro
func installSkill(w io.Writer, targets []skill.Target, home string) error {
var errs []error
installed := 0
- _, _ = fmt.Fprintf(w, "Installing the SAM skill (%s):\n", skill.Name)
+ _, _ = fmt.Fprintf(w, "Installing the Agent Mesh skill (%s):\n", skill.Name)
tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0)
for _, target := range targets {
before, err := skill.Install(target)
@@ -148,7 +148,7 @@ func installSkill(w io.Writer, targets []skill.Target, home string) error {
func listSkill(w io.Writer, targets []skill.Target, home string) error {
var errs []error
- _, _ = fmt.Fprintf(w, "SAM skill (%s):\n", skill.Name)
+ _, _ = fmt.Fprintf(w, "Agent Mesh skill (%s):\n", skill.Name)
tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0)
for _, target := range targets {
state, err := skill.Inspect(target)
@@ -169,12 +169,12 @@ func printSkillNextSteps(w io.Writer) {
_, _ = fmt.Fprint(w, `
Next steps:
1. Start a node in the background (prints its endpoint and API token file):
- sam-node run --daemonize
+ agentmesh-node run --daemonize
If it reports the node is not enrolled, run the join command it prints
first, then re-run it.
2. Point your agent at http://127.0.0.1:8080/mcp, authenticated with the
header "X-Mesh-Authentication: Bearer <token>". For example:
- Claude Code claude mcp add --transport http sam-mesh \
+ Claude Code claude mcp add --transport http agentmesh \
http://127.0.0.1:8080/mcp \
--header "X-Mesh-Authentication: Bearer <token>"
Antigravity add that URL as "serverUrl", with the same header, to
diff --git a/cmd/sam-node/skill_test.go b/cmd/agentmesh-node/skill_test.go
similarity index 100%
rename from cmd/sam-node/skill_test.go
rename to cmd/agentmesh-node/skill_test.go
diff --git a/cmd/sam-node/state.go b/cmd/agentmesh-node/state.go
similarity index 97%
rename from cmd/sam-node/state.go
rename to cmd/agentmesh-node/state.go
index 95d22e24..a5d072da 100644
--- a/cmd/sam-node/state.go
+++ b/cmd/agentmesh-node/state.go
@@ -36,7 +36,7 @@ func newStateCmd() *cobra.Command {
"A state directory is how the native SDKs keep a member: identity.key (the\n" +
"libp2p private key) and credential.json (the MemberCredential message of\n" +
"api/agentmesh.proto as JSON). Exporting hands this node's identity to a program\n" +
- "written with an SDK; importing runs an SDK-enrolled identity as a sam-node.\n" +
+ "written with an SDK; importing runs an SDK-enrolled identity as a agentmesh-node.\n" +
"Stop the node first; a running node holds its data directory.",
}
@@ -107,7 +107,7 @@ func newStateCmd() *cobra.Command {
if err := store.SetCredential(credential); err != nil {
return err
}
- fmt.Printf("Imported %s from %s into %s\nStart the node with 'sam-node run'; it resumes as that member.\n", id, args[0], resolveDataDir())
+ fmt.Printf("Imported %s from %s into %s\nStart the node with 'agentmesh-node run'; it resumes as that member.\n", id, args[0], resolveDataDir())
return nil
},
}
diff --git a/cmd/sam-one/admin.go b/cmd/agentmesh-one/admin.go
similarity index 94%
rename from cmd/sam-one/admin.go
rename to cmd/agentmesh-one/admin.go
index 6955813b..8ff728c3 100644
--- a/cmd/sam-one/admin.go
+++ b/cmd/agentmesh-one/admin.go
@@ -30,7 +30,7 @@ import (
"google.golang.org/protobuf/encoding/protojson"
)
-// adminClient talks to a running sam-one's admin API; subcommands never open
+// adminClient talks to a running agentmesh-one's admin API; subcommands never open
// the database from a second process.
type adminClient struct {
client *http.Client
@@ -39,17 +39,17 @@ type adminClient struct {
}
// resolveAdminToken picks the admin credential: a file named by the flag,
-// then the SAM_ADMIN_TOKEN env, then the token persisted in data-dir by a
+// then the AGENTMESH_ADMIN_TOKEN env, then the token persisted in data-dir by a
// previous run. The value itself is never a flag argument.
func resolveAdminToken(tokenPath, dataDir string) (string, error) {
- if tok, err := secretFromPathOrEnv(tokenPath, "SAM_ADMIN_TOKEN"); err != nil {
+ if tok, err := secretFromPathOrEnv(tokenPath, "AGENTMESH_ADMIN_TOKEN"); err != nil {
return "", fmt.Errorf("invalid --admin-token-path: %w", err)
} else if tok != "" {
return tok, nil
}
tok, err := standalone.AdminTokenFromDataDir(dataDir)
if err != nil {
- return "", fmt.Errorf("no admin token: pass --admin-token-path, set SAM_ADMIN_TOKEN, or point --data-dir at a sam-one data directory (%v)", err)
+ return "", fmt.Errorf("no admin token: pass --admin-token-path, set AGENTMESH_ADMIN_TOKEN, or point --data-dir at a agentmesh-one data directory (%v)", err)
}
return tok, nil
}
@@ -185,9 +185,9 @@ func newAdminSubcommands() []*cobra.Command {
// belong on stdout so `token create | awk` and $(...) capture them.
cmd.SetOut(os.Stdout)
cmd.SetErr(os.Stderr)
- cmd.PersistentFlags().StringVar(&server, "server", "http://127.0.0.1:8080", "Base URL of the running sam-one server")
- cmd.PersistentFlags().StringVar(&adminTokenPath, "admin-token-path", "", "File containing the admin API bearer token (or env SAM_ADMIN_TOKEN, or read from --data-dir)")
- cmd.PersistentFlags().StringVar(&dataDir, "data-dir", ".", "sam-one data directory holding the persisted admin token")
+ cmd.PersistentFlags().StringVar(&server, "server", "http://127.0.0.1:8080", "Base URL of the running agentmesh-one server")
+ cmd.PersistentFlags().StringVar(&adminTokenPath, "admin-token-path", "", "File containing the admin API bearer token (or env AGENTMESH_ADMIN_TOKEN, or read from --data-dir)")
+ cmd.PersistentFlags().StringVar(&dataDir, "data-dir", ".", "agentmesh-one data directory holding the persisted admin token")
}
var (
@@ -271,7 +271,7 @@ func newAdminSubcommands() []*cobra.Command {
},
}
- tokenCmd := &cobra.Command{Use: "token", Short: "Manage bootstrap tokens on a running sam-one"}
+ tokenCmd := &cobra.Command{Use: "token", Short: "Manage bootstrap tokens on a running agentmesh-one"}
addSharedFlags(tokenCmd)
tokenCmd.AddCommand(tokenCreate, tokenList, tokenRevoke, newTokenQRCommand(clientFactory, &server))
@@ -292,7 +292,7 @@ func newAdminSubcommands() []*cobra.Command {
},
}
- adminCmd := &cobra.Command{Use: "admin", Short: "Administrative actions on a running sam-one"}
+ adminCmd := &cobra.Command{Use: "admin", Short: "Administrative actions on a running agentmesh-one"}
addSharedFlags(adminCmd)
adminCmd.AddCommand(adminBan)
@@ -332,7 +332,7 @@ func newTokenQRCommand(clientFactory func() (*adminClient, error), server *strin
Use: "qr",
Short: "Mint a device enrollment token and print it as a QR code",
Long: "Mints a bootstrap token for the node role and renders " +
- "mesh://enroll?server=<url>&token=<token> as a QR code for the SAM mobile app. " +
+ "mesh://enroll?server=<url>&token=<token> as a QR code for the Agent Mesh mobile app. " +
"Single use by default; --max-usages lets one code, projected in a room, enroll " +
"many devices until it is exhausted, expires or is revoked. " +
"The embedded URL defaults to --server; pass --enroll-url when devices reach " +
diff --git a/cmd/sam-one/admin_test.go b/cmd/agentmesh-one/admin_test.go
similarity index 90%
rename from cmd/sam-one/admin_test.go
rename to cmd/agentmesh-one/admin_test.go
index ac70a94c..f077b6f5 100644
--- a/cmd/sam-one/admin_test.go
+++ b/cmd/agentmesh-one/admin_test.go
@@ -59,7 +59,7 @@ func newFakeAdminAPI(t *testing.T) *httptest.Server {
w.WriteHeader(http.StatusCreated)
out, _ := protojson.MarshalOptions{UseProtoNames: true}.Marshal(&api.BootstrapTokenCreateResponse{
Id: "abcdef123456",
- Token: "sam-bt-fresh",
+ Token: "mesh-bt-fresh",
Role: req.GetRole(),
ExpireTime: timestamppb.New(time.Date(2026, 12, 31, 0, 0, 0, 0, time.UTC)),
})
@@ -115,7 +115,7 @@ func TestAdminClient(t *testing.T) {
if err != nil {
t.Fatalf("createToken failed: %v", err)
}
- if created.GetToken() != "sam-bt-fresh" || created.GetRole() != api.RoleNode {
+ if created.GetToken() != "mesh-bt-fresh" || created.GetRole() != api.RoleNode {
t.Errorf("unexpected created token: %+v", created)
}
@@ -148,25 +148,25 @@ func TestAdminClient(t *testing.T) {
func TestResolveAdminToken(t *testing.T) {
dir := t.TempDir()
- if err := os.WriteFile(filepath.Join(dir, "admin-token"), []byte("sam_adm_file\n"), 0o600); err != nil {
+ if err := os.WriteFile(filepath.Join(dir, "admin-token"), []byte("mesh_adm_file\n"), 0o600); err != nil {
t.Fatalf("failed to write token file: %v", err)
}
explicit := filepath.Join(t.TempDir(), "my-admin-token")
- if err := os.WriteFile(explicit, []byte(" sam_adm_explicit\n"), 0o600); err != nil {
+ if err := os.WriteFile(explicit, []byte(" mesh_adm_explicit\n"), 0o600); err != nil {
t.Fatalf("failed to write explicit token file: %v", err)
}
- t.Setenv("SAM_ADMIN_TOKEN", "")
- if got, err := resolveAdminToken("", dir); err != nil || got != "sam_adm_file" {
- t.Errorf("data-dir fallback = %q, %v; want sam_adm_file", got, err)
+ t.Setenv("AGENTMESH_ADMIN_TOKEN", "")
+ if got, err := resolveAdminToken("", dir); err != nil || got != "mesh_adm_file" {
+ t.Errorf("data-dir fallback = %q, %v; want mesh_adm_file", got, err)
}
- t.Setenv("SAM_ADMIN_TOKEN", "sam_adm_env")
- if got, err := resolveAdminToken("", dir); err != nil || got != "sam_adm_env" {
- t.Errorf("env precedence = %q, %v; want sam_adm_env", got, err)
+ t.Setenv("AGENTMESH_ADMIN_TOKEN", "mesh_adm_env")
+ if got, err := resolveAdminToken("", dir); err != nil || got != "mesh_adm_env" {
+ t.Errorf("env precedence = %q, %v; want mesh_adm_env", got, err)
}
- if got, err := resolveAdminToken(explicit, dir); err != nil || got != "sam_adm_explicit" {
- t.Errorf("--admin-token-path precedence = %q, %v; want sam_adm_explicit (trimmed)", got, err)
+ if got, err := resolveAdminToken(explicit, dir); err != nil || got != "mesh_adm_explicit" {
+ t.Errorf("--admin-token-path precedence = %q, %v; want mesh_adm_explicit (trimmed)", got, err)
}
// A path that is set but unusable must not fall through to env or data-dir.
@@ -179,7 +179,7 @@ func TestResolveAdminToken(t *testing.T) {
t.Error("expected an error for an empty --admin-token-path")
}
- t.Setenv("SAM_ADMIN_TOKEN", "")
+ t.Setenv("AGENTMESH_ADMIN_TOKEN", "")
if _, err := resolveAdminToken("", t.TempDir()); err == nil {
t.Error("expected an error when no admin token source exists")
}
diff --git a/cmd/sam-one/main.go b/cmd/agentmesh-one/main.go
similarity index 88%
rename from cmd/sam-one/main.go
rename to cmd/agentmesh-one/main.go
index f4408f85..a3846d3c 100644
--- a/cmd/sam-one/main.go
+++ b/cmd/agentmesh-one/main.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// sam-one is the all-in-one SAM distribution: control plane, libp2p router
+// agentmesh-one is the all-in-one Agent Mesh distribution: control plane, libp2p router
// and storage in a single binary serving a single public port.
package main
@@ -37,7 +37,7 @@ import (
"github.com/spf13/cobra"
)
-var logger = golog.Logger("sam-one")
+var logger = golog.Logger("agentmesh-one")
func main() {
var (
@@ -70,7 +70,7 @@ func main() {
)
rootCmd := &cobra.Command{
- Use: "sam-one",
+ Use: "agentmesh-one",
Short: "Agent Mesh - all-in-one standalone server",
Version: version.String(),
Run: func(cmd *cobra.Command, args []string) {
@@ -84,7 +84,7 @@ func main() {
}
}
golog.SetAllLoggers(lvl)
- // Same as sam-node: go-libp2p-kad-dht logs routine small-mesh
+ // Same as agentmesh-node: go-libp2p-kad-dht logs routine small-mesh
// conditions (empty routing table, no closer peers) at INFO/ERROR,
// the latter through a malformed zap call inside the library.
// Only an explicit debug level keeps them.
@@ -96,25 +96,25 @@ func main() {
// Secrets arrive through a file or the environment, never as a
// flag value that would sit in `ps` and shell history. Env keeps
// single-container platforms (Cloud Run) configurable.
- if resolvedDSN, err := secretFromPathOrEnv(dbDSNPath, "SAM_DB_DSN"); err != nil {
+ if resolvedDSN, err := secretFromPathOrEnv(dbDSNPath, "AGENTMESH_DB_DSN"); err != nil {
logger.Fatalf("Invalid --db-dsn-path: %v", err)
} else if resolvedDSN != "" {
dbDSN = resolvedDSN
}
- joinToken, err := secretFromPathOrEnv(joinTokenPath, "SAM_TOKEN")
+ joinToken, err := secretFromPathOrEnv(joinTokenPath, "AGENTMESH_TOKEN")
if err != nil {
logger.Fatalf("Invalid --token-path: %v", err)
}
- adminToken, err := secretFromPathOrEnv(adminTokenPath, "SAM_ADMIN_TOKEN")
+ adminToken, err := secretFromPathOrEnv(adminTokenPath, "AGENTMESH_ADMIN_TOKEN")
if err != nil {
logger.Fatalf("Invalid --admin-token-path: %v", err)
}
- tunnelToken, err := secretFromPathOrEnv(tunnelTokenPath, "SAM_TUNNEL_TOKEN")
+ tunnelToken, err := secretFromPathOrEnv(tunnelTokenPath, "AGENTMESH_TUNNEL_TOKEN")
if err != nil {
logger.Fatalf("Invalid --tunnel-token-path: %v", err)
}
if externalURL == "" {
- externalURL = os.Getenv("SAM_EXTERNAL_URL")
+ externalURL = os.Getenv("AGENTMESH_EXTERNAL_URL")
}
var auds []string
@@ -130,10 +130,10 @@ func main() {
var tun tunnel.Tunnel
if tunnelProvider != "" {
if tunnelToken == "" && externalURL != "" {
- logger.Fatal("--tunnel and --external-url are mutually exclusive unless --tunnel-token-path / SAM_TUNNEL_TOKEN is set")
+ logger.Fatal("--tunnel and --external-url are mutually exclusive unless --tunnel-token-path / AGENTMESH_TUNNEL_TOKEN is set")
}
if tunnelToken != "" && externalURL == "" {
- logger.Fatal("--tunnel-token-path / SAM_TUNNEL_TOKEN requires --external-url (the public https:// hostname routed to the tunnel)")
+ logger.Fatal("--tunnel-token-path / AGENTMESH_TUNNEL_TOKEN requires --external-url (the public https:// hostname routed to the tunnel)")
}
if port == 0 {
var err error
@@ -215,15 +215,15 @@ func main() {
rootCmd.Flags().StringVar(&bindAddress, "bind-address", "0.0.0.0", "Host/IP to bind the single HTTP/WebSocket listener")
rootCmd.Flags().IntVar(&port, "port", 0, "TCP port of the single listener; 0 picks a free port, published in the startup banner")
- rootCmd.Flags().StringVar(&externalURL, "external-url", "", "Public URL reachable by nodes (or env SAM_EXTERNAL_URL)")
+ rootCmd.Flags().StringVar(&externalURL, "external-url", "", "Public URL reachable by nodes (or env AGENTMESH_EXTERNAL_URL)")
rootCmd.Flags().StringSliceVar(&p2pListen, "p2p-listen", nil, "Optional extra native libp2p listen multiaddrs")
rootCmd.Flags().StringVar(&dataDir, "data-dir", ".", "Directory for the database, router key and generated tokens")
rootCmd.Flags().StringVar(&dbDriver, "db-driver", "sqlite", "Database driver (sqlite or postgres)")
- rootCmd.Flags().StringVar(&dbDSN, "db-dsn", "", "Database DSN (default <data-dir>/sam.db for sqlite; avoid for postgres: embeds a password; prefer --db-dsn-path or SAM_DB_DSN)")
- rootCmd.Flags().StringVar(&dbDSNPath, "db-dsn-path", "", "Path to file containing the database DSN/Connection URL (overrides --db-dsn; or env SAM_DB_DSN)")
- rootCmd.Flags().StringVar(&joinTokenPath, "token-path", "", "File containing the cluster join token (or env SAM_TOKEN; auto-generated and persisted in --data-dir if neither is set)")
+ rootCmd.Flags().StringVar(&dbDSN, "db-dsn", "", "Database DSN (default <data-dir>/agentmesh.db for sqlite; avoid for postgres: embeds a password; prefer --db-dsn-path or AGENTMESH_DB_DSN)")
+ rootCmd.Flags().StringVar(&dbDSNPath, "db-dsn-path", "", "Path to file containing the database DSN/Connection URL (overrides --db-dsn; or env AGENTMESH_DB_DSN)")
+ rootCmd.Flags().StringVar(&joinTokenPath, "token-path", "", "File containing the cluster join token (or env AGENTMESH_TOKEN; auto-generated and persisted in --data-dir if neither is set)")
rootCmd.Flags().BoolVar(&noJoinToken, "no-join-token", false, "Run without a standing join token; devices enroll only with minted bootstrap tokens (token create/qr) or OIDC")
- rootCmd.Flags().StringVar(&adminTokenPath, "admin-token-path", "", "File containing the admin API bearer token (or env SAM_ADMIN_TOKEN; auto-generated and persisted in --data-dir if neither is set)")
+ rootCmd.Flags().StringVar(&adminTokenPath, "admin-token-path", "", "File containing the admin API bearer token (or env AGENTMESH_ADMIN_TOKEN; auto-generated and persisted in --data-dir if neither is set)")
rootCmd.Flags().StringVar(&policyFile, "policy-file", "", "Path to a protojson PolicyConfig seeding the mesh policy on first boot only")
rootCmd.Flags().StringVar(&oidcIssuer, "issuer", "", "Optional external OIDC issuer URL (comma-separated)")
rootCmd.Flags().StringVar(&workloadIssuer, "workload-issuer", "", "Optional workload OIDC issuer URL or '<issuer>=<email-suffix>' (comma-separated); accepted at /register, /refresh and /token/exchange, refused at /user/* and /oauth/authorize")
@@ -231,7 +231,7 @@ func main() {
rootCmd.Flags().StringVar(&allowedAudiencesFlag, "allowed-audiences", api.DefaultAudience, "Comma-separated list of allowed OIDC audiences")
rootCmd.Flags().StringVar(&logLevel, "log-level", "", "Log level: debug, info, warn, error")
rootCmd.Flags().StringVar(&tunnelProvider, "tunnel", "", "Publish the listener on a public URL through a tunnel provider ("+strings.Join(tunnel.Names(), ", ")+"); sets the external URL")
- rootCmd.Flags().StringVar(&tunnelTokenPath, "tunnel-token-path", "", "File containing the tunnel provider token (or env SAM_TUNNEL_TOKEN); use with --tunnel <provider> --external-url https://...")
+ rootCmd.Flags().StringVar(&tunnelTokenPath, "tunnel-token-path", "", "File containing the tunnel provider token (or env AGENTMESH_TUNNEL_TOKEN); use with --tunnel <provider> --external-url https://...")
rootCmd.Flags().BoolVar(&tunnelInstall, "tunnel-install", false, "Download the pinned connector binary (cloudflared "+tunnel.CloudflaredVersion+", digest-verified) into <data-dir>/bin without asking; implies accepting its license")
rootCmd.Flags().StringVar(&cloudflaredPath, "cloudflared-path", "", "Explicit cloudflared executable for --tunnel cloudflare (default: PATH, then <data-dir>/bin)")
rootCmd.Flags().BoolVar(&enrollQR, "enroll-qr", stdoutIsTerminal(), "Print a device enrollment QR code at startup (default: when stdout is a terminal)")
@@ -270,7 +270,7 @@ func main() {
// bannerSecrets records which credentials the operator supplied (flag or
// env). Those are theirs already and stdout is often a log pipeline, so the
-// banner names the source instead of echoing the value; tokens sam-one
+// banner names the source instead of echoing the value; tokens agentmesh-one
// generated itself are shown, since this is where the operator learns them.
type bannerSecrets struct {
adminSupplied bool
@@ -281,10 +281,10 @@ func printBanner(srv *standalone.Server, tun tunnel.Tunnel, secrets bannerSecret
base := srv.PublicURL()
adminShown := srv.AdminToken()
if secrets.adminSupplied {
- adminShown = "(supplied via --admin-token-path / SAM_ADMIN_TOKEN)"
+ adminShown = "(supplied via --admin-token-path / AGENTMESH_ADMIN_TOKEN)"
}
fmt.Println("══════════════════════════════════════════════════════════════════")
- fmt.Println("SAM standalone mesh is ready!")
+ fmt.Println("Agent Mesh standalone mesh is ready!")
fmt.Println()
fmt.Printf("API URL: %s\n", base)
if tun != nil {
@@ -295,25 +295,25 @@ func printBanner(srv *standalone.Server, tun tunnel.Tunnel, secrets bannerSecret
fmt.Printf("Admin Token: %s\n", adminShown)
switch {
case srv.JoinToken() == "":
- fmt.Println("Join Token: disabled (--no-join-token); enroll devices with `sam-one token qr` / `token create` or OIDC")
+ fmt.Println("Join Token: disabled (--no-join-token); enroll devices with `agentmesh-one token qr` / `token create` or OIDC")
case secrets.joinSupplied:
- fmt.Println("Join Token: (supplied via --token-path / SAM_TOKEN)")
+ fmt.Println("Join Token: (supplied via --token-path / AGENTMESH_TOKEN)")
fmt.Println()
fmt.Println("To enroll a node:")
- fmt.Printf(" sam-node join %s --bootstrap-token-path <file with the join token>\n", base)
+ fmt.Printf(" agentmesh-node join %s --bootstrap-token-path <file with the join token>\n", base)
default:
fmt.Printf("Join Token: %s\n", srv.JoinToken())
fmt.Println()
fmt.Println("To enroll a node:")
// The token is persisted next to the database; a file beats a value
- // in the shell history, like sam-node's own help recommends.
- fmt.Printf(" sam-node join %s --bootstrap-token-path %s\n", base, srv.JoinTokenPath())
+ // in the shell history, like agentmesh-node's own help recommends.
+ fmt.Printf(" agentmesh-node join %s --bootstrap-token-path %s\n", base, srv.JoinTokenPath())
}
fmt.Println("══════════════════════════════════════════════════════════════════")
}
// printBootEnrollQR mints the per-boot device token and draws it under the
-// banner; `sam-one token qr` produces further ones on demand. Without a
+// banner; `agentmesh-one token qr` produces further ones on demand. Without a
// public https URL there is nothing a device could trust, so no token is
// spent and a hint is printed instead.
func printBootEnrollQR(ctx context.Context, srv *standalone.Server, maxUsages int) error {
@@ -371,7 +371,7 @@ func openTunnel(ctx context.Context, o tunnelOptions) (tunnel.Tunnel, error) {
// opt in explicitly rather than fetch binaries on its own).
func installConsent(preApproved bool) func(version, url string) bool {
return func(version, url string) bool {
- fmt.Printf("cloudflared is not installed. sam-one can download release %s (SHA-256 verified) from\n %s\ninto its data directory. Installing cloudflared means accepting Cloudflare's license:\n %s\n",
+ fmt.Printf("cloudflared is not installed. agentmesh-one can download release %s (SHA-256 verified) from\n %s\ninto its data directory. Installing cloudflared means accepting Cloudflare's license:\n %s\n",
version, url, tunnel.CloudflaredLicenseURL)
if preApproved {
fmt.Println("Proceeding (--tunnel-install).")
diff --git a/cmd/sam-one/qr.go b/cmd/agentmesh-one/qr.go
similarity index 85%
rename from cmd/sam-one/qr.go
rename to cmd/agentmesh-one/qr.go
index 16eb68fa..5c399c1e 100644
--- a/cmd/sam-one/qr.go
+++ b/cmd/agentmesh-one/qr.go
@@ -27,9 +27,9 @@ import (
)
// printEnrollQR writes the device onboarding block: the URL the device will
-// enroll against, the sam:// payload for copy-paste, and the same payload
-// as a half-block QR code that the SAM mobile app (or a stock camera app,
-// via the sam:// link) scans. The server must pass the control-plane
+// enroll against, the mesh:// payload for copy-paste, and the same payload
+// as a half-block QR code that the Agent Mesh mobile app (or a stock camera app,
+// via the mesh:// link) scans. The server must pass the control-plane
// transport rule a device enforces, or the code would scan and then fail.
// maxUsages is how many devices the code admits; the token id lets the
// operator revoke a shared code before it is exhausted.
@@ -50,7 +50,7 @@ func printEnrollQR(w io.Writer, server, token string, ttl time.Duration, maxUsag
if maxUsages > 1 {
budget = fmt.Sprintf("up to %d devices", maxUsages)
}
- _, _ = fmt.Fprintf(w, "Scan with the SAM app to enroll a device into %s\n", host)
+ _, _ = fmt.Fprintf(w, "Scan with the Agent Mesh app to enroll a device into %s\n", host)
_, _ = fmt.Fprintf(w, "(%s, valid for %s):\n\n", budget, ttl.Round(time.Minute))
// inverseColor=false draws light modules as blocks, so the code reads
// black-on-white on the dark terminals scanners cope with best.
@@ -58,7 +58,7 @@ func printEnrollQR(w io.Writer, server, token string, ttl time.Duration, maxUsag
_, _ = fmt.Fprintf(w, "\n%s\n", uri)
// Same derivation as the control plane's token id, so `token list` and
// `token revoke` line up with what is printed here.
- _, _ = fmt.Fprintf(w, "Token ID: %s (revoke early with: sam-one token revoke %[1]s)\n", tokenID(token)[:12])
+ _, _ = fmt.Fprintf(w, "Token ID: %s (revoke early with: agentmesh-one token revoke %[1]s)\n", tokenID(token)[:12])
return nil
}
diff --git a/cmd/sam-router/main.go b/cmd/agentmesh-router/main.go
similarity index 98%
rename from cmd/sam-router/main.go
rename to cmd/agentmesh-router/main.go
index 09796f44..73687476 100644
--- a/cmd/sam-router/main.go
+++ b/cmd/agentmesh-router/main.go
@@ -55,11 +55,11 @@ var (
shutdownLeaseTTL time.Duration
)
-var logger = golog.Logger("sam-router-cli")
+var logger = golog.Logger("agentmesh-router-cli")
func main() {
rootCmd := &cobra.Command{
- Use: "sam-router",
+ Use: "agentmesh-router",
Short: "Agent Mesh - libp2p Router Node",
Version: version.String(),
Run: func(cmd *cobra.Command, args []string) {
diff --git a/cmd/chaos-agent/README.md b/cmd/chaos-agent/README.md
index 225abb39..6a32de1e 100644
--- a/cmd/chaos-agent/README.md
+++ b/cmd/chaos-agent/README.md
@@ -1,14 +1,14 @@
-# SAM Mesh Chaos Agent
+# Agent Mesh Chaos Agent
This directory contains a complete, production-grade Python AI Agent built with **LangChain** and the **MCP Python SDK**.
-This provides a realistic workload for the SAM mesh scale testing experiment. Rather than a synthetic benchmark or a hardcoded Go loop, this is a true autonomous agent capable of reasoning, exploring tools, and adversarial "Chaos Monkey" testing.
+This provides a realistic workload for the Agent Mesh scale testing experiment. Rather than a synthetic benchmark or a hardcoded Go loop, this is a true autonomous agent capable of reasoning, exploring tools, and adversarial "Chaos Monkey" testing.
## How it works
-1. It connects to the `sam-node` MCP endpoint via SSE (or `sam-box` proxy in the microVM).
+1. It connects to the `agentmesh-node` MCP endpoint via SSE (or `agentmesh-box` proxy in the microVM).
2. It dynamically converts all discovered MCP tools into LangChain `Tool` objects with JSON schemas.
-3. It initializes a LangChain `create_agent` tool-calling agent using the SAM mesh's OpenAI-compatible inference endpoint (`/v1/chat/completions`).
+3. It initializes a LangChain `create_agent` tool-calling agent using the Agent Mesh's OpenAI-compatible inference endpoint (`/v1/chat/completions`).
4. It is given an adversarial prompt to explore all tools, fuzz them with extreme inputs, and find bugs.
5. The LangChain framework automatically handles the multi-turn reasoning and tool-calling loop until the agent achieves its goal or hits the max iteration limit.
@@ -20,10 +20,10 @@ First, ensure you have Python installed, then install the dependencies:
pip install -r requirements.txt
```
-Run the agent against a local `sam-node`:
+Run the agent against a local `agentmesh-node`:
```bash
-python agent.py --auth "Bearer <your-sam-node-token>"
+python agent.py --auth "Bearer <your-agentmesh-node-token>"
```
### Customizing the Chaos
diff --git a/cmd/chaos-agent/agent.py b/cmd/chaos-agent/agent.py
index c7a63f04..51d94509 100644
--- a/cmd/chaos-agent/agent.py
+++ b/cmd/chaos-agent/agent.py
@@ -68,9 +68,9 @@ async def pick_model(inference_url, requested):
async def main():
parser = argparse.ArgumentParser(description="Chaos Monkey Agent via LangChain & MCP")
parser.add_argument("task", nargs="?", default="", help="Instruction to run; same positional interface as the agent harness, so one sandbox init serves both")
- parser.add_argument("--mcp-url", default=os.environ.get("SAM_MCP_URL", "http://mesh.sam.alt/mcp"), help="MCP endpoint; a mesh name the boundary resolves")
- parser.add_argument("--inference-url", default=os.environ.get("SAM_INFERENCE_URL", "http://mesh.sam.alt/v1"), help="OpenAI-compatible endpoint")
- parser.add_argument("--model", default=os.environ.get("SAM_MODEL", ""), help="Model to ask for; default is whatever the mesh offers first")
+ parser.add_argument("--mcp-url", default=os.environ.get("AGENTMESH_MCP_URL", "http://mesh.alt/mcp"), help="MCP endpoint; a mesh name the boundary resolves")
+ parser.add_argument("--inference-url", default=os.environ.get("AGENTMESH_INFERENCE_URL", "http://mesh.alt/v1"), help="OpenAI-compatible endpoint")
+ parser.add_argument("--model", default=os.environ.get("AGENTMESH_MODEL", ""), help="Model to ask for; default is whatever the mesh offers first")
parser.add_argument("--rounds", type=int, default=int(os.environ.get("CHAOS_ROUNDS", "0")), help="Rounds to run; 0 keeps going until stopped")
parser.add_argument("--sleep", type=float, default=float(os.environ.get("CHAOS_SLEEP", "30")), help="Seconds between rounds, jittered")
parser.add_argument("--auth", default="", help="Only needed outside a sandbox; inside one the boundary authenticates")
diff --git a/cmd/mcp-client/main.go b/cmd/mcp-client/main.go
index a5204519..1e3b5386 100644
--- a/cmd/mcp-client/main.go
+++ b/cmd/mcp-client/main.go
@@ -42,8 +42,8 @@ func main() {
timeoutArgs := flag.Int("timeout", 10, "Timeout in seconds")
listTools := flag.Bool("list", false, "List available tools and exit")
streamOpt := flag.Bool("stream", false, "Enable streaming mode for service discovery HTTP API")
- tokenOpt := flag.String("token", "", "Authorization Bearer token for protected sidecar endpoints (deprecated: prefer -token-path or SAM_API_TOKEN)")
- tokenPathOpt := flag.String("token-path", "", "Path to file containing the Authorization Bearer token (or env SAM_API_TOKEN)")
+ tokenOpt := flag.String("token", "", "Authorization Bearer token for protected sidecar endpoints (deprecated: prefer -token-path or AGENTMESH_API_TOKEN)")
+ tokenPathOpt := flag.String("token-path", "", "Path to file containing the Authorization Bearer token (or env AGENTMESH_API_TOKEN)")
showVersion := flag.Bool("version", false, "Print the version and exit")
flag.Parse()
if *showVersion {
@@ -59,7 +59,7 @@ func main() {
}
resolvedToken = strings.TrimSpace(string(data))
} else if resolvedToken == "" {
- resolvedToken = strings.TrimSpace(os.Getenv("SAM_API_TOKEN"))
+ resolvedToken = strings.TrimSpace(os.Getenv("AGENTMESH_API_TOKEN"))
}
if *serverURL == "" {
diff --git a/hack/gen-sdk-datalog/main.go b/hack/gen-sdk-datalog/main.go
index 86197b72..8ee03e7f 100644
--- a/hack/gen-sdk-datalog/main.go
+++ b/hack/gen-sdk-datalog/main.go
@@ -145,12 +145,12 @@ func deterministicPeerID(seed string) peer.ID {
func strPtr(s string) *string { return &s }
func buildConformanceSuite() tarConformanceSuite {
- cpSeed := sha256.Sum256([]byte("sam-tar-conformance-cp-root-key-v1"))
+ cpSeed := sha256.Sum256([]byte("agentmesh-tar-conformance-cp-root-key-v1"))
cpPriv := ed25519.NewKeyFromSeed(cpSeed[:])
cpPub := cpPriv.Public().(ed25519.PublicKey)
- callerPeer := deterministicPeerID("sam-tar-conformance-caller-peer-v1")
- providerPeer := deterministicPeerID("sam-tar-conformance-provider-peer-v1")
+ callerPeer := deterministicPeerID("agentmesh-tar-conformance-caller-peer-v1")
+ providerPeer := deterministicPeerID("agentmesh-tar-conformance-provider-peer-v1")
evalTime := time.Date(2026, 10, 3, 12, 0, 0, 0, time.UTC)
authExp := time.Date(2035, 1, 1, 0, 0, 0, 0, time.UTC)
diff --git a/hack/verify-secrets.sh b/hack/verify-secrets.sh
index bde88a3e..9931269c 100755
--- a/hack/verify-secrets.sh
+++ b/hack/verify-secrets.sh
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Refuses tracked files that carry a SAM-shaped credential. Generic secret
+# Refuses tracked files that carry a Agent Mesh-shaped credential. Generic secret
# scanners do not know these shapes: a node API token is 32 random bytes hex
# encoded behind "Bearer", and a private key block anywhere outside a test
# fixture is a key somebody will trust (a demo recording once carried a real
diff --git a/internal/bench/bench.go b/internal/bench/bench.go
index 83c34e09..9febcfc0 100644
--- a/internal/bench/bench.go
+++ b/internal/bench/bench.go
@@ -58,7 +58,7 @@ type Options struct {
// against it.
UnixTarget string
- // Target is the URL to request, e.g. http://mesh.sam.alt/v1/models.
+ // Target is the URL to request, e.g. http://mesh.alt/v1/models.
Target string
// Method and Body are the request to issue. An empty Method means GET.
diff --git a/internal/bench/join.go b/internal/bench/join.go
index a28ab6cb..91eceb64 100644
--- a/internal/bench/join.go
+++ b/internal/bench/join.go
@@ -43,14 +43,14 @@ import (
// leaves a few behind is reported as a few left behind rather than as a
// slightly worse mean.
//
-// The members are real sam-node processes, one per member, started from this
+// The members are real agentmesh-node processes, one per member, started from this
// process so that every timestamp comes from one clock. They all share this
// host's source address, which is what a classroom, an office or a CI runner
// pool looks like from the router.
// JoinOptions describe one fleet to take through the join journey.
type JoinOptions struct {
- // NodeBin is the sam-node binary; one process of it is started per member.
+ // NodeBin is the agentmesh-node binary; one process of it is started per member.
NodeBin string
// Count is how many members to start.
@@ -219,7 +219,7 @@ const (
// mcpInitialize is the first request of an MCP session, enough for the
// server to name itself.
-const mcpInitialize = `{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"sam-bench","version":"0"}}}`
+const mcpInitialize = `{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"agentmesh-bench","version":"0"}}}`
type member struct {
index int
@@ -329,7 +329,7 @@ func RunJoin(ctx context.Context, opts JoinOptions) (*JoinReport, error) {
func (o *JoinOptions) validate() error {
switch {
case o.NodeBin == "":
- return errors.New("bench: no sam-node binary")
+ return errors.New("bench: no agentmesh-node binary")
case o.Count <= 0:
return errors.New("bench: no members to start")
case o.Dir == "":
@@ -389,7 +389,7 @@ func newMember(opts JoinOptions, i int) *member {
}
}
-// start launches the member's sam-node. Its p2p listeners take ephemeral
+// start launches the member's agentmesh-node. Its p2p listeners take ephemeral
// ports: the fixed defaults would collide across members, and a member is
// reached through the router's relay regardless of where it listens.
func (m *member) start(opts JoinOptions) error {
@@ -403,7 +403,7 @@ func (m *member) start(opts JoinOptions) error {
args := []string{
"run",
"--control-plane", opts.ControlPlane,
- "--config", filepath.Join(m.dir, "sam-node.yaml"),
+ "--config", filepath.Join(m.dir, "agentmesh-node.yaml"),
"--data-dir", m.dir,
"--socket-path", m.socket,
"--bind-addr=",
diff --git a/internal/bench/join_test.go b/internal/bench/join_test.go
index 00b85b64..173b1a64 100644
--- a/internal/bench/join_test.go
+++ b/internal/bench/join_test.go
@@ -35,7 +35,7 @@ import (
// behaviour set through the environment the children inherit.
func TestMain(m *testing.M) {
- if os.Getenv("SAM_BENCH_FAKE_NODE") == "1" {
+ if os.Getenv("AGENTMESH_BENCH_FAKE_NODE") == "1" {
os.Exit(fakeNode(os.Args[1:]))
}
os.Exit(m.Run())
@@ -121,7 +121,7 @@ func fakeNode(args []string) int {
func fakeFleet(t *testing.T, count int, env map[string]string) JoinOptions {
t.Helper()
- t.Setenv("SAM_BENCH_FAKE_NODE", "1")
+ t.Setenv("AGENTMESH_BENCH_FAKE_NODE", "1")
if env == nil {
env = map[string]string{}
}
@@ -132,12 +132,12 @@ func fakeFleet(t *testing.T, count int, env map[string]string) JoinOptions {
t.Setenv(k, env[k])
}
token := filepath.Join(t.TempDir(), "token")
- if err := os.WriteFile(token, []byte("sam-bt-test\n"), 0o600); err != nil {
+ if err := os.WriteFile(token, []byte("mesh-bt-test\n"), 0o600); err != nil {
t.Fatal(err)
}
// t.TempDir carries the test's name, which for a subtest is long enough
// to push a member's socket past the Unix path limit.
- dir, err := os.MkdirTemp("", "sam-join-")
+ dir, err := os.MkdirTemp("", "agentmesh-join-")
if err != nil {
t.Fatal(err)
}
diff --git a/internal/bench/scrape_test.go b/internal/bench/scrape_test.go
index b3843117..735fe5bd 100644
--- a/internal/bench/scrape_test.go
+++ b/internal/bench/scrape_test.go
@@ -26,12 +26,12 @@ import (
func TestParseExpositionReadsLabelledSamples(t *testing.T) {
// The numbers a report quotes come out of this parser, so it has to be
// right about the cases the real endpoints actually emit.
- const exposition = `# HELP sam_box_flows_total Flows a sandbox asked to open
-# TYPE sam_box_flows_total counter
-sam_box_flows_total{route="mesh-service",outcome="allowed"} 42
-sam_box_flows_total{route="unresolved",outcome="denied"} 7
+ const exposition = `# HELP agentmesh_box_flows_total Flows a sandbox asked to open
+# TYPE agentmesh_box_flows_total counter
+agentmesh_box_flows_total{route="mesh-service",outcome="allowed"} 42
+agentmesh_box_flows_total{route="unresolved",outcome="denied"} 7
process_resident_memory_bytes 1.8874368e+07
-sam_box_flow_setup_seconds_bucket{route="mesh-service",le="0.001"} 12
+agentmesh_box_flow_setup_seconds_bucket{route="mesh-service",le="0.001"} 12
`
series, err := parseExposition(strings.NewReader(exposition))
@@ -40,16 +40,16 @@ sam_box_flow_setup_seconds_bucket{route="mesh-service",le="0.001"} 12
}
snap := &Snapshot{Series: series}
- if got, ok := snap.Value("sam_box_flows_total", map[string]string{"outcome": "denied"}); !ok || got != 7 {
+ if got, ok := snap.Value("agentmesh_box_flows_total", map[string]string{"outcome": "denied"}); !ok || got != 7 {
t.Errorf("denied flows = %v (found %v), want 7", got, ok)
}
- if got := snap.Sum("sam_box_flows_total"); got != 49 {
+ if got := snap.Sum("agentmesh_box_flows_total"); got != 49 {
t.Errorf("total flows = %v, want 49", got)
}
if got, ok := snap.Value("process_resident_memory_bytes", nil); !ok || got != 18874368 {
t.Errorf("rss = %v (found %v), want 18874368", got, ok)
}
- if got, ok := snap.Value("sam_box_flow_setup_seconds_bucket", map[string]string{"le": "0.001"}); !ok || got != 12 {
+ if got, ok := snap.Value("agentmesh_box_flow_setup_seconds_bucket", map[string]string{"le": "0.001"}); !ok || got != 12 {
t.Errorf("bucket = %v (found %v), want 12", got, ok)
}
}
@@ -109,7 +109,7 @@ func TestParseExpositionNonFinite(t *testing.T) {
func TestScrapeReadsALiveEndpoint(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
- _, _ = w.Write([]byte("sam_node_requests_in_flight 3\n"))
+ _, _ = w.Write([]byte("agentmesh_node_requests_in_flight 3\n"))
}))
defer server.Close()
@@ -117,7 +117,7 @@ func TestScrapeReadsALiveEndpoint(t *testing.T) {
if err != nil {
t.Fatalf("Scrape: %v", err)
}
- if got, ok := snap.Value("sam_node_requests_in_flight", nil); !ok || got != 3 {
+ if got, ok := snap.Value("agentmesh_node_requests_in_flight", nil); !ok || got != 3 {
t.Errorf("in flight = %v (found %v), want 3", got, ok)
}
}
diff --git a/internal/bench/sts.go b/internal/bench/sts.go
index e8f593e9..d5c71ebf 100644
--- a/internal/bench/sts.go
+++ b/internal/bench/sts.go
@@ -69,7 +69,7 @@ type STSPhaseReport struct {
}
// STSReport summarizes all STS benchmark phases (uncached Control Plane
-// endpoints and cached SamNode paths under 5-minute JWT-SVID and 1-hour
+// endpoints and cached AgentMeshNode paths under 5-minute JWT-SVID and 1-hour
// projected token rotation schedules).
type STSReport struct {
Concurrency int `json:"concurrency"`
@@ -84,7 +84,7 @@ type STSReport struct {
}
// RunSTS executes the STS benchmark suite against an in-process Control Plane
-// and enrolled SamNode, measuring uncached mint throughput/latency as well as
+// and enrolled AgentMeshNode, measuring uncached mint throughput/latency as well as
// node-cached throughput and hit rates for 5-minute JWT-SVIDs and 1-hour
// Kubernetes projected tokens.
func RunSTS(ctx context.Context, opts STSOptions) (*STSReport, error) {
@@ -149,12 +149,12 @@ func RunSTS(ctx context.Context, opts STSOptions) (*STSReport, error) {
_, err := cpClient.MintSTSToken(ctx, env.nodeBiscuit, &api.STSTokenRequest{
Biscuit: taskBiscuit,
Destination: "bigquery.googleapis.com",
- Audience: "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/sam/providers/cp",
+ Audience: "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/agentmesh/providers/cp",
})
return err
})
- // Phase 3: Cached SamNode.ExchangeSubjectJWT with 5-minute SPIFFE JWT-SVID rotation.
+ // Phase 3: Cached AgentMeshNode.ExchangeSubjectJWT with 5-minute SPIFFE JWT-SVID rotation.
// A workload issuing RequestsPerMinute requests/min makes (5 * RequestsPerMinute)
// requests per 5-minute SVID lifetime before its token rotates.
reqsPerSVID := 5 * opts.RequestsPerMinute
@@ -170,7 +170,7 @@ func RunSTS(ctx context.Context, opts STSOptions) (*STSReport, error) {
return err
})
- // Phase 4: Cached SamNode.ExchangeSubjectJWT with 1-hour Kubernetes projected token rotation.
+ // Phase 4: Cached AgentMeshNode.ExchangeSubjectJWT with 1-hour Kubernetes projected token rotation.
// A workload issuing RequestsPerMinute requests/min makes (60 * RequestsPerMinute)
// requests per 1-hour projected token lifetime before its token rotates.
reqsPerK8s := 60 * opts.RequestsPerMinute
@@ -186,7 +186,7 @@ func RunSTS(ctx context.Context, opts STSOptions) (*STSReport, error) {
return err
})
- // Phase 5: Cached SamNode.MintBorderJWT across active task Biscuits (15m border JWT lifetime).
+ // Phase 5: Cached AgentMeshNode.MintBorderJWT across active task Biscuits (15m border JWT lifetime).
reqsPerTask := 15 * opts.RequestsPerMinute
taskBiscuits, err := env.precomputeTaskBiscuits(opts.Workloads, opts.Requests, reqsPerTask)
if err != nil {
@@ -200,7 +200,7 @@ func RunSTS(ctx context.Context, opts STSOptions) (*STSReport, error) {
ctx,
tb,
"bigquery.googleapis.com",
- "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/sam/providers/cp",
+ "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/agentmesh/providers/cp",
)
return err
})
@@ -292,13 +292,13 @@ type stsBenchEnv struct {
nodePriv crypto.PrivKey
nodePeerID peer.ID
nodeBiscuit []byte
- samNode *node.SamNode
+ samNode *node.AgentMeshNode
exchangeCalls atomic.Int64
stsCalls atomic.Int64
}
func newSTSEnv(ctx context.Context) (*stsBenchEnv, error) {
- tempDir, err := os.MkdirTemp("", "sam-bench-sts-*")
+ tempDir, err := os.MkdirTemp("", "agentmesh-bench-sts-*")
if err != nil {
return nil, err
}
@@ -369,7 +369,7 @@ func newSTSEnv(ctx context.Context) (*stsBenchEnv, error) {
Kind: &api.CredentialBroker_OidcFederation{
OidcFederation: &api.OIDCFederation{
TokenEndpoint: "https://sts.googleapis.com/v1/token",
- Audience: "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/sam/providers/cp",
+ Audience: "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/agentmesh/providers/cp",
},
},
},
@@ -435,7 +435,7 @@ func newSTSEnv(ctx context.Context) (*stsBenchEnv, error) {
}))
env.cpURL = env.cpProxySrv.URL
- // Enroll a benchmark SamNode.
+ // Enroll a benchmark AgentMeshNode.
priv, pub, err := crypto.GenerateEd25519Key(rand.Reader)
if err != nil {
env.Close()
@@ -513,7 +513,7 @@ func newSTSEnv(ctx context.Context) (*stsBenchEnv, error) {
return nil, err
}
- samNode, err := node.NewSamNode(node.Options{
+ samNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: priv,
Store: nodeStore,
BiscuitTimeout: 5 * time.Second,
diff --git a/internal/console/public/app.js b/internal/console/public/app.js
index 84a1799d..4b87f908 100644
--- a/internal/console/public/app.js
+++ b/internal/console/public/app.js
@@ -338,8 +338,8 @@ function renderUsersTable(users) {
}
// Renders an operator-declared labels map (e.g. {component: "stvv", role:
-// "producer"}, from sam-node.yaml's labels: key) as a compact key=value
-// list - the closest thing to a node mnemonic that exists today, since SAM
+// "producer"}, from agentmesh-node.yaml's labels: key) as a compact key=value
+// list - the closest thing to a node mnemonic that exists today, since Agent Mesh
// has no dedicated name/alias field. Returns '' if there are none.
function formatLabels(labels) {
const entries = Object.entries(labels || {});
@@ -812,7 +812,7 @@ function showGeneratedToken(res) {
input.value = res.token;
document.getElementById('token-result-owner').textContent = res.owner_id || 'you';
document.getElementById('token-result-cmd').textContent =
- 'sam-node join --bootstrap-token ' + res.token + ' <control-plane-url>';
+ 'agentmesh-node join --bootstrap-token ' + res.token + ' <control-plane-url>';
panel.hidden = false;
input.focus();
input.select();
diff --git a/internal/console/public/index.html b/internal/console/public/index.html
index 1675ad58..d2b28234 100644
--- a/internal/console/public/index.html
+++ b/internal/console/public/index.html
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>SAM Console</title>
+ <title>Agent Mesh Console</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
@@ -57,8 +57,8 @@
<div class="sidebar-header">
<div class="logo"></div>
<div>
- <h2>SAM Console</h2>
- <span class="version">__SAM_VERSION__</span>
+ <h2>Agent Mesh Console</h2>
+ <span class="version">__AGENTMESH_VERSION__</span>
</div>
</div>
<nav class="sidebar-nav" aria-label="Sections">
diff --git a/internal/console/server.go b/internal/console/server.go
index 146a2924..50360ba3 100644
--- a/internal/console/server.go
+++ b/internal/console/server.go
@@ -194,9 +194,9 @@ func NewServer(cfg Config) (*Server, error) {
Rewrite: func(r *httputil.ProxyRequest) {
r.SetURL(controlPlaneURL)
r.Out.Host = r.In.Host
- // If Authorization header is not set, inject from sam_session cookie
+ // If Authorization header is not set, inject from agentmesh_session cookie
if r.Out.Header.Get("Authorization") == "" {
- if cookie, err := r.In.Cookie("sam_session"); err == nil && cookie.Value != "" {
+ if cookie, err := r.In.Cookie("agentmesh_session"); err == nil && cookie.Value != "" {
r.Out.Header.Set("Authorization", "Bearer "+cookie.Value)
}
}
@@ -256,7 +256,7 @@ func NewServer(cfg Config) (*Server, error) {
}
// checkCookieCSRF blocks cross-site state-mutating requests to /api/* that rely
-// on the ambient sam_session cookie rather than an explicit Authorization header.
+// on the ambient agentmesh_session cookie rather than an explicit Authorization header.
func (s *Server) checkCookieCSRF(w http.ResponseWriter, r *http.Request) bool {
if r.Method == http.MethodGet || r.Method == http.MethodHead || r.Method == http.MethodOptions {
return true
@@ -284,7 +284,7 @@ func (s *Server) checkCookieCSRF(w http.ResponseWriter, r *http.Request) bool {
return true
}
-// Defaults for discoverProviderWithRetry; matches sam-control-plane's
+// Defaults for discoverProviderWithRetry; matches agentmesh-control-plane's
// discoverProviders so a transient hiccup during rollout (e.g. Dex still
// starting up) doesn't permanently disable console OIDC login, since the
// console's /info reports healthy either way and Kubernetes won't restart it.
@@ -331,7 +331,7 @@ func (s *Server) Handler() http.Handler {
func (s *Server) HandleLogout(w http.ResponseWriter, r *http.Request) {
http.SetCookie(w, &http.Cookie{
- Name: "sam_session",
+ Name: "agentmesh_session",
Value: "",
Path: s.cfg.BasePath + "/",
MaxAge: -1,
@@ -359,7 +359,7 @@ func (s *Server) HandleLogin(w http.ResponseWriter, r *http.Request) {
state := fmt.Sprintf("%x", stateBytes)
http.SetCookie(w, &http.Cookie{
- Name: "sam_oidc_state",
+ Name: "agentmesh_oidc_state",
Value: state,
Path: s.cfg.BasePath + "/",
MaxAge: 300,
@@ -369,7 +369,7 @@ func (s *Server) HandleLogin(w http.ResponseWriter, r *http.Request) {
})
http.SetCookie(w, &http.Cookie{
- Name: "sam_oidc_verifier",
+ Name: "agentmesh_oidc_verifier",
Value: verifier,
Path: s.cfg.BasePath + "/",
MaxAge: 300,
@@ -394,20 +394,20 @@ func (s *Server) HandleLogin(w http.ResponseWriter, r *http.Request) {
}
func (s *Server) HandleCallback(w http.ResponseWriter, r *http.Request) {
- stateCookie, err := r.Cookie("sam_oidc_state")
+ stateCookie, err := r.Cookie("agentmesh_oidc_state")
if err != nil || stateCookie.Value == "" || stateCookie.Value != r.URL.Query().Get("state") {
http.Error(w, "Invalid state (CSRF verification failed)", http.StatusBadRequest)
return
}
- verifierCookie, err := r.Cookie("sam_oidc_verifier")
+ verifierCookie, err := r.Cookie("agentmesh_oidc_verifier")
if err != nil || verifierCookie.Value == "" {
http.Error(w, "Missing verifier cookie", http.StatusBadRequest)
return
}
- http.SetCookie(w, &http.Cookie{Name: "sam_oidc_state", Value: "", Path: s.cfg.BasePath + "/", MaxAge: -1, HttpOnly: true, Secure: s.secureCookies(r), SameSite: http.SameSiteLaxMode})
- http.SetCookie(w, &http.Cookie{Name: "sam_oidc_verifier", Value: "", Path: s.cfg.BasePath + "/", MaxAge: -1, HttpOnly: true, Secure: s.secureCookies(r), SameSite: http.SameSiteLaxMode})
+ http.SetCookie(w, &http.Cookie{Name: "agentmesh_oidc_state", Value: "", Path: s.cfg.BasePath + "/", MaxAge: -1, HttpOnly: true, Secure: s.secureCookies(r), SameSite: http.SameSiteLaxMode})
+ http.SetCookie(w, &http.Cookie{Name: "agentmesh_oidc_verifier", Value: "", Path: s.cfg.BasePath + "/", MaxAge: -1, HttpOnly: true, Secure: s.secureCookies(r), SameSite: http.SameSiteLaxMode})
code := r.URL.Query().Get("code")
if code == "" {
@@ -442,7 +442,7 @@ func (s *Server) HandleCallback(w http.ResponseWriter, r *http.Request) {
}
http.SetCookie(w, &http.Cookie{
- Name: "sam_session",
+ Name: "agentmesh_session",
Value: rawIDToken,
Path: s.cfg.BasePath + "/",
MaxAge: 24 * 3600,
@@ -461,7 +461,7 @@ func (s *Server) HandleCallback(w http.ResponseWriter, r *http.Request) {
// needs it, since the reverse proxy injects the cookie as Authorization for
// /api/ calls.
func (s *Server) HandleSession(w http.ResponseWriter, r *http.Request) {
- sessionCookie, err := r.Cookie("sam_session")
+ sessionCookie, err := r.Cookie("agentmesh_session")
if err != nil || sessionCookie.Value == "" {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusUnauthorized)
@@ -530,7 +530,7 @@ func (s *Server) HandleTokenLogin(w http.ResponseWriter, r *http.Request) {
}
http.SetCookie(w, &http.Cookie{
- Name: "sam_session",
+ Name: "agentmesh_session",
Value: token,
Path: s.cfg.BasePath + "/",
MaxAge: 24 * 3600,
@@ -566,7 +566,7 @@ func generatePKCE() (string, string, error) {
}
// versionPlaceholder in index.html is replaced with the build version on every page load.
-const versionPlaceholder = "__SAM_VERSION__"
+const versionPlaceholder = "__AGENTMESH_VERSION__"
// serveIndex reads index.html per request so a StaticDir stays live-editable.
func serveIndex(w http.ResponseWriter, r *http.Request, assets fs.FS) {
diff --git a/internal/console/server_test.go b/internal/console/server_test.go
index c0f5770b..23b6e35c 100644
--- a/internal/console/server_test.go
+++ b/internal/console/server_test.go
@@ -37,7 +37,7 @@ import (
)
// startNoOIDCControlPlaneStub serves a /info with no issuer, the
-// bootstrap-token-only mode sam-one runs the console in.
+// bootstrap-token-only mode agentmesh-one runs the console in.
func startNoOIDCControlPlaneStub(t *testing.T) *httptest.Server {
t.Helper()
mux := http.NewServeMux()
@@ -56,7 +56,7 @@ func startNoOIDCControlPlaneStub(t *testing.T) *httptest.Server {
}
// TestNewServerEmbeddedAssets pins the compiled-in frontend path used by
-// sam-one and the cmd default: StaticFS serving, SPA fallback, StaticDir
+// agentmesh-one and the cmd default: StaticFS serving, SPA fallback, StaticDir
// precedence for live-editing, and the fail-fast when no assets are set.
func TestNewServerEmbeddedAssets(t *testing.T) {
cpStub := startNoOIDCControlPlaneStub(t)
@@ -218,7 +218,7 @@ func TestNewServer_OIDCAutoDiscovery(t *testing.T) {
// TestNewServer_OIDCDiscoveryRetriesTransientFailure guards against a real
// deployment race: if the OIDC issuer (e.g. Dex) is still starting up when
-// sam-console boots, discovery must retry instead of permanently disabling
+// agentmesh-console boots, discovery must retry instead of permanently disabling
// login for the life of the pod (console's /info reports healthy either way,
// so Kubernetes never restarts it to retry on its own).
func TestNewServer_OIDCDiscoveryRetriesTransientFailure(t *testing.T) {
@@ -445,7 +445,7 @@ func TestHandleTokenLogin(t *testing.T) {
sessionCookie := func(resp *http.Response) *http.Cookie {
for _, c := range resp.Cookies() {
- if c.Name == "sam_session" {
+ if c.Name == "agentmesh_session" {
return c
}
}
@@ -460,7 +460,7 @@ func TestHandleTokenLogin(t *testing.T) {
}
c := sessionCookie(resp)
if c == nil {
- t.Fatal("no sam_session cookie set")
+ t.Fatal("no agentmesh_session cookie set")
}
if c.Value != "test-admin-token" {
t.Errorf("cookie value = %q, want %q", c.Value, "test-admin-token")
@@ -553,12 +553,12 @@ func TestHandleLogoutCookieAttributes(t *testing.T) {
var cookie *http.Cookie
for _, c := range rec.Result().Cookies() {
- if c.Name == "sam_session" {
+ if c.Name == "agentmesh_session" {
cookie = c
}
}
if cookie == nil {
- t.Fatal("logout did not set a sam_session deletion cookie")
+ t.Fatal("logout did not set a agentmesh_session deletion cookie")
}
if cookie.MaxAge >= 0 {
t.Errorf("MaxAge = %d, want negative to delete the cookie", cookie.MaxAge)
@@ -633,7 +633,7 @@ func TestConsoleCSRFAndSecurityHeaders(t *testing.T) {
crossReq, _ := http.NewRequest(http.MethodPost, console.URL+"/api/policies", strings.NewReader(`{}`))
crossReq.Header.Set("Content-Type", "application/json")
crossReq.Header.Set("Origin", "https://evil.example.com")
- crossReq.AddCookie(&http.Cookie{Name: "sam_session", Value: "test-admin-token"})
+ crossReq.AddCookie(&http.Cookie{Name: "agentmesh_session", Value: "test-admin-token"})
crossResp, err := http.DefaultClient.Do(crossReq)
if err != nil {
t.Fatalf("POST /api/policies: %v", err)
@@ -646,7 +646,7 @@ func TestConsoleCSRFAndSecurityHeaders(t *testing.T) {
// 3. HTML form Content-Type on cookie-authenticated POST /api/* must be rejected with 415
formReq, _ := http.NewRequest(http.MethodPost, console.URL+"/api/admin/enrollments/123/approve", strings.NewReader("a=b"))
formReq.Header.Set("Content-Type", "application/x-www-form-urlencoded")
- formReq.AddCookie(&http.Cookie{Name: "sam_session", Value: "test-admin-token"})
+ formReq.AddCookie(&http.Cookie{Name: "agentmesh_session", Value: "test-admin-token"})
formResp, err := http.DefaultClient.Do(formReq)
if err != nil {
t.Fatalf("POST /api/admin/enrollments/123/approve: %v", err)
@@ -661,7 +661,7 @@ func TestConsoleCSRFAndSecurityHeaders(t *testing.T) {
sameReq.Header.Set("Content-Type", "application/json")
sameReq.Header.Set("Origin", console.URL)
sameReq.Header.Set("Sec-Fetch-Site", "same-origin")
- sameReq.AddCookie(&http.Cookie{Name: "sam_session", Value: "test-admin-token"})
+ sameReq.AddCookie(&http.Cookie{Name: "agentmesh_session", Value: "test-admin-token"})
sameResp, err := http.DefaultClient.Do(sameReq)
if err != nil {
t.Fatalf("same-origin POST /api/policies: %v", err)
diff --git a/internal/console/session_test.go b/internal/console/session_test.go
index 5783f0b5..9fab0b7c 100644
--- a/internal/console/session_test.go
+++ b/internal/console/session_test.go
@@ -41,7 +41,7 @@ func TestHandleSessionDoesNotReturnTheToken(t *testing.T) {
t.Run("active session", func(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "/auth/session", nil)
- req.AddCookie(&http.Cookie{Name: "sam_session", Value: secret})
+ req.AddCookie(&http.Cookie{Name: "agentmesh_session", Value: secret})
rec := httptest.NewRecorder()
srv.HandleSession(rec, req)
diff --git a/internal/controlplane/client/client_test.go b/internal/controlplane/client/client_test.go
index d97e74ad..58d87ab9 100644
--- a/internal/controlplane/client/client_test.go
+++ b/internal/controlplane/client/client_test.go
@@ -47,7 +47,7 @@ func writeProto(t *testing.T, w http.ResponseWriter, msg proto.Message) {
}
func TestHTTPClientUserAgent(t *testing.T) {
- for _, component := range []string{"sam-node", "sam-router"} {
+ for _, component := range []string{"agentmesh-node", "agentmesh-router"} {
t.Run(component, func(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, request *http.Request) {
if got, want := request.UserAgent(), component+"/"+version.String(); got != want {
@@ -94,7 +94,7 @@ func TestFetchInfo(t *testing.T) {
defer srv.Close()
// A trailing slash on the base URL must not double up in the path.
- c := New(srv.URL+"/", NewHTTPClient(time.Second, nil, "sam-node"))
+ c := New(srv.URL+"/", NewHTTPClient(time.Second, nil, "agentmesh-node"))
info, err := c.FetchInfo(context.Background())
if err != nil {
t.Fatalf("FetchInfo: %v", err)
@@ -138,7 +138,7 @@ func TestFetchKeys(t *testing.T) {
writeProto(t, w, resp)
}))
t.Cleanup(srv.Close)
- return New(srv.URL, NewHTTPClient(time.Second, nil, "sam-node"))
+ return New(srv.URL, NewHTTPClient(time.Second, nil, "agentmesh-node"))
}
t.Run("a set vouched for by a trusted key is adopted whole", func(t *testing.T) {
@@ -173,7 +173,7 @@ func TestErrors(t *testing.T) {
http.Error(w, "store down", http.StatusServiceUnavailable)
}))
defer srv.Close()
- c := New(srv.URL, NewHTTPClient(time.Second, nil, "sam-node"))
+ c := New(srv.URL, NewHTTPClient(time.Second, nil, "agentmesh-node"))
_, err := c.FetchInfo(context.Background())
if err == nil || !strings.Contains(err.Error(), "503") || !strings.Contains(err.Error(), "store down") {
t.Fatalf("FetchInfo error = %v, want status and body", err)
@@ -187,7 +187,7 @@ func TestErrors(t *testing.T) {
}
}))
defer srv.Close()
- c := New(srv.URL, NewHTTPClient(time.Second, nil, "sam-node"))
+ c := New(srv.URL, NewHTTPClient(time.Second, nil, "agentmesh-node"))
if _, err := c.FetchInfo(context.Background()); err == nil || !strings.Contains(err.Error(), "decode /info") {
t.Fatalf("FetchInfo error = %v, want a decode error naming the path", err)
}
@@ -207,7 +207,7 @@ func TestErrors(t *testing.T) {
writeProto(t, w, big)
}))
defer srv.Close()
- c := New(srv.URL, NewHTTPClient(5*time.Second, nil, "sam-node"))
+ c := New(srv.URL, NewHTTPClient(5*time.Second, nil, "agentmesh-node"))
info, err := c.FetchInfo(context.Background())
if !errors.Is(err, ErrBodyTooLarge) {
t.Fatalf("FetchInfo = (%d bans, %v), want ErrBodyTooLarge", len(info.GetBannedPeerIds()), err)
@@ -232,7 +232,7 @@ func TestLargeAnswersArriveWhole(t *testing.T) {
writeProto(t, w, big)
}))
defer srv.Close()
- info, err := New(srv.URL, NewHTTPClient(5*time.Second, nil, "sam-node")).FetchInfo(context.Background())
+ info, err := New(srv.URL, NewHTTPClient(5*time.Second, nil, "agentmesh-node")).FetchInfo(context.Background())
if err != nil {
t.Fatalf("FetchInfo: %v", err)
}
@@ -256,7 +256,7 @@ func TestLargeAnswersArriveWhole(t *testing.T) {
writeProto(t, w, exact)
}))
defer srv.Close()
- info, err := New(srv.URL, NewHTTPClient(5*time.Second, nil, "sam-node")).FetchInfo(context.Background())
+ info, err := New(srv.URL, NewHTTPClient(5*time.Second, nil, "agentmesh-node")).FetchInfo(context.Background())
if err != nil {
t.Fatalf("FetchInfo at exactly the cap: %v", err)
}
@@ -281,7 +281,7 @@ func TestFetchPolicy(t *testing.T) {
}))
defer srv.Close()
- policy, err := New(srv.URL, NewHTTPClient(time.Second, nil, "sam-node")).FetchPolicy(context.Background(), []byte("biscuit"))
+ policy, err := New(srv.URL, NewHTTPClient(time.Second, nil, "agentmesh-node")).FetchPolicy(context.Background(), []byte("biscuit"))
if err != nil {
t.Fatalf("FetchPolicy: %v", err)
}
@@ -304,10 +304,10 @@ func TestHTTPClientTransportPolicy(t *testing.T) {
defer srv.Close()
// httptest binds 127.0.0.1; spell it as a non-loopback name that the
// transport must refuse before any connection is attempted.
- nonLoopbackURL := strings.Replace(srv.URL, "127.0.0.1", "sam-control-plane.invalid", 1)
+ nonLoopbackURL := strings.Replace(srv.URL, "127.0.0.1", "agentmesh-control-plane.invalid", 1)
allow := false
- httpClient := NewHTTPClient(time.Second, func() bool { return allow }, "sam-node")
+ httpClient := NewHTTPClient(time.Second, func() bool { return allow }, "agentmesh-node")
if _, err := New(srv.URL, httpClient).FetchInfo(context.Background()); err != nil {
t.Fatalf("loopback plaintext must be accepted: %v", err)
diff --git a/internal/controlplane/mesh.go b/internal/controlplane/mesh.go
index d2cc397d..08794531 100644
--- a/internal/controlplane/mesh.go
+++ b/internal/controlplane/mesh.go
@@ -105,7 +105,7 @@ type P2PMeshAdapter struct {
store storage.Store
mu sync.Mutex
// close tears down what NewMeshPublisher built; nil when the host and
- // topic belong to someone else (sam-one's embedded router).
+ // topic belong to someone else (agentmesh-one's embedded router).
close func() error
}
diff --git a/internal/controlplane/metrics.go b/internal/controlplane/metrics.go
index 6b53d7e2..a4f1ab0d 100644
--- a/internal/controlplane/metrics.go
+++ b/internal/controlplane/metrics.go
@@ -32,7 +32,7 @@ import (
var (
httpRequestsTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
- Name: "sam_control_plane_http_requests_total",
+ Name: "agentmesh_control_plane_http_requests_total",
Help: "Control-plane HTTP requests by registered route and status code",
},
[]string{"route", "code"},
@@ -40,7 +40,7 @@ var (
httpRequestDurationSeconds = promauto.NewHistogramVec(
prometheus.HistogramOpts{
- Name: "sam_control_plane_http_request_duration_seconds",
+ Name: "agentmesh_control_plane_http_request_duration_seconds",
Help: "Time a control-plane request occupied its handler",
Buckets: []float64{0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10},
},
@@ -94,7 +94,7 @@ const (
// Node admission states as reported by meshStateCollector. "admitted" is
// what CheckAdmission says, not liveness: a node that enrolled once and went
// away stays admitted until its session expires. Liveness is
-// sam_control_plane_mesh_connected_peers.
+// agentmesh_control_plane_mesh_connected_peers.
const (
nodeStateAdmitted = "admitted"
nodeStateExpired = "expired"
@@ -162,55 +162,55 @@ func newMeshStateCollector(store storage.Store) *meshStateCollector {
timeout: meshStateTimeout,
now: time.Now,
nodesDesc: prometheus.NewDesc(
- "sam_control_plane_enrolled_nodes",
+ "agentmesh_control_plane_enrolled_nodes",
"Enrolled identities by role and admission state",
[]string{"role", "state"}, nil),
usersDesc: prometheus.NewDesc(
- "sam_control_plane_users",
+ "agentmesh_control_plane_users",
"Human identities that have enrolled",
nil, nil),
requestsDesc: prometheus.NewDesc(
- "sam_control_plane_enrollment_requests",
+ "agentmesh_control_plane_enrollment_requests",
"Enrollment requests by status",
[]string{"status"}, nil),
tokensDesc: prometheus.NewDesc(
- "sam_control_plane_bootstrap_tokens",
+ "agentmesh_control_plane_bootstrap_tokens",
"Bootstrap tokens by state",
[]string{"state"}, nil),
routersDesc: prometheus.NewDesc(
- "sam_control_plane_routers_active",
+ "agentmesh_control_plane_routers_active",
"Routers holding an unexpired lease",
nil, nil),
routerPeersDesc: prometheus.NewDesc(
- "sam_control_plane_router_connected_peers",
+ "agentmesh_control_plane_router_connected_peers",
"Peers a router reported connected on its last lease renewal",
[]string{"router"}, nil),
routerDHTDesc: prometheus.NewDesc(
- "sam_control_plane_router_dht_size",
+ "agentmesh_control_plane_router_dht_size",
"DHT routing table size a router reported on its last lease renewal",
[]string{"router"}, nil),
routerLeaseDesc: prometheus.NewDesc(
- "sam_control_plane_router_lease_renewed_timestamp_seconds",
+ "agentmesh_control_plane_router_lease_renewed_timestamp_seconds",
"Unix time of a router's last lease renewal",
[]string{"router"}, nil),
meshPeersDesc: prometheus.NewDesc(
- "sam_control_plane_mesh_connected_peers",
+ "agentmesh_control_plane_mesh_connected_peers",
"Distinct non-router peers connected to at least one active router",
nil, nil),
signingKeysDesc: prometheus.NewDesc(
- "sam_control_plane_signing_keys",
+ "agentmesh_control_plane_signing_keys",
"Signing keys a credential verifies against: 1, or 2 during the grace period after a rotation",
nil, nil),
retiringKeyDesc: prometheus.NewDesc(
- "sam_control_plane_retiring_key_expiry_timestamp_seconds",
+ "agentmesh_control_plane_retiring_key_expiry_timestamp_seconds",
"Unix time the retiring signing key stops verifying; absent when no rotation is in its grace period",
nil, nil),
scrapeOKDesc: prometheus.NewDesc(
- "sam_control_plane_mesh_state_scrape_success",
+ "agentmesh_control_plane_mesh_state_scrape_success",
"1 if the mesh state was read from the store, 0 if the last read failed",
nil, nil),
scrapeSampleDesc: prometheus.NewDesc(
- "sam_control_plane_mesh_state_timestamp_seconds",
+ "agentmesh_control_plane_mesh_state_timestamp_seconds",
"Unix time the exported mesh state was read from the store",
nil, nil),
}
@@ -397,7 +397,7 @@ func countMeshPeers(routers []storage.RouterLease) int {
// metricsHandler serves the process-wide registry, which carries the request
// counters above and the Go runtime, alongside this server's own mesh state.
// The mesh collector is per server rather than global so two servers in one
-// process (tests, sam-one) never fight over a registration.
+// process (tests, agentmesh-one) never fight over a registration.
func (s *Server) metricsHandler() http.Handler {
return promhttp.HandlerFor(
prometheus.Gatherers{prometheus.DefaultGatherer, s.metricsRegistry},
diff --git a/internal/controlplane/metrics_test.go b/internal/controlplane/metrics_test.go
index be1c45b2..a7b0044c 100644
--- a/internal/controlplane/metrics_test.go
+++ b/internal/controlplane/metrics_test.go
@@ -185,40 +185,40 @@ func TestMeshStateCollectorExportsStoreState(t *testing.T) {
c.now = func() time.Time { return now }
g := gather(t, c)
- g.want(t, "sam_control_plane_mesh_state_scrape_success", 1)
- g.want(t, "sam_control_plane_mesh_state_timestamp_seconds", float64(now.Unix()))
+ g.want(t, "agentmesh_control_plane_mesh_state_scrape_success", 1)
+ g.want(t, "agentmesh_control_plane_mesh_state_timestamp_seconds", float64(now.Unix()))
- g.want(t, "sam_control_plane_enrolled_nodes{role="+api.RoleNode+",state=admitted}", 2)
- g.want(t, "sam_control_plane_enrolled_nodes{role="+api.RoleNode+",state=expired}", 1)
- g.want(t, "sam_control_plane_enrolled_nodes{role="+api.RoleNode+",state=banned}", 1)
- g.want(t, "sam_control_plane_enrolled_nodes{role="+api.RoleRouter+",state=admitted}", 2)
- g.want(t, "sam_control_plane_users", 1)
+ g.want(t, "agentmesh_control_plane_enrolled_nodes{role="+api.RoleNode+",state=admitted}", 2)
+ g.want(t, "agentmesh_control_plane_enrolled_nodes{role="+api.RoleNode+",state=expired}", 1)
+ g.want(t, "agentmesh_control_plane_enrolled_nodes{role="+api.RoleNode+",state=banned}", 1)
+ g.want(t, "agentmesh_control_plane_enrolled_nodes{role="+api.RoleRouter+",state=admitted}", 2)
+ g.want(t, "agentmesh_control_plane_users", 1)
- g.want(t, "sam_control_plane_enrollment_requests{status=pending}", 2)
- g.want(t, "sam_control_plane_enrollment_requests{status=approved}", 1)
+ g.want(t, "agentmesh_control_plane_enrollment_requests{status=pending}", 2)
+ g.want(t, "agentmesh_control_plane_enrollment_requests{status=approved}", 1)
- g.want(t, "sam_control_plane_bootstrap_tokens{state=active}", 1)
- g.want(t, "sam_control_plane_bootstrap_tokens{state=exhausted}", 1)
- g.want(t, "sam_control_plane_bootstrap_tokens{state=expired}", 1)
- g.want(t, "sam_control_plane_bootstrap_tokens{state=revoked}", 1)
+ g.want(t, "agentmesh_control_plane_bootstrap_tokens{state=active}", 1)
+ g.want(t, "agentmesh_control_plane_bootstrap_tokens{state=exhausted}", 1)
+ g.want(t, "agentmesh_control_plane_bootstrap_tokens{state=expired}", 1)
+ g.want(t, "agentmesh_control_plane_bootstrap_tokens{state=revoked}", 1)
// The lapsed lease is neither counted nor labelled.
- g.want(t, "sam_control_plane_routers_active", 2)
- g.want(t, "sam_control_plane_router_connected_peers{router=router-1}", 3)
- g.want(t, "sam_control_plane_router_connected_peers{router=router-2}", 3)
- g.want(t, "sam_control_plane_router_dht_size{router=router-1}", 5)
- g.want(t, "sam_control_plane_router_dht_size{router=router-2}", 4)
- g.want(t, "sam_control_plane_router_lease_renewed_timestamp_seconds{router=router-2}", float64(now.Add(-time.Minute).Unix()))
- if _, ok := g["sam_control_plane_router_connected_peers{router=router-gone}"]; ok {
+ g.want(t, "agentmesh_control_plane_routers_active", 2)
+ g.want(t, "agentmesh_control_plane_router_connected_peers{router=router-1}", 3)
+ g.want(t, "agentmesh_control_plane_router_connected_peers{router=router-2}", 3)
+ g.want(t, "agentmesh_control_plane_router_dht_size{router=router-1}", 5)
+ g.want(t, "agentmesh_control_plane_router_dht_size{router=router-2}", 4)
+ g.want(t, "agentmesh_control_plane_router_lease_renewed_timestamp_seconds{router=router-2}", float64(now.Add(-time.Minute).Unix()))
+ if _, ok := g["agentmesh_control_plane_router_connected_peers{router=router-gone}"]; ok {
t.Error("lapsed router lease was exported")
}
// node-a counted once, routers excluded, node-z behind a dead lease ignored.
- g.want(t, "sam_control_plane_mesh_connected_peers", 3)
+ g.want(t, "agentmesh_control_plane_mesh_connected_peers", 3)
// Both keys verify during the grace period; the retiring one's expiry is exported.
- g.want(t, "sam_control_plane_signing_keys", 2)
- retiring, ok := g["sam_control_plane_retiring_key_expiry_timestamp_seconds"]
+ g.want(t, "agentmesh_control_plane_signing_keys", 2)
+ retiring, ok := g["agentmesh_control_plane_retiring_key_expiry_timestamp_seconds"]
if !ok {
t.Fatal("retiring key expiry not exported during the grace period")
}
@@ -236,7 +236,7 @@ func TestMeshStateCollectorCachesWithinTTL(t *testing.T) {
c := newMeshStateCollector(store)
c.now = func() time.Time { return clock }
- gather(t, c).want(t, "sam_control_plane_routers_active", 2)
+ gather(t, c).want(t, "agentmesh_control_plane_routers_active", 2)
extra := storage.RouterLease{PeerID: "router-3", Addresses: []string{"/ip4/10.0.0.4/tcp/4501"}, LastRenewal: now, ExpiresAt: now.Add(time.Hour)}
if err := store.UpsertRouterLease(context.Background(), &extra); err != nil {
@@ -244,10 +244,10 @@ func TestMeshStateCollectorCachesWithinTTL(t *testing.T) {
}
clock = now.Add(c.ttl / 2)
- gather(t, c).want(t, "sam_control_plane_routers_active", 2)
+ gather(t, c).want(t, "agentmesh_control_plane_routers_active", 2)
clock = now.Add(c.ttl)
- gather(t, c).want(t, "sam_control_plane_routers_active", 3)
+ gather(t, c).want(t, "agentmesh_control_plane_routers_active", 3)
}
func TestMeshStateCollectorKeepsLastSnapshotWhenStoreFails(t *testing.T) {
@@ -260,8 +260,8 @@ func TestMeshStateCollectorKeepsLastSnapshotWhenStoreFails(t *testing.T) {
c.now = func() time.Time { return clock }
g := gather(t, c)
- g.want(t, "sam_control_plane_mesh_state_scrape_success", 1)
- g.want(t, "sam_control_plane_routers_active", 2)
+ g.want(t, "agentmesh_control_plane_mesh_state_scrape_success", 1)
+ g.want(t, "agentmesh_control_plane_routers_active", 2)
if err := store.Close(); err != nil {
t.Fatal(err)
@@ -269,9 +269,9 @@ func TestMeshStateCollectorKeepsLastSnapshotWhenStoreFails(t *testing.T) {
clock = now.Add(c.ttl)
g = gather(t, c)
- g.want(t, "sam_control_plane_mesh_state_scrape_success", 0)
- g.want(t, "sam_control_plane_routers_active", 2)
- g.want(t, "sam_control_plane_mesh_state_timestamp_seconds", float64(now.Unix()))
+ g.want(t, "agentmesh_control_plane_mesh_state_scrape_success", 0)
+ g.want(t, "agentmesh_control_plane_routers_active", 2)
+ g.want(t, "agentmesh_control_plane_mesh_state_timestamp_seconds", float64(now.Unix()))
}
func TestMeshStateCollectorBeforeFirstReadReportsOnlyFailure(t *testing.T) {
@@ -281,7 +281,7 @@ func TestMeshStateCollectorBeforeFirstReadReportsOnlyFailure(t *testing.T) {
}
g := gather(t, newMeshStateCollector(store))
- g.want(t, "sam_control_plane_mesh_state_scrape_success", 0)
+ g.want(t, "agentmesh_control_plane_mesh_state_scrape_success", 0)
if len(g) != 1 {
t.Errorf("expected only the success gauge before any snapshot, got %v", g)
}
@@ -340,9 +340,9 @@ func TestMetricsEndpointServesMeshStateAndRuntime(t *testing.T) {
t.Fatalf("status %d: %s", resp.StatusCode, body)
}
for _, want := range []string{
- "sam_control_plane_mesh_state_scrape_success 1",
- "sam_control_plane_routers_active 0",
- "sam_control_plane_mesh_connected_peers 0",
+ "agentmesh_control_plane_mesh_state_scrape_success 1",
+ "agentmesh_control_plane_routers_active 0",
+ "agentmesh_control_plane_mesh_connected_peers 0",
"go_goroutines",
} {
if !strings.Contains(string(body), want) {
diff --git a/internal/controlplane/node_gc.go b/internal/controlplane/node_gc.go
index 07ff5844..1d1b3394 100644
--- a/internal/controlplane/node_gc.go
+++ b/internal/controlplane/node_gc.go
@@ -34,7 +34,7 @@ const (
)
var nodesDeletedTotal = promauto.NewCounter(prometheus.CounterOpts{
- Name: "sam_control_plane_nodes_deleted_total",
+ Name: "agentmesh_control_plane_nodes_deleted_total",
Help: "Enrolled node records removed after outliving their session by the retention period",
})
diff --git a/internal/controlplane/node_gc_test.go b/internal/controlplane/node_gc_test.go
index 985ced9a..a7874ec7 100644
--- a/internal/controlplane/node_gc_test.go
+++ b/internal/controlplane/node_gc_test.go
@@ -73,7 +73,7 @@ func TestGCExpiredNodesAppliesRetention(t *testing.T) {
var after dto.Metric
_ = nodesDeletedTotal.Write(&after)
if got := after.GetCounter().GetValue() - before.GetCounter().GetValue(); got != 1 {
- t.Errorf("sam_control_plane_nodes_deleted_total advanced by %v, want 1", got)
+ t.Errorf("agentmesh_control_plane_nodes_deleted_total advanced by %v, want 1", got)
}
}
diff --git a/internal/controlplane/policy_scale_test.go b/internal/controlplane/policy_scale_test.go
index 342c0ad8..ee68b433 100644
--- a/internal/controlplane/policy_scale_test.go
+++ b/internal/controlplane/policy_scale_test.go
@@ -46,13 +46,13 @@ import (
// Any other error (validation, role resolution, or minting) still fails the
// test. Probe further with e.g.:
//
-// SAM_POLICY_SCALE_MAX=5000 go test ./internal/controlplane -run TestPolicyScale -v
+// AGENTMESH_POLICY_SCALE_MAX=5000 go test ./internal/controlplane -run TestPolicyScale -v
func TestPolicyScale(t *testing.T) {
tiers := []int{10, 100, 500}
- if extra := os.Getenv("SAM_POLICY_SCALE_MAX"); extra != "" {
+ if extra := os.Getenv("AGENTMESH_POLICY_SCALE_MAX"); extra != "" {
n, err := strconv.Atoi(extra)
if err != nil {
- t.Fatalf("invalid SAM_POLICY_SCALE_MAX=%q: %v", extra, err)
+ t.Fatalf("invalid AGENTMESH_POLICY_SCALE_MAX=%q: %v", extra, err)
}
tiers = append(tiers, n)
}
@@ -152,13 +152,13 @@ func TestPolicyScale(t *testing.T) {
// facts (one granted_service_set + one granted_target_set) regardless of how
// many exact entries it grants. Probe further with e.g.:
//
-// SAM_POLICY_SCALE_SET_MAX=20000 go test ./internal/controlplane -run TestPolicyScaleSetEncoding -v
+// AGENTMESH_POLICY_SCALE_SET_MAX=20000 go test ./internal/controlplane -run TestPolicyScaleSetEncoding -v
func TestPolicyScaleSetEncoding(t *testing.T) {
entryTiers := []int{10, 100, 2000}
- if extra := os.Getenv("SAM_POLICY_SCALE_SET_MAX"); extra != "" {
+ if extra := os.Getenv("AGENTMESH_POLICY_SCALE_SET_MAX"); extra != "" {
n, err := strconv.Atoi(extra)
if err != nil {
- t.Fatalf("invalid SAM_POLICY_SCALE_SET_MAX=%q: %v", extra, err)
+ t.Fatalf("invalid AGENTMESH_POLICY_SCALE_SET_MAX=%q: %v", extra, err)
}
entryTiers = append(entryTiers, n)
}
@@ -276,13 +276,13 @@ func TestValidatePolicyConfigFactBudget(t *testing.T) {
// dynamically from live claims at request time and so cannot pre-merge
// grants across roles the way mint time can. Probe further with e.g.:
//
-// SAM_POLICY_SCALE_ROLES_MAX=900 go test ./internal/controlplane -run TestPolicyScaleManyRoles -v
+// AGENTMESH_POLICY_SCALE_ROLES_MAX=900 go test ./internal/controlplane -run TestPolicyScaleManyRoles -v
func TestPolicyScaleManyRoles(t *testing.T) {
roleTiers := []int{10, 100, 800}
- if extra := os.Getenv("SAM_POLICY_SCALE_ROLES_MAX"); extra != "" {
+ if extra := os.Getenv("AGENTMESH_POLICY_SCALE_ROLES_MAX"); extra != "" {
n, err := strconv.Atoi(extra)
if err != nil {
- t.Fatalf("invalid SAM_POLICY_SCALE_ROLES_MAX=%q: %v", extra, err)
+ t.Fatalf("invalid AGENTMESH_POLICY_SCALE_ROLES_MAX=%q: %v", extra, err)
}
roleTiers = append(roleTiers, n)
}
diff --git a/internal/controlplane/server.go b/internal/controlplane/server.go
index d5e51c23..4bcfc232 100644
--- a/internal/controlplane/server.go
+++ b/internal/controlplane/server.go
@@ -53,7 +53,7 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"
)
-var logger = golog.Logger("sam-control-plane")
+var logger = golog.Logger("agentmesh-control-plane")
// routerAddresses is the router list a member receives: every active router's
// addresses, the routers in a fresh random order per response and each
@@ -90,7 +90,7 @@ const (
adminNodeActionUnban = "unban"
)
-// Server implements the SAM Control Plane web app.
+// Server implements the Agent Mesh Control Plane web app.
type Server struct {
config Options
store storage.Store
@@ -249,7 +249,7 @@ func (s *Server) Start() error {
s.wg.Add(1)
go func() {
defer s.wg.Done()
- logger.Infof("SAM Control Plane listening on http://%s", s.config.ListenAddr)
+ logger.Infof("Agent Mesh Control Plane listening on http://%s", s.config.ListenAddr)
if err := s.httpServer.Serve(l); err != nil && !errors.Is(err, http.ErrServerClosed) {
logger.Errorf("HTTP Server error: %v", err)
}
@@ -2295,7 +2295,7 @@ func (s *Server) authenticateUser(r *http.Request) (*storage.User, error) {
if subtle.ConstantTimeCompare(tokenHash[:], adminHash[:]) == 1 {
return &storage.User{
ID: "root-admin",
- Email: "[email protected]",
+ Email: "[email protected]",
Role: "admin",
CreatedAt: time.Now(),
}, nil
@@ -2454,7 +2454,7 @@ func (s *Server) HandleAdminBootstrapTokens(w http.ResponseWriter, r *http.Reque
http.Error(w, "Internal keygen error", http.StatusInternalServerError)
return
}
- tokenVal := fmt.Sprintf("sam-bt-%x", randBytes)
+ tokenVal := fmt.Sprintf("mesh-bt-%x", randBytes)
tokenID := fmt.Sprintf("%x", sha256.Sum256([]byte(tokenVal)))
tokenRecord := &storage.BootstrapToken{
@@ -3158,7 +3158,7 @@ func (s *Server) HandleUserBootstrapTokens(w http.ResponseWriter, r *http.Reques
http.Error(w, "Internal keygen error", http.StatusInternalServerError)
return
}
- tokenVal := fmt.Sprintf("sam-bt-%x", randBytes)
+ tokenVal := fmt.Sprintf("mesh-bt-%x", randBytes)
tokenID := fmt.Sprintf("%x", sha256.Sum256([]byte(tokenVal)))
tokenRecord := &storage.BootstrapToken{
diff --git a/internal/controlplane/server_test.go b/internal/controlplane/server_test.go
index 68418023..00d6d407 100644
--- a/internal/controlplane/server_test.go
+++ b/internal/controlplane/server_test.go
@@ -112,7 +112,7 @@ func startCustomMockOIDC(t *testing.T) (string, func(claims map[string]interface
func setupTestServer(t *testing.T, oidcIssuer string, overrides ...func(*Options)) (*Server, storage.Store, string) {
t.Helper()
- tempDir, err := os.MkdirTemp("", "sam-cp-test-*")
+ tempDir, err := os.MkdirTemp("", "agentmesh-cp-test-*")
if err != nil {
t.Fatalf("failed to create temp dir: %v", err)
}
@@ -226,7 +226,7 @@ func TestControlPlaneBasic(t *testing.T) {
DriverName: "sqlite",
DataSourceName: dbPath,
OIDCIssuer: issuer,
- OIDCClientID: "sam-cli-app",
+ OIDCClientID: "agentmesh-cli-app",
AllowedAudiences: []string{"agentmesh-audience"},
}, st)
if err != nil {
@@ -242,7 +242,7 @@ func TestControlPlaneBasic(t *testing.T) {
if err := proto.Unmarshal(rec.Body.Bytes(), &info2); err != nil {
t.Fatalf("failed to unmarshal ControlPlaneInfoResponse: %v", err)
}
- if info2.ClientId != "sam-cli-app" || info2.Audience != "agentmesh-audience" {
+ if info2.ClientId != "agentmesh-cli-app" || info2.Audience != "agentmesh-audience" {
t.Errorf("unexpected client id/audience: %+v", &info2)
}
})
@@ -2266,14 +2266,14 @@ func TestNodeProactiveTokenRefresh(t *testing.T) {
// The node trusts the key enrollment handed it, as a real node would; the
// refreshed token is verified against that key before it is adopted.
- n, err := node.NewSamNode(node.Options{
+ n, err := node.NewAgentMeshNode(node.Options{
PrivKey: privNode,
Store: nStore,
ControlPlanePubKey: enrollNodeResp.ControlPlanePublicKey,
ListenAddrs: []string{"/ip4/127.0.0.1/tcp/0"},
})
if err != nil {
- t.Fatalf("NewSamNode: %v", err)
+ t.Fatalf("NewAgentMeshNode: %v", err)
}
// Trigger proactive refresh
@@ -3285,7 +3285,7 @@ func TestMeshSurfaceCORS(t *testing.T) {
}
// TestAdminBootstrapTokensList pins the admin listing surface used by
-// `sam-one token list`: created tokens show up, and the list is admin-gated.
+// `agentmesh-one token list`: created tokens show up, and the list is admin-gated.
func TestAdminBootstrapTokensList(t *testing.T) {
dbPath := filepath.Join(t.TempDir(), "cp-admin-tokens.db")
store, err := storage.NewSQLStore("sqlite", dbPath)
diff --git a/internal/controlplane/sts.go b/internal/controlplane/sts.go
index 138c360f..63c566eb 100644
--- a/internal/controlplane/sts.go
+++ b/internal/controlplane/sts.go
@@ -362,7 +362,7 @@ func (s *Server) HandleOpenIDConfiguration(w http.ResponseWriter, r *http.Reques
},
"code_challenge_methods_supported": []string{"S256"},
"claims_supported": []string{
- "iss", "sub", "aud", "exp", "iat", "jti", "act", "sam_roles", "sam_task",
+ "iss", "sub", "aud", "exp", "iat", "jti", "act", "mesh_roles", "mesh_task",
},
}
w.Header().Set("Content-Type", "application/json")
@@ -735,7 +735,7 @@ func (s *Server) HandleRevocations(w http.ResponseWriter, r *http.Request) {
}
// HandleTokenExchange serves stateless HTTP POST `/token/exchange` (mesh protocol).
-// It verifies the calling sam-node's Biscuit + PoP challenge, verifies the
+// It verifies the calling agentmesh-node's Biscuit + PoP challenge, verifies the
// inbound subject JWT, resolves subject roles from mesh policy, and mints a
// short-lived Delegated Session Biscuit with zero database writes.
func (s *Server) HandleTokenExchange(w http.ResponseWriter, r *http.Request) {
@@ -936,7 +936,7 @@ func (s *Server) mintDelegatedBiscuitFromJWT(
}
// HandleSTSToken serves stateless HTTP POST `/sts/token` (mesh protocol).
-// It authenticates the calling egress sam-node via Biscuit + PoP challenge,
+// It authenticates the calling egress agentmesh-node via Biscuit + PoP challenge,
// verifies the caller's Biscuit + appended tar_block chain against standing
// mesh policy and egress://<destination>, and mints a short-lived ES256 JWT.
func (s *Server) HandleSTSToken(w http.ResponseWriter, r *http.Request) {
@@ -994,7 +994,7 @@ func (s *Server) HandleSTSToken(w http.ResponseWriter, r *http.Request) {
}
// Verify that if the destination is configured in PolicyConfig.egress with
- // served_by constraints, the calling sam-node is authorized to serve it.
+ // served_by constraints, the calling agentmesh-node is authorized to serve it.
destHost := api.NormalizeMeshHost(strings.TrimPrefix(strings.TrimSpace(req.Destination), api.EgressServicePrefix))
if egressList, err := s.store.GetEgressDestinations(r.Context()); err == nil {
for _, d := range egressList {
@@ -1053,17 +1053,17 @@ func (s *Server) HandleSTSToken(w http.ResponseWriter, r *http.Request) {
subject := claims.Principal()
taskName := claims.InnermostTaskName()
jwtClaims := jwt.MapClaims{
- "iss": s.oidcIssuerURL(r),
- "sub": subject,
- "aud": audience,
- "act": map[string]any{"sub": nodeRecord.PeerID},
- "sam_roles": claims.Roles,
- "iat": now.Unix(),
- "exp": jwtExpiry.Unix(),
- "jti": jti,
+ "iss": s.oidcIssuerURL(r),
+ "sub": subject,
+ "aud": audience,
+ "act": map[string]any{"sub": nodeRecord.PeerID},
+ "mesh_roles": claims.Roles,
+ "iat": now.Unix(),
+ "exp": jwtExpiry.Unix(),
+ "jti": jti,
}
if taskName != "" {
- jwtClaims["sam_task"] = taskName
+ jwtClaims["mesh_task"] = taskName
}
signedJWT, err := s.oidcSigner.SignJWT(r.Context(), jwtClaims)
@@ -1204,7 +1204,7 @@ func (s *Server) authorizeBiscuitForEgress(ctx context.Context, rawBiscuit []byt
}
// Destination-level STS minting checks whether the role grants egress://<destination>
// at all (plain or HTTP-narrowed); per-request method/path restrictions are
- // enforced by the egress sam-node PEP on the wire HTTP request.
+ // enforced by the egress agentmesh-node PEP on the wire HTTP request.
for _, r := range stsDestinationRules {
authorizer.AddRule(r)
}
@@ -1231,7 +1231,7 @@ func (s *Server) authorizeBiscuitForEgress(ctx context.Context, rawBiscuit []byt
return nil, http.StatusForbidden, err
}
- // Collect any roles derived via Datalog policy bindings so sam_roles is complete.
+ // Collect any roles derived via Datalog policy bindings so mesh_roles is complete.
if facts, qErr := authorizer.Query(biscuit.Rule{
Head: biscuit.Predicate{Name: "get_roles", IDs: []biscuit.Term{biscuit.Variable("r")}},
Body: []biscuit.Predicate{{Name: api.FactRole, IDs: []biscuit.Term{biscuit.Variable("r")}}},
diff --git a/internal/controlplane/sts_test.go b/internal/controlplane/sts_test.go
index 482616a1..dd6c1680 100644
--- a/internal/controlplane/sts_test.go
+++ b/internal/controlplane/sts_test.go
@@ -199,7 +199,7 @@ func TestTokenExchangeStatelessAndRoleIsolation(t *testing.T) {
t.Fatal("expected VerifyBiscuit (peer handshake) to reject delegated token lacking node() fact")
}
- // Verify SamNode.Authorize accepts the delegated token for mcp://weather get_forecast,
+ // Verify AgentMeshNode.Authorize accepts the delegated token for mcp://weather get_forecast,
// denies mcp://weather drop_table (TAR), and denies mcp://internal-admin (standing policy).
compiledRules, _ := api.BuildPolicyRules(roles, bindings)
parsedRules, err := api.ParseDatalogRules(api.PolicyRuleTexts(compiledRules))
@@ -211,14 +211,14 @@ func TestTokenExchangeStatelessAndRoleIsolation(t *testing.T) {
t.Fatalf("NewStore: %v", err)
}
defer func() { _ = nStore.Close() }()
- verifierNode, err := node.NewSamNode(node.Options{
+ verifierNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: nodePriv,
Store: nStore,
ControlPlanePubKey: cpPubKey,
BiscuitTimeout: time.Second,
})
if err != nil {
- t.Fatalf("NewSamNode: %v", err)
+ t.Fatalf("NewAgentMeshNode: %v", err)
}
verifierNode.MeshPolicyRules = parsedRules
verifierNode.SetIdentityCache(nodeBiscuit)
@@ -275,7 +275,7 @@ func jwkToECDSAPublicKey(t *testing.T, jwk JSONWebKey) *ecdsa.PublicKey {
func TestOIDCIssuerJWKSAndSTSToken(t *testing.T) {
issuer, mintOIDC := startCustomMockOIDC(t)
srv, store, baseURL := setupTestServer(t, issuer, func(o *Options) {
- o.STSIssuerURL = "https://cp.sam-mesh.example"
+ o.STSIssuerURL = "https://cp.agentmesh.example"
})
defer func() { _ = srv.Close() }()
@@ -304,10 +304,10 @@ func TestOIDCIssuerJWKSAndSTSToken(t *testing.T) {
if err := json.NewDecoder(discResp.Body).Decode(&discDoc); err != nil {
t.Fatalf("decode discovery doc: %v", err)
}
- if discDoc["issuer"] != "https://cp.sam-mesh.example" {
- t.Fatalf("issuer = %v, want https://cp.sam-mesh.example", discDoc["issuer"])
+ if discDoc["issuer"] != "https://cp.agentmesh.example" {
+ t.Fatalf("issuer = %v, want https://cp.agentmesh.example", discDoc["issuer"])
}
- if discDoc["jwks_uri"] != "https://cp.sam-mesh.example/jwks" {
+ if discDoc["jwks_uri"] != "https://cp.agentmesh.example/jwks" {
t.Fatalf("jwks_uri = %v", discDoc["jwks_uri"])
}
@@ -351,7 +351,7 @@ func TestOIDCIssuerJWKSAndSTSToken(t *testing.T) {
stsReq := &api.STSTokenRequest{
Biscuit: exResp.BiscuitToken,
Destination: "bigquery.googleapis.com",
- Audience: "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/sam/providers/cp",
+ Audience: "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/agentmesh/providers/cp",
ChallengeUnixMs: stsTs,
ChallengeSignature: stsSig,
}
@@ -409,8 +409,8 @@ func TestOIDCIssuerJWKSAndSTSToken(t *testing.T) {
if claims["sub"] != "[email protected]" {
t.Fatalf("jwt sub = %v, want [email protected]", claims["sub"])
}
- if claims["sam_task"] != "bq-export" {
- t.Fatalf("jwt sam_task = %v, want bq-export", claims["sam_task"])
+ if claims["mesh_task"] != "bq-export" {
+ t.Fatalf("jwt mesh_task = %v, want bq-export", claims["mesh_task"])
}
actMap, _ := claims["act"].(map[string]any)
if actMap["sub"] != nodePeerID.String() {
@@ -648,7 +648,7 @@ func TestOAuth21AuthorizationCodePKCEAndTokenExchange(t *testing.T) {
t.Fatal("expected AttenuateBiscuit on a sealed token to fail")
}
- // And verify the 2-block sealed Biscuit authorizes mcp://weather get_forecast on SamNode.
+ // And verify the 2-block sealed Biscuit authorizes mcp://weather get_forecast on AgentMeshNode.
compiledRules, _ := api.BuildPolicyRules(roles, bindings)
parsedRules, _ := api.ParseDatalogRules(api.PolicyRuleTexts(compiledRules))
nStore, err := node.NewStore(t.TempDir())
@@ -656,14 +656,14 @@ func TestOAuth21AuthorizationCodePKCEAndTokenExchange(t *testing.T) {
t.Fatalf("NewStore: %v", err)
}
defer func() { _ = nStore.Close() }()
- verifierNode, err := node.NewSamNode(node.Options{
+ verifierNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: nodePriv,
Store: nStore,
ControlPlanePubKey: cpPubKey,
BiscuitTimeout: time.Second,
})
if err != nil {
- t.Fatalf("NewSamNode: %v", err)
+ t.Fatalf("NewAgentMeshNode: %v", err)
}
verifierNode.MeshPolicyRules = parsedRules
verifierNode.SetIdentityCache(nodeBiscuit)
@@ -794,7 +794,7 @@ func TestSTSSecurityHardening(t *testing.T) {
Broker: &api.CredentialBroker{
Kind: &api.CredentialBroker_AwsAssumeRole{
AwsAssumeRole: &api.AWSAssumeRole{
- RoleArn: "arn:aws:iam::123456789012:role/sam-s3",
+ RoleArn: "arn:aws:iam::123456789012:role/agentmesh-s3",
},
},
},
diff --git a/internal/credprovider/credprovider.go b/internal/credprovider/credprovider.go
index 6845f5f4..01baa21c 100644
--- a/internal/credprovider/credprovider.go
+++ b/internal/credprovider/credprovider.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package credprovider implements outbound credential brokering for SAM egress
+// Package credprovider implements outbound credential brokering for Agent Mesh egress
// destinations (static secrets, RFC 8693 OIDC federation with optional Google
// Service Account impersonation, AWS STS AssumeRoleWithWebIdentity with inline
// IAM session policy compilation, and platform metadata identity) as well as
@@ -76,7 +76,7 @@ func CallerBiscuitFromContext(ctx context.Context) []byte {
return b
}
-// Exchanger translates a verified SAM principal and its intersected
+// Exchanger translates a verified Agent Mesh principal and its intersected
// TaskAuthorizationRule chain into a downscoped upstream credential.
type Exchanger interface {
Exchange(ctx context.Context, principal string, rules []*api.TaskAuthorizationRule) (bearerToken string, expiry time.Time, err error)
@@ -432,7 +432,7 @@ func (e *AWSAssumeRoleExchanger) Exchange(ctx context.Context, principal string,
func sanitizeAWSSessionName(principal string) string {
if principal == "" {
- return "sam-session"
+ return "mesh-session"
}
var b strings.Builder
for _, r := range principal {
@@ -446,7 +446,7 @@ func sanitizeAWSSessionName(principal string) string {
}
}
if b.Len() < 2 {
- return "sam-session"
+ return "mesh-session"
}
return b.String()
}
diff --git a/internal/credprovider/credprovider_test.go b/internal/credprovider/credprovider_test.go
index a888e9df..78f32c60 100644
--- a/internal/credprovider/credprovider_test.go
+++ b/internal/credprovider/credprovider_test.go
@@ -251,7 +251,7 @@ func TestOIDCFederationAndAWSExchangers(t *testing.T) {
http.Error(w, "unexpected subject_token", http.StatusBadRequest)
return
}
- if r.FormValue("audience") != "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/sam/providers/sam-cp" {
+ if r.FormValue("audience") != "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/agentmesh/providers/agentmesh-cp" {
http.Error(w, "unexpected audience", http.StatusBadRequest)
return
}
@@ -275,7 +275,7 @@ func TestOIDCFederationAndAWSExchangers(t *testing.T) {
ex := NewOIDCFederationExchanger("bigquery.googleapis.com", &api.OIDCFederation{
TokenEndpoint: mockSTS.URL + "/v1/token",
- Audience: "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/sam/providers/sam-cp",
+ Audience: "//iam.googleapis.com/projects/123/locations/global/workloadIdentityPools/agentmesh/providers/agentmesh-cp",
Impersonate: "[email protected]",
Scopes: []string{
"https://www.googleapis.com/auth/bigquery.readonly",
@@ -311,7 +311,7 @@ func TestOIDCFederationAndAWSExchangers(t *testing.T) {
mockAWS := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
_ = r.ParseForm()
- if r.FormValue("Action") != "AssumeRoleWithWebIdentity" || r.FormValue("RoleArn") != "arn:aws:iam::123456789012:role/sam-reader" {
+ if r.FormValue("Action") != "AssumeRoleWithWebIdentity" || r.FormValue("RoleArn") != "arn:aws:iam::123456789012:role/agentmesh-reader" {
http.Error(w, "invalid AWS request", http.StatusBadRequest)
return
}
@@ -325,7 +325,7 @@ func TestOIDCFederationAndAWSExchangers(t *testing.T) {
defer mockAWS.Close()
awsEx := NewAWSAssumeRoleExchanger("s3.amazonaws.com", &api.AWSAssumeRole{
- RoleArn: "arn:aws:iam::123456789012:role/sam-reader",
+ RoleArn: "arn:aws:iam::123456789012:role/agentmesh-reader",
}, mintFn, mockAWS.Client())
awsEx.stsEndpoint = mockAWS.URL
diff --git a/internal/envoy/callout.go b/internal/envoy/callout.go
index d413ce53..3ddec212 100644
--- a/internal/envoy/callout.go
+++ b/internal/envoy/callout.go
@@ -420,7 +420,7 @@ func (s *CalloutSession) RunResponsePhase(
// IsProtectedEgressHeader reports whether a header name is off-limits to an
// ext_proc inspector. Inspectors may add/modify application headers, or block a
// request, but must never select or overwrite credentials, host routing, or
-// SAM identity headers.
+// Agent Mesh identity headers.
func IsProtectedEgressHeader(name string) bool {
lower := strings.ToLower(strings.TrimSpace(name))
switch lower {
diff --git a/internal/envoy/envoy_test.go b/internal/envoy/envoy_test.go
index a49e2a06..32229b14 100644
--- a/internal/envoy/envoy_test.go
+++ b/internal/envoy/envoy_test.go
@@ -316,7 +316,7 @@ type referenceCalloutServer struct {
extprocv3.UnimplementedExternalProcessorServer
mu sync.Mutex
- lastSamAttrs map[string]*structpb.Value
+ lastMeshAttrs map[string]*structpb.Value
hadDeadline bool
sleepDuration time.Duration
}
@@ -345,9 +345,9 @@ func (s *referenceCalloutServer) Process(stream extprocv3.ExternalProcessor_Proc
return err
}
- if samAttrs := req.GetAttributes()["mesh"]; samAttrs != nil {
+ if meshAttrs := req.GetAttributes()["mesh"]; meshAttrs != nil {
s.mu.Lock()
- s.lastSamAttrs = samAttrs.GetFields()
+ s.lastMeshAttrs = meshAttrs.GetFields()
s.mu.Unlock()
}
@@ -488,11 +488,11 @@ func TestCalloutClient_UnixSocketAndMTLS(t *testing.T) {
t.Fatalf("NewCalloutClient: %v", err)
}
- samStruct, _ := structpb.NewStruct(map[string]any{
+ meshStruct, _ := structpb.NewStruct(map[string]any{
"destination": "vertex.googleapis.com",
"principal": "user:[email protected]",
})
- attrs := map[string]*structpb.Struct{"mesh": samStruct}
+ attrs := map[string]*structpb.Struct{"mesh": meshStruct}
req := httptest.NewRequest(http.MethodPost, "https://vertex.googleapis.com/v1/models/gemini:generateContent", nil)
session, imm, newReqBody, err := client.RunRequestPhase(req, cfg, "vertex.googleapis.com", []byte("prompt with PII_SSN inside"), attrs)
@@ -517,7 +517,7 @@ func TestCalloutClient_UnixSocketAndMTLS(t *testing.T) {
}
callout.mu.Lock()
- gotDest := callout.lastSamAttrs["destination"].GetStringValue()
+ gotDest := callout.lastMeshAttrs["destination"].GetStringValue()
hadDeadline := callout.hadDeadline
callout.mu.Unlock()
if gotDest != "vertex.googleapis.com" {
diff --git a/internal/envoy/server.go b/internal/envoy/server.go
index 3fd27a6a..0c149b44 100644
--- a/internal/envoy/server.go
+++ b/internal/envoy/server.go
@@ -76,7 +76,7 @@ type CheckResult struct {
ResponseHeaders map[string]string
}
-// Evaluator evaluates a normalized CheckInput against SAM's Datalog and TAR policy.
+// Evaluator evaluates a normalized CheckInput against Agent Mesh's Datalog and TAR policy.
type Evaluator func(ctx context.Context, in CheckInput) CheckResult
// GatewayServer serves Envoy HTTP ext_authz, gRPC ext_authz (v3 and v2), and
diff --git a/internal/identity/biscuit.go b/internal/identity/biscuit.go
index e000aa38..00c93091 100644
--- a/internal/identity/biscuit.go
+++ b/internal/identity/biscuit.go
@@ -45,7 +45,7 @@ const DefaultAuthorizerTimeout = 1 * time.Second
// number of derived facts and fixpoint iterations, but neither preempts a
// single rule: one self-join over a few hundred facts runs to completion
// whatever these say, and on timeout biscuit-go's worker goroutine keeps
-// computing. The only bound on attacker-authored rules is therefore that SAM
+// computing. The only bound on attacker-authored rules is therefore that Agent Mesh
// never evaluates any: see UnmarshalInbound.
const (
maxDatalogFacts = 1000
diff --git a/internal/identity/peer_binding_test.go b/internal/identity/peer_binding_test.go
index de1f1f7b..c96ce9b2 100644
--- a/internal/identity/peer_binding_test.go
+++ b/internal/identity/peer_binding_test.go
@@ -130,7 +130,7 @@ func TestPeerBindingRejectsAppendedBlock(t *testing.T) {
}
// Nor is the token accepted from its real owner: appended blocks are the
// one place a holder can put Datalog of their own, and even a check there
- // is a rule biscuit-go runs to completion with no deadline, so SAM does
+ // is a rule biscuit-go runs to completion with no deadline, so Agent Mesh does
// not evaluate any (ErrAppendedBlocks). RequireAuthorityBinding above is
// the defence in depth behind that gate.
if _, err := VerifyBiscuit(forged, victim, keys, time.Second); !errors.Is(err, ErrAppendedBlocks) {
diff --git a/internal/node/a2a_service.go b/internal/node/a2a_service.go
index cfac3783..5564d102 100644
--- a/internal/node/a2a_service.go
+++ b/internal/node/a2a_service.go
@@ -93,7 +93,7 @@ func (s *A2AService) Probe(ctx context.Context) error {
// a2aEgressGate runs the caller-side A2A checks on a raw egress request:
// the fail-closed labels gate. On refusal it writes the HTTP error itself
// and returns ok=false.
-func a2aEgressGate(node *SamNode, w http.ResponseWriter, r *http.Request, route egressRoute) (*http.Request, bool) {
+func a2aEgressGate(node *AgentMeshNode, w http.ResponseWriter, r *http.Request, route egressRoute) (*http.Request, bool) {
if labelsHeader := r.Header.Get(api.HeaderMeshRequiredLabels); labelsHeader != "" {
r.Header.Del(api.HeaderMeshRequiredLabels)
required, err := parseRequiredLabels(labelsHeader)
@@ -130,7 +130,7 @@ const maxAgentCardBytes = 1 << 20
// pathful base URL as the card location, e.g. a2a-go; a root GET is not part
// of any A2A binding, JSON-RPC being POST-only). Everything else is left to
// the streaming egress proxy.
-func a2aServeAgentCard(node *SamNode, rt http.RoundTripper, w http.ResponseWriter, r *http.Request, route egressRoute) bool {
+func a2aServeAgentCard(node *AgentMeshNode, rt http.RoundTripper, w http.ResponseWriter, r *http.Request, route egressRoute) bool {
if r.Method != http.MethodGet || (route.upstreamPath != a2aAgentCardPath && route.upstreamPath != "") {
return false
}
@@ -179,7 +179,7 @@ func a2aServeAgentCard(node *SamNode, rt http.RoundTripper, w http.ResponseWrite
// fetchRemoteAgentCard performs the mesh-side GET for the agent card, reusing
// the headers already prepared for egress (biscuit, agent claim, passthrough
// Authorization) on the incoming request.
-func fetchRemoteAgentCard(node *SamNode, rt http.RoundTripper, r *http.Request, route egressRoute) (*http.Response, error) {
+func fetchRemoteAgentCard(node *AgentMeshNode, rt http.RoundTripper, r *http.Request, route egressRoute) (*http.Response, error) {
ctx := allowLimitedEgressConn(r.Context())
if node != nil {
node.prepareEgressPeer(ctx, route.peerID)
diff --git a/internal/node/backend_env.go b/internal/node/backend_env.go
index 6f22d2ea..fe37ca32 100644
--- a/internal/node/backend_env.go
+++ b/internal/node/backend_env.go
@@ -21,7 +21,7 @@ import (
// nodeSecretEnvVars are this process's own credentials. A command backend is
// the operator's program, not the node's, so it never needs them.
-var nodeSecretEnvVars = []string{"SAM_API_TOKEN", "SAM_CLIENT_SECRET"}
+var nodeSecretEnvVars = []string{"AGENTMESH_API_TOKEN", "AGENTMESH_CLIENT_SECRET"}
// backendEnv builds the environment for a command-backed service: the node's
// environment minus its own secrets, plus the operator-declared extras.
diff --git a/internal/node/backend_env_test.go b/internal/node/backend_env_test.go
index 62bf59d1..559bd6f1 100644
--- a/internal/node/backend_env_test.go
+++ b/internal/node/backend_env_test.go
@@ -21,19 +21,19 @@ import (
)
func TestBackendEnvStripsNodeSecrets(t *testing.T) {
- t.Setenv("SAM_API_TOKEN", "node-secret")
- t.Setenv("SAM_CLIENT_SECRET", "oidc-secret")
- t.Setenv("SAM_API_TOKEN_SUFFIX", "kept") // only exact names are stripped
+ t.Setenv("AGENTMESH_API_TOKEN", "node-secret")
+ t.Setenv("AGENTMESH_CLIENT_SECRET", "oidc-secret")
+ t.Setenv("AGENTMESH_API_TOKEN_SUFFIX", "kept") // only exact names are stripped
t.Setenv("HARMLESS", "kept")
env := backendEnv(map[string]string{"BACKEND_KEY": "value"})
for _, kv := range env {
- if strings.HasPrefix(kv, "SAM_API_TOKEN=") || strings.HasPrefix(kv, "SAM_CLIENT_SECRET=") {
+ if strings.HasPrefix(kv, "AGENTMESH_API_TOKEN=") || strings.HasPrefix(kv, "AGENTMESH_CLIENT_SECRET=") {
t.Errorf("node secret leaked into backend env: %s", kv)
}
}
- for _, want := range []string{"HARMLESS=kept", "SAM_API_TOKEN_SUFFIX=kept", "BACKEND_KEY=value"} {
+ for _, want := range []string{"HARMLESS=kept", "AGENTMESH_API_TOKEN_SUFFIX=kept", "BACKEND_KEY=value"} {
if !slices.Contains(env, want) {
t.Errorf("backend env missing %q", want)
}
diff --git a/internal/node/config.go b/internal/node/config.go
index dd789606..fabd89c3 100644
--- a/internal/node/config.go
+++ b/internal/node/config.go
@@ -58,7 +58,7 @@ func LoadNodeConfig(path string) (*NodeConfigComplete, error) {
}
if !api.SupportedNodeConfigVersions[config.Version] {
- return nil, fmt.Errorf("node config %s declares version %q, which this build does not support (supported: %s); upgrade sam-node",
+ return nil, fmt.Errorf("node config %s declares version %q, which this build does not support (supported: %s); upgrade agentmesh-node",
path, config.Version, api.NodeConfigVersionV1Alpha1)
}
diff --git a/internal/node/config_test.go b/internal/node/config_test.go
index a6c2d8fa..1d1e9cb6 100644
--- a/internal/node/config_test.go
+++ b/internal/node/config_test.go
@@ -301,7 +301,7 @@ labels:
path = filepath.Join(t.TempDir(), "nonexistent.yaml")
} else {
dir := t.TempDir()
- path = filepath.Join(dir, "sam-node.yaml")
+ path = filepath.Join(dir, "agentmesh-node.yaml")
if err := os.WriteFile(path, []byte(tt.yamlContent), 0644); err != nil {
t.Fatalf("failed to write temp config file: %v", err)
}
@@ -338,13 +338,13 @@ func TestCompleteNodeConfig(t *testing.T) {
}
}
-// A backend credential may not be written into sam-node.yaml: the file is
+// A backend credential may not be written into agentmesh-node.yaml: the file is
// copied, committed and rendered into ConfigMaps. It comes from
// target_auth_path instead. An in-memory config (the mobile FFI, which
// passes a per-launch token that is never written) is not held to this.
func TestBackendCredentialRefusedInConfigFileOnly(t *testing.T) {
dir := t.TempDir()
- path := filepath.Join(dir, "sam-node.yaml")
+ path := filepath.Join(dir, "agentmesh-node.yaml")
inline := `version: v1alpha1
services:
- type: mcp
@@ -390,7 +390,7 @@ services:
func TestLoadNodeConfigEgressFloor(t *testing.T) {
write := func(t *testing.T, body string) string {
t.Helper()
- path := filepath.Join(t.TempDir(), "sam-node.yaml")
+ path := filepath.Join(t.TempDir(), "agentmesh-node.yaml")
if err := os.WriteFile(path, []byte(body), 0o600); err != nil {
t.Fatal(err)
}
diff --git a/internal/node/controlplane.go b/internal/node/controlplane.go
index 31ebb79c..96ecc095 100644
--- a/internal/node/controlplane.go
+++ b/internal/node/controlplane.go
@@ -41,7 +41,7 @@ func controlPlaneClient(controlPlaneURL string) *cpclient.Client {
// controlPlane returns a control plane client configured with this node's
// peer ID and private key so authenticated requests carry a signed challenge.
-func (n *SamNode) controlPlane(controlPlaneURL string) *cpclient.Client {
+func (n *AgentMeshNode) controlPlane(controlPlaneURL string) *cpclient.Client {
c := controlPlaneClient(controlPlaneURL)
if n == nil {
return c
diff --git a/internal/node/controlplane_client.go b/internal/node/controlplane_client.go
index 64811cfd..9b1c93b8 100644
--- a/internal/node/controlplane_client.go
+++ b/internal/node/controlplane_client.go
@@ -36,5 +36,5 @@ func SetAllowInsecureControlPlane(allow bool) {
// controlPlaneHTTPClient is the client for every request the node makes to
// its control plane; the plaintext policy is re-checked on every hop.
func controlPlaneHTTPClient(timeout time.Duration) *http.Client {
- return cpclient.NewHTTPClient(timeout, allowInsecureControlPlane.Load, "sam-node")
+ return cpclient.NewHTTPClient(timeout, allowInsecureControlPlane.Load, "agentmesh-node")
}
diff --git a/internal/node/controlplane_sync.go b/internal/node/controlplane_sync.go
index 3e8628e8..617ef98d 100644
--- a/internal/node/controlplane_sync.go
+++ b/internal/node/controlplane_sync.go
@@ -40,7 +40,7 @@ import (
// stop a key rotation from landing; the errors are reported together. Called
// once before Start, so the node dials the routers the control plane knows
// now and enforces the bans it holds now, and then by the sync loop.
-func (n *SamNode) SyncControlPlane(ctx context.Context) error {
+func (n *AgentMeshNode) SyncControlPlane(ctx context.Context) error {
if n.Store == nil {
return errors.New("node has no store")
}
@@ -71,7 +71,7 @@ func (n *SamNode) SyncControlPlane(ctx context.Context) error {
return errors.Join(errs...)
}
-func (n *SamNode) syncRevocations(ctx context.Context, controlPlaneURL string) error {
+func (n *AgentMeshNode) syncRevocations(ctx context.Context, controlPlaneURL string) error {
token := n.GetIdentity()
if len(token) == 0 {
return nil
@@ -101,7 +101,7 @@ func (n *SamNode) syncRevocations(ctx context.Context, controlPlaneURL string) e
// about. Verification against the keys already trusted keeps whoever answers
// the URL from becoming the trust root; an empty answer is a failure so the
// set is never wiped.
-func (n *SamNode) syncTrustedKeys(ctx context.Context, controlPlaneURL string) error {
+func (n *AgentMeshNode) syncTrustedKeys(ctx context.Context, controlPlaneURL string) error {
n.keysMu.RLock()
existing := append([]TrustedKey(nil), n.trustedKeys...)
n.keysMu.RUnlock()
@@ -132,7 +132,7 @@ func (n *SamNode) syncTrustedKeys(ctx context.Context, controlPlaneURL string) e
// same after a restart. An identity from a build that recorded no set is
// checked against the stored mesh-config key, the one enrollment handed out
// with it. Nothing enrolled means nothing to refresh.
-func (n *SamNode) identityPredatesRotation() bool {
+func (n *AgentMeshNode) identityPredatesRotation() bool {
if n.Store == nil || len(n.GetIdentity()) == 0 {
return false
}
@@ -168,7 +168,7 @@ func containsPublicKey(keys []ed25519.PublicKey, key ed25519.PublicKey) bool {
}
// recordIdentityKeySet pins the trusted set to the identity just adopted.
-func (n *SamNode) recordIdentityKeySet() {
+func (n *AgentMeshNode) recordIdentityKeySet() {
if n.Store == nil {
return
}
@@ -185,7 +185,7 @@ func (n *SamNode) recordIdentityKeySet() {
// dial; once it is running they only matter to the next start. The ban set
// is reconciled against the revocation cache, which is how a running node
// learns a ban or an unban it got no event for.
-func (n *SamNode) syncMeshInfo(ctx context.Context, controlPlaneURL string) error {
+func (n *AgentMeshNode) syncMeshInfo(ctx context.Context, controlPlaneURL string) error {
// Taken before the request: a ban recorded after this instant cannot be
// in the answer, so its absence must not be read as an unban.
fetchedAt := time.Now()
@@ -231,7 +231,7 @@ func parseMultiaddrs(addrs []string) []multiaddr.Multiaddr {
// ban set as of fetchedAt. Bans recorded at or after fetchedAt are kept even
// when absent from the answer: the answer predates them and cannot speak to
// them (see the router's reconcileBannedPeers for the same rule).
-func (n *SamNode) reconcileBannedPeers(peerIDs []string, fetchedAt time.Time) {
+func (n *AgentMeshNode) reconcileBannedPeers(peerIDs []string, fetchedAt time.Time) {
if n.revokedPeers == nil {
return
}
@@ -267,7 +267,7 @@ func (n *SamNode) reconcileBannedPeers(peerIDs []string, fetchedAt time.Time) {
// banPeer records the ban and evicts the peer: the cache entry is what the
// gater and the auth path consult, and dropping the admission is what stops
// the relay ACL from honouring a session that was already established.
-func (n *SamNode) banPeer(p peer.ID, bannedAtMs int64) {
+func (n *AgentMeshNode) banPeer(p peer.ID, bannedAtMs int64) {
if n.revokedPeers != nil {
n.revokedPeers.Add(p.String(), bannedAtMs)
}
@@ -280,7 +280,7 @@ func (n *SamNode) banPeer(p peer.ID, bannedAtMs int64) {
// triggerControlPlaneSync asks the sync loop to run soon, after a random
// delay of up to the configured jitter so a fleet told at once does not hit
// the control plane at once. A pending request is not duplicated.
-func (n *SamNode) triggerControlPlaneSync() {
+func (n *AgentMeshNode) triggerControlPlaneSync() {
select {
case n.controlPlaneSyncTrigger <- struct{}{}:
default:
@@ -293,7 +293,7 @@ func (n *SamNode) triggerControlPlaneSync() {
// jitter, so a fleet started or notified together does not pull together.
// Failures are logged at Warn once and at Debug while they persist, with an
// Info on recovery.
-func (n *SamNode) startControlPlaneSyncLoop(ctx context.Context, interval time.Duration) {
+func (n *AgentMeshNode) startControlPlaneSyncLoop(ctx context.Context, interval time.Duration) {
if interval <= 0 || n.Store == nil {
return
}
diff --git a/internal/node/controlplane_test.go b/internal/node/controlplane_test.go
index c612297e..ad2e693b 100644
--- a/internal/node/controlplane_test.go
+++ b/internal/node/controlplane_test.go
@@ -122,13 +122,13 @@ func TestSyncTrustedKeys(t *testing.T) {
currentPub, currentPriv := mustGenerateKey(t)
strangerPub, strangerPriv := mustGenerateKey(t)
- newNode := func(t *testing.T) *SamNode {
+ newNode := func(t *testing.T) *AgentMeshNode {
store, err := NewStore(t.TempDir())
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() { _ = store.Close() })
- return &SamNode{Store: store, trustedKeys: []TrustedKey{{Key: currentPub, ReceivedAt: time.Now()}}}
+ return &AgentMeshNode{Store: store, trustedKeys: []TrustedKey{{Key: currentPub, ReceivedAt: time.Now()}}}
}
t.Run("adopts the set a trusted key vouches for", func(t *testing.T) {
@@ -202,7 +202,7 @@ func TestReconcileBannedPeers(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- n := &SamNode{revokedPeers: cache}
+ n := &AgentMeshNode{revokedPeers: cache}
fetchedAt := time.Now()
n.revokedPeers.Add(stillBanned.String(), fetchedAt.Add(-time.Hour).UnixMilli())
n.revokedPeers.Add(unbanned.String(), fetchedAt.Add(-time.Hour).UnixMilli())
@@ -257,7 +257,7 @@ func TestSyncControlPlane(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- n := &SamNode{Store: store, revokedPeers: cache, trustedKeys: []TrustedKey{{Key: oldPub, ReceivedAt: time.Now()}}}
+ n := &AgentMeshNode{Store: store, revokedPeers: cache, trustedKeys: []TrustedKey{{Key: oldPub, ReceivedAt: time.Now()}}}
n.SetIdentityCache([]byte("identity"))
err = n.SyncControlPlane(context.Background())
@@ -341,7 +341,7 @@ func TestSyncMeshPolicyUsesDatalogRules(t *testing.T) {
if err := store.SaveControlPlaneURL(srv.URL); err != nil {
t.Fatal(err)
}
- n := &SamNode{Store: store}
+ n := &AgentMeshNode{Store: store}
n.SetIdentityCache([]byte("identity"))
err = n.syncMeshPolicy(context.Background())
@@ -385,7 +385,7 @@ func TestControlPlaneSyncLoop(t *testing.T) {
}
priv := GetOrGenerateKey(store)
- n := &SamNode{
+ n := &AgentMeshNode{
Store: store,
trustedKeys: []TrustedKey{{Key: oldPub, ReceivedAt: time.Now()}},
controlPlaneSyncTrigger: make(chan struct{}, 1),
@@ -479,7 +479,7 @@ func TestFetchControlPlaneInfo_InvalidProto(t *testing.T) {
}
}
-// A node built from stored config, as sam-node run does, must come out of
+// A node built from stored config, as agentmesh-node run does, must come out of
// its pre-start pull with the control plane's current router addresses and
// the full key set, both in memory and on disk; and an unreachable control
// plane must leave the stored config in place rather than blank it.
@@ -510,7 +510,7 @@ func TestSyncControlPlaneBeforeStart(t *testing.T) {
srv := httptest.NewServer(mux)
defer srv.Close()
- newStoredNode := func(t *testing.T, controlPlaneURL string) *SamNode {
+ newStoredNode := func(t *testing.T, controlPlaneURL string) *AgentMeshNode {
t.Helper()
store, err := NewStore(t.TempDir())
if err != nil {
@@ -535,7 +535,7 @@ func TestSyncControlPlaneBeforeStart(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- n, err := NewSamNode(Options{PrivKey: priv, Store: store, ControlPlanePubKey: cpPub, RouterAddrs: []multiaddr.Multiaddr{stale}})
+ n, err := NewAgentMeshNode(Options{PrivKey: priv, Store: store, ControlPlanePubKey: cpPub, RouterAddrs: []multiaddr.Multiaddr{stale}})
if err != nil {
t.Fatal(err)
}
@@ -629,7 +629,7 @@ func TestSyncControlPlaneRefusesUntrustedKeySet(t *testing.T) {
if err := store.SaveTrustedKeys([]TrustedKey{{Key: cpPub, ReceivedAt: time.Now()}}); err != nil {
t.Fatal(err)
}
- n := &SamNode{Store: store, trustedKeys: []TrustedKey{{Key: cpPub, ReceivedAt: time.Now()}}}
+ n := &AgentMeshNode{Store: store, trustedKeys: []TrustedKey{{Key: cpPub, ReceivedAt: time.Now()}}}
n.SetIdentityCache([]byte("identity"))
err = n.SyncControlPlane(context.Background())
@@ -663,7 +663,7 @@ func TestControlPlaneClientRefusesPlaintextToNonLoopback(t *testing.T) {
defer server.Close()
// httptest binds 127.0.0.1; spell it as a non-loopback name that the
// transport must refuse before any connection is attempted.
- nonLoopbackURL := strings.Replace(server.URL, "127.0.0.1", "sam-control-plane.invalid", 1)
+ nonLoopbackURL := strings.Replace(server.URL, "127.0.0.1", "agentmesh-control-plane.invalid", 1)
t.Cleanup(func() { SetAllowInsecureControlPlane(false) })
@@ -699,8 +699,8 @@ func TestReportNodeCatalog(t *testing.T) {
if r.URL.Path != "/nodes/catalog" {
t.Errorf("Expected path /nodes/catalog, got %s", r.URL.Path)
}
- if userAgent := r.UserAgent(); !strings.HasPrefix(userAgent, "sam-node/") || userAgent == "sam-node/" {
- t.Errorf("Expected versioned sam-node User-Agent, got %q", userAgent)
+ if userAgent := r.UserAgent(); !strings.HasPrefix(userAgent, "agentmesh-node/") || userAgent == "agentmesh-node/" {
+ t.Errorf("Expected versioned agentmesh-node User-Agent, got %q", userAgent)
}
gotAuth = r.Header.Get("Authorization")
gotContentType = r.Header.Get("Content-Type")
@@ -747,10 +747,10 @@ func TestReportNodeCatalog_HTTPError(t *testing.T) {
}
}
-// newCatalogTestNode is a SamNode with just enough state for the catalog
+// newCatalogTestNode is a AgentMeshNode with just enough state for the catalog
// loop: a store holding the control-plane URL, a cached identity, and a
// registry with one service.
-func newCatalogTestNode(t *testing.T, controlPlaneURL string) *SamNode {
+func newCatalogTestNode(t *testing.T, controlPlaneURL string) *AgentMeshNode {
t.Helper()
store, err := NewStore(t.TempDir())
if err != nil {
@@ -762,7 +762,7 @@ func newCatalogTestNode(t *testing.T, controlPlaneURL string) *SamNode {
t.Fatalf("SaveControlPlaneURL: %v", err)
}
}
- node := &SamNode{Store: store, services: newServiceRegistryForTest(&fakeDHT{})}
+ node := &AgentMeshNode{Store: store, services: newServiceRegistryForTest(&fakeDHT{})}
node.services.insertService(newFakeSvc("calc", api.ServiceType_SERVICE_TYPE_MCP))
return node
}
diff --git a/internal/node/debug_handlers.go b/internal/node/debug_handlers.go
index b49ceb86..59224c87 100644
--- a/internal/node/debug_handlers.go
+++ b/internal/node/debug_handlers.go
@@ -34,7 +34,7 @@ const (
// newDebugHandler serves the operator diagnostics under /debug. These were MCP
// tools once; they moved here so agents never see them in their tool list (#318).
-func newDebugHandler(n *SamNode) http.Handler {
+func newDebugHandler(n *AgentMeshNode) http.Handler {
mux := http.NewServeMux()
mux.HandleFunc("GET /debug/mesh-info", func(w http.ResponseWriter, r *http.Request) {
info, err := n.meshInfo()
@@ -88,7 +88,7 @@ func newDebugHandler(n *SamNode) http.Handler {
}
// debugReady reports whether the components the /debug handlers touch exist.
-func (n *SamNode) debugReady() error {
+func (n *AgentMeshNode) debugReady() error {
switch {
case n == nil:
return fmt.Errorf("node not initialized")
@@ -149,7 +149,7 @@ type logsResponse struct {
// meshInfo backs both the get_mesh_info MCP tool and GET /debug/mesh-info.
// The MCP path skips the /debug boundary guard, so it re-checks here.
-func (n *SamNode) meshInfo() (*meshInfoResponse, error) {
+func (n *AgentMeshNode) meshInfo() (*meshInfoResponse, error) {
if err := n.debugReady(); err != nil {
return nil, err
}
@@ -171,8 +171,8 @@ func (n *SamNode) meshInfo() (*meshInfoResponse, error) {
}
// connectivityStats backs GET /debug/connectivity: with a peer ID it pings that
-// peer, otherwise it pings the SAM router.
-func (n *SamNode) connectivityStats(ctx context.Context, peerIDStr string) connectivityResponse {
+// peer, otherwise it pings the Agent Mesh router.
+func (n *AgentMeshNode) connectivityStats(ctx context.Context, peerIDStr string) connectivityResponse {
ctx, cancel := context.WithTimeout(ctx, connectivityPingTimeout)
defer cancel()
@@ -215,7 +215,7 @@ func (n *SamNode) connectivityStats(ctx context.Context, peerIDStr string) conne
}
// tokenInfo backs GET /debug/token-info.
-func (n *SamNode) tokenInfo() tokenInfoResponse {
+func (n *AgentMeshNode) tokenInfo() tokenInfoResponse {
var info tokenInfoResponse
token, err := n.Store.LoadIdentity()
if err == nil && len(token) > 0 {
@@ -232,7 +232,7 @@ func (n *SamNode) tokenInfo() tokenInfoResponse {
}
// networkInfo backs GET /debug/network-info.
-func (n *SamNode) networkInfo() networkInfoResponse {
+func (n *AgentMeshNode) networkInfo() networkInfoResponse {
listenAddrs := []string{}
for _, a := range n.Host.Network().ListenAddresses() {
listenAddrs = append(listenAddrs, a.String())
@@ -250,7 +250,7 @@ func (n *SamNode) networkInfo() networkInfoResponse {
}
// connectPeer backs POST /debug/connect-peer.
-func (n *SamNode) connectPeer(ctx context.Context, peerAddr string) error {
+func (n *AgentMeshNode) connectPeer(ctx context.Context, peerAddr string) error {
ctx, cancel := context.WithTimeout(ctx, connectPeerTimeout)
defer cancel()
diff --git a/internal/node/discovery/discovery.go b/internal/node/discovery/discovery.go
index 0ffca97b..d2e94cb1 100644
--- a/internal/node/discovery/discovery.go
+++ b/internal/node/discovery/discovery.go
@@ -27,7 +27,7 @@ import (
golog "github.com/ipfs/go-log/v2"
)
-var logger = golog.Logger("sam-discovery")
+var logger = golog.Logger("agentmesh-discovery")
const (
// DefaultAnnounceInterval is how often a provider publishes on topics
diff --git a/internal/node/discovery_source.go b/internal/node/discovery_source.go
index 0b648b78..9ff9b702 100644
--- a/internal/node/discovery_source.go
+++ b/internal/node/discovery_source.go
@@ -46,7 +46,7 @@ func capKeys(keys []string) []string {
// discoverySource builds gossip announcements from the registered services:
// inference services announce model IDs, MCP services announce tool names.
-func (n *SamNode) discoverySource() []discovery.Announcement {
+func (n *AgentMeshNode) discoverySource() []discovery.Announcement {
labels := n.labels()
var out []discovery.Announcement
for _, info := range n.services.List(api.ServiceType_SERVICE_TYPE_UNSPECIFIED) {
diff --git a/internal/node/egress.go b/internal/node/egress.go
index e6504d20..4cb2baee 100644
--- a/internal/node/egress.go
+++ b/internal/node/egress.go
@@ -41,7 +41,7 @@ type CloudTokenExchanger = credprovider.Exchanger
// DefaultSecretsDir is where a node looks for the credentials the control
// plane names in egress destinations when --secrets-dir is not given.
-const DefaultSecretsDir = "/etc/sam/secrets"
+const DefaultSecretsDir = "/etc/agentmesh/secrets"
// Proxy-Status error types (RFC 9209) the node answers with when it, and not
// the destination, refuses a request. A client can then tell a policy denial
@@ -55,7 +55,7 @@ const (
// refuse answers a request the node refuses itself, naming the reason in
// Proxy-Status so the client can tell it from the destination's own answer.
func refuse(w http.ResponseWriter, status int, text, errorType string) {
- w.Header().Set("Proxy-Status", "sam-node; error="+errorType)
+ w.Header().Set("Proxy-Status", "agentmesh-node; error="+errorType)
http.Error(w, text, status)
}
@@ -66,7 +66,7 @@ func refuse(w http.ResponseWriter, status int, text, errorType string) {
// its own about it. Every request reaches the handler only after Authorize
// ran with the caller's credential and the method, path, host and port facts.
type EgressService struct {
- node *SamNode
+ node *AgentMeshNode
destination *api.EgressDestination
info *api.ServiceInfo
target *url.URL
@@ -97,7 +97,7 @@ func newEgressService(d *api.EgressDestination, secretsDir string) (*EgressServi
return newEgressServiceForNode(nil, d, secretsDir)
}
-func newEgressServiceForNode(node *SamNode, d *api.EgressDestination, secretsDir string) (*EgressService, error) {
+func newEgressServiceForNode(node *AgentMeshNode, d *api.EgressDestination, secretsDir string) (*EgressService, error) {
if err := api.ValidateEgressName(d.GetName()); err != nil {
return nil, err
}
@@ -252,9 +252,9 @@ func (s *EgressService) Init(ctx context.Context) error {
},
}
s.handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.Method == http.MethodConnect || strings.EqualFold(r.Header.Get("Upgrade"), HeaderSamTunnelUpgrade) {
+ if r.Method == http.MethodConnect || strings.EqualFold(r.Header.Get("Upgrade"), HeaderMeshTunnelUpgrade) {
reqPort := s.port()
- if pStr := r.Header.Get(HeaderSamEgressPort); pStr != "" {
+ if pStr := r.Header.Get(HeaderMeshEgressPort); pStr != "" {
if p, err := strconv.Atoi(pStr); err == nil {
reqPort = p
}
@@ -375,7 +375,7 @@ func egressFactsFor(svc Service) *EgressFacts {
// registered, withdrawn ones unregistered. One assignment that cannot be
// served (a credential the platform did not deliver) is reported and the
// rest are still applied.
-func (n *SamNode) syncEgressAssignments(ctx context.Context, controlPlaneURL string) error {
+func (n *AgentMeshNode) syncEgressAssignments(ctx context.Context, controlPlaneURL string) error {
token := n.GetIdentity()
if len(token) == 0 {
return errors.New("node has no identity token to fetch egress assignments")
@@ -393,7 +393,7 @@ func (n *SamNode) syncEgressAssignments(ctx context.Context, controlPlaneURL str
return n.applyEgressAssignments(ctx, resp.GetEgress())
}
-func (n *SamNode) applyEgressAssignments(ctx context.Context, assigned []*api.EgressDestination) error {
+func (n *AgentMeshNode) applyEgressAssignments(ctx context.Context, assigned []*api.EgressDestination) error {
if n.services == nil {
// Before Start there is no registry to reconcile against; Start
// applies what arrived last.
@@ -454,7 +454,7 @@ func (n *SamNode) applyEgressAssignments(ctx context.Context, assigned []*api.Eg
// applyPendingEgress registers the assignments that arrived before the
// registry existed. Called by Start once it does.
-func (n *SamNode) applyPendingEgress(ctx context.Context) {
+func (n *AgentMeshNode) applyPendingEgress(ctx context.Context) {
n.pendingEgressMu.Lock()
pending := n.pendingEgress
n.pendingEgress = nil
@@ -472,7 +472,7 @@ func (n *SamNode) applyPendingEgress(ctx context.Context) {
// node, so its own credential is evaluated, with the request's method and
// path and the destination's host and port, as on the mesh datapath. The
// client's Authorization was for the node and does not travel further.
-func handleLocalEgress(node *SamNode, w http.ResponseWriter, r *http.Request) {
+func handleLocalEgress(node *AgentMeshNode, w http.ResponseWriter, r *http.Request) {
if hasDotSegment(r.URL.Path) {
http.Error(w, "Invalid path", http.StatusBadRequest)
return
diff --git a/internal/node/egress_inspect.go b/internal/node/egress_inspect.go
index 3fd5abe4..36a7fb72 100644
--- a/internal/node/egress_inspect.go
+++ b/internal/node/egress_inspect.go
@@ -91,7 +91,7 @@ func (r *boundedResponseRecorder) Write(p []byte) (int, error) {
return r.body.Write(p)
}
-func buildSamAttributesStruct(destName string, ec egressCallerContext) map[string]*structpb.Struct {
+func buildMeshAttributesStruct(destName string, ec egressCallerContext) map[string]*structpb.Struct {
st, err := structpb.NewStruct(map[string]any{
"principal": ec.principal,
"roles": strings.Join(ec.roles, ","),
@@ -118,10 +118,10 @@ func writeImmediateResponse(w http.ResponseWriter, imm *extprocv3.ImmediateRespo
if details == "" {
details = "ext_proc_blocked"
}
- w.Header().Set("Proxy-Status", fmt.Sprintf("sam-node; error=%s; details=%q", proxyStatusDenied, details))
+ w.Header().Set("Proxy-Status", fmt.Sprintf("agentmesh-node; error=%s; details=%q", proxyStatusDenied, details))
logger.Infow("Egress Inspection Verdict",
"destination", destName,
- "sam_task", task,
+ "mesh_task", task,
"tier", "ext_proc",
"verdict", "block",
"status", status,
@@ -249,7 +249,7 @@ func (s *EgressService) serveInspectedEgress(w http.ResponseWriter, r *http.Requ
if !kind.ModelArmor.GetFailOpen() {
logger.Warnw("Egress Inspection Verdict",
"destination", s.info.Name,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"tier", "model_armor",
"verdict", "error_fail_closed",
"error", err.Error(),
@@ -259,7 +259,7 @@ func (s *EgressService) serveInspectedEgress(w http.ResponseWriter, r *http.Requ
}
logger.Warnw("Egress Inspection Verdict",
"destination", s.info.Name,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"tier", "model_armor",
"verdict", "error_fail_open",
"error", err.Error(),
@@ -267,12 +267,12 @@ func (s *EgressService) serveInspectedEgress(w http.ResponseWriter, r *http.Requ
} else if blocked {
logger.Infow("Egress Inspection Verdict",
"destination", s.info.Name,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"tier", "model_armor",
"verdict", "block",
"phase", "request",
)
- w.Header().Set("Proxy-Status", fmt.Sprintf("sam-node; error=%s; details=\"model_armor\"", proxyStatusDenied))
+ w.Header().Set("Proxy-Status", fmt.Sprintf("agentmesh-node; error=%s; details=\"model_armor\"", proxyStatusDenied))
http.Error(w, "Request blocked by Model Armor policy", http.StatusForbidden)
return
}
@@ -290,14 +290,14 @@ func (s *EgressService) serveInspectedEgress(w http.ResponseWriter, r *http.Requ
var imm *extprocv3.ImmediateResponse
var newBody []byte
if err == nil {
- attrs := buildSamAttributesStruct(s.info.Name, callerCtx)
+ attrs := buildMeshAttributesStruct(s.info.Name, callerCtx)
session, imm, newBody, err = client.RunRequestPhase(r, ep, s.info.Name, reqBody, attrs)
}
if err != nil {
if !ep.GetFailureModeAllow() {
logger.Warnw("Egress Inspection Verdict",
"destination", s.info.Name,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"tier", "ext_proc",
"verdict", "error_fail_closed",
"error", err.Error(),
@@ -307,7 +307,7 @@ func (s *EgressService) serveInspectedEgress(w http.ResponseWriter, r *http.Requ
}
logger.Warnw("Egress Inspection Verdict",
"destination", s.info.Name,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"tier", "ext_proc",
"verdict", "error_fail_open",
"error", err.Error(),
@@ -356,7 +356,7 @@ func (s *EgressService) serveInspectedEgress(w http.ResponseWriter, r *http.Requ
if !needResponseBuffer {
logger.Infow("Egress Inspection Verdict",
"destination", s.info.Name,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"tier", "inspection_chain",
"verdict", "allow",
)
@@ -441,12 +441,12 @@ func (s *EgressService) serveInspectedEgress(w http.ResponseWriter, r *http.Requ
} else if blocked {
logger.Infow("Egress Inspection Verdict",
"destination", s.info.Name,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"tier", "model_armor",
"verdict", "block",
"phase", "response",
)
- w.Header().Set("Proxy-Status", fmt.Sprintf("sam-node; error=%s; details=\"model_armor_response\"", proxyStatusDenied))
+ w.Header().Set("Proxy-Status", fmt.Sprintf("agentmesh-node; error=%s; details=\"model_armor_response\"", proxyStatusDenied))
http.Error(w, "Response blocked by Model Armor policy", http.StatusForbidden)
return
}
@@ -454,7 +454,7 @@ func (s *EgressService) serveInspectedEgress(w http.ResponseWriter, r *http.Requ
logger.Infow("Egress Inspection Verdict",
"destination", s.info.Name,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"tier", "inspection_chain",
"verdict", "allow",
)
diff --git a/internal/node/egress_inspect_test.go b/internal/node/egress_inspect_test.go
index 03516d2e..2d1d64b4 100644
--- a/internal/node/egress_inspect_test.go
+++ b/internal/node/egress_inspect_test.go
@@ -242,8 +242,8 @@ func (s *testExtProcInspector) Process(stream extprocv3.ExternalProcessor_Proces
if err != nil {
return err
}
- if samStruct := req.GetAttributes()["mesh"]; samStruct != nil {
- if v := samStruct.GetFields()["destination"]; v != nil {
+ if meshStruct := req.GetAttributes()["mesh"]; meshStruct != nil {
+ if v := meshStruct.GetFields()["destination"]; v != nil {
s.mu.Lock()
s.capturedDestAttr = v.GetStringValue()
s.mu.Unlock()
@@ -436,7 +436,7 @@ func TestExtProcEgressClient(t *testing.T) {
gotDest := inspector.capturedDestAttr
inspector.mu.Unlock()
if gotDest != "api.anthropic.com" {
- t.Fatalf("attributes[sam].destination = %q, want api.anthropic.com", gotDest)
+ t.Fatalf("attributes[mesh].destination = %q, want api.anthropic.com", gotDest)
}
if upstreamBody != `{"prompt":"my [MASKED] value"}` {
t.Fatalf("upstreamBody = %q, want masked body", upstreamBody)
@@ -641,7 +641,7 @@ func TestGatewayExtProcServer(t *testing.T) {
Headers: &corev3.HeaderMap{
Headers: []*corev3.HeaderValue{
{Key: ":method", Value: "POST"},
- {Key: ":path", Value: "/mesh/egress/api.github.com/repos/google/sam"},
+ {Key: ":path", Value: "/mesh/egress/api.github.com/repos/google/agentmesh"},
{Key: "authorization", Value: "Bearer " + b64Biscuit},
},
},
diff --git a/internal/node/egress_metrics.go b/internal/node/egress_metrics.go
index 4a3ecb70..a3e2f1ca 100644
--- a/internal/node/egress_metrics.go
+++ b/internal/node/egress_metrics.go
@@ -27,7 +27,7 @@ import (
var (
egressDecisionsTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
- Name: "sam_node_egress_decisions_total",
+ Name: "agentmesh_node_egress_decisions_total",
Help: "Requests for egress destinations this node serves, by destination and outcome (allow, deny, not_assigned, credential_unavailable)",
},
[]string{"destination", "outcome"},
@@ -35,7 +35,7 @@ var (
egressAssignmentsTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
- Name: "sam_node_egress_assignments_total",
+ Name: "agentmesh_node_egress_assignments_total",
Help: "Egress assignments applied from the control plane, by outcome (registered, withdrawn, refused)",
},
[]string{"outcome"},
diff --git a/internal/node/egress_route_test.go b/internal/node/egress_route_test.go
index 2012e101..c73e24dd 100644
--- a/internal/node/egress_route_test.go
+++ b/internal/node/egress_route_test.go
@@ -108,8 +108,8 @@ func TestLocalEgressRoute(t *testing.T) {
// The node's own refusals name themselves, so an app can tell a policy
// denial from a 403 the destination sent.
proxyStatus := map[int]string{
- http.StatusForbidden: "sam-node; error=http_request_denied",
- http.StatusNotFound: "sam-node; error=destination_not_found",
+ http.StatusForbidden: "agentmesh-node; error=http_request_denied",
+ http.StatusNotFound: "agentmesh-node; error=destination_not_found",
}
tests := []struct {
@@ -125,7 +125,7 @@ func TestLocalEgressRoute(t *testing.T) {
{"local attenuation on path", "GET", "/egress/api.github.com/repos/acme/vault/keys", nil, http.StatusForbidden},
{"a destination with a plain grant takes any method", "DELETE", "/egress/open.example/anything", nil, http.StatusNoContent},
{"a destination not assigned to this node", "GET", "/egress/other.example/x", nil, http.StatusNotFound},
- {"a mesh name is not an egress destination", "GET", "/egress/tools.mcp.sam.alt/x", nil, http.StatusNotFound},
+ {"a mesh name is not an egress destination", "GET", "/egress/tools.mcp.mesh.alt/x", nil, http.StatusNotFound},
}
decisions := func(destination, outcome string) float64 {
return counterValue(t, egressDecisionsTotal.WithLabelValues(destination, outcome))
diff --git a/internal/node/egress_test.go b/internal/node/egress_test.go
index 90414bed..413f2f9f 100644
--- a/internal/node/egress_test.go
+++ b/internal/node/egress_test.go
@@ -82,7 +82,7 @@ func TestAuthorizeHTTPFacts(t *testing.T) {
})
token, pub := mintFor(t, caller, append(narrowed, api.MarkerFact(api.FactTargetUnrestricted))...)
- node := &SamNode{
+ node := &AgentMeshNode{
Store: store,
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
@@ -150,7 +150,7 @@ func TestAuthorizeLocalIsSelfTargeted(t *testing.T) {
grant := biscuit.Fact{Predicate: biscuit.Predicate{Name: api.FactGrantedServiceExact,
IDs: []biscuit.Term{biscuit.String("egress"), biscuit.String("api.github.com")}}}
token, pub := mintFor(t, self, grant)
- node := &SamNode{Store: store, trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}}, BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{Store: store, trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}}, BiscuitTimeout: 500 * time.Millisecond}
local := RequestContext{PeerID: self, Protocol: "local-api", Target: "egress://api.github.com",
HTTP: &HTTPRequestFacts{Method: "GET", Path: "/"}, Local: true}
@@ -239,7 +239,7 @@ func TestEgressServiceProxiesWithTheNodesCredential(t *testing.T) {
}
rr = httptest.NewRecorder()
svc.Handler().ServeHTTP(rr, httptest.NewRequest(http.MethodGet, "/", nil))
- if rr.Code != http.StatusBadGateway || rr.Header().Get("Proxy-Status") != "sam-node; error=proxy_configuration_error" {
+ if rr.Code != http.StatusBadGateway || rr.Header().Get("Proxy-Status") != "agentmesh-node; error=proxy_configuration_error" {
t.Errorf("missing credential at request time: %d %q", rr.Code, rr.Header().Get("Proxy-Status"))
}
@@ -282,7 +282,7 @@ func TestApplyEgressAssignmentsReconciles(t *testing.T) {
if err := os.WriteFile(filepath.Join(secrets, "cred"), []byte("tok"), 0o600); err != nil {
t.Fatal(err)
}
- node := &SamNode{services: NewServiceRegistry(&fakeDHT{}, time.Second), config: Options{SecretsDir: secrets}}
+ node := &AgentMeshNode{services: NewServiceRegistry(&fakeDHT{}, time.Second), config: Options{SecretsDir: secrets}}
ctx := context.Background()
assignments := func(outcome string) float64 {
return counterValue(t, egressAssignmentsTotal.WithLabelValues(outcome))
@@ -326,7 +326,7 @@ func TestApplyEgressAssignmentsReconciles(t *testing.T) {
}
}
-func egressNames(node *SamNode) []string {
+func egressNames(node *AgentMeshNode) []string {
var names []string
for _, info := range node.services.List(api.ServiceType_SERVICE_TYPE_EGRESS) {
names = append(names, info.GetName())
diff --git a/internal/node/egress_tunnel.go b/internal/node/egress_tunnel.go
index 285349e5..8204cc2b 100644
--- a/internal/node/egress_tunnel.go
+++ b/internal/node/egress_tunnel.go
@@ -37,12 +37,12 @@ import (
)
const (
- // HeaderSamEgressPort carries the requested TCP destination port when a
+ // HeaderMeshEgressPort carries the requested TCP destination port when a
// CONNECT tunnel is forwarded across /libp2p-http.
- HeaderSamEgressPort = "X-Mesh-Egress-Port"
- // HeaderSamTunnelUpgrade marks an HTTP/1.1 request over /libp2p-http as a
+ HeaderMeshEgressPort = "X-Mesh-Egress-Port"
+ // HeaderMeshTunnelUpgrade marks an HTTP/1.1 request over /libp2p-http as a
// raw TCP CONNECT tunnel.
- HeaderSamTunnelUpgrade = "sam-tcp-tunnel"
+ HeaderMeshTunnelUpgrade = "mesh-tcp-tunnel"
clientHelloReadTimeout = 5 * time.Second
)
@@ -198,7 +198,7 @@ func (s *EgressService) ServeTunnel(ctx context.Context, w http.ResponseWriter,
logger.Warnw("Egress TCP Tunnel Verdict",
"destination", s.info.Name,
"port", reqPort,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"verdict", "deny_port",
)
refuse(w, http.StatusForbidden, fmt.Sprintf("egress destination %q does not allow TCP port %d", s.info.Name, reqPort), proxyStatusDenied)
@@ -233,7 +233,7 @@ func (s *EgressService) ServeTunnel(ctx context.Context, w http.ResponseWriter,
"destination", s.info.Name,
"port", reqPort,
"sni", sni,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"verdict", "deny_sni",
"error", err.Error(),
)
@@ -249,7 +249,7 @@ func (s *EgressService) ServeTunnel(ctx context.Context, w http.ResponseWriter,
"destination", s.info.Name,
"port", reqPort,
"sni", sni,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"verdict", "dial_error",
"error", err.Error(),
)
@@ -290,7 +290,7 @@ func (s *EgressService) ServeTunnel(ctx context.Context, w http.ResponseWriter,
"destination", s.info.Name,
"port", reqPort,
"sni", sni,
- "sam_task", callerCtx.task,
+ "mesh_task", callerCtx.task,
"verdict", "allow",
"bytes_tx", txBytes,
"bytes_rx", rxBytes,
@@ -302,7 +302,7 @@ func (s *EgressService) ServeTunnel(ctx context.Context, w http.ResponseWriter,
// authenticates the caller via withCallerOrTokenAuth, and either serves the
// tunnel locally (when this node serves egress://<host>) or forwards it across
// the mesh to a serving egress node.
-func withConnectTunnel(node *SamNode, token string, next http.Handler) http.Handler {
+func withConnectTunnel(node *AgentMeshNode, token string, next http.Handler) http.Handler {
authedConnect := withCallerOrTokenAuth(node, token, true, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
handleConnectTunnel(node, w, r)
}))
@@ -339,7 +339,7 @@ func parseConnectHostPort(r *http.Request) (string, int, error) {
return host, port, nil
}
-func handleConnectTunnel(node *SamNode, w http.ResponseWriter, r *http.Request) {
+func handleConnectTunnel(node *AgentMeshNode, w http.ResponseWriter, r *http.Request) {
host, port, err := parseConnectHostPort(r)
if err != nil {
refuse(w, http.StatusBadRequest, err.Error(), proxyStatusDenied)
@@ -435,7 +435,7 @@ func handleConnectTunnel(node *SamNode, w http.ResponseWriter, r *http.Request)
refuse(w, http.StatusForbidden, "Required labels not attested by provider", proxyStatusDenied)
}
-func forwardConnectTunnelToPeer(node *SamNode, w http.ResponseWriter, r *http.Request, targetPeer peer.ID, host string, port int, biscuitBytes []byte) {
+func forwardConnectTunnelToPeer(node *AgentMeshNode, w http.ResponseWriter, r *http.Request, targetPeer peer.ID, host string, port int, biscuitBytes []byte) {
dialCtx, cancel := context.WithTimeout(r.Context(), 10*time.Second)
meshConn, err := gostream.Dial(dialCtx, node.Host, targetPeer, "/libp2p-http")
cancel()
@@ -449,8 +449,8 @@ func forwardConnectTunnelToPeer(node *SamNode, w http.ResponseWriter, r *http.Re
host,
host,
port,
- HeaderSamTunnelUpgrade,
- HeaderSamEgressPort,
+ HeaderMeshTunnelUpgrade,
+ HeaderMeshEgressPort,
port,
api.HeaderMeshBiscuit,
base64.StdEncoding.EncodeToString(biscuitBytes),
diff --git a/internal/node/enroll.go b/internal/node/enroll.go
index ca01be4b..1a0084ae 100644
--- a/internal/node/enroll.go
+++ b/internal/node/enroll.go
@@ -36,7 +36,7 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"
)
-var logger = golog.Logger("sam-node")
+var logger = golog.Logger("agentmesh-node")
// expireUnix is the unix seconds of a control plane's expire_time for the
// store; an unset one is 0, an already-expired credential, so the node
@@ -73,7 +73,7 @@ func GetOrGenerateKey(s *Store) crypto.PrivKey {
return priv
}
-func (n *SamNode) Enroll(ctx context.Context, controlPlaneURL string, jwt string) error {
+func (n *AgentMeshNode) Enroll(ctx context.Context, controlPlaneURL string, jwt string) error {
enrollResp, err := n.enrollHTTP(ctx, controlPlaneURL, jwt, n.Host.ID(), n.config.PrivKey)
if err != nil {
return err
@@ -91,7 +91,7 @@ func (n *SamNode) Enroll(ctx context.Context, controlPlaneURL string, jwt string
// right after a rotation that is still signed by the retiring key; with only
// the newest key loaded the node would refuse every router. Best effort: a
// control plane too old to serve /keys still enrolls with one key.
-func (n *SamNode) adoptEnrolledKeys(ctx context.Context, controlPlaneURL string, newest []byte) {
+func (n *AgentMeshNode) adoptEnrolledKeys(ctx context.Context, controlPlaneURL string, newest []byte) {
n.addTrustedKey(ed25519.PublicKey(newest))
if err := n.syncTrustedKeys(ctx, controlPlaneURL); err != nil {
logger.Warnf("Could not fetch the control plane's full key set after enrollment (continuing with the enrollment key only): %v", err)
@@ -102,7 +102,7 @@ func (n *SamNode) adoptEnrolledKeys(ctx context.Context, controlPlaneURL string,
// enrollHTTP performs the HTTP half of enrollment for an explicit peer
// identity, so it can run before the libp2p host exists (startup recovery).
// privKey signs the proof-of-possession challenge; peerID must be its own.
-func (n *SamNode) enrollHTTP(ctx context.Context, controlPlaneURL, jwt string, peerID peer.ID, privKey crypto.PrivKey) (*api.EnrollResponse, error) {
+func (n *AgentMeshNode) enrollHTTP(ctx context.Context, controlPlaneURL, jwt string, peerID peer.ID, privKey crypto.PrivKey) (*api.EnrollResponse, error) {
pubBytes, err := crypto.MarshalPublicKey(privKey.GetPublic())
if err != nil {
return nil, fmt.Errorf("failed to marshal public key: %w", err)
@@ -160,7 +160,7 @@ func (n *SamNode) enrollHTTP(ctx context.Context, controlPlaneURL, jwt string, p
// ReEnrollWithRefreshToken re-enrolls over HTTP with a JWT from the stored
// refresh token, keeping the PeerID. Must not touch n.Host: startup recovery
// runs it before the host exists, and the mobile app on a never-started node.
-func (n *SamNode) ReEnrollWithRefreshToken(ctx context.Context) error {
+func (n *AgentMeshNode) ReEnrollWithRefreshToken(ctx context.Context) error {
controlPlaneURL, err := n.Store.LoadControlPlaneURL()
if err != nil || controlPlaneURL == "" {
return fmt.Errorf("no control plane URL in store")
@@ -178,7 +178,7 @@ func (n *SamNode) ReEnrollWithRefreshToken(ctx context.Context) error {
return err
}
-func (n *SamNode) processEnrollResponse(resp *http.Response) (*api.EnrollResponse, error) {
+func (n *AgentMeshNode) processEnrollResponse(resp *http.Response) (*api.EnrollResponse, error) {
if resp.StatusCode != http.StatusOK {
body, _ := io.ReadAll(io.LimitReader(resp.Body, maxControlPlaneBodyBytes))
return nil, fmt.Errorf("enrollment failed with status %s: %s", resp.Status, string(body))
@@ -225,7 +225,7 @@ func (n *SamNode) processEnrollResponse(resp *http.Response) (*api.EnrollRespons
return &enrollResp, nil
}
-func (n *SamNode) connectToRouters(ctx context.Context, addrs []string) error {
+func (n *AgentMeshNode) connectToRouters(ctx context.Context, addrs []string) error {
if len(addrs) == 0 {
return fmt.Errorf("failed to connect and authenticate after HTTP enrollment: control plane returned no router addresses")
}
@@ -251,7 +251,7 @@ func (n *SamNode) connectToRouters(ctx context.Context, addrs []string) error {
// EnrollBootstrap enrolls the node with the control plane using a pre-shared bootstrap token.
// If the enrollment status is PENDING, it polls the status endpoint until approved or rejected.
-func (n *SamNode) EnrollBootstrap(ctx context.Context, controlPlaneURL string, bootstrapToken string) error {
+func (n *AgentMeshNode) EnrollBootstrap(ctx context.Context, controlPlaneURL string, bootstrapToken string) error {
pubKey := n.Host.Peerstore().PubKey(n.Host.ID())
pubBytes, err := crypto.MarshalPublicKey(pubKey)
if err != nil {
diff --git a/internal/node/enroll_test.go b/internal/node/enroll_test.go
index 9d58d73b..26b42e3f 100644
--- a/internal/node/enroll_test.go
+++ b/internal/node/enroll_test.go
@@ -76,7 +76,7 @@ func TestEnrollmentPinsIdentityKeySet(t *testing.T) {
if err := store.SaveControlPlaneURL(server.URL); err != nil {
t.Fatal(err)
}
- node := &SamNode{Store: store, BiscuitTimeout: time.Second, config: Options{RequiredRole: api.RoleNode}}
+ node := &AgentMeshNode{Store: store, BiscuitTimeout: time.Second, config: Options{RequiredRole: api.RoleNode}}
if _, err := node.enrollHTTP(context.Background(), server.URL, "test-jwt", peerID, privateKey); err != nil {
t.Fatal(err)
}
@@ -98,7 +98,7 @@ func TestEnrollmentPinsIdentityKeySet(t *testing.T) {
if !node.identityPredatesRotation() {
t.Fatal("a key learned after issuance must mark the identity for refresh")
}
- restarted := &SamNode{Store: store}
+ restarted := &AgentMeshNode{Store: store}
if stored, err := store.LoadTrustedKeys(); err != nil {
t.Fatal(err)
} else {
@@ -259,7 +259,7 @@ func TestStartRecoversStaleIdentityViaRefreshToken(t *testing.T) {
cpSrv := httptest.NewServer(cpMux)
defer cpSrv.Close()
- if err := store.SaveOIDCConfig(oidcSrv.URL, "client_id_test", "sam"); err != nil {
+ if err := store.SaveOIDCConfig(oidcSrv.URL, "client_id_test", "agentmesh"); err != nil {
t.Fatal(err)
}
if err := store.SaveRefreshToken("stored_refresh"); err != nil {
@@ -278,7 +278,7 @@ func TestStartRecoversStaleIdentityViaRefreshToken(t *testing.T) {
t.Fatal(err)
}
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: privKey,
Store: store,
ControlPlanePubKey: cpPub,
@@ -434,7 +434,7 @@ func TestStartRecoversStaleIdentityViaAutonomousRefresh(t *testing.T) {
t.Fatal(err)
}
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: privKey,
Store: store,
ControlPlanePubKey: cpPub,
@@ -500,7 +500,7 @@ func TestStartStaleIdentityWithoutRefreshTokenFails(t *testing.T) {
t.Fatal(err)
}
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: privKey,
Store: store,
ControlPlanePubKey: cpPub,
@@ -579,7 +579,7 @@ func TestEnroll_InvalidControlPlanePublicKeySize(t *testing.T) {
defer func() { _ = store.Close() }()
priv, _, _ := crypto.GenerateKeyPair(crypto.Ed25519, -1)
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
Store: store,
ListenAddrs: []string{"/ip4/127.0.0.1/tcp/0"},
@@ -652,7 +652,7 @@ func TestEnrollTrustsRouterSignedByGraceKey(t *testing.T) {
cpSrv := httptest.NewServer(mux)
defer cpSrv.Close()
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: privKey,
Store: store,
ListenAddrs: []string{"/ip4/127.0.0.1/tcp/0"},
@@ -695,7 +695,7 @@ func TestProcessEnrollResponse_Errors(t *testing.T) {
defer func() { _ = store.Close() }()
priv, _, _ := crypto.GenerateKeyPair(crypto.Ed25519, -1)
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
Store: store,
ListenAddrs: []string{"/ip4/127.0.0.1/tcp/0"},
@@ -755,7 +755,7 @@ func TestConnectToRouters_EmptyAddrs(t *testing.T) {
defer func() { _ = store.Close() }()
priv, _, _ := crypto.GenerateKeyPair(crypto.Ed25519, -1)
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
Store: store,
ListenAddrs: []string{"/ip4/127.0.0.1/tcp/0"},
diff --git a/internal/node/ext_authz.go b/internal/node/ext_authz.go
index cd1230d6..32e7a005 100644
--- a/internal/node/ext_authz.go
+++ b/internal/node/ext_authz.go
@@ -42,13 +42,13 @@ type extAuthzCheckResult = envoy.CheckResult
// newNodeEnvoyGateway creates an Envoy ext_authz + ext_proc GatewayServer backed
// by this node's Biscuit PDP and credential broker.
-func newNodeEnvoyGateway(node *SamNode) *envoy.GatewayServer {
+func newNodeEnvoyGateway(node *AgentMeshNode) *envoy.GatewayServer {
return envoy.NewGatewayServer(func(ctx context.Context, in envoy.CheckInput) envoy.CheckResult {
return evaluateExtAuthz(ctx, node, in)
})
}
-func handleExtAuthzHTTP(node *SamNode, w http.ResponseWriter, r *http.Request) {
+func handleExtAuthzHTTP(node *AgentMeshNode, w http.ResponseWriter, r *http.Request) {
newNodeEnvoyGateway(node).HandleExtAuthzHTTP(w, r)
}
@@ -56,7 +56,7 @@ func inspectMCPHTTPRequestBody(r *http.Request) (string, bool, error) {
return envoy.InspectMCPHTTPRequestBody(r)
}
-func evaluateExtAuthz(ctx context.Context, node *SamNode, in extAuthzCheckInput) extAuthzCheckResult {
+func evaluateExtAuthz(ctx context.Context, node *AgentMeshNode, in extAuthzCheckInput) extAuthzCheckResult {
if node == nil {
return extAuthzCheckResult{
Allowed: false,
@@ -191,7 +191,7 @@ func evaluateExtAuthz(ctx context.Context, node *SamNode, in extAuthzCheckInput)
}
}
-func extractAndVerifyExtAuthzBiscuit(ctx context.Context, node *SamNode, headers map[string]string) ([]byte, int, error) {
+func extractAndVerifyExtAuthzBiscuit(ctx context.Context, node *AgentMeshNode, headers map[string]string) ([]byte, int, error) {
if rawB64 := strings.TrimSpace(headers[strings.ToLower(api.HeaderMeshBiscuit)]); rawB64 != "" {
raw, err := decodeBiscuitToken(rawB64)
if err != nil {
@@ -238,7 +238,7 @@ func isExtAuthzServiceScheme(scheme string) bool {
}
}
-func resolveExtAuthzTarget(node *SamNode, in extAuthzCheckInput) (target, reqPath string) {
+func resolveExtAuthzTarget(node *AgentMeshNode, in extAuthzCheckInput) (target, reqPath string) {
path := in.Path
if idx := strings.IndexByte(path, '?'); idx >= 0 {
path = path[:idx]
diff --git a/internal/node/gate.go b/internal/node/gate.go
index a773e491..42a9a4c1 100644
--- a/internal/node/gate.go
+++ b/internal/node/gate.go
@@ -34,7 +34,7 @@ var _ connmgr.ConnectionGater = (*nodeConnGate)(nil)
// nodeConnGate enforces swarm-level AuthN policies
type nodeConnGate struct {
- node *SamNode
+ node *AgentMeshNode
}
// InterceptPeerDial controls who we are allowed to call (Outbound)
@@ -72,7 +72,7 @@ func (g *nodeConnGate) InterceptSecured(dir network.Direction, p peer.ID, n netw
// HandleMCPStream is the libp2p stream handler for the MCP protocol.
// It routes the authenticated stream to the appropriate backend service,
// or serves the internal MCP catalog if the TargetService is empty/catalog.
-func (n *SamNode) HandleMCPStream(s network.Stream, reqCtx RequestContext) {
+func (n *AgentMeshNode) HandleMCPStream(s network.Stream, reqCtx RequestContext) {
// If the TargetService is for a registered local backend, dumb-pipe proxy to it.
target := reqCtx.Target
targetType, targetName := api.ParseServiceTarget(target)
@@ -106,7 +106,7 @@ func (n *SamNode) HandleMCPStream(s network.Stream, reqCtx RequestContext) {
transport := NewStreamTransport(s)
server := mcp.NewServer(&mcp.Implementation{
- Name: "sam-node-catalog",
+ Name: "agentmesh-node-catalog",
Version: "0.1.0",
}, nil)
diff --git a/internal/node/gate_test.go b/internal/node/gate_test.go
index a13608bf..6d6f26ac 100644
--- a/internal/node/gate_test.go
+++ b/internal/node/gate_test.go
@@ -48,7 +48,7 @@ func TestConnectionGater(t *testing.T) {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
Store: store,
revokedPeers: cache,
BiscuitTimeout: 500 * time.Millisecond,
@@ -126,7 +126,7 @@ func TestGaterEnforcesSeededBans(t *testing.T) {
t.Fatal(err)
}
- node, err := NewSamNode(Options{PrivKey: bannedPriv, Store: store})
+ node, err := NewAgentMeshNode(Options{PrivKey: bannedPriv, Store: store})
if err != nil {
t.Fatal(err)
}
@@ -146,8 +146,8 @@ func TestGaterEnforcesSeededBans(t *testing.T) {
}
}
-// startBareNode brings up a SamNode without control plane/enrollment.
-func startBareNode(t *testing.T, ctx context.Context) (*SamNode, func()) {
+// startBareNode brings up a AgentMeshNode without control plane/enrollment.
+func startBareNode(t *testing.T, ctx context.Context) (*AgentMeshNode, func()) {
t.Helper()
dir := t.TempDir()
store, err := NewStore(dir)
@@ -159,7 +159,7 @@ func startBareNode(t *testing.T, ctx context.Context) (*SamNode, func()) {
if err != nil {
t.Fatal(err)
}
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
RouterAddrs: nil,
Store: store,
@@ -188,7 +188,7 @@ func startBareNode(t *testing.T, ctx context.Context) (*SamNode, func()) {
return node, cleanup
}
-const testMCPProtocol = protocol.ID("/sam-test/mcp/1.0.0")
+const testMCPProtocol = protocol.ID("/mesh-test/mcp/1.0.0")
func TestHandleMCPStream_DumbPipeProxy(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
@@ -342,7 +342,7 @@ func TestHandleMCPStream_ForwarderRoutesCalls(t *testing.T) {
// the equivalent locally only - its CloseRead doc says plainly "Remote is
// not notified." A stream backed by TCP+yamux structurally cannot exercise
// the wire-level race this test is after; only a real QUIC connection can.
-func startBareQUICNode(t *testing.T, ctx context.Context) (*SamNode, func()) {
+func startBareQUICNode(t *testing.T, ctx context.Context) (*AgentMeshNode, func()) {
t.Helper()
dir := t.TempDir()
store, err := NewStore(dir)
@@ -354,7 +354,7 @@ func startBareQUICNode(t *testing.T, ctx context.Context) (*SamNode, func()) {
if err != nil {
t.Fatal(err)
}
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
RouterAddrs: nil,
Store: store,
@@ -384,7 +384,7 @@ func startBareQUICNode(t *testing.T, ctx context.Context) (*SamNode, func()) {
}
// TestHandleStreamPassThrough_BackendEOFDoesNotDropInFlightResponse is a
-// regression test for google/sam#375.
+// regression test for google/agentmesh#375.
//
// A backend that answers a single request and then closes its side of the
// connection - a normal EOF for a one-shot HTTP-style backend, not a
@@ -469,7 +469,7 @@ func TestHandleStreamPassThrough_BackendEOFDoesNotDropInFlightResponse(t *testin
}
// TestHandleStreamPassThrough_SlowBackendDoesNotHitDrainTimeout is a
-// regression test for review feedback from aojea on google/sam#379: the
+// regression test for review feedback from aojea on google/agentmesh#379: the
// drain wait was timed from the start of the whole exchange, not from when
// the backend leg actually finished, so any session - healthy or not -
// that happened to run longer than passThroughDrainTimeout got killed
diff --git a/internal/node/gossip_hardening_test.go b/internal/node/gossip_hardening_test.go
index fd7f7078..b419ba32 100644
--- a/internal/node/gossip_hardening_test.go
+++ b/internal/node/gossip_hardening_test.go
@@ -78,7 +78,7 @@ func TestValidateMeshEvent(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: cpPub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
}
diff --git a/internal/node/identity_evidence.go b/internal/node/identity_evidence.go
index 55d1ddf1..5928150c 100644
--- a/internal/node/identity_evidence.go
+++ b/internal/node/identity_evidence.go
@@ -54,7 +54,7 @@ func snapshotControlPlaneKey(key ed25519.PublicKey) (trustedKeySnapshot, error)
}, nil
}
-func (n *SamNode) trustedKeySnapshot() ([]trustedKeySnapshot, error) {
+func (n *AgentMeshNode) trustedKeySnapshot() ([]trustedKeySnapshot, error) {
n.keysMu.RLock()
trusted := append([]TrustedKey(nil), n.trustedKeys...)
n.keysMu.RUnlock()
@@ -90,7 +90,7 @@ func findSelectedKey(snapshots []trustedKeySnapshot, selected ed25519.PublicKey)
return trustedKeySnapshot{}, false
}
-func (n *SamNode) stillTrustsKey(selected trustedKeySnapshot) bool {
+func (n *AgentMeshNode) stillTrustsKey(selected trustedKeySnapshot) bool {
n.keysMu.RLock()
defer n.keysMu.RUnlock()
for _, candidate := range n.trustedKeys {
@@ -136,7 +136,7 @@ func handleIdentityEvidenceNotFound(w http.ResponseWriter, _ *http.Request) {
writeEvidenceError(w, http.StatusNotFound, "Not found")
}
-func handleIdentityEvidence(n *SamNode, w http.ResponseWriter, r *http.Request) {
+func handleIdentityEvidence(n *AgentMeshNode, w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
w.Header().Set("Allow", http.MethodGet)
writeEvidenceError(w, http.StatusMethodNotAllowed, "Method not allowed")
@@ -159,7 +159,7 @@ func handleIdentityEvidence(n *SamNode, w http.ResponseWriter, r *http.Request)
writeEvidenceProtoJSON(w, http.StatusOK, response)
}
-func handlePeerEvidence(n *SamNode, w http.ResponseWriter, r *http.Request) {
+func handlePeerEvidence(n *AgentMeshNode, w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
w.Header().Set("Allow", http.MethodGet)
writeEvidenceError(w, http.StatusMethodNotAllowed, "Method not allowed")
@@ -211,7 +211,7 @@ func trustedControlPlaneKeysUnavailable(err error, snapshots []trustedKeySnapsho
return nil
}
-func (n *SamNode) buildIdentityEvidence(checkedAt time.Time) (*api.IdentityEvidenceResponse, error) {
+func (n *AgentMeshNode) buildIdentityEvidence(checkedAt time.Time) (*api.IdentityEvidenceResponse, error) {
if n == nil || n.Host == nil || n.Store == nil {
return nil, fmt.Errorf("node identity store is unavailable")
}
@@ -256,7 +256,7 @@ func (n *SamNode) buildIdentityEvidence(checkedAt time.Time) (*api.IdentityEvide
}, nil
}
-func (n *SamNode) buildPeerEvidence(requested peer.ID, observation peerBiscuitObservation, checkedAt time.Time) (*api.PeerEvidenceResponse, error) {
+func (n *AgentMeshNode) buildPeerEvidence(requested peer.ID, observation peerBiscuitObservation, checkedAt time.Time) (*api.PeerEvidenceResponse, error) {
if requested == "" || observation.ConnectionPeer == "" || requested != observation.ConnectionPeer {
return nil, fmt.Errorf("requested and connection PeerIDs differ")
}
@@ -299,7 +299,7 @@ func (n *SamNode) buildPeerEvidence(requested peer.ID, observation peerBiscuitOb
// peerIsRevoked reports whether the peer is in the revocation cache, which is
// reconciled against the control plane's ban set by every SyncControlPlane
// and updated by MeshEvent_BANNED.
-func (n *SamNode) peerIsRevoked(peerID peer.ID) bool {
+func (n *AgentMeshNode) peerIsRevoked(peerID peer.ID) bool {
return n.revokedPeers != nil && n.revokedPeers.Contains(peerID.String())
}
diff --git a/internal/node/identity_evidence_http_test.go b/internal/node/identity_evidence_http_test.go
index e4228d59..8653f97a 100644
--- a/internal/node/identity_evidence_http_test.go
+++ b/internal/node/identity_evidence_http_test.go
@@ -40,11 +40,11 @@ func TestIdentityEvidenceRoutesHaveOwnMetricClass(t *testing.T) {
}
func TestIdentityEvidenceTrailingSlashReturnsNotFound(t *testing.T) {
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
- socketPath := filepath.Join(t.TempDir(), "sam.sock")
+ socketPath := filepath.Join(t.TempDir(), "agentmesh.sock")
srv, err := StartSidecarServer(node, "", socketPath, "", "", "", "")
if err != nil {
@@ -73,8 +73,8 @@ func TestIdentityEvidenceTrailingSlashReturnsNotFound(t *testing.T) {
func TestIdentityEvidenceHandlersRejectUnavailableNode(t *testing.T) {
tests := []struct {
name string
- handler func(*SamNode, http.ResponseWriter, *http.Request)
- node *SamNode
+ handler func(*AgentMeshNode, http.ResponseWriter, *http.Request)
+ node *AgentMeshNode
path string
}{
{
@@ -85,7 +85,7 @@ func TestIdentityEvidenceHandlersRejectUnavailableNode(t *testing.T) {
{
name: "identity nil host",
handler: handleIdentityEvidence,
- node: &SamNode{},
+ node: &AgentMeshNode{},
path: "/mesh/identity",
},
{
@@ -96,7 +96,7 @@ func TestIdentityEvidenceHandlersRejectUnavailableNode(t *testing.T) {
{
name: "peer nil host",
handler: handlePeerEvidence,
- node: &SamNode{},
+ node: &AgentMeshNode{},
path: "/mesh/peer/unavailable/evidence",
},
}
diff --git a/internal/node/identity_evidence_test.go b/internal/node/identity_evidence_test.go
index 5783e71a..b58bc2e0 100644
--- a/internal/node/identity_evidence_test.go
+++ b/internal/node/identity_evidence_test.go
@@ -33,7 +33,7 @@ import (
"google.golang.org/protobuf/encoding/protojson"
)
-func newIdentityEvidenceTestNode(t *testing.T, labels map[string]string) (*SamNode, ed25519.PrivateKey, time.Time) {
+func newIdentityEvidenceTestNode(t *testing.T, labels map[string]string) (*AgentMeshNode, ed25519.PrivateKey, time.Time) {
t.Helper()
host, err := libp2p.New()
if err != nil {
@@ -64,7 +64,7 @@ func newIdentityEvidenceTestNode(t *testing.T, labels map[string]string) (*SamNo
if err != nil {
t.Fatalf("create revocation cache: %v", err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
Host: host,
Store: store,
trustedKeys: []TrustedKey{{Key: controlPlanePublic, ReceivedAt: time.Now().UTC().Add(-time.Minute)}},
diff --git a/internal/node/inference_engine.go b/internal/node/inference_engine.go
index 4a25d795..23625f60 100644
--- a/internal/node/inference_engine.go
+++ b/internal/node/inference_engine.go
@@ -23,7 +23,7 @@ import (
"net/url"
)
-// InferenceEngine is the connector between SAM and an inference backend.
+// InferenceEngine is the connector between Agent Mesh and an inference backend.
// Implementations adapt one backend family; the service and facade layers
// stay backend-agnostic.
type InferenceEngine interface {
diff --git a/internal/node/inference_metrics.go b/internal/node/inference_metrics.go
index 66ac8e37..0ae9c87e 100644
--- a/internal/node/inference_metrics.go
+++ b/internal/node/inference_metrics.go
@@ -22,15 +22,15 @@ import (
var (
inferenceTokensTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
- Name: "sam_node_inference_tokens_total",
- Help: "Total number of inference tokens tracked by sam-node",
+ Name: "agentmesh_node_inference_tokens_total",
+ Help: "Total number of inference tokens tracked by agentmesh-node",
},
[]string{"peer_id", "model", "token_type"},
)
facadeRejectionsTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
- Name: "sam_node_facade_rejections_total",
+ Name: "agentmesh_node_facade_rejections_total",
Help: "Providers excluded by the OpenAI facade scorer, by reason",
},
[]string{"reason"},
@@ -38,7 +38,7 @@ var (
facadeRetriesTotal = promauto.NewCounter(
prometheus.CounterOpts{
- Name: "sam_node_facade_retries_total",
+ Name: "agentmesh_node_facade_retries_total",
Help: "Completion attempts retried on another provider after a retryable failure",
},
)
diff --git a/internal/node/labels_gate.go b/internal/node/labels_gate.go
index 7e570294..5d30f22b 100644
--- a/internal/node/labels_gate.go
+++ b/internal/node/labels_gate.go
@@ -127,9 +127,9 @@ func labelGateKey(peerID peer.ID, required, floor map[string]string) string {
// egressFloor returns the operator's egress floor, or nil when none is
// configured (api.Egress.RequireLabels).
-func (n *SamNode) egressFloor() map[string]string {
- // Nil-safe for the same reason labels() is: NewSamNode always leaves
- // nodeConfig set, but tests build SamNode directly.
+func (n *AgentMeshNode) egressFloor() map[string]string {
+ // Nil-safe for the same reason labels() is: NewAgentMeshNode always leaves
+ // nodeConfig set, but tests build AgentMeshNode directly.
if n.nodeConfig == nil {
return nil
}
@@ -143,7 +143,7 @@ func (n *SamNode) egressFloor() map[string]string {
// The gate runs whenever either exists. A caller that requires nothing is
// still held to the floor — the whole point of a floor is that the party being
// constrained does not get to opt out of it by saying nothing.
-func (n *SamNode) VerifyPeerLabels(ctx context.Context, peerID peer.ID, required map[string]string) error {
+func (n *AgentMeshNode) VerifyPeerLabels(ctx context.Context, peerID peer.ID, required map[string]string) error {
floor := n.egressFloor()
// No early return for an empty requirement: with nothing to attest this
// still verifies that the peer holds a control-plane-signed biscuit bound
@@ -168,7 +168,7 @@ func (n *SamNode) VerifyPeerLabels(ctx context.Context, peerID peer.ID, required
// checkPeerLabels verifies the provider's biscuit (control-plane signature,
// expiry, binding to peerID) and evaluates the caller's requirement and the
// operator's egress floor against its attested facts.
-func (n *SamNode) checkPeerLabels(providerBiscuit []byte, peerID peer.ID, required map[string]string) error {
+func (n *AgentMeshNode) checkPeerLabels(providerBiscuit []byte, peerID peer.ID, required map[string]string) error {
floor := n.egressFloor()
if len(providerBiscuit) == 0 {
return fmt.Errorf("provider %s returned no identity biscuit; not an enrolled peer (required labels %v, egress floor %v)", peerID, required, floor)
@@ -227,7 +227,7 @@ func (n *SamNode) checkPeerLabels(providerBiscuit []byte, peerID peer.ID, requir
// fetchPeerBiscuit obtains the peer's control-plane-minted identity via the
// mutual auth handshake on AuthProtocolID, authenticating with our own.
-func (n *SamNode) fetchPeerBiscuit(ctx context.Context, peerID peer.ID) ([]byte, error) {
+func (n *AgentMeshNode) fetchPeerBiscuit(ctx context.Context, peerID peer.ID) ([]byte, error) {
observation, err := n.fetchPeerBiscuitEvidence(ctx, peerID)
if err != nil {
return nil, err
@@ -250,7 +250,7 @@ func labelGateDialContext(ctx context.Context) context.Context {
// fetchPeerBiscuitEvidence is the uncached form used by the local evidence API.
// It preserves the PeerID authenticated by the libp2p stream separately from
// the requested target so callers can fail closed on any binding mismatch.
-func (n *SamNode) fetchPeerBiscuitEvidence(ctx context.Context, peerID peer.ID) (peerBiscuitObservation, error) {
+func (n *AgentMeshNode) fetchPeerBiscuitEvidence(ctx context.Context, peerID peer.ID) (peerBiscuitObservation, error) {
ourBiscuit := n.GetIdentity()
if ourBiscuit == nil {
return peerBiscuitObservation{}, fmt.Errorf("missing node identity")
diff --git a/internal/node/labels_gate_test.go b/internal/node/labels_gate_test.go
index 8086c5dd..2cc2f69f 100644
--- a/internal/node/labels_gate_test.go
+++ b/internal/node/labels_gate_test.go
@@ -62,7 +62,7 @@ func TestCheckPeerLabels(t *testing.T) {
return b
}
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: cpPub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
}
@@ -97,7 +97,7 @@ func TestCheckPeerLabels(t *testing.T) {
}
t.Run("no trusted keys fails closed", func(t *testing.T) {
- bare := &SamNode{BiscuitTimeout: 500 * time.Millisecond}
+ bare := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}
if err := bare.checkPeerLabels(mint(cpPriv, providerPeer, map[string]string{"region": "eu"}), providerPeer, map[string]string{"region": "eu"}); err == nil {
t.Error("expected error, got nil")
}
@@ -140,8 +140,8 @@ func TestCheckPeerLabelsEnforcesEgressFloor(t *testing.T) {
return b
}
- nodeWithFloor := func(floor map[string]string) *SamNode {
- return &SamNode{
+ nodeWithFloor := func(floor map[string]string) *AgentMeshNode {
+ return &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: cpPub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
nodeConfig: &NodeConfigComplete{EgressRequireLabels: floor},
@@ -224,7 +224,7 @@ func TestCheckPeerLabelsEnforcesEgressFloor(t *testing.T) {
// asked for nothing is gated, which is the difference between a floor and a
// suggestion, and between a provider and a peer that merely announced.
func TestVerifyPeerLabelsDoesNotShortCircuit(t *testing.T) {
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
nodeConfig: &NodeConfigComplete{EgressRequireLabels: map[string]string{"jurisdiction": "eu"}},
}
diff --git a/internal/node/mcp.go b/internal/node/mcp.go
index dad9f9bc..b342e5be 100644
--- a/internal/node/mcp.go
+++ b/internal/node/mcp.go
@@ -33,9 +33,9 @@ import (
"google.golang.org/protobuf/proto"
)
-// meshInstructions tells connecting clients how the SAM mesh is composed and how
+// meshInstructions tells connecting clients how the Agent Mesh is composed and how
// to discover and call remote tools/services. Sent at initialize time.
-const meshInstructions = `This MCP server connects this node to a SAM mesh: a network of remote agents that host their own services (e.g., MCP servers or inference services) and tools.
+const meshInstructions = `This MCP server connects this node to an Agent Mesh: a network of remote agents that host their own services (e.g., MCP servers or inference services) and tools.
The mesh allows you to discover these remote services, list their tools, and call them.
To use these remote services and their tools, the client can use the following flow:
@@ -45,7 +45,7 @@ To use these remote services and their tools, the client can use the following f
Other useful tools: discover_remote_services browses services by type (e.g. 'MCP' or 'Inference'), get_mesh_info reports connected peers and mesh state, list_local_services shows what this node hosts.
-Node diagnostics (logs, connectivity, network/token info, connecting to a peer by address) are NOT MCP tools. When asked to diagnose this node, run 'sam-node debug --help' in a shell to discover the available diagnostics, then invoke the matching subcommand. They talk to the node over its Unix socket, so no token is involved.
+Node diagnostics (logs, connectivity, network/token info, connecting to a peer by address) are NOT MCP tools. When asked to diagnose this node, run 'agentmesh-node debug --help' in a shell to discover the available diagnostics, then invoke the matching subcommand. They talk to the node over its Unix socket, so no token is involved.
Tools on remote services are identified via the format 'scheme://service-name/tool-name' (where 'scheme://service-name' represents the well-known local address of the service, and 'tool-name' is the individual tool to execute on it. Tool names themselves can contain any characters).
@@ -55,14 +55,14 @@ A2A agents ('a2a://...') are NOT called via call_remote_tool either: discover th
To authenticate such an HTTP request to this node, try these in order:
1. If get_mesh_info reports a local_api_socket, send the request over that Unix socket and skip authentication entirely: it serves this same HTTP API, and only the user who owns the socket can connect to it, so no token is involved and no secret lands in a command line. e.g. 'curl --unix-socket <local_api_socket> <local_proxy_url>/chat/completions'.
- 2. Otherwise use the TCP endpoint with header 'X-Mesh-Authentication: Bearer <node API token>'. Do not read your MCP client configuration files to recover that token: they hold every other server's headers too, and reading them puts all of those secrets into the transcript. A daemonized node writes its token to ~/.config/sam-mesh/api-token; have curl read the file itself (e.g. -H @<(printf 'X-Mesh-Authentication: Bearer %s' "$(cat ~/.config/sam-mesh/api-token)")) so the value never lands in an argument. If the node was started with --api-token-path or SAM_API_TOKEN, ask the user where the token lives.
+ 2. Otherwise use the TCP endpoint with header 'X-Mesh-Authentication: Bearer <node API token>'. Do not read your MCP client configuration files to recover that token: they hold every other server's headers too, and reading them puts all of those secrets into the transcript. A daemonized node writes its token to ~/.config/agentmesh/api-token; have curl read the file itself (e.g. -H @<(printf 'X-Mesh-Authentication: Bearer %s' "$(cat ~/.config/agentmesh/api-token)")) so the value never lands in an argument. If the node was started with --api-token-path or AGENTMESH_API_TOKEN, ask the user where the token lives.
Never print that token or echo it into the transcript. 'Authorization: Bearer <upstream-credential>' is a different thing: send it only when the destination service requires its own credential — it passes straight through untouched and is never used to authenticate to this node.`
// NewMCPServer creates a new MCP server instance with all tools registered.
-func NewMCPServer(node *SamNode) *mcp.Server {
+func NewMCPServer(node *AgentMeshNode) *mcp.Server {
mcpServer := mcp.NewServer(&mcp.Implementation{
- Name: "sam-node-mcp",
+ Name: "agentmesh-node-mcp",
Version: "0.1.0",
}, &mcp.ServerOptions{Instructions: meshInstructions})
@@ -108,18 +108,18 @@ func NewMCPServer(node *SamNode) *mcp.Server {
// NewUnauthenticatedMCPServer creates a minimal MCP server that instructs the client on how to authenticate.
func NewUnauthenticatedMCPServer(controlPlaneURL string) *mcp.Server {
mcpServer := mcp.NewServer(&mcp.Implementation{
- Name: "sam-node-mcp-unauth",
+ Name: "agentmesh-node-mcp-unauth",
Version: "0.1.0",
}, &mcp.ServerOptions{Instructions: "This node is unauthenticated. Use the get_login_instructions tool or help_user_login prompt."})
- joinCmd := "sam-node join"
+ joinCmd := "agentmesh-node join"
if controlPlaneURL != "" {
joinCmd += " " + controlPlaneURL
}
mcp.AddTool(mcpServer, &mcp.Tool{
Name: "get_login_instructions",
- Description: "Get instructions on how to authenticate this node so it can join the SAM mesh.",
+ Description: "Get instructions on how to authenticate this node so it can join the Agent Mesh.",
}, func(ctx context.Context, req *mcp.CallToolRequest, params map[string]any) (*mcp.CallToolResult, any, error) {
msg := fmt.Sprintf("The node is unauthenticated. Please open a regular terminal and run:\n\n %s\n\nOnce complete, restart this MCP client.", joinCmd)
return &mcp.CallToolResult{
@@ -134,7 +134,7 @@ func NewUnauthenticatedMCPServer(controlPlaneURL string) *mcp.Server {
Description: "Provides the user with login instructions when the node is unauthenticated.",
}, func(ctx context.Context, req *mcp.GetPromptRequest) (*mcp.GetPromptResult, error) {
return &mcp.GetPromptResult{
- Description: "Instructions for joining the SAM mesh.",
+ Description: "Instructions for joining the Agent Mesh.",
Messages: []*mcp.PromptMessage{
{
Role: "user",
@@ -172,7 +172,7 @@ func NewUnauthenticatedMCPHandler(controlPlaneURL string) http.Handler {
}
// NewMCPHandler creates a new HTTP handler for the MCP server using the official SDK.
-func NewMCPHandler(node *SamNode) http.Handler {
+func NewMCPHandler(node *AgentMeshNode) http.Handler {
mcpServer := NewMCPServer(node)
streamableHandler := mcp.NewStreamableHTTPHandler(func(request *http.Request) *mcp.Server {
@@ -195,7 +195,7 @@ func NewMCPHandler(node *SamNode) http.Handler {
// requiredLabels, when non-empty, fail-closed verifies the peer's control-plane-attested
// labels (see checkPeerLabels) before the tool is invoked; nil means no caller
// requirement, though the operator's egress floor, if configured, is still enforced.
-func (n *SamNode) CallMCPTool(ctx context.Context, targetPeer peer.ID, toolName string, params any, requiredLabels map[string]string) (*mcp.CallToolResult, error) {
+func (n *AgentMeshNode) CallMCPTool(ctx context.Context, targetPeer peer.ID, toolName string, params any, requiredLabels map[string]string) (*mcp.CallToolResult, error) {
var res *mcp.CallToolResult
var err error
maxRetries := 3
@@ -239,7 +239,7 @@ func (n *SamNode) CallMCPTool(ctx context.Context, targetPeer peer.ID, toolName
// (find_remote_tools) can hide forbidden services instead of leaking their names.
var ErrAuthRejected = errors.New("auth rejected")
-func (n *SamNode) ConnectMCPSession(ctx context.Context, targetPeer peer.ID, targetService string, requiredLabels map[string]string) (*mcp.ClientSession, func(), error) {
+func (n *AgentMeshNode) ConnectMCPSession(ctx context.Context, targetPeer peer.ID, targetService string, requiredLabels map[string]string) (*mcp.ClientSession, func(), error) {
// Open stream
logger.Debugf("Dialing %s for MCP...\n", targetPeer)
// For discovery, we want a fast failure, but for tool calls, we can wait a bit. We'll use the context's deadline,
@@ -347,7 +347,7 @@ func (n *SamNode) ConnectMCPSession(ctx context.Context, targetPeer peer.ID, tar
// Handoff to SDK using custom transport
transport := NewStreamTransport(s)
- mcpClient := mcp.NewClient(&mcp.Implementation{Name: "sam-node-mcp-client", Version: "0.1.0"}, nil)
+ mcpClient := mcp.NewClient(&mcp.Implementation{Name: "agentmesh-node-mcp-client", Version: "0.1.0"}, nil)
session, err := mcpClient.Connect(ctx, transport, nil)
if err != nil {
@@ -363,7 +363,7 @@ func (n *SamNode) ConnectMCPSession(ctx context.Context, targetPeer peer.ID, tar
return session, fullCleanup, nil
}
-func (n *SamNode) callMCPToolOnce(ctx context.Context, targetPeer peer.ID, toolName string, params any, requiredLabels map[string]string) (*mcp.CallToolResult, error) {
+func (n *AgentMeshNode) callMCPToolOnce(ctx context.Context, targetPeer peer.ID, toolName string, params any, requiredLabels map[string]string) (*mcp.CallToolResult, error) {
targetService, originalToolName, err := api.SplitToolName(toolName)
if err != nil {
return nil, err
@@ -392,7 +392,7 @@ func (n *SamNode) callMCPToolOnce(ctx context.Context, targetPeer peer.ID, toolN
// fetchRemoteServiceCatalog calls the remote peer's list_local_services
// MCP tool with the type filter and returns the parsed catalog.
-func (n *SamNode) fetchRemoteServiceCatalog(ctx context.Context, peerID peer.ID, typeStr string) ([]*api.ServiceInfo, error) {
+func (n *AgentMeshNode) fetchRemoteServiceCatalog(ctx context.Context, peerID peer.ID, typeStr string) ([]*api.ServiceInfo, error) {
n.preparePeerAddrs(ctx, peerID)
session, cleanup, err := n.ConnectMCPSession(ctx, peerID, "system://"+api.CatalogTarget, nil)
@@ -429,7 +429,7 @@ func (n *SamNode) fetchRemoteServiceCatalog(ctx context.Context, peerID peer.ID,
// preparePeerAddrs scans the target peer's addresses, filters out unroutable private IPs,
// and ensures relay circuits are available. This prevents dial backoff errors when the
// relay is behind a load-balanced DNS address or when pods advertise internal IPs.
-func (n *SamNode) preparePeerAddrs(ctx context.Context, targetPeer peer.ID) {
+func (n *AgentMeshNode) preparePeerAddrs(ctx context.Context, targetPeer peer.ID) {
if n.Host == nil || n.DHT == nil {
logger.Debugf("[Discovery] Host or DHT is nil")
return
diff --git a/internal/node/mcp_discovery_test.go b/internal/node/mcp_discovery_test.go
index 29bdb92a..55ce874d 100644
--- a/internal/node/mcp_discovery_test.go
+++ b/internal/node/mcp_discovery_test.go
@@ -70,7 +70,7 @@ func (f *fakeToolService) Tools(_ context.Context) ([]string, error) {
}
func TestDiscoverySource(t *testing.T) {
- node := &SamNode{
+ node := &AgentMeshNode{
services: NewServiceRegistry(&fakeDHT{}, 0),
nodeConfig: &NodeConfigComplete{Labels: map[string]string{"region": "EU"}},
}
diff --git a/internal/node/mcp_handlers.go b/internal/node/mcp_handlers.go
index 50f277e3..0214b7af 100644
--- a/internal/node/mcp_handlers.go
+++ b/internal/node/mcp_handlers.go
@@ -35,7 +35,7 @@ type ListLocalServicesParams struct {
}
// handleListLocalServices implements the list_local_services tool.
-func (n *SamNode) handleListLocalServices(ctx context.Context, req *mcp.CallToolRequest, params ListLocalServicesParams) (*mcp.CallToolResult, any, error) {
+func (n *AgentMeshNode) handleListLocalServices(ctx context.Context, req *mcp.CallToolRequest, params ListLocalServicesParams) (*mcp.CallToolResult, any, error) {
typeFilter := api.ServiceType_SERVICE_TYPE_UNSPECIFIED
if params.Type != "" {
parsed, err := api.ParseServiceType(params.Type)
@@ -73,7 +73,7 @@ type DiscoverRemoteServicesParams struct {
}
// handleDiscoverRemoteServices implements the discover_remote_services tool.
-func (n *SamNode) handleDiscoverRemoteServices(ctx context.Context, req *mcp.CallToolRequest, params DiscoverRemoteServicesParams) (*mcp.CallToolResult, any, error) {
+func (n *AgentMeshNode) handleDiscoverRemoteServices(ctx context.Context, req *mcp.CallToolRequest, params DiscoverRemoteServicesParams) (*mcp.CallToolResult, any, error) {
serviceType, err := api.ParseServiceType(params.Type)
if err != nil || serviceType == api.ServiceType_SERVICE_TYPE_UNSPECIFIED {
return nil, nil, fmt.Errorf("invalid or unspecified service type: %s", params.Type)
@@ -119,7 +119,7 @@ func (n *SamNode) handleDiscoverRemoteServices(ctx context.Context, req *mcp.Cal
type GetMeshInfoParams struct{}
// handleGetMeshInfo implements the get_mesh_info tool.
-func (n *SamNode) handleGetMeshInfo(ctx context.Context, req *mcp.CallToolRequest, params GetMeshInfoParams) (*mcp.CallToolResult, any, error) {
+func (n *AgentMeshNode) handleGetMeshInfo(ctx context.Context, req *mcp.CallToolRequest, params GetMeshInfoParams) (*mcp.CallToolResult, any, error) {
resData, err := n.meshInfo()
if err != nil {
return nil, nil, err
@@ -138,7 +138,7 @@ func (n *SamNode) handleGetMeshInfo(ctx context.Context, req *mcp.CallToolReques
// handleGetMeshInfoRemote is get_mesh_info as served to other peers over the
// catalog stream: the local socket path, the router and the connected-peer
// list are this node's business, not a remote caller's.
-func (n *SamNode) handleGetMeshInfoRemote(ctx context.Context, req *mcp.CallToolRequest, params GetMeshInfoParams) (*mcp.CallToolResult, any, error) {
+func (n *AgentMeshNode) handleGetMeshInfoRemote(ctx context.Context, req *mcp.CallToolRequest, params GetMeshInfoParams) (*mcp.CallToolResult, any, error) {
full, err := n.meshInfo()
if err != nil {
return nil, nil, err
@@ -168,7 +168,7 @@ type CallRemoteToolParams struct {
}
// handleCallRemoteTool implements the call_remote_tool tool.
-func (n *SamNode) handleCallRemoteTool(ctx context.Context, req *mcp.CallToolRequest, params CallRemoteToolParams) (*mcp.CallToolResult, any, error) {
+func (n *AgentMeshNode) handleCallRemoteTool(ctx context.Context, req *mcp.CallToolRequest, params CallRemoteToolParams) (*mcp.CallToolResult, any, error) {
logger.Infof("[MCP] call_remote_tool called for peer %s, tool %s", params.PeerID, params.ToolName)
targetPeer, err := peer.Decode(params.PeerID)
if err != nil {
@@ -217,7 +217,7 @@ type remoteToolRow struct {
// - params.Intent is accepted and logged at debug level, but does not
// filter or rank results in this implementation (placeholder for
// future semantic search).
-func (n *SamNode) handleFindRemoteTools(ctx context.Context, req *mcp.CallToolRequest, params FindRemoteToolsParams) (*mcp.CallToolResult, any, error) {
+func (n *AgentMeshNode) handleFindRemoteTools(ctx context.Context, req *mcp.CallToolRequest, params FindRemoteToolsParams) (*mcp.CallToolResult, any, error) {
if params.Intent != "" {
logger.Debugf("[find_remote_tools] intent (ignored): %q", params.Intent)
}
@@ -344,7 +344,7 @@ func gossipToolRows(provs []samdiscovery.Provider, toolName, serviceNameFilter s
// verifyGossipToolRows treats unsolicited announcements as routing hints, not
// authorization evidence. Each candidate is confirmed through the existing
// authenticated MCP session and exact tools/list response before it is exposed.
-func (n *SamNode) verifyGossipToolRows(ctx context.Context, candidates []remoteToolRow) []remoteToolRow {
+func (n *AgentMeshNode) verifyGossipToolRows(ctx context.Context, candidates []remoteToolRow) []remoteToolRow {
return verifyGossipToolRowsWithFetcher(ctx, candidates, n.fetchRemoteToolDescription)
}
@@ -451,7 +451,7 @@ func filterRowsByToolName(rows []remoteToolRow, toolName string) []remoteToolRow
// annotateToolLabels fills in the operator-declared labels for peers the
// gossip view knows, when not already known from a fresher source.
-func (n *SamNode) annotateToolLabels(rows []remoteToolRow) {
+func (n *AgentMeshNode) annotateToolLabels(rows []remoteToolRow) {
if n.Discovery == nil {
return
}
@@ -468,7 +468,7 @@ func (n *SamNode) annotateToolLabels(rows []remoteToolRow) {
// fetchRemoteToolCatalogue gets the remote node's service catalogue,
// then opens a separate libp2p stream to each MCP service to fetch its tools.
// serviceNameFilter must already be canonical; see normalizeServiceFilter.
-func (n *SamNode) fetchRemoteToolCatalogue(ctx context.Context, targetPeer peer.ID, serviceNameFilter string) ([]remoteToolRow, error) {
+func (n *AgentMeshNode) fetchRemoteToolCatalogue(ctx context.Context, targetPeer peer.ID, serviceNameFilter string) ([]remoteToolRow, error) {
services, err := n.fetchRemoteServiceCatalog(ctx, targetPeer, "MCP")
if err != nil {
return nil, fmt.Errorf("fetch remote service catalog: %w", err)
@@ -501,7 +501,7 @@ func (n *SamNode) fetchRemoteToolCatalogue(ctx context.Context, targetPeer peer.
// lists its tools, and returns the matching rows. Per-service failures are
// encoded as error rows (or omitted for AuthRejected); the session is always
// closed when the function returns.
-func (n *SamNode) fetchToolsForRemoteService(
+func (n *AgentMeshNode) fetchToolsForRemoteService(
ctx context.Context,
targetPeer peer.ID,
connectService, targetService, serviceNameFilter string,
@@ -562,7 +562,7 @@ func (n *SamNode) fetchToolsForRemoteService(
// fanOutFetch queries each peer's tool catalogue concurrently with a
// small cap and returns the filtered rows. Per-peer failures are
// logged at debug level and skipped — best-effort mesh-wide fetch.
-func (n *SamNode) fanOutFetch(ctx context.Context, peers []peer.ID, serviceName string) []remoteToolRow {
+func (n *AgentMeshNode) fanOutFetch(ctx context.Context, peers []peer.ID, serviceName string) []remoteToolRow {
const maxConcurrent = 8
sem := make(chan struct{}, maxConcurrent)
@@ -627,7 +627,7 @@ type DescribeRemoteToolParams struct {
ToolName string `json:"tool_name" jsonschema:"Namespaced server name as returned by find_remote_tools (e.g. 'mcp://code-reviewer/review_pr'). Required."`
}
-func (n *SamNode) fetchRemoteToolDescription(ctx context.Context, pid peer.ID, toolName string) (*remoteToolDescription, error) {
+func (n *AgentMeshNode) fetchRemoteToolDescription(ctx context.Context, pid peer.ID, toolName string) (*remoteToolDescription, error) {
serviceName, actualToolName, err := api.SplitToolName(toolName)
if err != nil {
return nil, err
@@ -670,7 +670,7 @@ func (n *SamNode) fetchRemoteToolDescription(ctx context.Context, pid peer.ID, t
}
// handleDescribeRemoteTool implements the describe_remote_tool client-facing tool.
-func (n *SamNode) handleDescribeRemoteTool(ctx context.Context, req *mcp.CallToolRequest, params DescribeRemoteToolParams) (*mcp.CallToolResult, any, error) {
+func (n *AgentMeshNode) handleDescribeRemoteTool(ctx context.Context, req *mcp.CallToolRequest, params DescribeRemoteToolParams) (*mcp.CallToolResult, any, error) {
if params.PeerID == "" {
return nil, nil, fmt.Errorf("peer_id is required")
}
diff --git a/internal/node/mcp_handlers_test.go b/internal/node/mcp_handlers_test.go
index c02dec38..91e4a29d 100644
--- a/internal/node/mcp_handlers_test.go
+++ b/internal/node/mcp_handlers_test.go
@@ -40,7 +40,7 @@ import (
// buildAndSaveBiscuit builds a biscuit signed with rootPriv that identifies
// node as caller, grants allow_mcp_server("*"), carries the node role as a
// real enrollment does, and saves it to node's store.
-func buildAndSaveBiscuit(node *SamNode, rootPriv ed25519.PrivateKey) error {
+func buildAndSaveBiscuit(node *AgentMeshNode, rootPriv ed25519.PrivateKey) error {
callerID := node.Host.ID().String()
builder := biscuit.NewBuilder(rootPriv)
_ = builder.AddAuthorityFact(api.MarkerFact(api.FactTargetUnrestricted))
@@ -87,7 +87,7 @@ func buildAndSaveBiscuit(node *SamNode, rootPriv ed25519.PrivateKey) error {
// of any pair verify each other (the caller through WithBiscuitAuth, the
// provider through the label gate). Returns the root key pair for tests that
// need to mint extra tokens.
-func enrollUnderRoot(t *testing.T, nodes ...*SamNode) (ed25519.PublicKey, ed25519.PrivateKey) {
+func enrollUnderRoot(t *testing.T, nodes ...*AgentMeshNode) (ed25519.PublicKey, ed25519.PrivateKey) {
t.Helper()
rootPub, rootPriv, err := ed25519.GenerateKey(rand.Reader)
if err != nil {
@@ -318,7 +318,7 @@ func TestHandleFindRemoteTools_MeshWide(t *testing.T) {
// Connect A to B, C, and D; every node is enrolled under one root so A's
// stream passes WithBiscuitAuth and each target passes A's provider gate.
enrollUnderRoot(t, nodeA, nodeB, nodeC, nodeD)
- for _, target := range []*SamNode{nodeB, nodeC, nodeD} {
+ for _, target := range []*AgentMeshNode{nodeB, nodeC, nodeD} {
if err := nodeA.Host.Connect(ctx, peer.AddrInfo{ID: target.Host.ID(), Addrs: target.Host.Addrs()}); err != nil {
t.Fatalf("connect to %s: %v", target.Host.ID(), err)
}
@@ -431,7 +431,7 @@ func TestHandleFindRemoteTools_PartialFailure(t *testing.T) {
}
}
-func buildAndSaveCustomBiscuit(node *SamNode, rootPriv ed25519.PrivateKey, allowedServices []string) error {
+func buildAndSaveCustomBiscuit(node *AgentMeshNode, rootPriv ed25519.PrivateKey, allowedServices []string) error {
callerID := node.Host.ID().String()
builder := biscuit.NewBuilder(rootPriv)
err := builder.AddAuthorityFact(api.MarkerFact(api.FactTargetUnrestricted))
@@ -834,7 +834,7 @@ func TestNewMCPHandler_AcceptsLegacyRequestWithProtocolVersionMeta(t *testing.T)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
- srv := httptest.NewServer(NewMCPHandler(&SamNode{BiscuitTimeout: 500 * time.Millisecond}))
+ srv := httptest.NewServer(NewMCPHandler(&AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}))
defer srv.Close()
body := `{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"tc","version":"0.0.1"},"_meta":{"io.modelcontextprotocol/protocolVersion":"2025-11-25"}}}`
diff --git a/internal/node/mcp_service.go b/internal/node/mcp_service.go
index 53f7c744..66932285 100644
--- a/internal/node/mcp_service.go
+++ b/internal/node/mcp_service.go
@@ -109,7 +109,7 @@ func (m *MCPService) Probe(ctx context.Context) error {
if err != nil {
return err
}
- client := mcp.NewClient(&mcp.Implementation{Name: "sam-node-probe", Version: "0.1.0"}, nil)
+ client := mcp.NewClient(&mcp.Implementation{Name: "agentmesh-node-probe", Version: "0.1.0"}, nil)
session, err := client.Connect(ctx, transport, nil)
if err != nil {
return fmt.Errorf("connect to backend of %q: %w", m.info.GetName(), err)
@@ -173,7 +173,7 @@ func (m *MCPService) Tools(ctx context.Context) ([]string, error) {
if err != nil {
return nil, err
}
- client := mcp.NewClient(&mcp.Implementation{Name: "sam-node-discovery", Version: "0.1.0"}, nil)
+ client := mcp.NewClient(&mcp.Implementation{Name: "agentmesh-node-discovery", Version: "0.1.0"}, nil)
session, err := client.Connect(ctx, transport, nil)
if err != nil {
return nil, fmt.Errorf("connect to backend of %q: %w", m.info.GetName(), err)
@@ -264,7 +264,7 @@ func (m *MCPService) HandleStreamPassThrough(s network.Stream, reqCtx RequestCon
// goroutine had just handed to Write to actually reach the peer. Close
// "does not guarantee receipt of the data"; the documented safe sequence
// is CloseWrite, then wait for the peer to finish reading (or hang up),
- // then Close. That race is the root cause of google/sam#375: the
+ // then Close. That race is the root cause of google/agentmesh#375: the
// producer's write reports success, but the immediate teardown right
// behind it can still lose the response in flight, and the consumer
// sees EOF instead.
diff --git a/internal/node/mcp_test.go b/internal/node/mcp_test.go
index 693be6f8..a0814120 100644
--- a/internal/node/mcp_test.go
+++ b/internal/node/mcp_test.go
@@ -32,7 +32,7 @@ import (
func TestMCPHandler_HTTP(t *testing.T) {
// Setup a dummy node
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
}
handler := NewMCPHandler(node)
@@ -93,7 +93,7 @@ func TestResolveRelayAddresses(t *testing.T) {
}
defer func() { _ = kdht.Close() }()
- node := &SamNode{
+ node := &AgentMeshNode{
Host: localHost,
DHT: kdht,
BiscuitTimeout: 500 * time.Millisecond,
@@ -189,7 +189,7 @@ func TestPreparePeerAddrsFallsBackToAuthenticatedRouters(t *testing.T) {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
Host: localHost,
DHT: kdht,
BiscuitTimeout: 500 * time.Millisecond,
@@ -241,7 +241,7 @@ func TestSplitToolName(t *testing.T) {
},
{
name: "No scheme path",
- input: "sam.catalog/some-tool",
+ input: "mesh.catalog/some-tool",
wantErr: true,
},
{
diff --git a/internal/node/middleware.go b/internal/node/middleware.go
index 4917fcef..79366191 100644
--- a/internal/node/middleware.go
+++ b/internal/node/middleware.go
@@ -113,7 +113,7 @@ func (t *trackingStream) Write(p []byte) (n int, err error) {
}
// WithBiscuitAuth enforces a Protobuf handshake on a stream before calling the next handler.
-func (n *SamNode) WithBiscuitAuth(next func(network.Stream, RequestContext)) network.StreamHandler {
+func (n *AgentMeshNode) WithBiscuitAuth(next func(network.Stream, RequestContext)) network.StreamHandler {
return func(s network.Stream) {
ts := &trackingStream{Stream: s}
remotePeer := s.Conn().RemotePeer()
@@ -203,12 +203,12 @@ func (n *SamNode) WithBiscuitAuth(next func(network.Stream, RequestContext)) net
}
// VerifyBiscuitToken checks revocation, cache, and evaluates the token against trusted keys and local policies.
-func (n *SamNode) VerifyBiscuitToken(biscuitBytes []byte, reqCtx RequestContext) error {
+func (n *AgentMeshNode) VerifyBiscuitToken(biscuitBytes []byte, reqCtx RequestContext) error {
_, err := n.verifyBiscuitTokenWithRules(biscuitBytes, reqCtx)
return err
}
-func (n *SamNode) verifyBiscuitTokenWithRules(biscuitBytes []byte, reqCtx RequestContext) ([]*api.TaskAuthorizationRule, error) {
+func (n *AgentMeshNode) verifyBiscuitTokenWithRules(biscuitBytes []byte, reqCtx RequestContext) ([]*api.TaskAuthorizationRule, error) {
remotePeer := reqCtx.PeerID
// Check revocation cache
@@ -247,12 +247,12 @@ func (n *SamNode) verifyBiscuitTokenWithRules(biscuitBytes []byte, reqCtx Reques
return taskRules, nil
}
-func (n *SamNode) Authorize(rawToken []byte, req RequestContext, pubKey ed25519.PublicKey) error {
+func (n *AgentMeshNode) Authorize(rawToken []byte, req RequestContext, pubKey ed25519.PublicKey) error {
_, err := n.authorizeWithRules(rawToken, req, pubKey)
return err
}
-func (n *SamNode) authorizeWithRules(rawToken []byte, req RequestContext, pubKey ed25519.PublicKey) ([]*api.TaskAuthorizationRule, error) {
+func (n *AgentMeshNode) authorizeWithRules(rawToken []byte, req RequestContext, pubKey ed25519.PublicKey) ([]*api.TaskAuthorizationRule, error) {
if len(pubKey) != ed25519.PublicKeySize {
return nil, fmt.Errorf("invalid public key size: %d", len(pubKey))
}
@@ -479,7 +479,7 @@ func (req RequestContext) auditFields() []any {
return fields
}
-func (n *SamNode) injectIdentityFacts(authorizer biscuit.Authorizer, pubKey ed25519.PublicKey) error {
+func (n *AgentMeshNode) injectIdentityFacts(authorizer biscuit.Authorizer, pubKey ed25519.PublicKey) error {
ourIdentity := n.GetIdentity()
if ourIdentity == nil {
logger.Debugf("[Auth] Node identity is missing, skipping target fact injection")
diff --git a/internal/node/middleware_test.go b/internal/node/middleware_test.go
index 36102afc..a048f420 100644
--- a/internal/node/middleware_test.go
+++ b/internal/node/middleware_test.go
@@ -163,7 +163,7 @@ func TestAuthorize(t *testing.T) {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
Store: store,
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
@@ -179,7 +179,7 @@ func TestAuthorize(t *testing.T) {
}
}
-// TestAuthorizeRejectsExpiredBiscuit reproduces #296: SamNode.Authorize did not
+// TestAuthorizeRejectsExpiredBiscuit reproduces #296: AgentMeshNode.Authorize did not
// inject the time(now) fact nor the ControlPlaneStaticTimeCheck, so an expired
// biscuit that would be rejected by identity.VerifyBiscuit was still accepted
// on the node dataplane.
@@ -237,7 +237,7 @@ func TestAuthorizeRejectsExpiredBiscuit(t *testing.T) {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
Store: store,
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
@@ -300,7 +300,7 @@ func TestAuthorizeRejectsAppendedPeerBinding(t *testing.T) {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
}
@@ -437,7 +437,7 @@ func TestBaselineRules(t *testing.T) {
b, _ := builder.Build()
tokenBytes, _ := b.Serialize()
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
}
@@ -600,7 +600,7 @@ attenuation:
}
}
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
nodeConfig: nodeConfigComplete,
BiscuitTimeout: 500 * time.Millisecond,
@@ -662,7 +662,7 @@ func TestRevocation(t *testing.T) {
cache, _ := lru.New[string, int64](10000)
rl, _ := ratelimit.NewPeerRateLimiter(100)
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
revokedPeers: cache,
rateLimiter: rl,
@@ -751,7 +751,7 @@ func TestWithBiscuitAuth_MutualBiscuit(t *testing.T) {
}
rl, _ := ratelimit.NewPeerRateLimiter(100)
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
rateLimiter: rl,
BiscuitTimeout: 500 * time.Millisecond,
@@ -807,7 +807,7 @@ func TestVerifyEvent(t *testing.T) {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
}
@@ -982,7 +982,7 @@ func TestMiddlewareTargetChecks(t *testing.T) {
idB, _ := idBuilder.Build()
idTokenBytes, _ := idB.Serialize()
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
}
@@ -1115,7 +1115,7 @@ func TestAuthorize_WithTARBlocks(t *testing.T) {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
}
@@ -1204,7 +1204,7 @@ func TestTARConformanceVectors(t *testing.T) {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: rootPub, ReceivedAt: time.Now()}},
MeshPolicyRules: meshRules,
BiscuitTimeout: 500 * time.Millisecond,
diff --git a/internal/node/node.go b/internal/node/node.go
index 6fc07788..345707bc 100644
--- a/internal/node/node.go
+++ b/internal/node/node.go
@@ -132,7 +132,7 @@ type TrustedKey struct {
}
type nodeRelayACL struct {
- node *SamNode
+ node *AgentMeshNode
}
func (a *nodeRelayACL) AllowReserve(p peer.ID, addr multiaddr.Multiaddr) bool {
@@ -148,7 +148,7 @@ func (a *nodeRelayACL) AllowConnect(src peer.ID, srcAddr multiaddr.Multiaddr, de
// isAdmitted reports whether a peer completed the auth handshake and its token
// has not lapsed since. The handshake only proves the token was valid at that
// instant, so without this the relay ACL would honour an admission forever.
-func (n *SamNode) isAdmitted(p peer.ID) bool {
+func (n *AgentMeshNode) isAdmitted(p peer.ID) bool {
v, ok := n.authPeers.Load(p)
if !ok {
return false
@@ -161,7 +161,7 @@ func (n *SamNode) isAdmitted(p peer.ID) bool {
return true
}
-type SamNode struct {
+type AgentMeshNode struct {
config Options
Host host.Host
DHT *dht.IpfsDHT
@@ -220,20 +220,20 @@ type SamNode struct {
// SetTokenSource configures the live platform/OIDC token source presented as
// TokenRefreshRequest.jwt during RefreshEnrollment.
-func (n *SamNode) SetTokenSource(ts TokenSource) {
+func (n *AgentMeshNode) SetTokenSource(ts TokenSource) {
n.mu.Lock()
defer n.mu.Unlock()
n.tokenSource = ts
}
-func (n *SamNode) getTokenSource() TokenSource {
+func (n *AgentMeshNode) getTokenSource() TokenSource {
n.mu.Lock()
defer n.mu.Unlock()
return n.tokenSource
}
// UpdateRelays updates the current relays used by AutoRelay.
-func (n *SamNode) UpdateRelays(addrs []multiaddr.Multiaddr) {
+func (n *AgentMeshNode) UpdateRelays(addrs []multiaddr.Multiaddr) {
newRelays := routerPeers(context.Background(), addrs)
n.mu.Lock()
defer n.mu.Unlock()
@@ -245,7 +245,7 @@ func (n *SamNode) UpdateRelays(addrs []multiaddr.Multiaddr) {
}
// GetIdentity returns the node's biscuit identity, caching it in memory.
-func (n *SamNode) GetIdentity() []byte {
+func (n *AgentMeshNode) GetIdentity() []byte {
if val := n.cachedIdentity.Load(); val != nil {
b := val.([]byte)
if len(b) > 0 {
@@ -262,14 +262,14 @@ func (n *SamNode) GetIdentity() []byte {
}
// SetIdentityCache explicitly updates the cached identity.
-func (n *SamNode) SetIdentityCache(b []byte) {
+func (n *AgentMeshNode) SetIdentityCache(b []byte) {
if len(b) > 0 {
n.cachedIdentity.Store(b)
}
}
// RevokeBiscuitID records a Biscuit revocation ID (base64url- or hex-encoded) as revoked until expiry.
-func (n *SamNode) RevokeBiscuitID(revocationID string, expiry time.Time) {
+func (n *AgentMeshNode) RevokeBiscuitID(revocationID string, expiry time.Time) {
if revocationID == "" {
return
}
@@ -294,7 +294,7 @@ func (n *SamNode) RevokeBiscuitID(revocationID string, expiry time.Time) {
// RevokeBiscuitToken revokes the outermost block of a Biscuit token locally.
// Revoking the final block's RevocationId invalidates that task token and any
// further attenuated descendants without revoking the parent token.
-func (n *SamNode) RevokeBiscuitToken(rawToken []byte, expiry time.Time) (string, error) {
+func (n *AgentMeshNode) RevokeBiscuitToken(rawToken []byte, expiry time.Time) (string, error) {
b, _, err := identity.UnmarshalInbound(rawToken)
if err != nil {
return "", err
@@ -309,7 +309,7 @@ func (n *SamNode) RevokeBiscuitToken(rawToken []byte, expiry time.Time) (string,
}
// IsBiscuitRevoked checks whether any block of b has been revoked.
-func (n *SamNode) IsBiscuitRevoked(b *biscuit.Biscuit) bool {
+func (n *AgentMeshNode) IsBiscuitRevoked(b *biscuit.Biscuit) bool {
if n == nil || n.revokedTokens == nil || b == nil {
return false
}
@@ -392,9 +392,9 @@ func routerPeers(ctx context.Context, addrs []multiaddr.Multiaddr) []peer.AddrIn
return out
}
-// NewSamNode creates a new Agent instance secured with the 4-layer pipeline.
-// NewSamNode initializes options and structures without starting background tasks or network interfaces.
-func NewSamNode(cfg Options) (*SamNode, error) {
+// NewAgentMeshNode creates a new Agent instance secured with the 4-layer pipeline.
+// NewAgentMeshNode initializes options and structures without starting background tasks or network interfaces.
+func NewAgentMeshNode(cfg Options) (*AgentMeshNode, error) {
cfg.Default()
if err := cfg.Validate(); err != nil {
return nil, err
@@ -420,7 +420,7 @@ func NewSamNode(cfg Options) (*SamNode, error) {
trustedKeys = append(trustedKeys, TrustedKey{Key: cfg.ControlPlanePubKey, ReceivedAt: time.Now()})
}
- node := &SamNode{
+ node := &AgentMeshNode{
config: cfg,
Store: cfg.Store,
trustedKeys: trustedKeys,
@@ -433,7 +433,7 @@ func NewSamNode(cfg Options) (*SamNode, error) {
controlPlaneSyncTrigger: make(chan struct{}, 1),
tokenSource: cfg.TokenSource,
BiscuitTimeout: cfg.BiscuitTimeout,
- logger: golog.Logger("sam-node"),
+ logger: golog.Logger("agentmesh-node"),
}
var err error
@@ -462,9 +462,9 @@ func NewSamNode(cfg Options) (*SamNode, error) {
}
// labels reports this node's operator-declared labels, validated at load.
-// NewSamNode always leaves nodeConfig non-nil, but tests build SamNode
+// NewAgentMeshNode always leaves nodeConfig non-nil, but tests build AgentMeshNode
// literals directly, so the guard lives here rather than at each caller.
-func (n *SamNode) labels() map[string]string {
+func (n *AgentMeshNode) labels() map[string]string {
if n.nodeConfig == nil {
return nil
}
@@ -472,7 +472,7 @@ func (n *SamNode) labels() map[string]string {
}
// Start initializes the libp2p host, DHT, connects to the routers, and starts runtime components.
-func (n *SamNode) Start(ctx context.Context) error {
+func (n *AgentMeshNode) Start(ctx context.Context) error {
if biscuitBytes := n.GetIdentity(); len(biscuitBytes) > 0 {
// The identity may be signed by any currently valid control plane
// key, not only the newest: after a rotation the biscuit's key can
@@ -805,14 +805,14 @@ func (n *SamNode) Start(ctx context.Context) error {
// triggerReprovide asks the reprovide loop to run a cycle now, dropping the
// request when one is already pending.
-func (n *SamNode) triggerReprovide() {
+func (n *AgentMeshNode) triggerReprovide() {
select {
case n.reprovideTrigger <- struct{}{}:
default:
}
}
-func (n *SamNode) startReprovideLoop(ctx context.Context, interval time.Duration) {
+func (n *AgentMeshNode) startReprovideLoop(ctx context.Context, interval time.Duration) {
go func() {
initialDelay := 5 * time.Second
if n.config.DiscoveryInterval != "" {
@@ -854,7 +854,7 @@ func (n *SamNode) startReprovideLoop(ctx context.Context, interval time.Duration
}()
}
-func (n *SamNode) IsConnected() bool {
+func (n *AgentMeshNode) IsConnected() bool {
n.mu.Lock()
defer n.mu.Unlock()
if len(n.authenticatedRouters) == 0 {
@@ -871,7 +871,7 @@ func (n *SamNode) IsConnected() bool {
// isAuthenticatedAndConnected reports whether this router was authenticated
// on a session that is still open. The router forgets a peer once its last
// connection drops, so a stale entry must not skip the handshake.
-func (n *SamNode) isAuthenticatedAndConnected(router peer.ID) bool {
+func (n *AgentMeshNode) isAuthenticatedAndConnected(router peer.ID) bool {
n.mu.Lock()
authed := n.authenticatedRouters[router]
n.mu.Unlock()
@@ -880,7 +880,7 @@ func (n *SamNode) isAuthenticatedAndConnected(router peer.ID) bool {
// authenticatedRouterIDs lists the routers this node passed the handshake
// with and is still connected to: the relays that will open a circuit for it.
-func (n *SamNode) authenticatedRouterIDs() []peer.ID {
+func (n *AgentMeshNode) authenticatedRouterIDs() []peer.ID {
n.mu.Lock()
defer n.mu.Unlock()
ids := make([]peer.ID, 0, len(n.authenticatedRouters))
@@ -892,19 +892,19 @@ func (n *SamNode) authenticatedRouterIDs() []peer.ID {
return ids
}
-func (n *SamNode) LoadMeshConfig() ([]byte, []string, error) {
+func (n *AgentMeshNode) LoadMeshConfig() ([]byte, []string, error) {
return n.Store.LoadMeshConfig()
}
-func (n *SamNode) LoadControlPlaneURL() (string, error) {
+func (n *AgentMeshNode) LoadControlPlaneURL() (string, error) {
return n.Store.LoadControlPlaneURL()
}
-func (n *SamNode) SaveMeshConfig(pubKey []byte, addrs []string) error {
+func (n *AgentMeshNode) SaveMeshConfig(pubKey []byte, addrs []string) error {
return n.Store.SaveMeshConfig(pubKey, addrs)
}
-func (n *SamNode) startConnectionMonitor(ctx context.Context, bootstrapDuration, checkInterval time.Duration, maxFailures int) {
+func (n *AgentMeshNode) startConnectionMonitor(ctx context.Context, bootstrapDuration, checkInterval time.Duration, maxFailures int) {
go func() {
// Wait for initial bootstrap to complete
select {
@@ -953,7 +953,7 @@ func (n *SamNode) startConnectionMonitor(ctx context.Context, bootstrapDuration,
}()
}
-func (n *SamNode) RegisterStaticServices(ctx context.Context, services []api.ServiceConfig) error {
+func (n *AgentMeshNode) RegisterStaticServices(ctx context.Context, services []api.ServiceConfig) error {
// Wait for node to be connected to a router or DHT to be ready
// This avoids failure if we try to register immediately after enrollment
// before the connection is established.
@@ -1003,7 +1003,7 @@ dhtLoop:
// listed a router that had gone. The dials still in flight finish in the
// background and record their sessions as they land; the connection monitor
// re-handshakes whatever drops later.
-func (n *SamNode) authWithRouters(ctx context.Context, routers []peer.AddrInfo) (authenticated bool, fatal error) {
+func (n *AgentMeshNode) authWithRouters(ctx context.Context, routers []peer.AddrInfo) (authenticated bool, fatal error) {
if len(routers) == 0 {
return false, nil
}
@@ -1027,7 +1027,7 @@ func (n *SamNode) authWithRouters(ctx context.Context, routers []peer.AddrInfo)
// dialRouters runs authRouter against every router at once and delivers one
// outcome per router on the returned channel, in completion order. The
// channel is buffered for all of them, so a caller may stop reading early.
-func (n *SamNode) dialRouters(ctx context.Context, routers []peer.AddrInfo, biscuitBytes []byte) <-chan error {
+func (n *AgentMeshNode) dialRouters(ctx context.Context, routers []peer.AddrInfo, biscuitBytes []byte) <-chan error {
results := make(chan error, len(routers))
for _, router := range routers {
go func() {
@@ -1049,7 +1049,7 @@ func (n *SamNode) dialRouters(ctx context.Context, routers []peer.AddrInfo, bisc
// and a router that restarts alone is never re-handshaken at all, the
// member keeping one router fewer after each rollout. One redial per router
// runs at a time, and a router that stays away is left to the monitor.
-func (n *SamNode) redialRouter(ctx context.Context, router peer.ID) {
+func (n *AgentMeshNode) redialRouter(ctx context.Context, router peer.ID) {
if n.config.RouterRedialDelay < 0 {
return
}
@@ -1107,7 +1107,7 @@ func (n *SamNode) redialRouter(ctx context.Context, router peer.ID) {
}()
}
-func (n *SamNode) loadIdentityForAuth() ([]byte, error) {
+func (n *AgentMeshNode) loadIdentityForAuth() ([]byte, error) {
biscuitBytes, err := n.Store.LoadIdentity()
if err != nil {
return nil, fmt.Errorf("%w: failed to load identity from store: %w", ErrFatalAuth, err)
@@ -1124,7 +1124,7 @@ func (n *SamNode) loadIdentityForAuth() ([]byte, error) {
// handshake is not, and repeating it trips the router's per-peer handshake
// limiter. The dial is bounded by RouterConnectTimeout so a router that is
// down does not hold its caller for long.
-func (n *SamNode) authRouter(ctx context.Context, router peer.AddrInfo, biscuitBytes []byte) error {
+func (n *AgentMeshNode) authRouter(ctx context.Context, router peer.AddrInfo, biscuitBytes []byte) error {
if n.isAuthenticatedAndConnected(router.ID) {
return nil
}
@@ -1149,7 +1149,7 @@ func (n *SamNode) authRouter(ctx context.Context, router peer.AddrInfo, biscuitB
// behind addr: one peer for a direct address, every router behind the name
// for a dnsaddr. They are dialed at once and all are waited for; it succeeds
// when at least one admitted this node.
-func (n *SamNode) ConnectAndAuthWithRouter(ctx context.Context, addr multiaddr.Multiaddr) error {
+func (n *AgentMeshNode) ConnectAndAuthWithRouter(ctx context.Context, addr multiaddr.Multiaddr) error {
biscuitBytes, err := n.loadIdentityForAuth()
if err != nil {
return err
@@ -1186,7 +1186,7 @@ func (n *SamNode) ConnectAndAuthWithRouter(ctx context.Context, addr multiaddr.M
// authenticateRouterSession runs the auth handshake with a router this host
// is connected to and records the session.
-func (n *SamNode) authenticateRouterSession(ctx context.Context, router peer.ID, biscuitBytes []byte) error {
+func (n *AgentMeshNode) authenticateRouterSession(ctx context.Context, router peer.ID, biscuitBytes []byte) error {
s, err := n.Host.NewStream(ctx, router, api.AuthProtocolID)
if err != nil {
return fmt.Errorf("failed to open auth stream: %w", err)
@@ -1214,7 +1214,7 @@ func (n *SamNode) authenticateRouterSession(ctx context.Context, router peer.ID,
// node are refused once the old one lapses. A router that refuses is
// dropped from the authenticated set; the connection monitor then dials and
// handshakes afresh.
-func (n *SamNode) readmitRouters(ctx context.Context) {
+func (n *AgentMeshNode) readmitRouters(ctx context.Context) {
if n.Host == nil {
return
}
@@ -1235,7 +1235,7 @@ func (n *SamNode) readmitRouters(ctx context.Context) {
}
}
-func (n *SamNode) performRouterAuthHandshake(s network.Stream, biscuitBytes []byte, expectedRouter peer.ID) (bool, error) {
+func (n *AgentMeshNode) performRouterAuthHandshake(s network.Stream, biscuitBytes []byte, expectedRouter peer.ID) (bool, error) {
writer := msgio.NewVarintWriter(s)
authFrame := &api.AuthFrame{Biscuit: biscuitBytes}
data, err := proto.Marshal(authFrame)
@@ -1289,7 +1289,7 @@ func (n *SamNode) performRouterAuthHandshake(s network.Stream, biscuitBytes []by
return true, nil
}
-func (n *SamNode) StartRenewalLoop(ctx context.Context, issuerURL, clientID, clientSecret, jwtPath string) {
+func (n *AgentMeshNode) StartRenewalLoop(ctx context.Context, issuerURL, clientID, clientSecret, jwtPath string) {
src, continuous, err := ResolveTokenSource(ctx, TokenSourceConfig{
Node: n,
IssuerURL: issuerURL,
@@ -1307,7 +1307,7 @@ func (n *SamNode) StartRenewalLoop(ctx context.Context, issuerURL, clientID, cli
n.StartRenewalLoopWithSource(ctx, src)
}
-func (n *SamNode) StartRenewalLoopWithSource(ctx context.Context, src TokenSource) {
+func (n *AgentMeshNode) StartRenewalLoopWithSource(ctx context.Context, src TokenSource) {
if src == nil {
src = n.getTokenSource()
}
@@ -1395,7 +1395,7 @@ func (e *RefreshError) Error() string {
}
// RefreshEnrollment trades the expiring biscuit token for a new one using a cryptographic challenge.
-func (n *SamNode) RefreshEnrollment(ctx context.Context) error {
+func (n *AgentMeshNode) RefreshEnrollment(ctx context.Context) error {
n.refreshMu.Lock()
defer n.refreshMu.Unlock()
@@ -1530,7 +1530,7 @@ func (n *SamNode) RefreshEnrollment(ctx context.Context) error {
// verifyOwnBiscuit checks a token the control plane handed this node: signed
// by a trusted key, bound to this peer, and carrying the configured role.
-func (n *SamNode) verifyOwnBiscuit(token []byte) error {
+func (n *AgentMeshNode) verifyOwnBiscuit(token []byte) error {
if len(token) == 0 {
return errors.New("empty biscuit token")
}
@@ -1566,7 +1566,7 @@ func (n *SamNode) verifyOwnBiscuit(token []byte) error {
return identity.VerifyBiscuitRole(token, key, n.config.RequiredRole, n.BiscuitTimeout)
}
-func (n *SamNode) renewWithRefreshToken(ctx context.Context, clientSecret string) (string, error) {
+func (n *AgentMeshNode) renewWithRefreshToken(ctx context.Context, clientSecret string) (string, error) {
if n.Store == nil {
return "", fmt.Errorf("store is not initialized")
}
@@ -1613,7 +1613,7 @@ const (
)
// listenForControlPlaneEvents listens to the topic established by the control plane
-func (n *SamNode) listenForControlPlaneEvents(ctx context.Context) {
+func (n *AgentMeshNode) listenForControlPlaneEvents(ctx context.Context) {
topic, err := n.PubSub.Join(api.GossipEvents)
if err != nil {
return
@@ -1659,7 +1659,7 @@ func (n *SamNode) listenForControlPlaneEvents(ctx context.Context) {
}
}
-func (n *SamNode) handleBannedEvent(event *api.MeshEvent) {
+func (n *AgentMeshNode) handleBannedEvent(event *api.MeshEvent) {
p, err := peer.Decode(event.PeerId)
if err != nil {
logger.Warnf("[Mesh Event] Ignoring BANNED event with undecodable peer ID %q: %v", event.PeerId, err)
@@ -1697,7 +1697,7 @@ func containsTrustedKey(keys []TrustedKey, key ed25519.PublicKey) bool {
// addTrustedKey appends a control plane public key to the trust set (no-op
// on duplicates) and persists the updated set so it survives restarts.
-func (n *SamNode) addTrustedKey(key ed25519.PublicKey) {
+func (n *AgentMeshNode) addTrustedKey(key ed25519.PublicKey) {
n.keysMu.Lock()
if containsTrustedKey(n.trustedKeys, key) {
n.keysMu.Unlock()
@@ -1709,7 +1709,7 @@ func (n *SamNode) addTrustedKey(key ed25519.PublicKey) {
n.persistTrustedKeys(snapshot)
}
-func (n *SamNode) persistTrustedKeys(keys []TrustedKey) {
+func (n *AgentMeshNode) persistTrustedKeys(keys []TrustedKey) {
if n.Store == nil {
return
}
@@ -1718,7 +1718,7 @@ func (n *SamNode) persistTrustedKeys(keys []TrustedKey) {
}
}
-func (n *SamNode) handleKeyRotationEvent(event *api.MeshEvent) {
+func (n *AgentMeshNode) handleKeyRotationEvent(event *api.MeshEvent) {
if len(event.NewPublicKey) != ed25519.PublicKeySize {
logger.Errorf("[Mesh Event] Key rotation failed: invalid public key size %d, expected %d", len(event.NewPublicKey), ed25519.PublicKeySize)
return
@@ -1751,7 +1751,7 @@ func pruneTrustedKeys(keys []TrustedKey, now time.Time, gracePeriod time.Duratio
return active
}
-func (n *SamNode) startKeyPruning(ctx context.Context, gracePeriod time.Duration) {
+func (n *AgentMeshNode) startKeyPruning(ctx context.Context, gracePeriod time.Duration) {
if gracePeriod <= 0 {
return
}
@@ -1778,7 +1778,7 @@ func (n *SamNode) startKeyPruning(ctx context.Context, gracePeriod time.Duration
}()
}
-func (n *SamNode) verifyEvent(event *api.MeshEvent) bool {
+func (n *AgentMeshNode) verifyEvent(event *api.MeshEvent) bool {
sig := event.Signature
event.Signature = nil
data, err := proto.MarshalOptions{Deterministic: true}.Marshal(event)
@@ -1809,7 +1809,7 @@ func (n *SamNode) verifyEvent(event *api.MeshEvent) bool {
// signed the pubsub envelope still cannot get an unsigned event past here. A
// stale event is ignored rather than rejected: it may be a genuine event
// that arrived late, and there is no reason to penalize its forwarder.
-func (n *SamNode) validateMeshEvent(_ context.Context, from peer.ID, msg *pubsub.Message) pubsub.ValidationResult {
+func (n *AgentMeshNode) validateMeshEvent(_ context.Context, from peer.ID, msg *pubsub.Message) pubsub.ValidationResult {
var event api.MeshEvent
if err := proto.Unmarshal(msg.Data, &event); err != nil {
logger.Warnw("[Mesh Event] rejecting undecodable event", "event", meshEventSpoofingAttempt, "peer", from.String())
@@ -1831,7 +1831,7 @@ func (n *SamNode) validateMeshEvent(_ context.Context, from peer.ID, msg *pubsub
return pubsub.ValidationAccept
}
-func (n *SamNode) startDiscovery(ctx context.Context, meshID string, interval time.Duration) {
+func (n *AgentMeshNode) startDiscovery(ctx context.Context, meshID string, interval time.Duration) {
awaitRoutingTable(ctx, n.DHT.RoutingTable().Size, interval)
routingDiscovery := routing.NewRoutingDiscovery(n.DHT)
util.Advertise(ctx, routingDiscovery, meshID)
@@ -1919,7 +1919,7 @@ func awaitRoutingTable(ctx context.Context, size func() int, bound time.Duration
}
}
-func (n *SamNode) getTrustedPublicKeys() []ed25519.PublicKey {
+func (n *AgentMeshNode) getTrustedPublicKeys() []ed25519.PublicKey {
n.keysMu.RLock()
defer n.keysMu.RUnlock()
keys := make([]ed25519.PublicKey, 0, len(n.trustedKeys))
@@ -1938,7 +1938,7 @@ var authHandshakeTimeout = 10 * time.Second
// HandleAuthHandshake is the core libp2p stream handler for /mesh/auth/1.0.0.
// This is the "Admission Office" of the mesh node.
-func (n *SamNode) HandleAuthHandshake(s network.Stream) {
+func (n *AgentMeshNode) HandleAuthHandshake(s network.Stream) {
defer func() {
if err := s.Close(); err != nil {
logger.Errorf("[AuthN] Failed to close auth stream: %v", err)
@@ -1996,7 +1996,7 @@ func (n *SamNode) HandleAuthHandshake(s network.Stream) {
}
}
-func (n *SamNode) RegisterService(ctx context.Context, req *api.RegisterServiceRequest) error {
+func (n *AgentMeshNode) RegisterService(ctx context.Context, req *api.RegisterServiceRequest) error {
if req.Service == nil {
return fmt.Errorf("service field is required")
}
@@ -2013,13 +2013,13 @@ func (n *SamNode) RegisterService(ctx context.Context, req *api.RegisterServiceR
return n.services.Register(ctx, svc)
}
-func (n *SamNode) UnregisterService(ctx context.Context, serviceName string) error {
+func (n *AgentMeshNode) UnregisterService(ctx context.Context, serviceName string) error {
return n.services.Unregister(ctx, serviceName)
}
// Teardown detaches all registered services and closes the libp2p host.
// Store is owned by the caller and is not closed here.
-func (n *SamNode) Teardown() error {
+func (n *AgentMeshNode) Teardown() error {
if n.services != nil {
n.services.TeardownAll()
}
@@ -2037,7 +2037,7 @@ func (n *SamNode) Teardown() error {
return errors.Join(errs...)
}
-func (n *SamNode) IsServiceRegistered(serviceName string) bool {
+func (n *AgentMeshNode) IsServiceRegistered(serviceName string) bool {
_, ok := n.services.Get(serviceName)
return ok
}
@@ -2051,7 +2051,7 @@ const (
// findProvidersByCID is the shared DHT-lookup primitive; bounds the
// lookup so FindProvidersAsync's channel is guaranteed to close.
-func (n *SamNode) findProvidersByCID(ctx context.Context, c cid.Cid) ([]peer.AddrInfo, error) {
+func (n *AgentMeshNode) findProvidersByCID(ctx context.Context, c cid.Cid) ([]peer.AddrInfo, error) {
if n.DHT == nil {
return nil, fmt.Errorf("DHT not initialized")
}
@@ -2096,7 +2096,7 @@ func (n *SamNode) findProvidersByCID(ctx context.Context, c cid.Cid) ([]peer.Add
}
// FindProvidersByName returns peers hosting a specific {type, name} service.
-func (n *SamNode) FindProvidersByName(ctx context.Context, serviceType api.ServiceType, serviceName string) ([]peer.AddrInfo, error) {
+func (n *AgentMeshNode) FindProvidersByName(ctx context.Context, serviceType api.ServiceType, serviceName string) ([]peer.AddrInfo, error) {
c, err := serviceNameToCID(serviceType, serviceName)
if err != nil {
return nil, err
@@ -2105,7 +2105,7 @@ func (n *SamNode) FindProvidersByName(ctx context.Context, serviceType api.Servi
}
// FindProvidersByType returns peers hosting at least one service of the given type.
-func (n *SamNode) FindProvidersByType(ctx context.Context, serviceType api.ServiceType) ([]peer.AddrInfo, error) {
+func (n *AgentMeshNode) FindProvidersByType(ctx context.Context, serviceType api.ServiceType) ([]peer.AddrInfo, error) {
c, err := serviceTypeToCID(serviceType)
if err != nil {
return nil, err
@@ -2114,7 +2114,7 @@ func (n *SamNode) FindProvidersByType(ctx context.Context, serviceType api.Servi
}
// localProxyURL builds the loopback URL clients use to reach a remote service.
-func (n *SamNode) localProxyURL(peerID peer.ID, typeStr, serviceName string) string {
+func (n *AgentMeshNode) localProxyURL(peerID peer.ID, typeStr, serviceName string) string {
host := n.BoundHTTPAddr
if host == "" {
// Socket-only node: any host works once the caller dials the socket.
@@ -2126,7 +2126,7 @@ func (n *SamNode) localProxyURL(peerID peer.ID, typeStr, serviceName string) str
// DiscoverRemoteServices dispatches to the named or type-only path
// based on whether serviceName is provided.
-func (n *SamNode) DiscoverRemoteServices(ctx context.Context, serviceType api.ServiceType, serviceName string) ([]*api.DiscoveredProvider, error) {
+func (n *AgentMeshNode) DiscoverRemoteServices(ctx context.Context, serviceType api.ServiceType, serviceName string) ([]*api.DiscoveredProvider, error) {
typeStr, err := api.ServiceTypeToString(serviceType)
if err != nil {
return nil, err
@@ -2139,7 +2139,7 @@ func (n *SamNode) DiscoverRemoteServices(ctx context.Context, serviceType api.Se
// DiscoverRemoteServicesStream performs service discovery and streams results down the returned channel.
// The channel is closed automatically when discovery completes or the context is cancelled.
-func (n *SamNode) DiscoverRemoteServicesStream(ctx context.Context, serviceType api.ServiceType, serviceName string) (<-chan *api.DiscoveredProvider, error) {
+func (n *AgentMeshNode) DiscoverRemoteServicesStream(ctx context.Context, serviceType api.ServiceType, serviceName string) (<-chan *api.DiscoveredProvider, error) {
typeStr, err := api.ServiceTypeToString(serviceType)
if err != nil {
return nil, err
@@ -2228,7 +2228,7 @@ func (n *SamNode) DiscoverRemoteServicesStream(ctx context.Context, serviceType
}
// discoverServicesByName: targeted DHT lookup, no fan-out.
-func (n *SamNode) discoverServicesByName(ctx context.Context, serviceType api.ServiceType, typeStr, serviceName string) ([]*api.DiscoveredProvider, error) {
+func (n *AgentMeshNode) discoverServicesByName(ctx context.Context, serviceType api.ServiceType, typeStr, serviceName string) ([]*api.DiscoveredProvider, error) {
peers, err := n.FindProvidersByName(ctx, serviceType, serviceName)
if err != nil {
return nil, err
@@ -2249,7 +2249,7 @@ func (n *SamNode) discoverServicesByName(ctx context.Context, serviceType api.Se
// discoverServicesByType: rendezvous lookup → parallel list_local_services
// fan-out → flat catalog. Failed peers are dropped with a log line.
-func (n *SamNode) discoverServicesByType(ctx context.Context, serviceType api.ServiceType, typeStr string) ([]*api.DiscoveredProvider, error) {
+func (n *AgentMeshNode) discoverServicesByType(ctx context.Context, serviceType api.ServiceType, typeStr string) ([]*api.DiscoveredProvider, error) {
peers, err := n.FindProvidersByType(ctx, serviceType)
if err != nil {
return nil, err
@@ -2312,7 +2312,7 @@ func (n *SamNode) discoverServicesByType(ctx context.Context, serviceType api.Se
// ListLocalServices returns services registered on this node. If
// typeFilter is SERVICE_TYPE_UNSPECIFIED, all services are returned.
-func (n *SamNode) ListLocalServices(typeFilter api.ServiceType) []*api.ServiceInfo {
+func (n *AgentMeshNode) ListLocalServices(typeFilter api.ServiceType) []*api.ServiceInfo {
return n.services.List(typeFilter)
}
@@ -2354,7 +2354,7 @@ func (w *responseWriterWithCount) Unwrap() http.ResponseWriter {
return w.ResponseWriter
}
-func (n *SamNode) StartIngressServer(ctx context.Context) error {
+func (n *AgentMeshNode) StartIngressServer(ctx context.Context) error {
listener, err := gostream.Listen(n.Host, "/libp2p-http")
if err != nil {
return err
@@ -2456,8 +2456,8 @@ func (n *SamNode) StartIngressServer(ctx context.Context) error {
if svc, ok := n.services.GetTyped(serviceType, serviceName); ok {
reqCtx.Egress = egressFactsFor(svc)
}
- if strings.EqualFold(r.Header.Get("Upgrade"), HeaderSamTunnelUpgrade) {
- reqPort, _ := strconv.Atoi(r.Header.Get(HeaderSamEgressPort))
+ if strings.EqualFold(r.Header.Get("Upgrade"), HeaderMeshTunnelUpgrade) {
+ reqPort, _ := strconv.Atoi(r.Header.Get(HeaderMeshEgressPort))
reqCtx.HTTP = &HTTPRequestFacts{Method: http.MethodConnect, Path: ""}
reqCtx.Egress = &EgressFacts{Host: serviceName, Port: reqPort}
}
@@ -2563,7 +2563,7 @@ func (n *SamNode) StartIngressServer(ctx context.Context) error {
// mesh (via Identify and DHT provider records). Relay addresses always pass:
// their IP belongs to the router, and dropping one would strand a node behind
// NAT.
-func (n *SamNode) announceFilter(addrs []multiaddr.Multiaddr) []multiaddr.Multiaddr {
+func (n *AgentMeshNode) announceFilter(addrs []multiaddr.Multiaddr) []multiaddr.Multiaddr {
announcePrivate := n.config.AnnouncePrivateAddrs == nil || *n.config.AnnouncePrivateAddrs
if n.config.AllowLoopback && announcePrivate {
return addrs
@@ -2634,7 +2634,7 @@ func hasCircuit(addr multiaddr.Multiaddr) bool {
return false
}
-func (n *SamNode) syncMeshPolicy(ctx context.Context) error {
+func (n *AgentMeshNode) syncMeshPolicy(ctx context.Context) error {
controlPlaneURL, err := n.Store.LoadControlPlaneURL()
if err != nil || controlPlaneURL == "" {
return fmt.Errorf("control plane URL not found in store")
@@ -2672,7 +2672,7 @@ func (n *SamNode) syncMeshPolicy(ctx context.Context) error {
// reportNodeCatalog self-reports this node's local service list to the
// control plane (see internal/controlplane/catalog.go's HandleNodeCatalog),
// so an admin console can show mesh-wide service topology.
-func (n *SamNode) reportNodeCatalog(ctx context.Context) error {
+func (n *AgentMeshNode) reportNodeCatalog(ctx context.Context) error {
controlPlaneURL, err := n.Store.LoadControlPlaneURL()
if err != nil || controlPlaneURL == "" {
return fmt.Errorf("control plane URL not found in store")
@@ -2696,7 +2696,7 @@ func (n *SamNode) reportNodeCatalog(ctx context.Context) error {
// A failure is logged at Warn once and at Debug while it persists: the
// usual causes (control plane unreachable, path not routed) do not change
// from one tick to the next.
-func (n *SamNode) startCatalogReportLoop(ctx context.Context, initialDelay, interval time.Duration) {
+func (n *AgentMeshNode) startCatalogReportLoop(ctx context.Context, initialDelay, interval time.Duration) {
if interval <= 0 {
interval = 1 * time.Minute
}
diff --git a/internal/node/node_metrics.go b/internal/node/node_metrics.go
index 82308f49..c53c20c1 100644
--- a/internal/node/node_metrics.go
+++ b/internal/node/node_metrics.go
@@ -31,7 +31,7 @@ import (
// as gauges a scraper can keep. A node that runs unattended, such as a
// canary, becomes a continuous probe of the mesh this way.
type nodeStateCollector struct {
- n *SamNode
+ n *AgentMeshNode
readyDesc *prometheus.Desc
meshConnectedDesc *prometheus.Desc
@@ -42,35 +42,35 @@ type nodeStateCollector struct {
servicesDesc *prometheus.Desc
}
-func newNodeStateCollector(n *SamNode) *nodeStateCollector {
+func newNodeStateCollector(n *AgentMeshNode) *nodeStateCollector {
return &nodeStateCollector{
n: n,
readyDesc: prometheus.NewDesc(
- "sam_node_ready",
+ "agentmesh_node_ready",
"1 once the libp2p host, DHT and identity store exist",
nil, nil),
meshConnectedDesc: prometheus.NewDesc(
- "sam_node_mesh_connected",
+ "agentmesh_node_mesh_connected",
"1 while the node holds an authenticated connection to a router",
nil, nil),
connectedDesc: prometheus.NewDesc(
- "sam_node_connected_peers",
+ "agentmesh_node_connected_peers",
"Peers with an open libp2p connection, authenticated or not",
nil, nil),
authenticatedDesc: prometheus.NewDesc(
- "sam_node_authenticated_peers",
+ "agentmesh_node_authenticated_peers",
"Peers that have completed the mesh authentication handshake with this node",
nil, nil),
dhtDesc: prometheus.NewDesc(
- "sam_node_dht_routing_table_size",
+ "agentmesh_node_dht_routing_table_size",
"Peers in the Kademlia routing table",
nil, nil),
biscuitExpiryDesc: prometheus.NewDesc(
- "sam_node_biscuit_expiry_timestamp_seconds",
+ "agentmesh_node_biscuit_expiry_timestamp_seconds",
"Unix time the node's mesh credential expires",
nil, nil),
servicesDesc: prometheus.NewDesc(
- "sam_node_services_registered",
+ "agentmesh_node_services_registered",
"Local services this node offers to the mesh, by type",
[]string{"type"}, nil),
}
@@ -131,8 +131,8 @@ func serviceTypeLabel(t api.ServiceType) string {
// metricsHandler serves the process-wide registry, which carries the request
// and inference counters and the Go runtime, alongside this node's own state.
// The state collector is per node so two nodes in one process (tests,
-// sam-one) never fight over a registration.
-func (n *SamNode) metricsHandler() http.Handler {
+// agentmesh-one) never fight over a registration.
+func (n *AgentMeshNode) metricsHandler() http.Handler {
n.metricsOnce.Do(func() {
n.metricsRegistry = prometheus.NewRegistry()
n.metricsRegistry.MustRegister(newNodeStateCollector(n))
@@ -148,7 +148,7 @@ func (n *SamNode) metricsHandler() http.Handler {
// The sidecar's own /metrics stays token-gated: this listener exists so a
// socket-only node, which has no TCP port at all, can still be observed. It
// is off unless an operator names the address, since nothing on it is gated.
-func StartMetricsServer(node *SamNode, addr string) (*http.Server, error) {
+func StartMetricsServer(node *AgentMeshNode, addr string) (*http.Server, error) {
if addr == "" {
return nil, errors.New("no metrics address configured")
}
diff --git a/internal/node/node_metrics_test.go b/internal/node/node_metrics_test.go
index 5747f9ed..1f5cd020 100644
--- a/internal/node/node_metrics_test.go
+++ b/internal/node/node_metrics_test.go
@@ -45,9 +45,9 @@ func TestNodeMetricsServer(t *testing.T) {
}
defer func() { _ = store.Close() }()
- // Half-built, as a node is between NewSamNode and Start: alive, not
+ // Half-built, as a node is between NewAgentMeshNode and Start: alive, not
// ready, and nothing read from a host that does not exist yet.
- node := &SamNode{Store: store, services: NewServiceRegistry(&fakeDHT{}, 0)}
+ node := &AgentMeshNode{Store: store, services: NewServiceRegistry(&fakeDHT{}, 0)}
srv, err := StartMetricsServer(node, "127.0.0.1:0")
if err != nil {
t.Fatal(err)
@@ -68,10 +68,10 @@ func TestNodeMetricsServer(t *testing.T) {
if code != http.StatusOK {
t.Fatalf("/metrics = %d: %s", code, body)
}
- if !strings.Contains(body, "sam_node_ready 0") {
- t.Error("/metrics missing sam_node_ready 0 before start")
+ if !strings.Contains(body, "agentmesh_node_ready 0") {
+ t.Error("/metrics missing agentmesh_node_ready 0 before start")
}
- if strings.Contains(body, "sam_node_connected_peers") {
+ if strings.Contains(body, "agentmesh_node_connected_peers") {
t.Error("/metrics exported host state before the host existed")
}
@@ -101,21 +101,21 @@ func TestNodeMetricsServer(t *testing.T) {
}
_, body = getMetricsBody(t, base+"/metrics")
for _, want := range []string{
- "sam_node_ready 1",
- "sam_node_mesh_connected 0",
- "sam_node_connected_peers 0",
- "sam_node_authenticated_peers 2",
- "sam_node_dht_routing_table_size 0",
- "sam_node_biscuit_expiry_timestamp_seconds " + strconv.FormatFloat(float64(expiry), 'g', -1, 64),
+ "agentmesh_node_ready 1",
+ "agentmesh_node_mesh_connected 0",
+ "agentmesh_node_connected_peers 0",
+ "agentmesh_node_authenticated_peers 2",
+ "agentmesh_node_dht_routing_table_size 0",
+ "agentmesh_node_biscuit_expiry_timestamp_seconds " + strconv.FormatFloat(float64(expiry), 'g', -1, 64),
// The process-wide registry rides along: sidecar counters and libp2p.
- "sam_node_requests_in_flight",
+ "agentmesh_node_requests_in_flight",
"libp2p_",
} {
if !strings.Contains(body, want) {
t.Errorf("/metrics missing %q", want)
}
}
- if strings.Contains(body, "sam_node_services_registered") {
+ if strings.Contains(body, "agentmesh_node_services_registered") {
t.Error("services gauge exported with an empty registry")
}
@@ -136,7 +136,7 @@ func TestNodeMetricsServer(t *testing.T) {
t.Errorf("/readyz = %d once a router is authenticated", code)
}
_, body = getMetricsBody(t, base+"/metrics")
- for _, want := range []string{"sam_node_mesh_connected 1", "sam_node_connected_peers 1"} {
+ for _, want := range []string{"agentmesh_node_mesh_connected 1", "agentmesh_node_connected_peers 1"} {
if !strings.Contains(body, want) {
t.Errorf("/metrics missing %q", want)
}
@@ -144,7 +144,7 @@ func TestNodeMetricsServer(t *testing.T) {
}
func TestStartMetricsServerRequiresAddress(t *testing.T) {
- if _, err := StartMetricsServer(&SamNode{}, ""); err == nil {
+ if _, err := StartMetricsServer(&AgentMeshNode{}, ""); err == nil {
t.Fatal("expected an error for an empty address")
}
}
diff --git a/internal/node/node_test.go b/internal/node/node_test.go
index c11f75d7..ba6af459 100644
--- a/internal/node/node_test.go
+++ b/internal/node/node_test.go
@@ -98,7 +98,7 @@ func TestAnnounceFilter(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- n := &SamNode{config: Options{
+ n := &AgentMeshNode{config: Options{
AllowLoopback: tt.allowLoopback,
AnnouncePrivateAddrs: tt.announcePrivate,
}}
@@ -127,7 +127,7 @@ func TestHandleBannedEvent(t *testing.T) {
for _, spelling := range []string{banned.String(), peer.ToCid(banned).String()} {
revokedCache, _ := lru.New[string, int64](10)
- node := &SamNode{
+ node := &AgentMeshNode{
revokedPeers: revokedCache,
BiscuitTimeout: 500 * time.Millisecond,
}
@@ -163,7 +163,7 @@ func TestBannedPeerCanonicalisation(t *testing.T) {
if err != nil {
t.Fatalf("failed to create revocation cache: %v", err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
revokedPeers: revokedCache,
peerLastEventTime: make(map[string]int64),
BiscuitTimeout: 500 * time.Millisecond,
@@ -185,7 +185,7 @@ func TestBannedPeerCanonicalisation(t *testing.T) {
}
func TestHandleKeyRotationEvent(t *testing.T) {
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}
pub, _, err := ed25519.GenerateKey(nil)
if err != nil {
@@ -221,7 +221,7 @@ func TestKeyRotationEventSurvivesRestart(t *testing.T) {
enrollKey, _, _ := ed25519.GenerateKey(nil)
rotatedKey, _, _ := ed25519.GenerateKey(nil)
- node := &SamNode{Store: store, trustedKeys: []TrustedKey{{Key: enrollKey, ReceivedAt: time.Now()}}}
+ node := &AgentMeshNode{Store: store, trustedKeys: []TrustedKey{{Key: enrollKey, ReceivedAt: time.Now()}}}
node.handleKeyRotationEvent(&api.MeshEvent{
Type: api.MeshEvent_KEY_ROTATION,
NewPublicKey: rotatedKey,
@@ -236,7 +236,7 @@ func TestKeyRotationEventSurvivesRestart(t *testing.T) {
// "Restart": a fresh node built from the same store must trust the rotated key
priv, _, _ := crypto.GenerateKeyPair(crypto.Ed25519, -1)
- restarted, err := NewSamNode(Options{PrivKey: priv, Store: store, ControlPlanePubKey: enrollKey})
+ restarted, err := NewAgentMeshNode(Options{PrivKey: priv, Store: store, ControlPlanePubKey: enrollKey})
if err != nil {
t.Fatal(err)
}
@@ -251,7 +251,7 @@ func TestKeyRotationEventSurvivesRestart(t *testing.T) {
}
}
-func TestNewSamNodeIgnoresCorruptPersistedKeys(t *testing.T) {
+func TestNewAgentMeshNodeIgnoresCorruptPersistedKeys(t *testing.T) {
store, err := NewStore(t.TempDir())
if err != nil {
t.Fatal(err)
@@ -267,7 +267,7 @@ func TestNewSamNodeIgnoresCorruptPersistedKeys(t *testing.T) {
}
priv, _, _ := crypto.GenerateKeyPair(crypto.Ed25519, -1)
- node, err := NewSamNode(Options{PrivKey: priv, Store: store})
+ node, err := NewAgentMeshNode(Options{PrivKey: priv, Store: store})
if err != nil {
t.Fatal(err)
}
@@ -342,7 +342,7 @@ func TestHandleAuthHandshake(t *testing.T) {
}
defer func() { _ = clientHost.Close() }()
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: time.Second,
}
@@ -463,7 +463,7 @@ func TestHandleAuthHandshakeBoundsUnauthenticatedPeers(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: pub, ReceivedAt: time.Now()}},
BiscuitTimeout: time.Second,
handshakeLimiter: limiter,
@@ -563,7 +563,7 @@ func TestPerformRouterAuthHandshakeRequiresRouterRole(t *testing.T) {
}
defer func() { _ = clientHost.Close() }()
- node := &SamNode{
+ node := &AgentMeshNode{
trustedKeys: []TrustedKey{{Key: cpPub, ReceivedAt: time.Now()}},
BiscuitTimeout: time.Second,
}
@@ -615,7 +615,7 @@ func TestStartRenewalLoop_ExpiredAndFails(t *testing.T) {
// Set expiration to the past
_ = store.SaveIdentityExpiration(time.Now().Add(-1 * time.Hour).Unix())
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
Store: store,
}
@@ -641,7 +641,7 @@ func TestConnectionMonitor_CrashesAfterFailures(t *testing.T) {
if os.Getenv("BE_CRASHER_MONITOR") == "1" {
priv, _, _ := crypto.GenerateKeyPair(crypto.Ed25519, -1)
store, _ := NewStore(t.TempDir())
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
RouterAddrs: nil,
Store: store,
@@ -656,7 +656,7 @@ func TestConnectionMonitor_CrashesAfterFailures(t *testing.T) {
MonitorInterval: 1 * time.Minute,
})
if err != nil {
- os.Exit(0) // Ignore NewSamNode errors for this crasher
+ os.Exit(0) // Ignore NewAgentMeshNode errors for this crasher
}
if err := node.Start(context.Background()); err != nil {
os.Exit(0)
@@ -678,13 +678,13 @@ func TestConnectionMonitor_CrashesAfterFailures(t *testing.T) {
t.Fatalf("process ran with err %v, want exit status 1 (fatal crash)", err)
}
-func TestNewSamNode_Validation(t *testing.T) {
+func TestNewAgentMeshNode_Validation(t *testing.T) {
priv, _, _ := crypto.GenerateKeyPair(crypto.Ed25519, -1)
store, _ := NewStore(t.TempDir())
defer func() { _ = store.Close() }()
t.Run("nil PrivKey", func(t *testing.T) {
- _, err := NewSamNode(Options{
+ _, err := NewAgentMeshNode(Options{
PrivKey: nil,
Store: store,
})
@@ -694,7 +694,7 @@ func TestNewSamNode_Validation(t *testing.T) {
})
t.Run("nil Store", func(t *testing.T) {
- _, err := NewSamNode(Options{
+ _, err := NewAgentMeshNode(Options{
PrivKey: priv,
Store: nil,
})
@@ -704,18 +704,18 @@ func TestNewSamNode_Validation(t *testing.T) {
})
}
-func TestNewSamNode_BiscuitTimeout(t *testing.T) {
+func TestNewAgentMeshNode_BiscuitTimeout(t *testing.T) {
priv, _, _ := crypto.GenerateKeyPair(crypto.Ed25519, -1)
store, _ := NewStore(t.TempDir())
defer func() { _ = store.Close() }()
t.Run("defaults when unset", func(t *testing.T) {
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
Store: store,
})
if err != nil {
- t.Fatalf("NewSamNode: %v", err)
+ t.Fatalf("NewAgentMeshNode: %v", err)
}
if node.BiscuitTimeout != identity.DefaultAuthorizerTimeout {
t.Errorf("BiscuitTimeout = %v, want default %v", node.BiscuitTimeout, identity.DefaultAuthorizerTimeout)
@@ -723,13 +723,13 @@ func TestNewSamNode_BiscuitTimeout(t *testing.T) {
})
t.Run("explicit value respected", func(t *testing.T) {
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
Store: store,
BiscuitTimeout: 10 * time.Second,
})
if err != nil {
- t.Fatalf("NewSamNode: %v", err)
+ t.Fatalf("NewAgentMeshNode: %v", err)
}
if node.BiscuitTimeout != 10*time.Second {
t.Errorf("BiscuitTimeout = %v, want 10s", node.BiscuitTimeout)
@@ -737,7 +737,7 @@ func TestNewSamNode_BiscuitTimeout(t *testing.T) {
})
}
-func TestNewSamNode_DHTOptions(t *testing.T) {
+func TestNewAgentMeshNode_DHTOptions(t *testing.T) {
priv, _, _ := crypto.GenerateKeyPair(crypto.Ed25519, -1)
store, _ := NewStore(t.TempDir())
defer func() { _ = store.Close() }()
@@ -752,7 +752,7 @@ func TestNewSamNode_DHTOptions(t *testing.T) {
DiscoveryConcurrency: 5,
}
- node, err := NewSamNode(opts)
+ node, err := NewAgentMeshNode(opts)
if err != nil {
t.Fatalf("failed to create node with DHT options: %v", err)
}
@@ -771,7 +771,7 @@ func TestNewSamNode_DHTOptions(t *testing.T) {
}
}
-// newDHTHost returns a host wired to a DHT on the /sam prefix. Client mode
+// newDHTHost returns a host wired to a DHT on the /mesh prefix. Client mode
// keeps the host out of its peers' routing tables, so nothing dials it except
// the code under test.
func newDHTHost(t *testing.T, mode dht.ModeOpt) (host.Host, *dht.IpfsDHT) {
@@ -824,7 +824,7 @@ func TestFindProvidersSkipsRevoked(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- node := &SamNode{Host: hostA, DHT: dhtA, revokedPeers: revokedCache}
+ node := &AgentMeshNode{Host: hostA, DHT: dhtA, revokedPeers: revokedCache}
// Positive control: the provider record is findable before the ban, so a
// later empty result is the guard and not a lookup that never worked.
@@ -875,7 +875,7 @@ func TestStartDiscoverySkipsRevoked(t *testing.T) {
t.Fatal(err)
}
revokedCache.Add(revokedHost.ID().String(), time.Now().UnixMilli())
- node := &SamNode{Host: hostA, DHT: dhtA, revokedPeers: revokedCache}
+ node := &AgentMeshNode{Host: hostA, DHT: dhtA, revokedPeers: revokedCache}
go node.startDiscovery(ctx, meshID, 200*time.Millisecond)
diff --git a/internal/node/oidc.go b/internal/node/oidc.go
index d9da6bb7..d485ec5d 100644
--- a/internal/node/oidc.go
+++ b/internal/node/oidc.go
@@ -49,7 +49,7 @@ func generatePKCE() (string, string, error) {
}
// FetchJWT fetches a JWT token using the Client Credentials flow.
-func (n *SamNode) FetchJWT(ctx context.Context, tokenURL, clientID, clientSecret string) (string, error) {
+func (n *AgentMeshNode) FetchJWT(ctx context.Context, tokenURL, clientID, clientSecret string) (string, error) {
config := &clientcredentials.Config{
ClientID: clientID,
ClientSecret: clientSecret,
@@ -96,7 +96,7 @@ func ParseAuthMode(s string) (AuthMode, error) {
}
// InteractiveLogin prompts the user to go to a URL and enter a code.
-func (n *SamNode) InteractiveLogin(ctx context.Context, authURL, tokenURL, clientID, audience string, requestRefresh bool, headless bool) (string, error) {
+func (n *AgentMeshNode) InteractiveLogin(ctx context.Context, authURL, tokenURL, clientID, audience string, requestRefresh bool, headless bool) (string, error) {
return n.InteractiveLoginWithDeviceAuth(ctx, authURL, tokenURL, "", clientID, audience, requestRefresh, headless)
}
@@ -104,14 +104,14 @@ func (n *SamNode) InteractiveLogin(ctx context.Context, authURL, tokenURL, clien
// the OAuth Device Authorization Grant in headless mode when the provider
// exposes a device authorization endpoint, and otherwise uses the loopback
// browser flow with a device fallback.
-func (n *SamNode) InteractiveLoginWithDeviceAuth(ctx context.Context, authURL, tokenURL, deviceAuthURL, clientID, audience string, requestRefresh bool, headless bool) (string, error) {
+func (n *AgentMeshNode) InteractiveLoginWithDeviceAuth(ctx context.Context, authURL, tokenURL, deviceAuthURL, clientID, audience string, requestRefresh bool, headless bool) (string, error) {
return n.InteractiveLoginWithMode(ctx, authURL, tokenURL, deviceAuthURL, clientID, audience, requestRefresh, headless, AuthModeAuto)
}
// InteractiveLoginWithMode authenticates the user using an explicit AuthMode,
// letting callers (e.g. CUJ harnesses) force a deterministic flow instead of
// relying on headless environment detection.
-func (n *SamNode) InteractiveLoginWithMode(ctx context.Context, authURL, tokenURL, deviceAuthURL, clientID, audience string, requestRefresh bool, headless bool, mode AuthMode) (string, error) {
+func (n *AgentMeshNode) InteractiveLoginWithMode(ctx context.Context, authURL, tokenURL, deviceAuthURL, clientID, audience string, requestRefresh bool, headless bool, mode AuthMode) (string, error) {
if tokenURL == "" {
return "", fmt.Errorf("token URL is required")
}
@@ -397,7 +397,7 @@ func bodySnippet(body []byte) string {
}
// DeviceLogin performs OAuth 2.0 Device Authorization Grant (RFC 8628).
-func (n *SamNode) DeviceLogin(ctx context.Context, deviceAuthURL, tokenURL, clientID, audience string, requestRefresh bool) (string, error) {
+func (n *AgentMeshNode) DeviceLogin(ctx context.Context, deviceAuthURL, tokenURL, clientID, audience string, requestRefresh bool) (string, error) {
if deviceAuthURL == "" {
return "", fmt.Errorf("device authorization URL is required")
}
@@ -655,7 +655,7 @@ func parseTokenResponse(resp *http.Response) (jwt string, refreshToken string, e
var oidcDiscoveryTimeout = 10 * time.Second
// DiscoverTokenURL discovers the token URL from the OIDC issuer.
-func (n *SamNode) DiscoverTokenURL(ctx context.Context, issuerURL string) (string, error) {
+func (n *AgentMeshNode) DiscoverTokenURL(ctx context.Context, issuerURL string) (string, error) {
client := &http.Client{Timeout: oidcDiscoveryTimeout}
provider, err := oidc.NewProvider(oidc.ClientContext(ctx, client), issuerURL)
if err != nil {
@@ -674,7 +674,7 @@ func (n *SamNode) DiscoverTokenURL(ctx context.Context, issuerURL string) (strin
}
// DiscoverEndpoints discovers both token and authorization endpoints.
-func (n *SamNode) DiscoverEndpoints(ctx context.Context, issuerURL string) (tokenURL, authURL string, err error) {
+func (n *AgentMeshNode) DiscoverEndpoints(ctx context.Context, issuerURL string) (tokenURL, authURL string, err error) {
endpoints, err := n.DiscoverEndpointsWithDevice(ctx, issuerURL)
if err != nil {
return "", "", err
@@ -690,7 +690,7 @@ type OIDCEndpoints struct {
}
// DiscoverEndpointsWithDevice discovers token, authorization and device authorization endpoints.
-func (n *SamNode) DiscoverEndpointsWithDevice(ctx context.Context, issuerURL string) (*OIDCEndpoints, error) {
+func (n *AgentMeshNode) DiscoverEndpointsWithDevice(ctx context.Context, issuerURL string) (*OIDCEndpoints, error) {
client := &http.Client{Timeout: oidcDiscoveryTimeout}
provider, err := oidc.NewProvider(oidc.ClientContext(ctx, client), issuerURL)
if err != nil {
@@ -737,7 +737,7 @@ func openBrowser(targetURL string) error {
}
// RefreshJWT refreshes the OIDC token using the stored refresh token.
-func (n *SamNode) RefreshJWT(ctx context.Context, tokenURL, clientID, clientSecret, refreshToken string) (string, string, error) {
+func (n *AgentMeshNode) RefreshJWT(ctx context.Context, tokenURL, clientID, clientSecret, refreshToken string) (string, string, error) {
tokenData := url.Values{}
tokenData.Set("grant_type", "refresh_token")
tokenData.Set("client_id", clientID)
diff --git a/internal/node/oidc_test.go b/internal/node/oidc_test.go
index b48d9560..ac9234ef 100644
--- a/internal/node/oidc_test.go
+++ b/internal/node/oidc_test.go
@@ -65,7 +65,7 @@ func TestInteractiveLogin(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
@@ -85,7 +85,7 @@ func TestInteractiveLogin(t *testing.T) {
}
defer func() { openBrowserFunc = originalOpenBrowser }()
- token, err := node.InteractiveLogin(ctx, "http://auth.example.com/auth", server.URL+"/token", "client_id_test", "sam-e2e", false, false)
+ token, err := node.InteractiveLogin(ctx, "http://auth.example.com/auth", server.URL+"/token", "client_id_test", "agentmesh-e2e", false, false)
if err != nil {
t.Fatalf("InteractiveLogin failed: %v", err)
}
@@ -111,7 +111,7 @@ func TestDiscoverEndpoints(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}
ctx := context.Background()
tokenURL, authURL, err := node.DiscoverEndpoints(ctx, server.URL)
@@ -144,7 +144,7 @@ func TestDiscoverEndpointsWithDevice(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}
ctx := context.Background()
endpoints, err := node.DiscoverEndpointsWithDevice(ctx, server.URL)
@@ -187,7 +187,7 @@ func TestDiscoverEndpointsDoesNotHangOnUnresponsiveIssuer(t *testing.T) {
}
}()
- node := &SamNode{}
+ node := &AgentMeshNode{}
done := make(chan struct{})
go func() {
defer close(done)
@@ -240,7 +240,7 @@ func TestInteractiveLoginWithRefresh(t *testing.T) {
}
}()
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond, Store: store}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond, Store: store}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
@@ -268,7 +268,7 @@ func TestInteractiveLoginWithRefresh(t *testing.T) {
}
defer func() { openBrowserFunc = originalOpenBrowser }()
- token, err := node.InteractiveLogin(ctx, "http://auth.example.com/auth", server.URL+"/token", "client_id_test", "sam-e2e", true, false)
+ token, err := node.InteractiveLogin(ctx, "http://auth.example.com/auth", server.URL+"/token", "client_id_test", "agentmesh-e2e", true, false)
if err != nil {
t.Fatalf("InteractiveLogin failed: %v", err)
}
@@ -354,7 +354,7 @@ func TestInteractiveLoginWithDeviceAuth_Headless(t *testing.T) {
}
}()
- node := &SamNode{Store: store}
+ node := &AgentMeshNode{Store: store}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
@@ -371,7 +371,7 @@ func TestInteractiveLoginWithDeviceAuth_Headless(t *testing.T) {
server.URL+"/token",
server.URL+"/device",
"client_id_test",
- "sam-e2e",
+ "agentmesh-e2e",
true,
true,
)
@@ -392,7 +392,7 @@ func TestInteractiveLoginWithDeviceAuth_Headless(t *testing.T) {
}
// TestInteractiveLoginBrowserFailFallsBackToDevice verifies that in an
-// interactive (non-headless) flow, if the browser cannot be opened, SAM falls
+// interactive (non-headless) flow, if the browser cannot be opened, Agent Mesh falls
// back to the device authorization flow when the provider advertises one,
// instead of leaving the user to paste a callback code.
func TestInteractiveLoginBrowserFailFallsBackToDevice(t *testing.T) {
@@ -440,7 +440,7 @@ func TestInteractiveLoginBrowserFailFallsBackToDevice(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()
- node := &SamNode{}
+ node := &AgentMeshNode{}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
@@ -456,7 +456,7 @@ func TestInteractiveLoginBrowserFailFallsBackToDevice(t *testing.T) {
server.URL+"/token",
server.URL+"/device",
"client_id_test",
- "sam-e2e",
+ "agentmesh-e2e",
false,
false, // interactive: browser flow attempted first, then device fallback
)
@@ -508,11 +508,11 @@ func TestDeviceLoginRetriesOnTransientTokenError(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()
- node := &SamNode{}
+ node := &AgentMeshNode{}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
- token, err := node.DeviceLogin(ctx, server.URL+"/device", server.URL+"/token", "client_id_test", "sam-e2e", false)
+ token, err := node.DeviceLogin(ctx, server.URL+"/device", server.URL+"/token", "client_id_test", "agentmesh-e2e", false)
if err != nil {
t.Fatalf("DeviceLogin failed: %v", err)
}
@@ -555,11 +555,11 @@ func TestDeviceLoginPending401(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()
- node := &SamNode{}
+ node := &AgentMeshNode{}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
- token, err := node.DeviceLogin(ctx, server.URL+"/device", server.URL+"/token", "client_id_test", "sam-e2e", false)
+ token, err := node.DeviceLogin(ctx, server.URL+"/device", server.URL+"/token", "client_id_test", "agentmesh-e2e", false)
if err != nil {
t.Fatalf("DeviceLogin failed: %v", err)
}
@@ -609,11 +609,11 @@ func TestDeviceLoginFatalErrors(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()
- node := &SamNode{}
+ node := &AgentMeshNode{}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
- _, err := node.DeviceLogin(ctx, server.URL+"/device", server.URL+"/token", "client_id_test", "sam-e2e", false)
+ _, err := node.DeviceLogin(ctx, server.URL+"/device", server.URL+"/token", "client_id_test", "agentmesh-e2e", false)
if err == nil {
t.Fatal("expected DeviceLogin to fail")
}
@@ -688,7 +688,7 @@ func TestAuthModeDeviceForcedWhenInteractive(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()
- node := &SamNode{}
+ node := &AgentMeshNode{}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
@@ -705,7 +705,7 @@ func TestAuthModeDeviceForcedWhenInteractive(t *testing.T) {
server.URL+"/token",
server.URL+"/device",
"client_id_test",
- "sam-e2e",
+ "agentmesh-e2e",
false,
false,
AuthModeDevice,
@@ -721,7 +721,7 @@ func TestAuthModeDeviceForcedWhenInteractive(t *testing.T) {
// TestAuthModeDeviceWithoutEndpointErrors verifies that auth-mode=device fails
// fast when the provider advertises no device endpoint.
func TestAuthModeDeviceWithoutEndpointErrors(t *testing.T) {
- node := &SamNode{}
+ node := &AgentMeshNode{}
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
@@ -731,7 +731,7 @@ func TestAuthModeDeviceWithoutEndpointErrors(t *testing.T) {
"http://token.example.com/token",
"", // no device endpoint
"client_id_test",
- "sam-e2e",
+ "agentmesh-e2e",
false,
true,
AuthModeDevice,
@@ -769,7 +769,7 @@ func TestAuthModeBrowserIgnoresDevice(t *testing.T) {
server := httptest.NewServer(mux)
defer server.Close()
- node := &SamNode{}
+ node := &AgentMeshNode{}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
@@ -792,7 +792,7 @@ func TestAuthModeBrowserIgnoresDevice(t *testing.T) {
server.URL+"/token",
server.URL+"/device",
"client_id_test",
- "sam-e2e",
+ "agentmesh-e2e",
false,
true, // headless requested, but browser mode overrides it
AuthModeBrowser,
@@ -856,14 +856,14 @@ func TestRenewWithRefreshToken(t *testing.T) {
}()
// Store OIDC Config and old refresh token
- if err := store.SaveOIDCConfig(server.URL, "client_id_test", "sam-e2e"); err != nil {
+ if err := store.SaveOIDCConfig(server.URL, "client_id_test", "agentmesh-e2e"); err != nil {
t.Fatalf("Failed to save OIDC Config: %v", err)
}
if err := store.SaveRefreshToken("old_refresh_123"); err != nil {
t.Fatalf("Failed to save Refresh Token: %v", err)
}
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond, Store: store}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond, Store: store}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
diff --git a/internal/node/openai_facade.go b/internal/node/openai_facade.go
index 8cae626f..ed1cf69f 100644
--- a/internal/node/openai_facade.go
+++ b/internal/node/openai_facade.go
@@ -102,7 +102,7 @@ type openAIFacade struct {
backoff map[string]time.Time
}
-func newOpenAIFacade(node *SamNode, egress http.Handler) *openAIFacade {
+func newOpenAIFacade(node *AgentMeshNode, egress http.Handler) *openAIFacade {
client := &http.Client{Transport: libp2phttp.NewTransport(node.Host)}
return &openAIFacade{
forward: egress,
@@ -180,7 +180,7 @@ func newOpenAIFacade(node *SamNode, egress http.Handler) *openAIFacade {
// fetchRemoteModels probes a remote provider's backend /v1/models through its
// libp2p ingress, authenticating with this node's biscuit.
-func fetchRemoteModels(ctx context.Context, node *SamNode, client *http.Client, peerID, srvName string) ([]string, error) {
+func fetchRemoteModels(ctx context.Context, node *AgentMeshNode, client *http.Client, peerID, srvName string) ([]string, error) {
pid, err := peer.Decode(peerID)
if err != nil {
return nil, fmt.Errorf("invalid peer ID %q: %w", peerID, err)
diff --git a/internal/node/openai_facade_test.go b/internal/node/openai_facade_test.go
index 120d283b..5d925ffc 100644
--- a/internal/node/openai_facade_test.go
+++ b/internal/node/openai_facade_test.go
@@ -149,13 +149,13 @@ func TestFacade_Completions_ForwardsToRemote(t *testing.T) {
f.remoteModels = func(_ context.Context, _, _ string) ([]string, error) {
return []string{"m1"}, nil
}
- var gotPath, gotBody, gotAuth, gotSamAuth string
+ var gotPath, gotBody, gotAuth, gotMeshAuth string
f.forward = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
gotPath = r.URL.Path
b, _ := io.ReadAll(r.Body)
gotBody = string(b)
gotAuth = r.Header.Get("Authorization")
- gotSamAuth = r.Header.Get(api.HeaderMeshAuthentication)
+ gotMeshAuth = r.Header.Get(api.HeaderMeshAuthentication)
w.WriteHeader(http.StatusOK)
})
@@ -177,8 +177,8 @@ func TestFacade_Completions_ForwardsToRemote(t *testing.T) {
if gotBody != body {
t.Errorf("forwarded body: got %q, want %q", gotBody, body)
}
- if gotSamAuth != "" {
- t.Errorf("%s must never travel off-node, got %q", api.HeaderMeshAuthentication, gotSamAuth)
+ if gotMeshAuth != "" {
+ t.Errorf("%s must never travel off-node, got %q", api.HeaderMeshAuthentication, gotMeshAuth)
}
if gotAuth != "Bearer backend-credential" {
t.Errorf("backend Authorization must pass through, got %q", gotAuth)
diff --git a/internal/node/options.go b/internal/node/options.go
index ea9fcb15..e6032a64 100644
--- a/internal/node/options.go
+++ b/internal/node/options.go
@@ -28,7 +28,7 @@ import (
const (
DefaultMeshName = "public-mesh"
DefaultDiscoveryInterval = "30s"
- DefaultConfigFile = "sam-node.yaml"
+ DefaultConfigFile = "agentmesh-node.yaml"
DefaultRouterConnectTimeout = 5 * time.Second
// A router pod that restarts is back in well under a minute; the first
// redial waits a moment for it, and six doublings reach past where the
@@ -36,7 +36,7 @@ const (
DefaultRouterRedialDelay = 2 * time.Second
DefaultRouterRedialAttempts = 6
// DefaultSocketName is the local API socket the node creates in its data directory.
- DefaultSocketName = "sam.sock"
+ DefaultSocketName = "agentmesh.sock"
)
// Reachability is the value of Options.Reachability and of --reachability.
@@ -47,7 +47,7 @@ const (
ReachabilityAuto Reachability = "auto"
)
-// Options holds all configuration options for a SamNode.
+// Options holds all configuration options for a AgentMeshNode.
type Options struct {
PrivKey crypto.PrivKey
ControlPlanePubKey ed25519.PublicKey
@@ -114,7 +114,7 @@ type Options struct {
// stampede.
ControlPlaneSyncJitter time.Duration
// BackendProbeTimeout bounds how long a command-spawned service backend
- // (sam-node.yaml's `command`, spawned as a local subprocess) is given to
+ // (agentmesh-node.yaml's `command`, spawned as a local subprocess) is given to
// answer before the service is registered but withheld from
// advertisement. Zero uses the library default (2s). Raise this for
// backends with slower cold-start/import costs than that - the default
diff --git a/internal/node/proxy_test.go b/internal/node/proxy_test.go
index 04941ef0..3b88099a 100644
--- a/internal/node/proxy_test.go
+++ b/internal/node/proxy_test.go
@@ -69,7 +69,7 @@ func TestDatapathIntegration(t *testing.T) {
// Pre-populate stores with dummy keys to avoid enrollment failure if required
// For this test, we assume we can run without full enrollment if we bypass AuthHandler
- nodeA, err := NewSamNode(Options{
+ nodeA, err := NewAgentMeshNode(Options{
PrivKey: privA,
RouterAddrs: nil,
Store: storeA,
@@ -96,7 +96,7 @@ func TestDatapathIntegration(t *testing.T) {
}
}()
- nodeB, err := NewSamNode(Options{
+ nodeB, err := NewAgentMeshNode(Options{
PrivKey: privB,
RouterAddrs: nil,
Store: storeB,
@@ -179,7 +179,7 @@ func TestDatapathIntegration(t *testing.T) {
// 4. Execution: Node B makes a request via its local Egress Proxy
// We need to create the egress proxy for Node B.
- // The user request says: "Implement a reverse proxy on the local `sam-node` HTTP server that intercepts requests to `/mesh/`"
+ // The user request says: "Implement a reverse proxy on the local `agentmesh-node` HTTP server that intercepts requests to `/mesh/`"
// In sidecar.go we have `createEgressProxy(node)`. We can use it here.
proxyHandler := createEgressProxy(nodeB)
@@ -265,7 +265,7 @@ func TestDatapathIntegration_Unauthenticated(t *testing.T) {
}
defer func() { _ = storeB.Close() }()
- nodeA, err := NewSamNode(Options{
+ nodeA, err := NewAgentMeshNode(Options{
PrivKey: privA,
RouterAddrs: nil,
Store: storeA,
@@ -292,7 +292,7 @@ func TestDatapathIntegration_Unauthenticated(t *testing.T) {
}
}()
- nodeB, err := NewSamNode(Options{
+ nodeB, err := NewAgentMeshNode(Options{
PrivKey: privB,
RouterAddrs: nil,
Store: storeB,
@@ -414,7 +414,7 @@ func TestStdioDatapathIntegration(t *testing.T) {
}
defer func() { _ = storeB.Close() }()
- nodeA, err := NewSamNode(Options{
+ nodeA, err := NewAgentMeshNode(Options{
PrivKey: privA,
RouterAddrs: nil,
Store: storeA,
@@ -437,7 +437,7 @@ func TestStdioDatapathIntegration(t *testing.T) {
}
defer func() { _ = nodeA.Host.Close() }()
- nodeB, err := NewSamNode(Options{
+ nodeB, err := NewAgentMeshNode(Options{
PrivKey: privB,
RouterAddrs: nil,
Store: storeB,
@@ -585,7 +585,7 @@ func TestDatapathHeadersAndRoutingTable(t *testing.T) {
}
defer func() { _ = storeB.Close() }()
- nodeA, err := NewSamNode(Options{
+ nodeA, err := NewAgentMeshNode(Options{
PrivKey: privA,
RouterAddrs: nil,
Store: storeA,
@@ -612,7 +612,7 @@ func TestDatapathHeadersAndRoutingTable(t *testing.T) {
}
}()
- nodeB, err := NewSamNode(Options{
+ nodeB, err := NewAgentMeshNode(Options{
PrivKey: privB,
RouterAddrs: nil,
Store: storeB,
@@ -809,7 +809,7 @@ func TestDatapathHeadersAndRoutingTable(t *testing.T) {
}
}
-// The operator's egress floor holds at the /sam/ chokepoint itself, so an agent
+// The operator's egress floor holds at the /mesh/ chokepoint itself, so an agent
// that skips the facade and dials /mesh/<peer>/... raw is still gated: the
// provider's biscuit must attest every pair of the floor before anything is
// forwarded, whatever the caller did or did not ask for (see #385).
diff --git a/internal/node/refresh_test.go b/internal/node/refresh_test.go
index a5300d78..cd822278 100644
--- a/internal/node/refresh_test.go
+++ b/internal/node/refresh_test.go
@@ -39,7 +39,7 @@ import (
// refreshHarness is a node with a stored identity and a mock control plane
// whose /refresh answer the test chooses.
type refreshHarness struct {
- node *SamNode
+ node *AgentMeshNode
cpPub ed25519.PublicKey
cpPriv ed25519.PrivateKey
peerID peer.ID
@@ -102,7 +102,7 @@ func newRefreshHarness(t *testing.T, refresh http.HandlerFunc) *refreshHarness {
t.Fatal(err)
}
- node := &SamNode{
+ node := &AgentMeshNode{
Store: store,
trustedKeys: []TrustedKey{{Key: cpPub, ReceivedAt: time.Now()}},
BiscuitTimeout: 500 * time.Millisecond,
@@ -232,7 +232,7 @@ func TestRotationRefreshSurvivesRestart(t *testing.T) {
harness.storedIdentityUnchanged(t)
// Restart: only what the store holds carries over.
- restarted, err := NewSamNode(Options{PrivKey: GetOrGenerateKey(store), Store: store, ControlPlanePubKey: harness.cpPub, RequiredRole: api.RoleNode, BiscuitTimeout: time.Second})
+ restarted, err := NewAgentMeshNode(Options{PrivKey: GetOrGenerateKey(store), Store: store, ControlPlanePubKey: harness.cpPub, RequiredRole: api.RoleNode, BiscuitTimeout: time.Second})
if err != nil {
t.Fatal(err)
}
diff --git a/internal/node/relay_acl_test.go b/internal/node/relay_acl_test.go
index 990985b9..604f948b 100644
--- a/internal/node/relay_acl_test.go
+++ b/internal/node/relay_acl_test.go
@@ -26,7 +26,7 @@ import (
)
func TestNodeRelayACL_AllowConnect(t *testing.T) {
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}
acl := &nodeRelayACL{node: node}
srcPeer := peer.ID("src-peer")
@@ -60,7 +60,7 @@ func TestNodeRelayACL_AllowConnect(t *testing.T) {
}
func TestNodeRelayACL_AllowReserve(t *testing.T) {
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}
acl := &nodeRelayACL{node: node}
peerID := peer.ID("some-peer")
@@ -80,7 +80,7 @@ func TestNodeRelayACL_AllowReserve(t *testing.T) {
// admitted. The handshake only proves validity at that instant, so the ACL has
// to re-check, otherwise one handshake buys relay rights forever.
func TestExpiredAdmissionLosesRelayRights(t *testing.T) {
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}
acl := &nodeRelayACL{node: node}
peerID := peer.ID("lapsed-peer")
@@ -109,7 +109,7 @@ func TestBannedPeerLosesRelayRights(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- node := &SamNode{revokedPeers: revokedCache, BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{revokedPeers: revokedCache, BiscuitTimeout: 500 * time.Millisecond}
acl := &nodeRelayACL{node: node}
peerID, err := peer.Decode("12D3KooWAFv4iJst5G6MjwXhZ66K5zS1tP7A9vSg4vK8f1T7X8t9")
diff --git a/internal/node/router_auth_dedupe_test.go b/internal/node/router_auth_dedupe_test.go
index 40955b69..7942d1e3 100644
--- a/internal/node/router_auth_dedupe_test.go
+++ b/internal/node/router_auth_dedupe_test.go
@@ -40,7 +40,7 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"
)
-// fakeRouter is a libp2p host answering the SAM auth protocol. It counts
+// fakeRouter is a libp2p host answering the Agent Mesh auth protocol. It counts
// handshakes so a test can tell a fresh session from a reused one, and keeps
// the last biscuit it was shown.
type fakeRouter struct {
@@ -121,7 +121,7 @@ func newFakeRouter(t *testing.T, listenAddrs ...string) *fakeRouter {
// startNode brings up a node enrolled against this router and authenticated.
// Each tweak may adjust the options before the node is built.
-func (r *fakeRouter) startNode(t *testing.T, ctx context.Context, routerAddrs []multiaddr.Multiaddr, tweaks ...func(*Options)) *SamNode {
+func (r *fakeRouter) startNode(t *testing.T, ctx context.Context, routerAddrs []multiaddr.Multiaddr, tweaks ...func(*Options)) *AgentMeshNode {
t.Helper()
store, err := NewStore(t.TempDir())
if err != nil {
@@ -148,7 +148,7 @@ func (r *fakeRouter) startNode(t *testing.T, ctx context.Context, routerAddrs []
for _, tweak := range tweaks {
tweak(&opts)
}
- node, err := NewSamNode(opts)
+ node, err := NewAgentMeshNode(opts)
if err != nil {
t.Fatal(err)
}
@@ -161,7 +161,7 @@ func (r *fakeRouter) startNode(t *testing.T, ctx context.Context, routerAddrs []
// waitForConnectedness polls until the node's view of the router matches want,
// and reports the last state it saw if the deadline passes first.
-func waitForConnectedness(t *testing.T, node *SamNode, router peer.ID, want network.Connectedness) {
+func waitForConnectedness(t *testing.T, node *AgentMeshNode, router peer.ID, want network.Connectedness) {
t.Helper()
deadline := time.Now().Add(5 * time.Second)
var got network.Connectedness
@@ -385,7 +385,7 @@ func TestStartIsReadyOnceOneRouterAdmitsTheNode(t *testing.T) {
if err := store.SaveIdentity(live.mint(pid.String(), api.RoleNode)); err != nil {
t.Fatal(err)
}
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: privKey,
Store: store,
ControlPlanePubKey: live.cpPub,
diff --git a/internal/node/service.go b/internal/node/service.go
index 391dec81..9a8339c7 100644
--- a/internal/node/service.go
+++ b/internal/node/service.go
@@ -175,7 +175,7 @@ func buildRegisterRequest(sCfg api.ServiceConfig) (*api.RegisterServiceRequest,
return req, nil
}
-// serviceKeyToCID hashes "sam:service[:part]..." into a DHT rendezvous CID.
+// serviceKeyToCID hashes "mesh:service[:part]..." into a DHT rendezvous CID.
func serviceKeyToCID(parts ...string) (cid.Cid, error) {
srvKey := strings.Join(append([]string{"mesh:service"}, parts...), ":")
hash, err := multihash.Sum([]byte(srvKey), multihash.SHA2_256, -1)
diff --git a/internal/node/service_registry.go b/internal/node/service_registry.go
index 69a16845..360ad97d 100644
--- a/internal/node/service_registry.go
+++ b/internal/node/service_registry.go
@@ -41,7 +41,7 @@ type backendProber interface {
// defaultDHTProbeTimeout is the default bound on one backend probe before
// advertising, used when a ServiceRegistry isn't given an explicit
// BackendProbeTimeout (see Options.BackendProbeTimeout / --backend-probe-
-// timeout). Command-spawned backends (sam-node.yaml's `command`, launched as
+// timeout). Command-spawned backends (agentmesh-node.yaml's `command`, launched as
// a local subprocess) can need longer than this to answer their first
// request - a moderately-featured interpreted-language MCP server's own
// import/startup cost alone can exceed 2s - so this is a floor, not
diff --git a/internal/node/service_test.go b/internal/node/service_test.go
index c3e02ba5..912f2b7f 100644
--- a/internal/node/service_test.go
+++ b/internal/node/service_test.go
@@ -77,14 +77,14 @@ func TestNewReverseProxyHandler_RewritesRequests(t *testing.T) {
{
name: "joins target path and query",
targetURL: "http://backend.example/base?upstream=one",
- requestURL: "https://service.sam/child/?client=two",
+ requestURL: "https://service.mesh/child/?client=two",
wantURL: "http://backend.example/base/child/?upstream=one&client=two",
wantProto: "https",
},
{
name: "marker trims trailing slash",
targetURL: "http://backend.example/base?upstream=one",
- requestURL: "http://service.sam/child/?client=two",
+ requestURL: "http://service.mesh/child/?client=two",
noTrailingSlash: true,
wantURL: "http://backend.example/base/child?upstream=one&client=two",
wantProto: "http",
@@ -92,7 +92,7 @@ func TestNewReverseProxyHandler_RewritesRequests(t *testing.T) {
{
name: "target trailing slash is retained",
targetURL: "http://backend.example/base/",
- requestURL: "http://service.sam/child/",
+ requestURL: "http://service.mesh/child/",
noTrailingSlash: true,
wantURL: "http://backend.example/base/child/",
wantProto: "http",
diff --git a/internal/node/sidecar.go b/internal/node/sidecar.go
index abd05560..a8c73594 100644
--- a/internal/node/sidecar.go
+++ b/internal/node/sidecar.go
@@ -41,7 +41,7 @@ import (
// StartSidecarServer serves the node's local API on a TCP address, on a Unix
// socket, or on both. An empty addr disables the TCP listener; an empty
// socketPath disables the socket.
-func StartSidecarServer(node *SamNode, addr, socketPath, token, certFile, keyFile, caFile string) (*http.Server, error) {
+func StartSidecarServer(node *AgentMeshNode, addr, socketPath, token, certFile, keyFile, caFile string) (*http.Server, error) {
mux := http.NewServeMux()
// Public endpoints
@@ -196,7 +196,7 @@ func serveSocket(server *http.Server, listener net.Listener, socketPath string)
// serveTCP starts the sidecar's TCP listener, which — unlike the Unix socket —
// is reachable by any local process and therefore always demands a token or
// mutual TLS.
-func serveTCP(server *http.Server, node *SamNode, addr, token, certFile, keyFile, caFile string) error {
+func serveTCP(server *http.Server, node *AgentMeshNode, addr, token, certFile, keyFile, caFile string) error {
listener, err := net.Listen("tcp", addr)
if err != nil {
return fmt.Errorf("failed to listen on %s: %w", addr, err)
@@ -386,7 +386,7 @@ func handleReadyz(w http.ResponseWriter, r *http.Request) {
}
}
-func withMeshConnection(node *SamNode, next http.Handler) http.Handler {
+func withMeshConnection(node *AgentMeshNode, next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if node != nil && !node.IsConnected() {
logger.Warnf("[SidecarAuth] Request %s %s rejected: node not connected to mesh", r.Method, r.URL.Path)
@@ -503,7 +503,7 @@ func constantTimeEqual(got, want string) bool {
// against memory-exhaustion from oversized payloads.
const maxRequestBodyBytes = 1 << 20 // 1 MiB
-func handleDiscoverService(node *SamNode, w http.ResponseWriter, r *http.Request) {
+func handleDiscoverService(node *AgentMeshNode, w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
return
@@ -629,11 +629,11 @@ func handleDiscoverService(node *SamNode, w http.ResponseWriter, r *http.Request
type egressMiddleware struct {
// gateRequest may refuse the request (writing the HTTP error itself,
// returning false) or return a derived request to forward.
- gateRequest func(node *SamNode, w http.ResponseWriter, r *http.Request, route egressRoute) (*http.Request, bool)
+ gateRequest func(node *AgentMeshNode, w http.ResponseWriter, r *http.Request, route egressRoute) (*http.Request, bool)
// serveLocal may fully handle the request at this node (returning true)
// instead of letting it stream through the proxy; nil means no hook.
// It runs after the egress headers (biscuit, agent claim) are prepared.
- serveLocal func(node *SamNode, rt http.RoundTripper, w http.ResponseWriter, r *http.Request, route egressRoute) bool
+ serveLocal func(node *AgentMeshNode, rt http.RoundTripper, w http.ResponseWriter, r *http.Request, route egressRoute) bool
}
// egressRoute is the parsed /mesh/{peer}/{type}/{svc}/{upstream} egress path,
@@ -667,7 +667,7 @@ func parseEgressRoute(path string) (egressRoute, bool) {
// applyEgressMiddleware routes a raw egress request through the middleware
// registered for its service type, if any.
-func applyEgressMiddleware(node *SamNode, w http.ResponseWriter, r *http.Request) (*http.Request, bool) {
+func applyEgressMiddleware(node *AgentMeshNode, w http.ResponseWriter, r *http.Request) (*http.Request, bool) {
route, ok := parseEgressRoute(r.URL.Path)
if !ok {
return r, true
@@ -682,7 +682,7 @@ func applyEgressMiddleware(node *SamNode, w http.ResponseWriter, r *http.Request
// serveEgressLocally gives the service type's middleware a chance to answer
// the request from this node (e.g. agent-card regeneration) instead of
// proxying; it reports whether the request was handled.
-func serveEgressLocally(node *SamNode, rt http.RoundTripper, w http.ResponseWriter, r *http.Request) bool {
+func serveEgressLocally(node *AgentMeshNode, rt http.RoundTripper, w http.ResponseWriter, r *http.Request) bool {
route, ok := parseEgressRoute(r.URL.Path)
if !ok {
return false
@@ -702,7 +702,7 @@ func allowLimitedEgressConn(ctx context.Context) context.Context {
// prepareEgressPeer warms up connectivity to the destination peer of an
// egress request if it is not already connected.
-func (node *SamNode) prepareEgressPeer(ctx context.Context, peerID string) {
+func (node *AgentMeshNode) prepareEgressPeer(ctx context.Context, peerID string) {
pid, err := peer.Decode(peerID)
if err != nil {
return
@@ -712,7 +712,7 @@ func (node *SamNode) prepareEgressPeer(ctx context.Context, peerID string) {
}
}
-func createEgressProxy(node *SamNode) http.Handler {
+func createEgressProxy(node *AgentMeshNode) http.Handler {
transport := libp2phttp.NewTransport(node.Host)
proxy := &httputil.ReverseProxy{
diff --git a/internal/node/sidecar_auth_test.go b/internal/node/sidecar_auth_test.go
index 0fc04e19..b3346524 100644
--- a/internal/node/sidecar_auth_test.go
+++ b/internal/node/sidecar_auth_test.go
@@ -64,11 +64,11 @@ func TestConstantTimeEqual(t *testing.T) {
// the same bar as reading the token file, and every scrape in this repo goes
// that way.
func TestMetricsGatedOnTCPButNotOnTheSocket(t *testing.T) {
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
- socketPath := filepath.Join(t.TempDir(), "sam.sock")
+ socketPath := filepath.Join(t.TempDir(), "agentmesh.sock")
srv, err := StartSidecarServer(node, "127.0.0.1:0", socketPath, "test-token", "", "", "")
if err != nil {
diff --git a/internal/node/sidecar_hygiene_test.go b/internal/node/sidecar_hygiene_test.go
index 319707ee..155df0d3 100644
--- a/internal/node/sidecar_hygiene_test.go
+++ b/internal/node/sidecar_hygiene_test.go
@@ -59,7 +59,7 @@ func TestWithAuthStripsDuplicateSidecarToken(t *testing.T) {
"token in both headers": {
samAuth: "Bearer " + token, authorization: "Bearer " + token, wantAuthorization: "",
},
- "token via X-Sam, provider key in Authorization": {
+ "token via X-Mesh, provider key in Authorization": {
samAuth: "Bearer " + token, authorization: "Bearer provider-key", wantAuthorization: "Bearer provider-key",
},
"token via Authorization only": {
diff --git a/internal/node/sidecar_metrics.go b/internal/node/sidecar_metrics.go
index 1025957c..6a42f3fc 100644
--- a/internal/node/sidecar_metrics.go
+++ b/internal/node/sidecar_metrics.go
@@ -37,7 +37,7 @@ var requestBuckets = []float64{
var (
requestTTFBSeconds = promauto.NewHistogramVec(
prometheus.HistogramOpts{
- Name: "sam_node_request_ttfb_seconds",
+ Name: "agentmesh_node_request_ttfb_seconds",
Help: "Time from accepting a sidecar request to its first response byte",
Buckets: requestBuckets,
},
@@ -46,7 +46,7 @@ var (
requestDurationSeconds = promauto.NewHistogramVec(
prometheus.HistogramOpts{
- Name: "sam_node_request_duration_seconds",
+ Name: "agentmesh_node_request_duration_seconds",
Help: "Time a sidecar request occupied its handler, including streaming",
Buckets: requestBuckets,
},
@@ -55,7 +55,7 @@ var (
requestsInFlight = promauto.NewGauge(
prometheus.GaugeOpts{
- Name: "sam_node_requests_in_flight",
+ Name: "agentmesh_node_requests_in_flight",
Help: "Sidecar requests currently being served",
},
)
diff --git a/internal/node/sidecar_test.go b/internal/node/sidecar_test.go
index 6f5b7db1..3419725b 100644
--- a/internal/node/sidecar_test.go
+++ b/internal/node/sidecar_test.go
@@ -68,11 +68,11 @@ func waitForSocket(t *testing.T, path string) *http.Client {
// file's owner-only permissions are the credential, while the TCP listener on
// the very same server keeps demanding the token.
func TestSidecarSocketAuthorizesWithoutToken(t *testing.T) {
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
- socketPath := filepath.Join(t.TempDir(), "sam.sock")
+ socketPath := filepath.Join(t.TempDir(), "agentmesh.sock")
srv, err := StartSidecarServer(node, "127.0.0.1:0", socketPath, "test-token", "", "", "")
if err != nil {
@@ -118,11 +118,11 @@ func TestSidecarSocketAuthorizesWithoutToken(t *testing.T) {
// TestSidecarSocketOnly covers a node with no TCP listener at all, where no API
// token exists to demand.
func TestSidecarSocketOnly(t *testing.T) {
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
- socketPath := filepath.Join(t.TempDir(), "sam.sock")
+ socketPath := filepath.Join(t.TempDir(), "agentmesh.sock")
srv, err := StartSidecarServer(node, "", socketPath, "", "", "", "")
if err != nil {
@@ -138,7 +138,7 @@ func TestSidecarSocketOnly(t *testing.T) {
}
func TestStartSidecarServerRequiresAListener(t *testing.T) {
- node := &SamNode{services: NewServiceRegistry(&fakeDHT{}, 0)}
+ node := &AgentMeshNode{services: NewServiceRegistry(&fakeDHT{}, 0)}
if _, err := StartSidecarServer(node, "", "", "token", "", "", ""); err == nil {
t.Fatal("expected an error when neither a TCP address nor a socket is configured")
}
@@ -152,9 +152,9 @@ func TestSidecarSocketFailureKeepsTCPServing(t *testing.T) {
if err := os.WriteFile(unusable, []byte("not a directory"), 0600); err != nil {
t.Fatalf("failed to write the blocking file: %v", err)
}
- socketPath := filepath.Join(unusable, "sam.sock")
+ socketPath := filepath.Join(unusable, "agentmesh.sock")
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
@@ -170,7 +170,7 @@ func TestSidecarSocketFailureKeepsTCPServing(t *testing.T) {
t.Errorf("BoundSocketPath = %q, want empty after a failed socket", node.BoundSocketPath)
}
- socketOnly := &SamNode{services: NewServiceRegistry(&fakeDHT{}, 0)}
+ socketOnly := &AgentMeshNode{services: NewServiceRegistry(&fakeDHT{}, 0)}
if _, err := StartSidecarServer(socketOnly, "", socketPath, "", "", "", ""); err == nil {
t.Error("expected an error when the socket is the only configured listener")
}
@@ -178,7 +178,7 @@ func TestSidecarSocketFailureKeepsTCPServing(t *testing.T) {
func TestListenLocalSocket(t *testing.T) {
t.Run("replaces a socket left behind by a crashed node", func(t *testing.T) {
- path := filepath.Join(t.TempDir(), "sam.sock")
+ path := filepath.Join(t.TempDir(), "agentmesh.sock")
stale, err := net.Listen("unix", path)
if err != nil {
t.Fatalf("failed to create the stale socket: %v", err)
@@ -197,7 +197,7 @@ func TestListenLocalSocket(t *testing.T) {
})
t.Run("refuses a socket a live node is using", func(t *testing.T) {
- path := filepath.Join(t.TempDir(), "sam.sock")
+ path := filepath.Join(t.TempDir(), "agentmesh.sock")
live, err := net.Listen("unix", path)
if err != nil {
t.Fatalf("failed to create the live socket: %v", err)
@@ -219,7 +219,7 @@ func TestListenLocalSocket(t *testing.T) {
})
t.Run("refuses to remove a file that is not a socket", func(t *testing.T) {
- path := filepath.Join(t.TempDir(), "sam.sock")
+ path := filepath.Join(t.TempDir(), "agentmesh.sock")
if err := os.WriteFile(path, []byte("precious"), 0600); err != nil {
t.Fatalf("failed to write the file: %v", err)
}
@@ -293,9 +293,9 @@ func TestWithAuth(t *testing.T) {
})
t.Run("Consumed gate header is stripped, other headers survive", func(t *testing.T) {
- var gotSamAuth, gotAuth string
+ var gotMeshAuth, gotAuth string
inspect := withAuth(token, true, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- gotSamAuth = r.Header.Get(api.HeaderMeshAuthentication)
+ gotMeshAuth = r.Header.Get(api.HeaderMeshAuthentication)
gotAuth = r.Header.Get("Authorization")
w.WriteHeader(http.StatusOK)
}))
@@ -306,8 +306,8 @@ func TestWithAuth(t *testing.T) {
rr := httptest.NewRecorder()
inspect.ServeHTTP(rr, req)
- if gotSamAuth != "" {
- t.Errorf("consumed %s header must be stripped, got %q", api.HeaderMeshAuthentication, gotSamAuth)
+ if gotMeshAuth != "" {
+ t.Errorf("consumed %s header must be stripped, got %q", api.HeaderMeshAuthentication, gotMeshAuth)
}
if gotAuth != "Bearer backend-credential" {
t.Errorf("Authorization must survive when not consumed, got %q", gotAuth)
@@ -361,7 +361,7 @@ func TestWithAuth(t *testing.T) {
}
func TestSidecarServerAuthEnforcement(t *testing.T) {
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
@@ -451,7 +451,7 @@ func TestSidecarServerAuthEnforcement(t *testing.T) {
// (register/unregister/discover, mcp), and rejected on the egress proxy, which
// must forward "Authorization" untouched to the destination service.
func TestSidecarAuthorizationFallbackScope(t *testing.T) {
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
@@ -545,7 +545,7 @@ func TestRegisterService(t *testing.T) {
// Wait for DHT to recognize the peer
time.Sleep(100 * time.Millisecond)
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond,
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(d, 0),
DHT: d,
}
@@ -574,7 +574,7 @@ func TestRegisterService(t *testing.T) {
}
func TestUnregisterService(t *testing.T) {
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond,
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
node.services.insertService(&testService{info: &api.ServiceInfo{Name: "test-service"}})
@@ -600,7 +600,7 @@ func TestHandleDiscoverService(t *testing.T) {
}
defer func() { _ = d.Close() }()
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond,
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(d, 0),
DHT: d,
Host: h,
@@ -659,7 +659,7 @@ func TestHandleDiscoverService(t *testing.T) {
}
func TestListLocalServices(t *testing.T) {
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond,
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
@@ -677,7 +677,7 @@ func TestListLocalServices(t *testing.T) {
}
func TestListLocalServices_TypeFilter(t *testing.T) {
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond,
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
mcpA := &api.ServiceInfo{Type: api.ServiceType_SERVICE_TYPE_MCP, Name: "mcp-a"}
@@ -776,7 +776,7 @@ func TestServiceKeyToCID_Equivalence(t *testing.T) {
}
func TestRegisterService_Validation(t *testing.T) {
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond,
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(&fakeDHT{}, 0),
}
@@ -822,7 +822,7 @@ func TestRegisterService_Validation(t *testing.T) {
}
func TestStartSidecarServer_TokenMandatory(t *testing.T) {
- node := &SamNode{BiscuitTimeout: 500 * time.Millisecond}
+ node := &AgentMeshNode{BiscuitTimeout: 500 * time.Millisecond}
// Test case: No token, no TLS
_, err := StartSidecarServer(node, "127.0.0.1:0", "", "", "", "", "")
@@ -856,7 +856,7 @@ func TestDiscoverService_Pagination(t *testing.T) {
}
defer func() { _ = d.Close() }()
- node := &SamNode{
+ node := &AgentMeshNode{
BiscuitTimeout: 500 * time.Millisecond,
services: NewServiceRegistry(d, 0),
DHT: d,
diff --git a/internal/node/statedir.go b/internal/node/statedir.go
index caab6c2e..1e5d1413 100644
--- a/internal/node/statedir.go
+++ b/internal/node/statedir.go
@@ -26,11 +26,11 @@ import (
)
// The state directory is the layout the native SDKs keep a member in, and
-// what `sam-node state export` writes and `sam-node state import` reads:
+// what `agentmesh-node state export` writes and `agentmesh-node state import` reads:
// the private key in the libp2p PrivateKey encoding and the
// api.MemberCredential as protojson with proto field names. Files are
// owner-only; unknown fields in the credential are an error, as on every
-// SAM surface.
+// Agent Mesh surface.
const (
StateDirIdentityFile = "identity.key"
StateDirCredentialFile = "credential.json"
diff --git a/internal/node/static_service_test.go b/internal/node/static_service_test.go
index 7141f3c9..248e8dcf 100644
--- a/internal/node/static_service_test.go
+++ b/internal/node/static_service_test.go
@@ -180,7 +180,7 @@ func TestStaticServiceRegistrationRequiresConnection(t *testing.T) {
}
// 4. Create Node with empty router addrs initially
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
RouterAddrs: []multiaddr.Multiaddr{},
Store: store,
@@ -267,7 +267,7 @@ func TestStaticServiceRegistrationCommandFailure(t *testing.T) {
}
// 4. Create Node with empty router addrs initially
- node, err := NewSamNode(Options{
+ node, err := NewAgentMeshNode(Options{
PrivKey: priv,
RouterAddrs: []multiaddr.Multiaddr{},
Store: store,
diff --git a/internal/node/store.go b/internal/node/store.go
index 2eb28230..de4a937d 100644
--- a/internal/node/store.go
+++ b/internal/node/store.go
@@ -64,17 +64,17 @@ var legacyKeys = []string{
// Store is the node's persistent state: its private key and its
// api.MemberCredential, in a bbolt database whose file lock also tells a
-// second sam-node that this data directory is in use.
+// second agentmesh-node that this data directory is in use.
type Store struct {
db *bbolt.DB
}
// ErrStoreLocked reports that another process already holds the data
// directory, which for a node data directory means a node is running.
-var ErrStoreLocked = errors.New("another sam-node instance is using this data directory")
+var ErrStoreLocked = errors.New("another agentmesh-node instance is using this data directory")
func GetDefaultDataDir() (string, error) {
- if envDir := strings.TrimSpace(os.Getenv("SAM_DATA_DIR")); envDir != "" {
+ if envDir := strings.TrimSpace(os.Getenv("AGENTMESH_DATA_DIR")); envDir != "" {
if err := os.MkdirAll(envDir, 0700); err != nil {
return "", err
}
@@ -84,7 +84,7 @@ func GetDefaultDataDir() (string, error) {
if err != nil {
return "", err
}
- dir := filepath.Join(base, "sam-mesh")
+ dir := filepath.Join(base, "agentmesh")
if err := os.MkdirAll(dir, 0700); err != nil {
return "", err
}
@@ -245,7 +245,7 @@ func (s *Store) Credential() (*api.MemberCredential, error) {
}
// SetCredential replaces everything the node persists besides its private
-// key; `sam-node state import` uses it.
+// key; `agentmesh-node state import` uses it.
func (s *Store) SetCredential(c *api.MemberCredential) error {
return s.db.Update(func(tx *bbolt.Tx) error {
return putCredential(tx.Bucket([]byte(bucketIdentity)), c)
diff --git a/internal/node/store_test.go b/internal/node/store_test.go
index f6cfbf8b..10f76fb7 100644
--- a/internal/node/store_test.go
+++ b/internal/node/store_test.go
@@ -218,7 +218,7 @@ func TestStore_OIDCConfig(t *testing.T) {
issuer := "https://auth.example.com"
clientID := "client-123"
- audience := "sam-mesh"
+ audience := "agentmesh"
if err := store.SaveOIDCConfig(issuer, clientID, audience); err != nil {
t.Fatalf("SaveOIDCConfig failed: %v", err)
@@ -415,7 +415,7 @@ func TestStore_MigratesLegacyLayout(t *testing.T) {
}
}
-// TestStore_CredentialRoundTrip is what `sam-node state export | import`
+// TestStore_CredentialRoundTrip is what `agentmesh-node state export | import`
// relies on: the message out is the message in.
func TestStore_CredentialRoundTrip(t *testing.T) {
store, err := NewStore(t.TempDir())
@@ -568,11 +568,11 @@ func TestGetDefaultDataDir(t *testing.T) {
t.Error("Expected non-empty directory path")
}
- custom := filepath.Join(t.TempDir(), "custom-sam-dir")
- t.Setenv("SAM_DATA_DIR", custom)
+ custom := filepath.Join(t.TempDir(), "custom-agentmesh-dir")
+ t.Setenv("AGENTMESH_DATA_DIR", custom)
got, err := GetDefaultDataDir()
if err != nil {
- t.Fatalf("GetDefaultDataDir with SAM_DATA_DIR failed: %v", err)
+ t.Fatalf("GetDefaultDataDir with AGENTMESH_DATA_DIR failed: %v", err)
}
if got != custom {
t.Fatalf("GetDefaultDataDir = %q, want %q", got, custom)
diff --git a/internal/node/sts.go b/internal/node/sts.go
index 7c30b645..ecb42745 100644
--- a/internal/node/sts.go
+++ b/internal/node/sts.go
@@ -48,7 +48,7 @@ func CallerBiscuitFromContext(ctx context.Context) []byte {
// GetRequestIdentity returns the caller Biscuit from ctx when present,
// falling back to the node's own enrolled Biscuit identity.
-func (n *SamNode) GetRequestIdentity(ctx context.Context) []byte {
+func (n *AgentMeshNode) GetRequestIdentity(ctx context.Context) []byte {
if b := CallerBiscuitFromContext(ctx); len(b) > 0 {
return b
}
@@ -57,7 +57,7 @@ func (n *SamNode) GetRequestIdentity(ctx context.Context) []byte {
// trustedPublicKeys returns the Control Plane Ed25519 public keys currently
// trusted by this node, falling back to the stored mesh config key if needed.
-func (n *SamNode) trustedPublicKeys() []ed25519.PublicKey {
+func (n *AgentMeshNode) trustedPublicKeys() []ed25519.PublicKey {
n.keysMu.RLock()
keys := publicKeysOf(n.trustedKeys)
n.keysMu.RUnlock()
@@ -72,7 +72,7 @@ func (n *SamNode) trustedPublicKeys() []ed25519.PublicKey {
// VerifyLocalBiscuit verifies a raw Biscuit against the node's revocation
// cache, banned peer cache, and trusted Control Plane keys, returning its
// extracted claims and TaskAuthorizationRule chain.
-func (n *SamNode) VerifyLocalBiscuit(rawToken []byte) (*identity.VerifiedBiscuitClaims, error) {
+func (n *AgentMeshNode) VerifyLocalBiscuit(rawToken []byte) (*identity.VerifiedBiscuitClaims, error) {
if len(rawToken) == 0 {
return nil, errors.New("empty biscuit token")
}
@@ -111,7 +111,7 @@ func (n *SamNode) VerifyLocalBiscuit(rawToken []byte) (*identity.VerifiedBiscuit
// (len(claims.TaskRules) == 0) must be bound to this node's localPeerID;
// task-attenuated Biscuits (len(claims.TaskRules) > 0) may be further
// attenuated or exchanged for an outbound border JWT at a PEP node.
-func (n *SamNode) verifyLocalCallerBiscuit(rawToken []byte) (*identity.VerifiedBiscuitClaims, error) {
+func (n *AgentMeshNode) verifyLocalCallerBiscuit(rawToken []byte) (*identity.VerifiedBiscuitClaims, error) {
claims, err := n.VerifyLocalBiscuit(rawToken)
if err != nil {
return nil, err
@@ -126,7 +126,7 @@ func (n *SamNode) verifyLocalCallerBiscuit(rawToken []byte) (*identity.VerifiedB
return claims, nil
}
-func (n *SamNode) localPeerID() (peer.ID, error) {
+func (n *AgentMeshNode) localPeerID() (peer.ID, error) {
if n.Host != nil && n.Host.ID() != "" {
return n.Host.ID(), nil
}
@@ -136,7 +136,7 @@ func (n *SamNode) localPeerID() (peer.ID, error) {
return "", errors.New("node has no peer ID")
}
-func (n *SamNode) controlPlaneURL() (string, error) {
+func (n *AgentMeshNode) controlPlaneURL() (string, error) {
if n.Store != nil {
if u, err := n.Store.LoadControlPlaneURL(); err == nil && u != "" {
return u, nil
@@ -149,7 +149,7 @@ func (n *SamNode) controlPlaneURL() (string, error) {
// an external JWT (OIDC, K8s SA, SPIFFE JWT-SVID) and mint a short-lived
// Delegated Session Biscuit bound to this node. Unattenuated, unsealed
// exchanges are cached in memory by SHA-256 of the subject JWT.
-func (n *SamNode) ExchangeSubjectJWT(ctx context.Context, subjectToken, subjectTokenType string, taskRule *api.TaskAuthorizationRule, seal bool) (*api.TokenExchangeResponse, error) {
+func (n *AgentMeshNode) ExchangeSubjectJWT(ctx context.Context, subjectToken, subjectTokenType string, taskRule *api.TaskAuthorizationRule, seal bool) (*api.TokenExchangeResponse, error) {
if subjectToken == "" {
return nil, errors.New("subject_token is required")
}
@@ -217,7 +217,7 @@ func (n *SamNode) ExchangeSubjectJWT(ctx context.Context, subjectToken, subjectT
// MintBorderJWT calls POST /sts/token on the Control Plane to verify a caller
// Biscuit for an egress destination and mint a short-lived ES256 JWT for cloud
// STS federation. Minted JWTs are cached in memory until 10s before expiry.
-func (n *SamNode) MintBorderJWT(ctx context.Context, callerBiscuit []byte, destination, audience string) (*api.STSTokenResponse, error) {
+func (n *AgentMeshNode) MintBorderJWT(ctx context.Context, callerBiscuit []byte, destination, audience string) (*api.STSTokenResponse, error) {
if len(callerBiscuit) == 0 {
callerBiscuit = n.GetIdentity()
}
@@ -307,7 +307,7 @@ func decodeBiscuitToken(s string) ([]byte, error) {
return raw, nil
}
}
- return nil, errors.New("not a valid SAM biscuit token")
+ return nil, errors.New("not a valid Agent Mesh biscuit token")
}
// isLikelyJWT reports whether s has the 3-part base64url structure of a compact
@@ -329,14 +329,14 @@ func isLikelyJWT(s string) bool {
return ok
}
-// resolveCallerCredential inspects a bearer credential presented to sam-node.
+// resolveCallerCredential inspects a bearer credential presented to agentmesh-node.
// It returns:
// - (biscuitBytes, true, nil) when the credential is a valid Biscuit or an
// external JWT successfully exchanged into a Delegated Session Biscuit;
// - (nil, true, err) when the credential is recognizable as a Biscuit or JWT
// but failed verification/exchange (so the caller must fail closed);
// - (nil, false, nil) when the credential is neither a Biscuit nor a JWT.
-func (n *SamNode) resolveCallerCredential(ctx context.Context, bearer string) ([]byte, bool, error) {
+func (n *AgentMeshNode) resolveCallerCredential(ctx context.Context, bearer string) ([]byte, bool, error) {
if n == nil || bearer == "" {
return nil, false, nil
}
@@ -366,14 +366,14 @@ func (n *SamNode) resolveCallerCredential(ctx context.Context, bearer string) ([
// withCallerOrTokenAuth gates a sidecar handler behind either:
// 1. the Unix domain socket / mTLS,
-// 2. the static sidecar API token (SAM_API_TOKEN),
-// 3. a verified SAM Biscuit (including attenuated Task Biscuits), or
+// 2. the static sidecar API token (AGENTMESH_API_TOKEN),
+// 3. a verified Agent Mesh Biscuit (including attenuated Task Biscuits), or
// 4. an external Workload/User JWT exchanged via the Control Plane STS.
//
// Whenever a caller Biscuit or JWT is presented, the verified Biscuit is
// attached to r.Context() via WithCallerBiscuit so outbound mesh/egress calls
// execute under the caller's narrowed authority.
-func withCallerOrTokenAuth(node *SamNode, token string, allowAuthorizationFallback bool, next http.Handler) http.Handler {
+func withCallerOrTokenAuth(node *AgentMeshNode, token string, allowAuthorizationFallback bool, next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
logger.Debugf("[SidecarAuth] Incoming request: %s %s from %s", r.Method, r.URL.Path, r.RemoteAddr)
@@ -465,8 +465,8 @@ func withCallerOrTokenAuth(node *SamNode, token string, allowAuthorizationFallba
}
// handleNodeOAuthToken implements RFC 8693 Token Exchange & Attenuation
-// (POST /oauth/token) on sam-node.
-func handleNodeOAuthToken(node *SamNode, sidecarToken string, w http.ResponseWriter, r *http.Request) {
+// (POST /oauth/token) on agentmesh-node.
+func handleNodeOAuthToken(node *AgentMeshNode, sidecarToken string, w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
writeNodeOAuthError(w, http.StatusMethodNotAllowed, "invalid_request", "Method not allowed")
return
@@ -483,7 +483,7 @@ func handleNodeOAuthToken(node *SamNode, sidecarToken string, w http.ResponseWri
grantType := r.FormValue("grant_type")
if grantType != api.GrantTypeTokenExchange {
- writeNodeOAuthError(w, http.StatusBadRequest, "unsupported_grant_type", "Only urn:ietf:params:oauth:grant-type:token-exchange is supported on sam-node")
+ writeNodeOAuthError(w, http.StatusBadRequest, "unsupported_grant_type", "Only urn:ietf:params:oauth:grant-type:token-exchange is supported on agentmesh-node")
return
}
@@ -625,7 +625,7 @@ func handleNodeOAuthToken(node *SamNode, sidecarToken string, w http.ResponseWri
writeNodeOAuthTokenResponse(w, base64.StdEncoding.EncodeToString(baseBiscuit), api.TokenTypeBiscuit, expIn, scope)
}
-func authenticateSidecarCaller(node *SamNode, sidecarToken string, r *http.Request) ([]byte, bool) {
+func authenticateSidecarCaller(node *AgentMeshNode, sidecarToken string, r *http.Request) ([]byte, bool) {
for _, hdr := range []string{api.HeaderMeshAuthentication, "Authorization"} {
val := r.Header.Get(hdr)
if val == "" {
@@ -650,10 +650,10 @@ func authenticateSidecarCaller(node *SamNode, sidecarToken string, r *http.Reque
}
// handleNodeOAuthRevoke implements RFC 7009 Token Revocation (POST /oauth/revoke)
-// on sam-node, adding the Biscuit's root Block 0 revocation ID to the local
+// on agentmesh-node, adding the Biscuit's root Block 0 revocation ID to the local
// revocation cache so any call carrying it (or any child attenuated from it)
// is immediately rejected.
-func handleNodeOAuthRevoke(node *SamNode, sidecarToken string, w http.ResponseWriter, r *http.Request) {
+func handleNodeOAuthRevoke(node *AgentMeshNode, sidecarToken string, w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
writeNodeOAuthError(w, http.StatusMethodNotAllowed, "invalid_request", "Method not allowed")
return
@@ -710,7 +710,7 @@ func handleNodeOAuthRevoke(node *SamNode, sidecarToken string, w http.ResponseWr
// handleOAuthProtectedResource serves RFC 9728 OAuth 2.0 Protected Resource Metadata
// (GET /.well-known/oauth-protected-resource).
-func handleOAuthProtectedResource(node *SamNode, w http.ResponseWriter, r *http.Request) {
+func handleOAuthProtectedResource(node *AgentMeshNode, w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
return
diff --git a/internal/node/sts_test.go b/internal/node/sts_test.go
index 83d95217..1c2a1372 100644
--- a/internal/node/sts_test.go
+++ b/internal/node/sts_test.go
@@ -44,7 +44,7 @@ import (
)
type stsNodeHarness struct {
- node *SamNode
+ node *AgentMeshNode
cpPub ed25519.PublicKey
cpPriv ed25519.PrivateKey
peerID peer.ID
@@ -99,12 +99,12 @@ func newSTSNodeHarness(t *testing.T) *stsNodeHarness {
t.Fatalf("SaveIdentity: %v", err)
}
- n, err := NewSamNode(Options{
+ n, err := NewAgentMeshNode(Options{
PrivKey: privKey,
Store: store,
})
if err != nil {
- t.Fatalf("NewSamNode: %v", err)
+ t.Fatalf("NewAgentMeshNode: %v", err)
}
n.trustedKeys = []TrustedKey{{Key: cpPub, ReceivedAt: time.Now()}}
n.SetIdentityCache(nodeBiscuit)
diff --git a/internal/node/tokensource.go b/internal/node/tokensource.go
index 10c4b39a..97a600ca 100644
--- a/internal/node/tokensource.go
+++ b/internal/node/tokensource.go
@@ -47,7 +47,7 @@ var NewFileTokenSource = cpclient.NewFileTokenSource
// ClientCredentialsTokenSource fetches a JWT via OAuth2 client_credentials
// against an OIDC issuer.
type ClientCredentialsTokenSource struct {
- node *SamNode
+ node *AgentMeshNode
issuerURL string
clientID string
clientSecret string
@@ -55,9 +55,9 @@ type ClientCredentialsTokenSource struct {
// NewClientCredentialsTokenSource creates a TokenSource that exchanges client
// credentials at issuerURL's token endpoint.
-func NewClientCredentialsTokenSource(n *SamNode, issuerURL, clientID, clientSecret string) *ClientCredentialsTokenSource {
+func NewClientCredentialsTokenSource(n *AgentMeshNode, issuerURL, clientID, clientSecret string) *ClientCredentialsTokenSource {
if n == nil {
- n = &SamNode{}
+ n = &AgentMeshNode{}
}
return &ClientCredentialsTokenSource{
node: n,
@@ -82,13 +82,13 @@ func (s *ClientCredentialsTokenSource) FetchToken(ctx context.Context) (string,
// RefreshTokenSource exchanges a stored OIDC refresh token for a fresh JWT.
type RefreshTokenSource struct {
- node *SamNode
+ node *AgentMeshNode
clientSecret string
}
// NewRefreshTokenSource creates a TokenSource backed by the node's persisted
// OIDC refresh token.
-func NewRefreshTokenSource(n *SamNode, clientSecret string) *RefreshTokenSource {
+func NewRefreshTokenSource(n *AgentMeshNode, clientSecret string) *RefreshTokenSource {
return &RefreshTokenSource{
node: n,
clientSecret: clientSecret,
@@ -196,9 +196,9 @@ func ProbeGCPMetadata(ctx context.Context, endpoint string, httpClient *http.Cli
return resp.StatusCode == http.StatusOK && strings.EqualFold(resp.Header.Get("Metadata-Flavor"), "Google")
}
-// TokenSourceConfig configures how sam-node resolves its platform/OIDC JWT source.
+// TokenSourceConfig configures how agentmesh-node resolves its platform/OIDC JWT source.
type TokenSourceConfig struct {
- Node *SamNode
+ Node *AgentMeshNode
IssuerURL string
ClientID string
ClientSecret string
diff --git a/internal/node/tokensource_test.go b/internal/node/tokensource_test.go
index 6cb38f25..4ec1f928 100644
--- a/internal/node/tokensource_test.go
+++ b/internal/node/tokensource_test.go
@@ -218,7 +218,7 @@ func TestRefreshEnrollmentSendsPlatformJWT(t *testing.T) {
t.Fatal(err)
}
- n, err := NewSamNode(Options{
+ n, err := NewAgentMeshNode(Options{
PrivKey: privNode,
Store: nStore,
ControlPlanePubKey: cpPub,
diff --git a/internal/router/config.go b/internal/router/config.go
index 7cab2a5a..2434200f 100644
--- a/internal/router/config.go
+++ b/internal/router/config.go
@@ -28,7 +28,7 @@ import (
// termination grace period.
const DefaultShutdownLeaseTTL = 30 * time.Second
-// Options holds configuration details for the sam-router.
+// Options holds configuration details for the agentmesh-router.
type Options struct {
ControlPlaneURL string
ListenAddrs []string
diff --git a/internal/router/metrics.go b/internal/router/metrics.go
index 96255240..80076a8f 100644
--- a/internal/router/metrics.go
+++ b/internal/router/metrics.go
@@ -47,7 +47,7 @@ const (
var (
authHandshakesTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
- Name: "sam_router_auth_handshakes_total",
+ Name: "agentmesh_router_auth_handshakes_total",
Help: "Inbound mesh authentication handshakes by outcome",
},
[]string{"result"},
@@ -55,7 +55,7 @@ var (
leaseRenewalsTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
- Name: "sam_router_lease_renewals_total",
+ Name: "agentmesh_router_lease_renewals_total",
Help: "Control-plane lease renewal attempts by outcome",
},
[]string{"result"},
@@ -97,47 +97,47 @@ func newRouterStateCollector(r *Router) *routerStateCollector {
return &routerStateCollector{
r: r,
infoDesc: prometheus.NewDesc(
- "sam_router_info",
+ "agentmesh_router_info",
"The router's mesh identity; always 1",
[]string{"peer_id"}, nil),
readyDesc: prometheus.NewDesc(
- "sam_router_ready",
+ "agentmesh_router_ready",
"1 once the router is enrolled and its libp2p host is online",
nil, nil),
drainingDesc: prometheus.NewDesc(
- "sam_router_draining",
+ "agentmesh_router_draining",
"1 once the router has withdrawn its lease and is shutting down",
nil, nil),
authenticatedDesc: prometheus.NewDesc(
- "sam_router_authenticated_peers",
+ "agentmesh_router_authenticated_peers",
"Connected peers that have completed the mesh authentication handshake",
nil, nil),
connectedDesc: prometheus.NewDesc(
- "sam_router_connected_peers",
+ "agentmesh_router_connected_peers",
"Peers with an open libp2p connection, authenticated or not",
nil, nil),
connectionsDesc: prometheus.NewDesc(
- "sam_router_connections",
+ "agentmesh_router_connections",
"Open libp2p connections by direction; a peer may hold several",
[]string{"direction"}, nil),
watermarkDesc: prometheus.NewDesc(
- "sam_router_connection_watermark",
+ "agentmesh_router_connection_watermark",
"Connection manager limits: above high, connections are trimmed down to low",
[]string{"level"}, nil),
relayLimitDesc: prometheus.NewDesc(
- "sam_router_relay_limit",
+ "agentmesh_router_relay_limit",
"Relay budgets in force, to read libp2p_relaysvc_* against",
[]string{"limit"}, nil),
bannedDesc: prometheus.NewDesc(
- "sam_router_banned_peers",
+ "agentmesh_router_banned_peers",
"Peers on the ban list synced from the control plane",
nil, nil),
dhtDesc: prometheus.NewDesc(
- "sam_router_dht_routing_table_size",
+ "agentmesh_router_dht_routing_table_size",
"Peers in the Kademlia routing table",
nil, nil),
biscuitExpiryDesc: prometheus.NewDesc(
- "sam_router_biscuit_expiry_timestamp_seconds",
+ "agentmesh_router_biscuit_expiry_timestamp_seconds",
"Unix time the router's own mesh credential expires",
nil, nil),
}
diff --git a/internal/router/metrics_test.go b/internal/router/metrics_test.go
index a530d8f5..6b5ae0d0 100644
--- a/internal/router/metrics_test.go
+++ b/internal/router/metrics_test.go
@@ -63,10 +63,10 @@ func TestRouterMetricsListener(t *testing.T) {
if code != http.StatusOK {
t.Fatalf("/metrics = %d: %s", code, body)
}
- if !strings.Contains(body, "sam_router_ready 0") {
- t.Error("/metrics missing sam_router_ready 0 before start")
+ if !strings.Contains(body, "agentmesh_router_ready 0") {
+ t.Error("/metrics missing agentmesh_router_ready 0 before start")
}
- if strings.Contains(body, "sam_router_authenticated_peers") {
+ if strings.Contains(body, "agentmesh_router_authenticated_peers") {
t.Error("/metrics exported host state before the host existed")
}
@@ -97,29 +97,29 @@ func TestRouterMetricsListener(t *testing.T) {
}
_, body = getBody(t, base+"/metrics")
for _, want := range []string{
- "sam_router_ready 1",
- `sam_router_info{peer_id="` + host.ID().String() + `"} 1`,
+ "agentmesh_router_ready 1",
+ `agentmesh_router_info{peer_id="` + host.ID().String() + `"} 1`,
// The derived cap: a quarter of the default high watermark.
- "sam_router_conns_per_source_ip_limit 1000",
- "sam_router_draining 0",
- `sam_router_connections{direction="inbound"} 0`,
- `sam_router_connections{direction="outbound"} 0`,
- `sam_router_connection_watermark{level="high"} 4000`,
- `sam_router_relay_limit{limit="reservations"} 4000`,
- `sam_router_relay_limit{limit="reservations_per_ip"} 1000`,
- `sam_router_relay_limit{limit="circuits_per_peer"} 1024`,
- "sam_router_inbound_connections_refused_total",
- "sam_router_authenticated_peers 2",
- "sam_router_banned_peers 1",
- "sam_router_connected_peers 0",
- "sam_router_dht_routing_table_size 0",
+ "agentmesh_router_conns_per_source_ip_limit 1000",
+ "agentmesh_router_draining 0",
+ `agentmesh_router_connections{direction="inbound"} 0`,
+ `agentmesh_router_connections{direction="outbound"} 0`,
+ `agentmesh_router_connection_watermark{level="high"} 4000`,
+ `agentmesh_router_relay_limit{limit="reservations"} 4000`,
+ `agentmesh_router_relay_limit{limit="reservations_per_ip"} 1000`,
+ `agentmesh_router_relay_limit{limit="circuits_per_peer"} 1024`,
+ "agentmesh_router_inbound_connections_refused_total",
+ "agentmesh_router_authenticated_peers 2",
+ "agentmesh_router_banned_peers 1",
+ "agentmesh_router_connected_peers 0",
+ "agentmesh_router_dht_routing_table_size 0",
// The text format renders values with strconv 'g', so a unix time
// comes out in scientific notation.
- "sam_router_biscuit_expiry_timestamp_seconds " + strconv.FormatFloat(float64(expiry.Unix()), 'g', -1, 64),
+ "agentmesh_router_biscuit_expiry_timestamp_seconds " + strconv.FormatFloat(float64(expiry.Unix()), 'g', -1, 64),
// libp2p registers into the default registry, which the listener
// serves alongside the router's own state.
"libp2p_",
- "sam_router_auth_handshakes_total",
+ "agentmesh_router_auth_handshakes_total",
} {
if !strings.Contains(body, want) {
t.Errorf("/metrics missing %q", want)
diff --git a/internal/router/resource_observer.go b/internal/router/resource_observer.go
index 4960e118..7e53999f 100644
--- a/internal/router/resource_observer.go
+++ b/internal/router/resource_observer.go
@@ -41,7 +41,7 @@ const (
var inboundRefusedTotal = promauto.NewCounterVec(
prometheus.CounterOpts{
- Name: "sam_router_inbound_connections_refused_total",
+ Name: "agentmesh_router_inbound_connections_refused_total",
Help: "Inbound connections the resource manager refused before the handshake, by reason",
},
[]string{"reason"},
@@ -133,7 +133,7 @@ func refusalReason(err error) string {
// connsPerSourceIPDesc exports the cap in force, so a dashboard can read the
// refusal counter against it.
var connsPerSourceIPDesc = prometheus.NewDesc(
- "sam_router_conns_per_source_ip_limit",
+ "agentmesh_router_conns_per_source_ip_limit",
"Inbound connections allowed from one source IP",
nil, nil)
diff --git a/internal/router/router.go b/internal/router/router.go
index b1d4fa69..c4115f68 100644
--- a/internal/router/router.go
+++ b/internal/router/router.go
@@ -67,7 +67,7 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"
)
-var logger = golog.Logger("sam-router")
+var logger = golog.Logger("agentmesh-router")
const (
DefaultLowWaterMark = 1000
@@ -879,7 +879,7 @@ func (r *Router) controlPlane(timeout time.Duration) *cpclient.Client {
// controlPlaneClient is the client for every request to the control plane;
// its transport re-checks the plaintext policy on each hop, redirects included.
func (r *Router) controlPlaneClient(timeout time.Duration) *http.Client {
- return cpclient.NewHTTPClient(timeout, func() bool { return r.config.AllowInsecureControlPlane }, "sam-router")
+ return cpclient.NewHTTPClient(timeout, func() bool { return r.config.AllowInsecureControlPlane }, "agentmesh-router")
}
func (r *Router) getTrustedPublicKeys() []ed25519.PublicKey {
diff --git a/internal/router/router_test.go b/internal/router/router_test.go
index d10280ec..a9d2a699 100644
--- a/internal/router/router_test.go
+++ b/internal/router/router_test.go
@@ -1181,7 +1181,7 @@ func TestRouterRefreshEnrollmentReattestsJWT(t *testing.T) {
tempDir := t.TempDir()
jwtPath := filepath.Join(tempDir, "router.jwt")
initialJWT := mintToken(map[string]interface{}{
- "sub": "system:serviceaccount:sam-system:sam-router",
+ "sub": "system:serviceaccount:agentmesh-system:agentmesh-router",
"groups": []string{"routers"},
})
if err := os.WriteFile(jwtPath, []byte(initialJWT+"\n"), 0600); err != nil {
@@ -1207,9 +1207,9 @@ func TestRouterRefreshEnrollmentReattestsJWT(t *testing.T) {
defer func() { _ = r.Close() }()
rotatedJWT := mintToken(map[string]interface{}{
- "sub": "system:serviceaccount:sam-system:sam-router",
+ "sub": "system:serviceaccount:agentmesh-system:agentmesh-router",
"groups": []string{"routers"},
- "email": "[email protected]",
+ "email": "[email protected]",
})
if err := os.WriteFile(jwtPath, []byte(rotatedJWT), 0600); err != nil {
t.Fatal(err)
@@ -1223,7 +1223,7 @@ func TestRouterRefreshEnrollmentReattestsJWT(t *testing.T) {
if err != nil || rec == nil {
t.Fatalf("GetNode: %v", err)
}
- if !strings.Contains(rec.ClaimsJSON, "[email protected]") {
+ if !strings.Contains(rec.ClaimsJSON, "[email protected]") {
t.Errorf("ClaimsJSON = %s, want updated claim from rotated router JWT", rec.ClaimsJSON)
}
}
diff --git a/internal/router/trust_test.go b/internal/router/trust_test.go
index 72903158..cb3bf0f5 100644
--- a/internal/router/trust_test.go
+++ b/internal/router/trust_test.go
@@ -48,8 +48,8 @@ func TestOptionsValidateControlPlaneTransport(t *testing.T) {
}{
{"http://127.0.0.1:8080", false, false},
{"https://cp.example.com", false, false},
- {"http://sam-mesh-control-plane:8080", false, true},
- {"http://sam-mesh-control-plane:8080", true, false},
+ {"http://agentmesh-control-plane:8080", false, true},
+ {"http://agentmesh-control-plane:8080", true, false},
}
for _, tt := range tests {
o := Options{ControlPlaneURL: tt.url, AllowInsecureControlPlane: tt.insecure}
@@ -68,7 +68,7 @@ func TestOptionsValidateControlPlaneTransport(t *testing.T) {
// plaintext URL is refused just like a flag-supplied one.
func TestControlPlaneClientRefusesPlaintextHop(t *testing.T) {
r := &Router{config: Options{}}
- req, err := http.NewRequest(http.MethodGet, "http://sam-mesh-control-plane:8080/keys", nil)
+ req, err := http.NewRequest(http.MethodGet, "http://agentmesh-control-plane:8080/keys", nil)
if err != nil {
t.Fatal(err)
}
diff --git a/internal/secrets/secrets.go b/internal/secrets/secrets.go
index 6fc98b32..69de8ddc 100644
--- a/internal/secrets/secrets.go
+++ b/internal/secrets/secrets.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package secrets resolves secret configuration for SAM binaries.
+// Package secrets resolves secret configuration for Agent Mesh binaries.
//
// Daemon-lifetime secrets are never accepted as flag values: command lines
// leak via /proc/<pid>/cmdline (world-readable), shell history, CI logs, and
diff --git a/internal/secrets/secrets_test.go b/internal/secrets/secrets_test.go
index 0424c259..73c6e8e3 100644
--- a/internal/secrets/secrets_test.go
+++ b/internal/secrets/secrets_test.go
@@ -66,36 +66,36 @@ func TestFromPathOrEnv(t *testing.T) {
}
t.Run("file wins over env", func(t *testing.T) {
- t.Setenv("SAM_TEST_SECRET", "env-secret")
- got, err := FromPathOrEnv("api-token", tokenFile, "SAM_TEST_SECRET")
+ t.Setenv("AGENTMESH_TEST_SECRET", "env-secret")
+ got, err := FromPathOrEnv("api-token", tokenFile, "AGENTMESH_TEST_SECRET")
if err != nil || got != "file-secret" {
t.Errorf("got %q, %v; want file-secret", got, err)
}
- if _, still := os.LookupEnv("SAM_TEST_SECRET"); still {
+ if _, still := os.LookupEnv("AGENTMESH_TEST_SECRET"); still {
t.Error("env var must be removed from the process environment")
}
})
t.Run("env fallback trimmed", func(t *testing.T) {
- t.Setenv("SAM_TEST_SECRET", " env-secret \n")
- got, err := FromPathOrEnv("api-token", "", "SAM_TEST_SECRET")
+ t.Setenv("AGENTMESH_TEST_SECRET", " env-secret \n")
+ got, err := FromPathOrEnv("api-token", "", "AGENTMESH_TEST_SECRET")
if err != nil || got != "env-secret" {
t.Errorf("got %q, %v; want env-secret", got, err)
}
- if _, still := os.LookupEnv("SAM_TEST_SECRET"); still {
+ if _, still := os.LookupEnv("AGENTMESH_TEST_SECRET"); still {
t.Error("env var must be removed from the process environment")
}
})
t.Run("unset means unconfigured", func(t *testing.T) {
- got, err := FromPathOrEnv("api-token", "", "SAM_TEST_SECRET_UNSET")
+ got, err := FromPathOrEnv("api-token", "", "AGENTMESH_TEST_SECRET_UNSET")
if err != nil || got != "" {
t.Errorf("got %q, %v; want empty", got, err)
}
})
t.Run("missing file is an error", func(t *testing.T) {
- if _, err := FromPathOrEnv("api-token", filepath.Join(dir, "nope"), "SAM_TEST_SECRET"); err == nil {
+ if _, err := FromPathOrEnv("api-token", filepath.Join(dir, "nope"), "AGENTMESH_TEST_SECRET"); err == nil {
t.Error("expected error for missing file")
}
})
@@ -105,7 +105,7 @@ func TestFromPathOrEnv(t *testing.T) {
if err := os.WriteFile(empty, []byte("\n"), 0o600); err != nil {
t.Fatal(err)
}
- if _, err := FromPathOrEnv("api-token", empty, "SAM_TEST_SECRET"); err == nil {
+ if _, err := FromPathOrEnv("api-token", empty, "AGENTMESH_TEST_SECRET"); err == nil {
t.Error("expected error for empty file")
}
})
diff --git a/internal/skill/skill.go b/internal/skill/skill.go
index 79e609aa..680f8dbe 100644
--- a/internal/skill/skill.go
+++ b/internal/skill/skill.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package skill installs the SAM agent skill into the directories local AI
+// Package skill installs the Agent Mesh agent skill into the directories local AI
// agents scan, so an agent can bootstrap a node and drive the mesh without the
// user pasting instructions by hand.
package skill
@@ -22,18 +22,18 @@ import (
"os"
"path/filepath"
- samskill "github.com/google/agentmesh/agents/skills/sam-mesh"
+ agentmeshskill "github.com/google/agentmesh/agents/skills/agentmesh"
)
const (
// Name is the directory an installed skill lives in.
- Name = "sam-mesh"
+ Name = "agentmesh"
// fileName is the document every agent skill runtime looks for.
fileName = "SKILL.md"
)
// Content is the skill document installed for local agents.
-var Content = samskill.Markdown
+var Content = agentmeshskill.Markdown
// Target is a directory tree that an agent scans for skills.
type Target struct {
diff --git a/internal/standalone/standalone.go b/internal/standalone/standalone.go
index 0d87f2ce..46077248 100644
--- a/internal/standalone/standalone.go
+++ b/internal/standalone/standalone.go
@@ -47,11 +47,11 @@ import (
"google.golang.org/protobuf/proto"
)
-var logger = golog.Logger("sam-one")
+var logger = golog.Logger("agentmesh-one")
const (
joinTokenPrefix = "mesh_tok_"
- adminTokenPrefix = "sam_adm_"
+ adminTokenPrefix = "mesh_adm_"
deviceTokenPrefix = "mesh_dev_"
joinTokenFile = "join-token"
@@ -91,14 +91,14 @@ type Options struct {
// DBDriver selects "sqlite" (default) or "postgres".
DBDriver string
// DBDSN is the database connection string; defaults to
- // <DataDir>/sam.db for sqlite.
+ // <DataDir>/agentmesh.db for sqlite.
DBDSN string
// JoinToken is the cluster join token; auto-generated and persisted in
// DataDir when empty.
JoinToken string
// DisableJoinToken runs without any standing join token: devices then
// enroll only with explicitly minted bootstrap tokens or through OIDC.
- // The right setting for a fleet; the default keeps `sam-node join` on a
+ // The right setting for a fleet; the default keeps `agentmesh-node join` on a
// laptop zero-config.
DisableJoinToken bool
// AdminToken protects the admin REST API; auto-generated and persisted in
@@ -179,7 +179,7 @@ func (o *Options) Default() {
o.DBDriver = "sqlite"
}
if o.DBDSN == "" && o.DBDriver == "sqlite" {
- o.DBDSN = filepath.Join(o.DataDir, "sam.db")
+ o.DBDSN = filepath.Join(o.DataDir, "agentmesh.db")
}
if len(o.AllowedAudiences) == 0 {
o.AllowedAudiences = []string{api.DefaultAudience}
@@ -309,18 +309,18 @@ func (s *Server) Start(ctx context.Context) (retErr error) {
return fmt.Errorf("failed to provision join token: %w", err)
}
}
- if err := s.ensureBootstrapToken(ctx, s.joinToken, api.RoleNode, joinTokenMaxUsages, joinTokenTTL, "sam-one join token"); err != nil {
+ if err := s.ensureBootstrapToken(ctx, s.joinToken, api.RoleNode, joinTokenMaxUsages, joinTokenTTL, "agentmesh-one join token"); err != nil {
return fmt.Errorf("failed to register join token: %w", err)
}
}
// Per-boot single-use credential for the embedded router's stock
// enrollment flow; never persisted or displayed.
- routerToken, err := generateToken("sam_rtr_")
+ routerToken, err := generateToken("mesh_rtr_")
if err != nil {
return err
}
- if err := s.ensureBootstrapToken(ctx, routerToken, api.RoleRouter, 1, routerTokenTTL, "sam-one embedded router token"); err != nil {
+ if err := s.ensureBootstrapToken(ctx, routerToken, api.RoleRouter, 1, routerTokenTTL, "agentmesh-one embedded router token"); err != nil {
return fmt.Errorf("failed to register router token: %w", err)
}
@@ -458,7 +458,7 @@ func (s *Server) AdminToken() string { return s.adminToken }
func (s *Server) JoinToken() string { return s.joinToken }
// JoinTokenPath is where an auto-generated join token is persisted, for
-// `sam-node join --bootstrap-token-path`.
+// `agentmesh-node join --bootstrap-token-path`.
func (s *Server) JoinTokenPath() string { return filepath.Join(s.opts.DataDir, joinTokenFile) }
// PeerID returns the embedded router's peer ID.
@@ -468,7 +468,7 @@ func (s *Server) PeerID() string { return s.router.Host.ID().String() }
// maxUsages enrollments (1 = burned by the first device; more lets one code
// on a projector enroll a room) and returns its plaintext once. Unlike the
// join token it is never persisted; a device that missed the window simply
-// gets a new one, and `sam-one token revoke` ends a shared one early.
+// gets a new one, and `agentmesh-one token revoke` ends a shared one early.
func (s *Server) MintDeviceEnrollmentToken(ctx context.Context, ttl time.Duration, maxUsages int) (string, error) {
if ttl <= 0 {
ttl = DeviceTokenTTL
@@ -480,7 +480,7 @@ func (s *Server) MintDeviceEnrollmentToken(ctx context.Context, ttl time.Duratio
if err != nil {
return "", err
}
- if err := s.ensureBootstrapToken(ctx, tok, api.RoleNode, maxUsages, ttl, "sam-one device enrollment via "+s.PublicURL()); err != nil {
+ if err := s.ensureBootstrapToken(ctx, tok, api.RoleNode, maxUsages, ttl, "agentmesh-one device enrollment via "+s.PublicURL()); err != nil {
return "", fmt.Errorf("failed to register device enrollment token: %w", err)
}
return tok, nil
@@ -529,7 +529,7 @@ func (s *Server) seedPolicyOnFirstBoot(ctx context.Context) error {
// node role opened up for zero-config development use.
func defaultDevPolicyRoles() []*api.PolicyRole {
return []*api.PolicyRole{
- {Name: "sam-admin", AllowedServices: []string{"*"}, AllowedTargets: []string{"*"}},
+ {Name: "mesh-admin", AllowedServices: []string{"*"}, AllowedTargets: []string{"*"}},
{Name: api.RoleRouter, AllowedServices: []string{"*"}, AllowedTargets: []string{"*"}},
{Name: api.RoleNode, AllowedServices: []string{"*"}, AllowedTargets: []string{"*"}, AllowedLabels: []string{"*"}},
}
@@ -683,7 +683,7 @@ func externalMultiaddr(rawURL string) (string, error) {
// ensureRouterKey seeds router.key deterministically from an operator-supplied
// adminToken when no router.key file exists on disk yet. On stateless
// single-container platforms (e.g. Cloud Run) where /data is ephemeral and
-// SAM_ADMIN_TOKEN is pinned via environment variable, this keeps the embedded
+// AGENTMESH_ADMIN_TOKEN is pinned via environment variable, this keeps the embedded
// router's libp2p PeerID stable across container restarts without extra config.
func ensureRouterKey(keyPath, adminToken string) error {
if _, err := os.Stat(keyPath); err == nil {
@@ -694,7 +694,7 @@ func ensureRouterKey(keyPath, adminToken string) error {
if strings.TrimSpace(adminToken) == "" {
return nil
}
- seed := sha256.Sum256([]byte("sam-one-router-ed25519-v1:" + strings.TrimSpace(adminToken)))
+ seed := sha256.Sum256([]byte("agentmesh-one-router-ed25519-v1:" + strings.TrimSpace(adminToken)))
priv, _, err := crypto.GenerateEd25519Key(bytes.NewReader(seed[:]))
if err != nil {
return err
diff --git a/internal/standalone/standalone_test.go b/internal/standalone/standalone_test.go
index b3ed8e84..cc4c8700 100644
--- a/internal/standalone/standalone_test.go
+++ b/internal/standalone/standalone_test.go
@@ -64,7 +64,7 @@ func TestExternalMultiaddr(t *testing.T) {
want string
wantErr bool
}{
- {url: "https://my-sam.a.run.app", want: "/dns4/my-sam.a.run.app/tcp/443/wss"},
+ {url: "https://my-agentmesh.a.run.app", want: "/dns4/my-agentmesh.a.run.app/tcp/443/wss"},
{url: "http://192-168-1-50.nip.io:8080", want: "/dns4/192-168-1-50.nip.io/tcp/8080/ws"},
{url: "http://192.168.1.50:8080", want: "/ip4/192.168.1.50/tcp/8080/ws"},
{url: "https://mesh.example:8443", want: "/dns4/mesh.example/tcp/8443/wss"},
@@ -95,10 +95,10 @@ func TestEnsureRouterKeyDeterministic(t *testing.T) {
key1 := filepath.Join(dir1, routerKeyFile)
key2 := filepath.Join(dir2, routerKeyFile)
- if err := ensureRouterKey(key1, "sam_adm_fixed_secret"); err != nil {
+ if err := ensureRouterKey(key1, "mesh_adm_fixed_secret"); err != nil {
t.Fatalf("ensureRouterKey(key1): %v", err)
}
- if err := ensureRouterKey(key2, "sam_adm_fixed_secret"); err != nil {
+ if err := ensureRouterKey(key2, "mesh_adm_fixed_secret"); err != nil {
t.Fatalf("ensureRouterKey(key2): %v", err)
}
@@ -125,7 +125,7 @@ func TestEnsureRouterKeyDeterministic(t *testing.T) {
}
// Existing key file must not be overwritten by a different admin token.
- if err := ensureRouterKey(key1, "sam_adm_other_secret"); err != nil {
+ if err := ensureRouterKey(key1, "mesh_adm_other_secret"); err != nil {
t.Fatalf("ensureRouterKey existing: %v", err)
}
b1After, err := os.ReadFile(key1)
@@ -141,10 +141,10 @@ func TestInferredRequestMultiaddr(t *testing.T) {
const testPeerID = "12D3KooWBzUDQCkZhz2rWrYBhpjcCH8VnrRNcwCW6DoF36iADYrY"
reqCloudRun, _ := http.NewRequest(http.MethodGet, "http://0.0.0.0:8080/info", nil)
- reqCloudRun.Host = "sam-one-xyz-uc.a.run.app"
+ reqCloudRun.Host = "agentmesh-one-xyz-uc.a.run.app"
reqCloudRun.Header.Set("X-Forwarded-Proto", "https")
got, ok := inferredRequestMultiaddr(reqCloudRun, testPeerID)
- want := "/dns4/sam-one-xyz-uc.a.run.app/tcp/443/wss/p2p/" + testPeerID
+ want := "/dns4/agentmesh-one-xyz-uc.a.run.app/tcp/443/wss/p2p/" + testPeerID
if !ok || got != want {
t.Fatalf("CloudRun inferredRequestMultiaddr = (%q, %v), want (%q, true)", got, ok, want)
}
@@ -166,7 +166,7 @@ func TestInferredRequestMultiaddr(t *testing.T) {
}
func TestPrependInferredRouterAddr(t *testing.T) {
- const inferred = "/dns4/sam-one-xyz.a.run.app/tcp/443/wss/p2p/12D3KooWBzUDQCkZhz2rWrYBhpjcCH8VnrRNcwCW6DoF36iADYrY"
+ const inferred = "/dns4/agentmesh-one-xyz.a.run.app/tcp/443/wss/p2p/12D3KooWBzUDQCkZhz2rWrYBhpjcCH8VnrRNcwCW6DoF36iADYrY"
const local = "/ip4/127.0.0.1/tcp/8080/ws/p2p/12D3KooWBzUDQCkZhz2rWrYBhpjcCH8VnrRNcwCW6DoF36iADYrY"
enrollIn, _ := proto.Marshal(&api.BootstrapEnrollResponse{
diff --git a/internal/storage/sql_store.go b/internal/storage/sql_store.go
index 90c376d2..b4000d7c 100644
--- a/internal/storage/sql_store.go
+++ b/internal/storage/sql_store.go
@@ -34,7 +34,7 @@ import (
_ "modernc.org/sqlite"
)
-var logger = log.Logger("sam-storage")
+var logger = log.Logger("agentmesh-storage")
// SQLStore implements Store interface using database/sql.
type SQLStore struct {
diff --git a/internal/storage/sql_store_test.go b/internal/storage/sql_store_test.go
index dbc66583..1158a029 100644
--- a/internal/storage/sql_store_test.go
+++ b/internal/storage/sql_store_test.go
@@ -33,7 +33,7 @@ import (
func newTestStore(t *testing.T) Store {
t.Helper()
// Use a temporary file for SQLite testing to avoid concurrency sharing bugs in parallel tests
- tempDir, err := os.MkdirTemp("", "sam-store-test-*")
+ tempDir, err := os.MkdirTemp("", "agentmesh-store-test-*")
if err != nil {
t.Fatalf("failed to create temp dir: %v", err)
}
diff --git a/internal/storage/storage.go b/internal/storage/storage.go
index 900e0867..fff16632 100644
--- a/internal/storage/storage.go
+++ b/internal/storage/storage.go
@@ -166,7 +166,7 @@ type EnrollmentRequest struct {
ResolvedBy string
}
-// Store defines the persistent operations for the SAM control plane.
+// Store defines the persistent operations for the Agent Mesh control plane.
type Store interface {
// Ping checks the health of the underlying database connection.
Ping(ctx context.Context) error
@@ -246,7 +246,7 @@ type Store interface {
// rather than a page of it.
ListBannedPeerIDs(ctx context.Context) ([]string, error)
- // UpsertRouterLease updates or creates a lease for a sam-router.
+ // UpsertRouterLease updates or creates a lease for a agentmesh-router.
UpsertRouterLease(ctx context.Context, lease *RouterLease) error
// GetActiveRouters retrieves all routers whose leases are still valid.
diff --git a/internal/tunnel/cloudflare.go b/internal/tunnel/cloudflare.go
index f266e575..9834e917 100644
--- a/internal/tunnel/cloudflare.go
+++ b/internal/tunnel/cloudflare.go
@@ -55,7 +55,7 @@ type Cloudflare struct {
// Timeout bounds how long Open waits for the URL and then for its
// hostname to be published in DNS; defaults to 30s.
Timeout time.Duration
- // InstallDir is where a downloaded cloudflared is kept (sam-one uses
+ // InstallDir is where a downloaded cloudflared is kept (agentmesh-one uses
// <data-dir>/bin). Empty disables both the cache and downloads.
InstallDir string
// Consent is asked before downloading; installing cloudflared means
@@ -72,7 +72,7 @@ type Cloudflare struct {
// stub it.
LookupHost func(ctx context.Context, host string) ([]string, error)
// Token is an optional named tunnel token (from --tunnel-token-path
- // or SAM_TUNNEL_TOKEN). When set, Open runs
+ // or AGENTMESH_TUNNEL_TOKEN). When set, Open runs
// `cloudflared tunnel --no-autoupdate run --url <target>` with
// TUNNEL_TOKEN in the child environment instead of a random
// trycloudflare.com quick tunnel, and publishes ExternalURL.
@@ -198,7 +198,7 @@ func (c *Cloudflare) awaitPublished(ctx context.Context, rawURL string, deadline
// authoritativeLookup resolves host at its zone's own nameserver, bypassing
// every cache in between. Asking a recursive resolver before the record
// exists makes it cache the NXDOMAIN (the zone's SOA allows 30 minutes) and
-// strands every device behind that resolver, including a sam-node on this
+// strands every device behind that resolver, including a agentmesh-node on this
// very machine; the authoritative server has no cache to poison.
func authoritativeLookup(ctx context.Context, host string) ([]string, error) {
parts := strings.Split(host, ".")
@@ -268,7 +268,7 @@ func (c *Cloudflare) resolveBinary(ctx context.Context) (string, error) {
}
url := base + CloudflaredVersion + "/" + asset.Name
if c.Consent == nil || !c.Consent(CloudflaredVersion, url) {
- return "", fmt.Errorf("%w on PATH and download not authorized (install it from %s, or allow sam-one to download the pinned release)", ErrCloudflaredUnavailable, CloudflaredLicenseURL)
+ return "", fmt.Errorf("%w on PATH and download not authorized (install it from %s, or allow agentmesh-one to download the pinned release)", ErrCloudflaredUnavailable, CloudflaredLicenseURL)
}
client := c.HTTPClient
if client == nil {
diff --git a/internal/tunnel/codespaces_test.go b/internal/tunnel/codespaces_test.go
index 24f7cbf4..9613c6fd 100644
--- a/internal/tunnel/codespaces_test.go
+++ b/internal/tunnel/codespaces_test.go
@@ -75,7 +75,7 @@ func scriptedProxy(t *testing.T, statuses ...int) (*httptest.Server, *atomic.Int
func TestCodespacesOpenDerivesURLFromPlatformEnv(t *testing.T) {
c := &Codespaces{
- Getenv: codespaceEnv("octocat-sam-abc123", "app.github.dev"),
+ Getenv: codespaceEnv("octocat-agentmesh-abc123", "app.github.dev"),
Transport: rewriteTo("http://127.0.0.1:0"),
ProbeTimeout: 10 * time.Millisecond,
}
@@ -83,7 +83,7 @@ func TestCodespacesOpenDerivesURLFromPlatformEnv(t *testing.T) {
if err != nil {
t.Fatalf("Open: %v", err)
}
- if got, want := tun.URL(), "https://octocat-sam-abc123-8080.app.github.dev"; got != want {
+ if got, want := tun.URL(), "https://octocat-agentmesh-abc123-8080.app.github.dev"; got != want {
t.Fatalf("URL = %q, want %q", got, want)
}
select {
@@ -110,7 +110,7 @@ func TestCodespacesOpenDerivesURLFromPlatformEnv(t *testing.T) {
func TestCodespacesOpenRejectsOtherPlatforms(t *testing.T) {
for name, getenv := range map[string]func(string) string{
"no env": codespaceEnv("", ""),
- "name only": codespaceEnv("octocat-sam-abc123", ""),
+ "name only": codespaceEnv("octocat-agentmesh-abc123", ""),
"domain only": codespaceEnv("", "app.github.dev"),
} {
t.Run(name, func(t *testing.T) {
@@ -120,14 +120,14 @@ func TestCodespacesOpenRejectsOtherPlatforms(t *testing.T) {
}
})
}
- c := &Codespaces{Getenv: codespaceEnv("octocat-sam-abc123", "app.github.dev")}
+ c := &Codespaces{Getenv: codespaceEnv("octocat-agentmesh-abc123", "app.github.dev")}
if _, err := c.Open(context.Background(), "http://127.0.0.1"); err == nil {
t.Fatal("Open accepted a target without a port")
}
}
func TestCodespacesProbeWaitsForTheMeshBehindThePublicPort(t *testing.T) {
- // 502 is what the proxy returns while sam-one is still binding.
+ // 502 is what the proxy returns while agentmesh-one is still binding.
proxy, n := scriptedProxy(t, http.StatusBadGateway, http.StatusBadGateway, http.StatusOK)
c := &Codespaces{Transport: rewriteTo(proxy.URL), ProbeInterval: time.Millisecond}
if got := c.probe(context.Background(), "https://name-8080.app.github.dev", time.Now().Add(5*time.Second), true); got != probeReachable {
diff --git a/mobile/sam-node-ffi/ffi/ffi.go b/mobile/sam-node-ffi/ffi/ffi.go
index e22a23d2..fbdedbb3 100644
--- a/mobile/sam-node-ffi/ffi/ffi.go
+++ b/mobile/sam-node-ffi/ffi/ffi.go
@@ -36,7 +36,7 @@ import (
)
var (
- activeNode *node.SamNode
+ activeNode *node.AgentMeshNode
activeStore *node.Store
cancelFunc context.CancelFunc
sidecarSrv *http.Server
@@ -208,7 +208,7 @@ func StartNode(configJSON string) error {
return err
}
- samNode, err := node.NewSamNode(node.Options{
+ samNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: priv,
ControlPlanePubKey: controlPlanePubKey,
RouterAddrs: routerAddrs,
@@ -355,7 +355,7 @@ func decodeLabels(jsonText string) (map[string]string, error) {
// and are minted into the node's Biscuit here; changing them means enrolling
// again, which reuses the stored key so the PeerID survives.
func EnrollNode(dataDir string, controlPlaneURL string, jwt string, allowLoopback bool, labels string, refreshToken string) error {
- return enrollWith(dataDir, controlPlaneURL, allowLoopback, labels, func(ctx context.Context, n *node.SamNode, store *node.Store) error {
+ return enrollWith(dataDir, controlPlaneURL, allowLoopback, labels, func(ctx context.Context, n *node.AgentMeshNode, store *node.Store) error {
if err := n.Enroll(ctx, controlPlaneURL, jwt); err != nil {
return err
}
@@ -375,7 +375,7 @@ func EnrollNodeBootstrap(dataDir string, controlPlaneURL string, bootstrapToken
if strings.TrimSpace(bootstrapToken) == "" {
return errors.New("bootstrap token is required")
}
- return enrollWith(dataDir, controlPlaneURL, allowLoopback, labels, func(ctx context.Context, n *node.SamNode, _ *node.Store) error {
+ return enrollWith(dataDir, controlPlaneURL, allowLoopback, labels, func(ctx context.Context, n *node.AgentMeshNode, _ *node.Store) error {
return n.EnrollBootstrap(ctx, controlPlaneURL, strings.TrimSpace(bootstrapToken))
})
}
@@ -383,7 +383,7 @@ func EnrollNodeBootstrap(dataDir string, controlPlaneURL string, bootstrapToken
// enrollWith runs one enrollment flow on a throwaway node built from the
// stored (or freshly generated) key, then persists the control plane URL and
// syncs the mesh config so the next StartNode finds everything in place.
-func enrollWith(dataDir string, controlPlaneURL string, allowLoopback bool, labels string, enroll func(context.Context, *node.SamNode, *node.Store) error) error {
+func enrollWith(dataDir string, controlPlaneURL string, allowLoopback bool, labels string, enroll func(context.Context, *node.AgentMeshNode, *node.Store) error) error {
mu.Lock()
isRunning := activeNode != nil || unauthSrv != nil
mu.Unlock()
@@ -431,7 +431,7 @@ func enrollWith(dataDir string, controlPlaneURL string, allowLoopback bool, labe
listenAddrs = []string{"/ip4/0.0.0.0/udp/0/quic-v1", "/ip4/0.0.0.0/tcp/0"}
}
- meshNode, err := node.NewSamNode(node.Options{
+ meshNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: priv,
RouterAddrs: initRouterAddrs,
Store: store,
@@ -614,7 +614,7 @@ func ReEnrollNode(dataDir string, labels string) error {
}
defer func() { _ = store.Close() }()
- meshNode, err := node.NewSamNode(node.Options{
+ meshNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: node.GetOrGenerateKey(store),
Store: store,
AllowLoopback: true,
diff --git a/sam-control-plane b/sam-control-plane
new file mode 100755
index 00000000..9b918ce8
Binary files /dev/null and b/sam-control-plane differ
diff --git a/sdk/README.md b/sdk/README.md
index 2bebfa76..2828ba99 100644
--- a/sdk/README.md
+++ b/sdk/README.md
@@ -633,7 +633,7 @@ Both testnets run the example programs, unchanged, as canaries beside the
`sam-node` ones (`.github/k8s/sam-sdk-canary-template.yaml`): two pairs, an
agent written with one SDK and the official A2A SDK (`a2a-agent.ts`,
`a2a_agent.py`) and a caller written with the other in one pod, enrolled
-with the pod's projected service account token through `SAM_JWT_PATH`. The
+with the pod's projected service account token through `AGENTMESH_JWT_PATH`. The
agent accepts `a2a://agent`; the caller reads its peer ID from the line it
prints, through a volume the pod shares, sends it a message with the A2A
SDK's client every five minutes and is Ready while the last answer named
diff --git a/sdk/js/README.md b/sdk/js/README.md
index 2498e9b3..5d1895ae 100644
--- a/sdk/js/README.md
+++ b/sdk/js/README.md
@@ -29,8 +29,8 @@ section has the details and an example page.
Both programs below are in
[`examples/`](https://github.com/google/sam/tree/main/sdk/js/examples) and
run against a real mesh in the repository's tests. They read the mesh from
-`SAM_CONTROL_PLANE_URL` and the enrollment token from
-`SAM_BOOTSTRAP_TOKEN_PATH`; the guide shows how to get both from `sam-one`
+`AGENTMESH_CONTROL_PLANE_URL` and the enrollment token from
+`AGENTMESH_BOOTSTRAP_TOKEN_PATH`; the guide shows how to get both from `sam-one`
or from the operator of an existing mesh.
Find a service and call it:
@@ -45,11 +45,11 @@ Find a service and call it:
// node call.js inference://ollama /v1/models
// node call.js 12D3KooW... a2a://agent /card
//
-// SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-// SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
-// SAM_JWT_PATH (a workload identity token your platform issues, such as a
+// AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+// AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
+// AGENTMESH_JWT_PATH (a workload identity token your platform issues, such as a
// Kubernetes projected service account token), and keeps the identity and
-// credential in SAM_STATE_DIR; later runs resume from there without it.
+// credential in AGENTMESH_STATE_DIR; later runs resume from there without it.
import { homedir } from "node:os";
import { AgentMesh, type DiscoveredProvider } from "@sam-mesh/sdk";
@@ -62,12 +62,12 @@ if (argv[0] !== undefined && !argv[0].includes("://")) {
const [service = peerId !== undefined ? "a2a://agent" : "mcp://everything", toolOrPath = peerId !== undefined ? "/card" : "echo", args = '{"message": "hi"}'] = argv;
const mesh = await AgentMesh.enroll({
- controlPlaneUrl: process.env.SAM_CONTROL_PLANE_URL ?? "https://mesh.example.com",
- bootstrapTokenPath: process.env.SAM_BOOTSTRAP_TOKEN_PATH,
- jwtPath: process.env.SAM_JWT_PATH,
- stateDir: process.env.SAM_STATE_DIR ?? `${homedir()}/.config/sam-mesh/caller`,
+ controlPlaneUrl: process.env.AGENTMESH_CONTROL_PLANE_URL ?? "https://mesh.example.com",
+ bootstrapTokenPath: process.env.AGENTMESH_BOOTSTRAP_TOKEN_PATH,
+ jwtPath: process.env.AGENTMESH_JWT_PATH,
+ stateDir: process.env.AGENTMESH_STATE_DIR ?? `${homedir()}/.config/sam-mesh/caller`,
// A plaintext http:// control plane is otherwise accepted only on loopback.
- allowInsecure: process.env.SAM_INSECURE_CONTROL_PLANE === "true",
+ allowInsecure: process.env.AGENTMESH_INSECURE_CONTROL_PLANE === "true",
});
const session = await mesh.join();
console.log(`on the mesh as ${session.peerId}`);
@@ -129,11 +129,11 @@ agent by its peer ID, the one it prints, through a router:
// node agent.js # answered by the handler below
// node agent.js http://127.0.0.1:9999 # forwarded to an A2A server beside it
//
-// SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-// SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
-// SAM_JWT_PATH (a workload identity token your platform issues, such as a
+// AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+// AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
+// AGENTMESH_JWT_PATH (a workload identity token your platform issues, such as a
// Kubernetes projected service account token), and keeps the identity and
-// credential in SAM_STATE_DIR; later runs resume from there, as the same
+// credential in AGENTMESH_STATE_DIR; later runs resume from there, as the same
// peer, without it.
import { homedir } from "node:os";
import { AgentMesh } from "@sam-mesh/sdk";
@@ -141,12 +141,12 @@ import { AgentMesh } from "@sam-mesh/sdk";
const [backendURL] = process.argv.slice(2);
const mesh = await AgentMesh.enroll({
- controlPlaneUrl: process.env.SAM_CONTROL_PLANE_URL ?? "https://mesh.example.com",
- bootstrapTokenPath: process.env.SAM_BOOTSTRAP_TOKEN_PATH,
- jwtPath: process.env.SAM_JWT_PATH,
- stateDir: process.env.SAM_STATE_DIR ?? `${homedir()}/.config/sam-mesh/agent`,
+ controlPlaneUrl: process.env.AGENTMESH_CONTROL_PLANE_URL ?? "https://mesh.example.com",
+ bootstrapTokenPath: process.env.AGENTMESH_BOOTSTRAP_TOKEN_PATH,
+ jwtPath: process.env.AGENTMESH_JWT_PATH,
+ stateDir: process.env.AGENTMESH_STATE_DIR ?? `${homedir()}/.config/sam-mesh/agent`,
// A plaintext http:// control plane is otherwise accepted only on loopback.
- allowInsecure: process.env.SAM_INSECURE_CONTROL_PLANE === "true",
+ allowInsecure: process.env.AGENTMESH_INSECURE_CONTROL_PLANE === "true",
});
const session = await mesh.join();
diff --git a/sdk/js/examples/a2a-agent.ts b/sdk/js/examples/a2a-agent.ts
index 63134e1c..c74d50d0 100644
--- a/sdk/js/examples/a2a-agent.ts
+++ b/sdk/js/examples/a2a-agent.ts
@@ -6,11 +6,11 @@
//
// node a2a-agent.js
//
-// SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-// SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
-// SAM_JWT_PATH (a workload identity token your platform issues, such as a
+// AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+// AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
+// AGENTMESH_JWT_PATH (a workload identity token your platform issues, such as a
// Kubernetes projected service account token), and keeps the identity and
-// credential in SAM_STATE_DIR; later runs resume from there, as the same
+// credential in AGENTMESH_STATE_DIR; later runs resume from there, as the same
// peer, without it.
import { homedir } from "node:os";
import { randomUUID } from "node:crypto";
@@ -21,12 +21,12 @@ import { UserBuilder, agentCardHandler, jsonRpcHandler } from "@a2a-js/sdk/serve
import { AgentMesh, MeshSession } from "@sam-mesh/sdk";
const mesh = await AgentMesh.enroll({
- controlPlaneUrl: process.env.SAM_CONTROL_PLANE_URL ?? "https://mesh.example.com",
- bootstrapTokenPath: process.env.SAM_BOOTSTRAP_TOKEN_PATH,
- jwtPath: process.env.SAM_JWT_PATH,
- stateDir: process.env.SAM_STATE_DIR ?? `${homedir()}/.config/sam-mesh/a2a-agent`,
+ controlPlaneUrl: process.env.AGENTMESH_CONTROL_PLANE_URL ?? "https://mesh.example.com",
+ bootstrapTokenPath: process.env.AGENTMESH_BOOTSTRAP_TOKEN_PATH,
+ jwtPath: process.env.AGENTMESH_JWT_PATH,
+ stateDir: process.env.AGENTMESH_STATE_DIR ?? `${homedir()}/.config/sam-mesh/a2a-agent`,
// A plaintext http:// control plane is otherwise accepted only on loopback.
- allowInsecure: process.env.SAM_INSECURE_CONTROL_PLANE === "true",
+ allowInsecure: process.env.AGENTMESH_INSECURE_CONTROL_PLANE === "true",
});
const session = await mesh.join();
diff --git a/sdk/js/examples/a2a-call.ts b/sdk/js/examples/a2a-call.ts
index 2b0eb4b1..90227767 100644
--- a/sdk/js/examples/a2a-call.ts
+++ b/sdk/js/examples/a2a-call.ts
@@ -5,11 +5,11 @@
//
// node a2a-call.js 12D3KooW... "hello"
//
-// SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-// SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
-// SAM_JWT_PATH (a workload identity token your platform issues, such as a
+// AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+// AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
+// AGENTMESH_JWT_PATH (a workload identity token your platform issues, such as a
// Kubernetes projected service account token), and keeps the identity and
-// credential in SAM_STATE_DIR; later runs resume from there without it.
+// credential in AGENTMESH_STATE_DIR; later runs resume from there without it.
import { homedir } from "node:os";
import { randomUUID } from "node:crypto";
import { Message, Role, type SendMessageRequest } from "@a2a-js/sdk";
@@ -22,12 +22,12 @@ if (peerId === undefined) {
}
const mesh = await AgentMesh.enroll({
- controlPlaneUrl: process.env.SAM_CONTROL_PLANE_URL ?? "https://mesh.example.com",
- bootstrapTokenPath: process.env.SAM_BOOTSTRAP_TOKEN_PATH,
- jwtPath: process.env.SAM_JWT_PATH,
- stateDir: process.env.SAM_STATE_DIR ?? `${homedir()}/.config/sam-mesh/a2a-caller`,
+ controlPlaneUrl: process.env.AGENTMESH_CONTROL_PLANE_URL ?? "https://mesh.example.com",
+ bootstrapTokenPath: process.env.AGENTMESH_BOOTSTRAP_TOKEN_PATH,
+ jwtPath: process.env.AGENTMESH_JWT_PATH,
+ stateDir: process.env.AGENTMESH_STATE_DIR ?? `${homedir()}/.config/sam-mesh/a2a-caller`,
// A plaintext http:// control plane is otherwise accepted only on loopback.
- allowInsecure: process.env.SAM_INSECURE_CONTROL_PLANE === "true",
+ allowInsecure: process.env.AGENTMESH_INSECURE_CONTROL_PLANE === "true",
});
const session = await mesh.join();
console.log(`on the mesh as ${session.peerId}`);
diff --git a/sdk/js/examples/agent.ts b/sdk/js/examples/agent.ts
index 64e0d9b3..696b695c 100644
--- a/sdk/js/examples/agent.ts
+++ b/sdk/js/examples/agent.ts
@@ -7,11 +7,11 @@
// node agent.js # answered by the handler below
// node agent.js http://127.0.0.1:9999 # forwarded to an A2A server beside it
//
-// SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-// SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
-// SAM_JWT_PATH (a workload identity token your platform issues, such as a
+// AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+// AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
+// AGENTMESH_JWT_PATH (a workload identity token your platform issues, such as a
// Kubernetes projected service account token), and keeps the identity and
-// credential in SAM_STATE_DIR; later runs resume from there, as the same
+// credential in AGENTMESH_STATE_DIR; later runs resume from there, as the same
// peer, without it.
import { homedir } from "node:os";
import { AgentMesh } from "@sam-mesh/sdk";
@@ -19,12 +19,12 @@ import { AgentMesh } from "@sam-mesh/sdk";
const [backendURL] = process.argv.slice(2);
const mesh = await AgentMesh.enroll({
- controlPlaneUrl: process.env.SAM_CONTROL_PLANE_URL ?? "https://mesh.example.com",
- bootstrapTokenPath: process.env.SAM_BOOTSTRAP_TOKEN_PATH,
- jwtPath: process.env.SAM_JWT_PATH,
- stateDir: process.env.SAM_STATE_DIR ?? `${homedir()}/.config/sam-mesh/agent`,
+ controlPlaneUrl: process.env.AGENTMESH_CONTROL_PLANE_URL ?? "https://mesh.example.com",
+ bootstrapTokenPath: process.env.AGENTMESH_BOOTSTRAP_TOKEN_PATH,
+ jwtPath: process.env.AGENTMESH_JWT_PATH,
+ stateDir: process.env.AGENTMESH_STATE_DIR ?? `${homedir()}/.config/sam-mesh/agent`,
// A plaintext http:// control plane is otherwise accepted only on loopback.
- allowInsecure: process.env.SAM_INSECURE_CONTROL_PLANE === "true",
+ allowInsecure: process.env.AGENTMESH_INSECURE_CONTROL_PLANE === "true",
});
const session = await mesh.join();
diff --git a/sdk/js/examples/call.ts b/sdk/js/examples/call.ts
index b3249fa6..8ee49673 100644
--- a/sdk/js/examples/call.ts
+++ b/sdk/js/examples/call.ts
@@ -6,11 +6,11 @@
// node call.js inference://ollama /v1/models
// node call.js 12D3KooW... a2a://agent /card
//
-// SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-// SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
-// SAM_JWT_PATH (a workload identity token your platform issues, such as a
+// AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+// AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or
+// AGENTMESH_JWT_PATH (a workload identity token your platform issues, such as a
// Kubernetes projected service account token), and keeps the identity and
-// credential in SAM_STATE_DIR; later runs resume from there without it.
+// credential in AGENTMESH_STATE_DIR; later runs resume from there without it.
import { homedir } from "node:os";
import { AgentMesh, type DiscoveredProvider } from "@sam-mesh/sdk";
@@ -23,12 +23,12 @@ if (argv[0] !== undefined && !argv[0].includes("://")) {
const [service = peerId !== undefined ? "a2a://agent" : "mcp://everything", toolOrPath = peerId !== undefined ? "/card" : "echo", args = '{"message": "hi"}'] = argv;
const mesh = await AgentMesh.enroll({
- controlPlaneUrl: process.env.SAM_CONTROL_PLANE_URL ?? "https://mesh.example.com",
- bootstrapTokenPath: process.env.SAM_BOOTSTRAP_TOKEN_PATH,
- jwtPath: process.env.SAM_JWT_PATH,
- stateDir: process.env.SAM_STATE_DIR ?? `${homedir()}/.config/sam-mesh/caller`,
+ controlPlaneUrl: process.env.AGENTMESH_CONTROL_PLANE_URL ?? "https://mesh.example.com",
+ bootstrapTokenPath: process.env.AGENTMESH_BOOTSTRAP_TOKEN_PATH,
+ jwtPath: process.env.AGENTMESH_JWT_PATH,
+ stateDir: process.env.AGENTMESH_STATE_DIR ?? `${homedir()}/.config/sam-mesh/caller`,
// A plaintext http:// control plane is otherwise accepted only on loopback.
- allowInsecure: process.env.SAM_INSECURE_CONTROL_PLANE === "true",
+ allowInsecure: process.env.AGENTMESH_INSECURE_CONTROL_PLANE === "true",
});
const session = await mesh.join();
console.log(`on the mesh as ${session.peerId}`);
diff --git a/sdk/js/src/conformance-join.ts b/sdk/js/src/conformance-join.ts
index c4c1aee4..a0d6bd83 100644
--- a/sdk/js/src/conformance-join.ts
+++ b/sdk/js/src/conformance-join.ts
@@ -188,26 +188,26 @@ async function handle(session: MeshSession, command: Command): Promise<unknown>
}
async function main(): Promise<void> {
- const controlPlaneUrl = requireEnv("SAM_CONTROL_PLANE_URL");
+ const controlPlaneUrl = requireEnv("AGENTMESH_CONTROL_PLANE_URL");
// Enrollment is with a bootstrap token or a platform JWT, as the examples
// offer; a JWT file is read again at every refresh.
- const bootstrapTokenPath = process.env.SAM_BOOTSTRAP_TOKEN_PATH;
- const jwtPath = process.env.SAM_JWT_PATH;
+ const bootstrapTokenPath = process.env.AGENTMESH_BOOTSTRAP_TOKEN_PATH;
+ const jwtPath = process.env.AGENTMESH_JWT_PATH;
if ((bootstrapTokenPath === undefined) === (jwtPath === undefined)) {
- throw new Error("exactly one of SAM_BOOTSTRAP_TOKEN_PATH or SAM_JWT_PATH is required");
+ throw new Error("exactly one of AGENTMESH_BOOTSTRAP_TOKEN_PATH or AGENTMESH_JWT_PATH is required");
}
- const stateDir = requireEnv("SAM_SDK_STATE_DIR");
- const allowInsecure = process.env.SAM_INSECURE_CONTROL_PLANE === "1";
- const listenAddrs = (process.env.SAM_SDK_LISTEN_ADDRS ?? "").split(",").filter((a) => a !== "");
+ const stateDir = requireEnv("AGENTMESH_SDK_STATE_DIR");
+ const allowInsecure = process.env.AGENTMESH_INSECURE_CONTROL_PLANE === "1";
+ const listenAddrs = (process.env.AGENTMESH_SDK_LISTEN_ADDRS ?? "").split(",").filter((a) => a !== "");
// Labels this member declares at enrollment; the policy's allowed_labels
- // decide whether the control plane attests them. SAM_SDK_EGRESS_REQUIRE_LABELS
+ // decide whether the control plane attests them. AGENTMESH_SDK_EGRESS_REQUIRE_LABELS
// is the floor every provider this member calls must attest.
- const labels = labelsFromEnv("SAM_SDK_LABELS");
- const egressRequireLabels = labelsFromEnv("SAM_SDK_EGRESS_REQUIRE_LABELS");
- // SAM_SDK_RELAY_CHECK_SECONDS shortens how often the relay reservation is
+ const labels = labelsFromEnv("AGENTMESH_SDK_LABELS");
+ const egressRequireLabels = labelsFromEnv("AGENTMESH_SDK_EGRESS_REQUIRE_LABELS");
+ // AGENTMESH_SDK_RELAY_CHECK_SECONDS shortens how often the relay reservation is
// checked, so a test that moves a router sees the member follow it within
// its budget.
- const relayCheck = process.env.SAM_SDK_RELAY_CHECK_SECONDS;
+ const relayCheck = process.env.AGENTMESH_SDK_RELAY_CHECK_SECONDS;
const relayOptions = relayCheck !== undefined && relayCheck !== "" ? { relayCheckIntervalMs: Number(relayCheck) * 1000 } : {};
const mesh = await AgentMesh.enroll({
@@ -220,9 +220,9 @@ async function main(): Promise<void> {
...(Object.keys(labels).length > 0 ? { labels } : {}),
});
// The test drives every pull itself; only gossip events bring one forward.
- // SAM_SDK_ROUTERS, peer IDs, joins through those routers only, so the test
+ // AGENTMESH_SDK_ROUTERS, peer IDs, joins through those routers only, so the test
// can put two members on different routers.
- const only = new Set((process.env.SAM_SDK_ROUTERS ?? "").split(",").filter((id) => id !== ""));
+ const only = new Set((process.env.AGENTMESH_SDK_ROUTERS ?? "").split(",").filter((id) => id !== ""));
const routerAddresses = only.size === 0 ? undefined : mesh.credential.routerAddresses.filter((a) => [...only].some((id) => a.endsWith(`/p2p/${id}`)));
const session = await mesh.join({
listenAddrs,
diff --git a/sdk/js/src/conformance.ts b/sdk/js/src/conformance.ts
index 14e3cde7..b8b8ed76 100644
--- a/sdk/js/src/conformance.ts
+++ b/sdk/js/src/conformance.ts
@@ -18,10 +18,10 @@
// ships the same runner (python -m agent_mesh.conformance) with the same
// environment and output, so one Go test checks both.
//
-// SAM_CONTROL_PLANE_URL base URL of the control plane
-// SAM_BOOTSTRAP_TOKEN_PATH file holding a bootstrap token
-// SAM_SDK_STATE_DIR directory for identity and credential
-// SAM_INSECURE_CONTROL_PLANE "1" to accept plaintext http:// off loopback
+// AGENTMESH_CONTROL_PLANE_URL base URL of the control plane
+// AGENTMESH_BOOTSTRAP_TOKEN_PATH file holding a bootstrap token
+// AGENTMESH_SDK_STATE_DIR directory for identity and credential
+// AGENTMESH_INSECURE_CONTROL_PLANE "1" to accept plaintext http:// off loopback
import { AgentMesh } from "./mesh.ts";
@@ -37,10 +37,10 @@ function requireEnv(name: string): string {
}
async function main(): Promise<void> {
- const controlPlaneUrl = requireEnv("SAM_CONTROL_PLANE_URL");
- const bootstrapTokenPath = requireEnv("SAM_BOOTSTRAP_TOKEN_PATH");
- const stateDir = requireEnv("SAM_SDK_STATE_DIR");
- const allowInsecure = process.env.SAM_INSECURE_CONTROL_PLANE === "1";
+ const controlPlaneUrl = requireEnv("AGENTMESH_CONTROL_PLANE_URL");
+ const bootstrapTokenPath = requireEnv("AGENTMESH_BOOTSTRAP_TOKEN_PATH");
+ const stateDir = requireEnv("AGENTMESH_SDK_STATE_DIR");
+ const allowInsecure = process.env.AGENTMESH_INSECURE_CONTROL_PLANE === "1";
const mesh = await AgentMesh.enroll({ controlPlaneUrl, allowInsecure, stateDir, bootstrapTokenPath, pollIntervalMs: 200 });
const enrolled = mesh.credential;
diff --git a/sdk/python/README.md b/sdk/python/README.md
index 5655f5af..6fad8b3f 100644
--- a/sdk/python/README.md
+++ b/sdk/python/README.md
@@ -28,8 +28,8 @@ asyncio, use it through `anyio` with the trio backend. One dependency,
Both programs below are in
[`examples/`](https://github.com/google/sam/tree/main/sdk/python/examples)
and run against a real mesh in the repository's tests. They read the mesh
-from `SAM_CONTROL_PLANE_URL` and the enrollment token from
-`SAM_BOOTSTRAP_TOKEN_PATH`; the guide shows how to get both from `sam-one`
+from `AGENTMESH_CONTROL_PLANE_URL` and the enrollment token from
+`AGENTMESH_BOOTSTRAP_TOKEN_PATH`; the guide shows how to get both from `sam-one`
or from the operator of an existing mesh.
Find a service and call it:
@@ -44,11 +44,11 @@ published nothing, reached by its peer ID.
python call.py inference://ollama /v1/models
python call.py 12D3KooW... a2a://agent /card
-SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or SAM_JWT_PATH
+AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or AGENTMESH_JWT_PATH
(a workload identity token your platform issues, such as a Kubernetes
projected service account token), and keeps the identity and credential in
-SAM_STATE_DIR; later runs resume from there without it.
+AGENTMESH_STATE_DIR; later runs resume from there without it.
"""
import json
@@ -68,12 +68,12 @@ tool_or_path = argv[1] if len(argv) > 1 else ("/card" if peer_id else "echo")
args = json.loads(argv[2]) if len(argv) > 2 else {"message": "hi"}
mesh = AgentMesh.enroll(
- os.environ.get("SAM_CONTROL_PLANE_URL", "https://mesh.example.com"),
- bootstrap_token_path=os.environ.get("SAM_BOOTSTRAP_TOKEN_PATH"),
- jwt_path=os.environ.get("SAM_JWT_PATH"),
- state_dir=os.environ.get("SAM_STATE_DIR", "~/.config/sam-mesh/caller"),
+ os.environ.get("AGENTMESH_CONTROL_PLANE_URL", "https://mesh.example.com"),
+ bootstrap_token_path=os.environ.get("AGENTMESH_BOOTSTRAP_TOKEN_PATH"),
+ jwt_path=os.environ.get("AGENTMESH_JWT_PATH"),
+ state_dir=os.environ.get("AGENTMESH_STATE_DIR", "~/.config/agentmesh/caller"),
# A plaintext http:// control plane is otherwise accepted only on loopback.
- allow_insecure=os.environ.get("SAM_INSECURE_CONTROL_PLANE") == "true",
+ allow_insecure=os.environ.get("AGENTMESH_INSECURE_CONTROL_PLANE") == "true",
)
@@ -129,11 +129,11 @@ before anything reaches this code.
python agent.py # answered by the handler below
python agent.py http://127.0.0.1:9999 # forwarded to an A2A server beside it
-SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or SAM_JWT_PATH
+AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or AGENTMESH_JWT_PATH
(a workload identity token your platform issues, such as a Kubernetes
projected service account token), and keeps the identity and credential in
-SAM_STATE_DIR; later runs resume from there, as the same peer, without it.
+AGENTMESH_STATE_DIR; later runs resume from there, as the same peer, without it.
"""
import json
@@ -146,12 +146,12 @@ from agent_mesh import AgentMesh, HTTPRequest, HTTPResponse, VerifiedBiscuit
backend_url = sys.argv[1] if len(sys.argv) > 1 else None
mesh = AgentMesh.enroll(
- os.environ.get("SAM_CONTROL_PLANE_URL", "https://mesh.example.com"),
- bootstrap_token_path=os.environ.get("SAM_BOOTSTRAP_TOKEN_PATH"),
- jwt_path=os.environ.get("SAM_JWT_PATH"),
- state_dir=os.environ.get("SAM_STATE_DIR", "~/.config/sam-mesh/agent"),
+ os.environ.get("AGENTMESH_CONTROL_PLANE_URL", "https://mesh.example.com"),
+ bootstrap_token_path=os.environ.get("AGENTMESH_BOOTSTRAP_TOKEN_PATH"),
+ jwt_path=os.environ.get("AGENTMESH_JWT_PATH"),
+ state_dir=os.environ.get("AGENTMESH_STATE_DIR", "~/.config/agentmesh/agent"),
# A plaintext http:// control plane is otherwise accepted only on loopback.
- allow_insecure=os.environ.get("SAM_INSECURE_CONTROL_PLANE") == "true",
+ allow_insecure=os.environ.get("AGENTMESH_INSECURE_CONTROL_PLANE") == "true",
)
diff --git a/sdk/python/examples/a2a_agent.py b/sdk/python/examples/a2a_agent.py
index 91ce4b43..20fb32ae 100644
--- a/sdk/python/examples/a2a_agent.py
+++ b/sdk/python/examples/a2a_agent.py
@@ -6,11 +6,11 @@ ones, and the SDK turns the rest away before a request reaches the app.
python a2a_agent.py
-SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or SAM_JWT_PATH
+AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or AGENTMESH_JWT_PATH
(a workload identity token your platform issues, such as a Kubernetes
projected service account token), and keeps the identity and credential in
-SAM_STATE_DIR; later runs resume from there, as the same peer, without it.
+AGENTMESH_STATE_DIR; later runs resume from there, as the same peer, without it.
"""
import os
@@ -30,12 +30,12 @@ from agent_mesh import AgentMesh, MeshSession
from starlette.applications import Starlette
mesh = AgentMesh.enroll(
- os.environ.get("SAM_CONTROL_PLANE_URL", "https://mesh.example.com"),
- bootstrap_token_path=os.environ.get("SAM_BOOTSTRAP_TOKEN_PATH"),
- jwt_path=os.environ.get("SAM_JWT_PATH"),
- state_dir=os.environ.get("SAM_STATE_DIR", "~/.config/sam-mesh/a2a-agent"),
+ os.environ.get("AGENTMESH_CONTROL_PLANE_URL", "https://mesh.example.com"),
+ bootstrap_token_path=os.environ.get("AGENTMESH_BOOTSTRAP_TOKEN_PATH"),
+ jwt_path=os.environ.get("AGENTMESH_JWT_PATH"),
+ state_dir=os.environ.get("AGENTMESH_STATE_DIR", "~/.config/agentmesh/a2a-agent"),
# A plaintext http:// control plane is otherwise accepted only on loopback.
- allow_insecure=os.environ.get("SAM_INSECURE_CONTROL_PLANE") == "true",
+ allow_insecure=os.environ.get("AGENTMESH_INSECURE_CONTROL_PLANE") == "true",
)
diff --git a/sdk/python/examples/a2a_call.py b/sdk/python/examples/a2a_call.py
index 95f460f4..3a70ffaf 100644
--- a/sdk/python/examples/a2a_call.py
+++ b/sdk/python/examples/a2a_call.py
@@ -5,11 +5,11 @@ router with this member's credential.
python a2a_call.py 12D3KooW... "hello"
-SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or SAM_JWT_PATH
+AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or AGENTMESH_JWT_PATH
(a workload identity token your platform issues, such as a Kubernetes
projected service account token), and keeps the identity and credential in
-SAM_STATE_DIR; later runs resume from there without it.
+AGENTMESH_STATE_DIR; later runs resume from there without it.
"""
import os
@@ -28,12 +28,12 @@ peer_id = sys.argv[1]
text = sys.argv[2] if len(sys.argv) > 2 else "hello"
mesh = AgentMesh.enroll(
- os.environ.get("SAM_CONTROL_PLANE_URL", "https://mesh.example.com"),
- bootstrap_token_path=os.environ.get("SAM_BOOTSTRAP_TOKEN_PATH"),
- jwt_path=os.environ.get("SAM_JWT_PATH"),
- state_dir=os.environ.get("SAM_STATE_DIR", "~/.config/sam-mesh/a2a-caller"),
+ os.environ.get("AGENTMESH_CONTROL_PLANE_URL", "https://mesh.example.com"),
+ bootstrap_token_path=os.environ.get("AGENTMESH_BOOTSTRAP_TOKEN_PATH"),
+ jwt_path=os.environ.get("AGENTMESH_JWT_PATH"),
+ state_dir=os.environ.get("AGENTMESH_STATE_DIR", "~/.config/agentmesh/a2a-caller"),
# A plaintext http:// control plane is otherwise accepted only on loopback.
- allow_insecure=os.environ.get("SAM_INSECURE_CONTROL_PLANE") == "true",
+ allow_insecure=os.environ.get("AGENTMESH_INSECURE_CONTROL_PLANE") == "true",
)
diff --git a/sdk/python/examples/agent.py b/sdk/python/examples/agent.py
index 86677d88..9cc1f444 100644
--- a/sdk/python/examples/agent.py
+++ b/sdk/python/examples/agent.py
@@ -7,11 +7,11 @@ before anything reaches this code.
python agent.py # answered by the handler below
python agent.py http://127.0.0.1:9999 # forwarded to an A2A server beside it
-SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or SAM_JWT_PATH
+AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or AGENTMESH_JWT_PATH
(a workload identity token your platform issues, such as a Kubernetes
projected service account token), and keeps the identity and credential in
-SAM_STATE_DIR; later runs resume from there, as the same peer, without it.
+AGENTMESH_STATE_DIR; later runs resume from there, as the same peer, without it.
"""
import json
@@ -24,12 +24,12 @@ from agent_mesh import AgentMesh, HTTPRequest, HTTPResponse, VerifiedBiscuit
backend_url = sys.argv[1] if len(sys.argv) > 1 else None
mesh = AgentMesh.enroll(
- os.environ.get("SAM_CONTROL_PLANE_URL", "https://mesh.example.com"),
- bootstrap_token_path=os.environ.get("SAM_BOOTSTRAP_TOKEN_PATH"),
- jwt_path=os.environ.get("SAM_JWT_PATH"),
- state_dir=os.environ.get("SAM_STATE_DIR", "~/.config/sam-mesh/agent"),
+ os.environ.get("AGENTMESH_CONTROL_PLANE_URL", "https://mesh.example.com"),
+ bootstrap_token_path=os.environ.get("AGENTMESH_BOOTSTRAP_TOKEN_PATH"),
+ jwt_path=os.environ.get("AGENTMESH_JWT_PATH"),
+ state_dir=os.environ.get("AGENTMESH_STATE_DIR", "~/.config/agentmesh/agent"),
# A plaintext http:// control plane is otherwise accepted only on loopback.
- allow_insecure=os.environ.get("SAM_INSECURE_CONTROL_PLANE") == "true",
+ allow_insecure=os.environ.get("AGENTMESH_INSECURE_CONTROL_PLANE") == "true",
)
diff --git a/sdk/python/examples/call.py b/sdk/python/examples/call.py
index 415132b5..61d0bc8f 100644
--- a/sdk/python/examples/call.py
+++ b/sdk/python/examples/call.py
@@ -6,11 +6,11 @@ published nothing, reached by its peer ID.
python call.py inference://ollama /v1/models
python call.py 12D3KooW... a2a://agent /card
-SAM_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
-SAM_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or SAM_JWT_PATH
+AGENTMESH_CONTROL_PLANE_URL names the mesh. The first run enrolls with the file
+AGENTMESH_BOOTSTRAP_TOKEN_PATH (a token the mesh operator gave you) or AGENTMESH_JWT_PATH
(a workload identity token your platform issues, such as a Kubernetes
projected service account token), and keeps the identity and credential in
-SAM_STATE_DIR; later runs resume from there without it.
+AGENTMESH_STATE_DIR; later runs resume from there without it.
"""
import json
@@ -30,12 +30,12 @@ tool_or_path = argv[1] if len(argv) > 1 else ("/card" if peer_id else "echo")
args = json.loads(argv[2]) if len(argv) > 2 else {"message": "hi"}
mesh = AgentMesh.enroll(
- os.environ.get("SAM_CONTROL_PLANE_URL", "https://mesh.example.com"),
- bootstrap_token_path=os.environ.get("SAM_BOOTSTRAP_TOKEN_PATH"),
- jwt_path=os.environ.get("SAM_JWT_PATH"),
- state_dir=os.environ.get("SAM_STATE_DIR", "~/.config/sam-mesh/caller"),
+ os.environ.get("AGENTMESH_CONTROL_PLANE_URL", "https://mesh.example.com"),
+ bootstrap_token_path=os.environ.get("AGENTMESH_BOOTSTRAP_TOKEN_PATH"),
+ jwt_path=os.environ.get("AGENTMESH_JWT_PATH"),
+ state_dir=os.environ.get("AGENTMESH_STATE_DIR", "~/.config/agentmesh/caller"),
# A plaintext http:// control plane is otherwise accepted only on loopback.
- allow_insecure=os.environ.get("SAM_INSECURE_CONTROL_PLANE") == "true",
+ allow_insecure=os.environ.get("AGENTMESH_INSECURE_CONTROL_PLANE") == "true",
)
diff --git a/sdk/python/src/agent_mesh/conformance.py b/sdk/python/src/agent_mesh/conformance.py
index a695a05f..be2972be 100644
--- a/sdk/python/src/agent_mesh/conformance.py
+++ b/sdk/python/src/agent_mesh/conformance.py
@@ -18,10 +18,10 @@ holds as JSON on stdout for the Go side to verify. The JavaScript SDK ships the
same runner (dist/conformance.js) with the same environment and output, so one
Go test checks both.
- SAM_CONTROL_PLANE_URL base URL of the control plane
- SAM_BOOTSTRAP_TOKEN_PATH file holding a bootstrap token
- SAM_SDK_STATE_DIR directory for identity and credential
- SAM_INSECURE_CONTROL_PLANE "1" to accept plaintext http:// off loopback
+ AGENTMESH_CONTROL_PLANE_URL base URL of the control plane
+ AGENTMESH_BOOTSTRAP_TOKEN_PATH file holding a bootstrap token
+ AGENTMESH_SDK_STATE_DIR directory for identity and credential
+ AGENTMESH_INSECURE_CONTROL_PLANE "1" to accept plaintext http:// off loopback
"""
import base64
@@ -40,10 +40,10 @@ def _require_env(name: str) -> str:
def main() -> None:
- control_plane_url = _require_env("SAM_CONTROL_PLANE_URL")
- bootstrap_token_path = _require_env("SAM_BOOTSTRAP_TOKEN_PATH")
- state_dir = _require_env("SAM_SDK_STATE_DIR")
- allow_insecure = os.environ.get("SAM_INSECURE_CONTROL_PLANE") == "1"
+ control_plane_url = _require_env("AGENTMESH_CONTROL_PLANE_URL")
+ bootstrap_token_path = _require_env("AGENTMESH_BOOTSTRAP_TOKEN_PATH")
+ state_dir = _require_env("AGENTMESH_SDK_STATE_DIR")
+ allow_insecure = os.environ.get("AGENTMESH_INSECURE_CONTROL_PLANE") == "1"
mesh = AgentMesh.enroll(
control_plane_url,
diff --git a/sdk/python/src/agent_mesh/conformance_join.py b/sdk/python/src/agent_mesh/conformance_join.py
index 8e11f03e..1c39f7b9 100644
--- a/sdk/python/src/agent_mesh/conformance_join.py
+++ b/sdk/python/src/agent_mesh/conformance_join.py
@@ -171,25 +171,25 @@ async def _handle(session: MeshSession, command: dict) -> dict:
async def main() -> None:
# stdout carries the protocol lines only; every log goes to stderr.
logging.basicConfig(stream=sys.stderr, level=logging.WARNING, force=True)
- control_plane_url = _require_env("SAM_CONTROL_PLANE_URL")
+ control_plane_url = _require_env("AGENTMESH_CONTROL_PLANE_URL")
# Enrollment is with a bootstrap token or a platform JWT, as the examples
# offer; a JWT file is read again at every refresh.
- bootstrap_token_path = os.environ.get("SAM_BOOTSTRAP_TOKEN_PATH")
- jwt_path = os.environ.get("SAM_JWT_PATH")
+ bootstrap_token_path = os.environ.get("AGENTMESH_BOOTSTRAP_TOKEN_PATH")
+ jwt_path = os.environ.get("AGENTMESH_JWT_PATH")
if (bootstrap_token_path is None) == (jwt_path is None):
- raise RuntimeError("exactly one of SAM_BOOTSTRAP_TOKEN_PATH or SAM_JWT_PATH is required")
- state_dir = _require_env("SAM_SDK_STATE_DIR")
- allow_insecure = os.environ.get("SAM_INSECURE_CONTROL_PLANE") == "1"
- listen = [a for a in os.environ.get("SAM_SDK_LISTEN_ADDRS", "").split(",") if a]
+ raise RuntimeError("exactly one of AGENTMESH_BOOTSTRAP_TOKEN_PATH or AGENTMESH_JWT_PATH is required")
+ state_dir = _require_env("AGENTMESH_SDK_STATE_DIR")
+ allow_insecure = os.environ.get("AGENTMESH_INSECURE_CONTROL_PLANE") == "1"
+ listen = [a for a in os.environ.get("AGENTMESH_SDK_LISTEN_ADDRS", "").split(",") if a]
# Labels this member declares at enrollment; the policy's allowed_labels
- # decide whether the control plane attests them. SAM_SDK_EGRESS_REQUIRE_LABELS
+ # decide whether the control plane attests them. AGENTMESH_SDK_EGRESS_REQUIRE_LABELS
# is the floor every provider this member calls must attest.
- labels = _labels_from_env("SAM_SDK_LABELS")
- egress_require_labels = _labels_from_env("SAM_SDK_EGRESS_REQUIRE_LABELS")
- # SAM_SDK_RELAY_CHECK_SECONDS shortens how often the relay reservation is
+ labels = _labels_from_env("AGENTMESH_SDK_LABELS")
+ egress_require_labels = _labels_from_env("AGENTMESH_SDK_EGRESS_REQUIRE_LABELS")
+ # AGENTMESH_SDK_RELAY_CHECK_SECONDS shortens how often the relay reservation is
# checked and how soon a failed renewal is retried, so a test that moves
# a router sees the member follow it within its budget.
- relay_check = os.environ.get("SAM_SDK_RELAY_CHECK_SECONDS")
+ relay_check = os.environ.get("AGENTMESH_SDK_RELAY_CHECK_SECONDS")
relay_options = {"reservation_check_interval": float(relay_check), "refresh_retry": float(relay_check)} if relay_check else {}
mesh = AgentMesh.enroll(
@@ -202,9 +202,9 @@ async def main() -> None:
poll_interval=0.2,
)
# The test drives every pull itself; only gossip events bring one forward.
- # SAM_SDK_ROUTERS, peer IDs, joins through those routers only, so the test
+ # AGENTMESH_SDK_ROUTERS, peer IDs, joins through those routers only, so the test
# can put two members on different routers.
- only = {p for p in os.environ.get("SAM_SDK_ROUTERS", "").split(",") if p}
+ only = {p for p in os.environ.get("AGENTMESH_SDK_ROUTERS", "").split(",") if p}
router_addresses = [a for a in mesh.credential.router_addresses if any(a.endswith(f"/p2p/{p}") for p in only)] if only else None
async with mesh.join(
listen_addrs=listen,
diff --git a/sdk/testdata/tar_conformance.json b/sdk/testdata/tar_conformance.json
index c76aabff..a9eb87de 100644
--- a/sdk/testdata/tar_conformance.json
+++ b/sdk/testdata/tar_conformance.json
@@ -1,15 +1,15 @@
{
"_comment": "Generated by hack/gen-sdk-datalog; do not edit.",
- "public_key_b64": "+eAauv9zlp6c0Zk/mGWThohZehix71wGRsVqKsGc97E=",
- "caller_peer_id": "12D3KooWAGBDFVmdHUoxDqPNPNMA8AaTQdXAGgQJ3LaLqqFwUqDC",
- "provider_peer_id": "12D3KooWMXqcZXCVk78nHcs4bLjXdCZDVp9EPaZCqkLyQLMtPjMX",
- "provider_biscuit_b64": "EoICCpcBCjQxMkQzS29vV01YcWNaWENWazc4bkhjczRiTGpYZENaRFZwOUVQYVpDcWtMeVFMTXRQak1YCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCBIkCAASIJ8wQ/3bG3ds0YRL/vn5FBt0rrp2x1HDLMcltS2o4FaHGkCk3kta588AjI5b9sq8vh6Dfs1FKl60ms+sXn3tDM4E3lQFN+iRVNfdMMD8SgReVJXJxIxbUMHMGIlYK/iOZHEFIiIKIE+GWa0Gs7JAjzyexwl3Bwwq7FZPSPV4hTcor8bXafWF",
+ "public_key_b64": "rPSEaipRdhrQTCHgQAJt9jj8bWLocgoS54HeSjZWiyE=",
+ "caller_peer_id": "12D3KooWM3iX1bUjQ6WjnL87wVvGwz6v4MWA3gqgZYDCszT7GYGs",
+ "provider_peer_id": "12D3KooWEBhwEmAqYmLgpu4RRBZcS58dws6aM2iUmmegnTgr7y4E",
+ "provider_biscuit_b64": "EoICCpcBCjQxMkQzS29vV0VCaHdFbUFxWW1MZ3B1NFJSQlpjUzU4ZHdzNmFNMmlVbW1lZ25UZ3I3eTRFCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCBIkCAASIJ8wQ/3bG3ds0YRL/vn5FBt0rrp2x1HDLMcltS2o4FaHGkBOP3z73qe1jMsV/Lk3dSBcDGTXYk4JiIMOTa0rP7MTebQsD3D3j4rB7ijdU8/XvOcx03ltObox1y6Ske6WgWYLIiIKIE+GWa0Gs7JAjzyexwl3Bwwq7FZPSPV4hTcor8bXafWF",
"evaluation_time": "2026-10-03T12:00:00Z",
"policy_datalog_rules": [],
"vectors": [
{
"name": "authority_only_allowed",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BCIiCiBI9/IYuiQe4ZFPIQiGeGsASop1+WnilHxttgej0dEs2Q==",
+ "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV00zaVgxYlVqUTZXam5MODd3VnZHd3o2djRNV0EzZ3FnWllEQ3N6VDdHWUdzCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpATceRioCiQ11uq6x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x5OWhjR2t1WjJsMGFIVmlMbU52YlJvYUVnTkhSVlFTQkZCUFUxUWFEUzl5WlhCdmN5OWhZMjFsTHlvYUx3b1hSMlZ0YVc1cElHbHVabVZ5Wlc1alpTQndjbVZtYVhnU0ZHbHVabVZ5Wlc1alpUb3ZMMmRsYldsdWFTNHFJZ1lJZ0pXa3lRYwoJdGFyX2Jsb2NrEgAYAyIKCggIhwgSAxiGCBIkCAASIBQXNY6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKIiIKINv2oB2wODCIU391vjtbkJp3aAPx8Ix6LD9a+MkNfycb",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_forecast",
@@ -27,7 +27,7 @@
},
{
"name": "one_hop_mcp_denied_tool",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBroAwr9AgrfAkNoQnZjbU5vWlhOMGNtRjBiM0l0YUc5d0VoZFBjbU5vWlhOMGNtRjBiM0lnVkdGemF5QlRZMjl3WlJvX0NoRlhaV0YwYUdWeUlFMURVQ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WlhOMGNtRjBiM0l0YUc5d0VoZFBjbU5vWlhOMGNtRjBiM0lnVkdGemF5QlRZMjl3WlJvX0NoRlhaV0YwYUdWeUlFMURVQ0IwYjI5c2N4SU5iV053T2k4dmQyVmhkR2hsY2hvYkNndG5aWFJmZDJWaGRHaGxjZ29NWjJWMFgyWnZjbVZqWVhOMEdtQUtLVWRwZEVoMVlpQkJVRWtnY21WaFpDOTNjbWwwWlNCMWJtUmxjaUF2Y21Wd2IzTXZZV050WlM4cUVoZGxaM0psYzNNNkx5OWhjR2t1WjJsMGFIVmlMbU52YlJvYUVnTkhSVlFTQkZCUFUxUWFEUzl5WlhCdmN5OWhZMjFsTHlvYUx3b1hSMlZ0YVc1cElHbHVabVZ5Wlc1alpTQndjbVZtYVhnU0ZHbHVabVZ5Wlc1alpUb3ZMMmRsYldsdWFTNHFJZ1lJZ0pXa3lRYwoJdGFyX2Jsb2NrEgAYAyIKCggIhwgSAxiGCBIkCAASIBQXNY6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKIiIKINv2oB2wODCIU391vjtbkJp3aAPx8Ix6LD9a+MkNfycb",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "drop_table",
@@ -35,7 +35,7 @@
},
{
"name": "one_hop_mcp_missing_tool_denied_on_http",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAY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MKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpATceRioCiQ11uq6xI0Fdhp8xR0xQPkm4BjGqT9lFdcR95a9Yc/9hfxG2ES3T9/Sv2TOv1HlkaILyRWrBasEnPDxroAwr9AgrfAkNoQnZjbU5vWlhOMGNtRjBiM0l0YUc5d0VoZFBjbU5vWlhOMGNtRjBiM0lnVkdGemF5QlRZMjl3WlJvX0NoRlhaV0YwYUdWeUlFMURVQ0IwYjI5c2N4SU5iV053T2k4dmQyVmhkR2hsY2hvYkNndG5aWFJmZDJWaGRHaGxjZ29NWjJWMFgyWnZjbVZqWVhOMEdtQUtLVWRwZEVoMVlpQkJVRWtnY21WaFpDOTNjbWwwWlNCMWJtUmxjaUF2Y21Wd2IzTXZZV050WlM4cUVoZGxaM0psYzNNNkx5OWhjR2t1WjJsMGFIVmlMbU52YlJvYUVnTkhSVlFTQkZCUFUxUWFEUzl5WlhCdmN5OWhZMjFsTHlvYUx3b1hSMlZ0YVc1cElHbHVabVZ5Wlc1alpTQndjbVZtYVhnU0ZHbHVabVZ5Wlc1alpUb3ZMMmRsYldsdWFTNHFJZ1lJZ0pXa3lRYwoJdGFyX2Jsb2NrEgAYAyIKCggIhwgSAxiGCBIkCAASIBQXNY6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKIiIKINv2oB2wODCIU391vjtbkJp3aAPx8Ix6LD9a+MkNfycb",
"target_service": "mcp://weather",
"protocol": "/libp2p-http",
"method": "POST",
@@ -44,7 +44,7 @@
},
{
"name": "one_hop_wildcard_prefix_inference_allowed",
- "bi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GCBIkCAASIBQXNY6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKIiIKINv2oB2wODCIU391vjtbkJp3aAPx8Ix6LD9a+MkNfycb",
"target_service": "inference://gemini.pro",
"protocol": "/libp2p-http",
"method": "POST",
@@ -54,7 +54,7 @@
},
{
"name": "one_hop_dot_boundary_inference_denied",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBroAwr9AgrfAkNoQnZjbU5vWlhOMGNtRjBiM0l0YUc5d0VoZFBjbU5vWlhOMGNtRjBiM0lnVkdGemF5QlRZMjl3WlJvX0NoRlhaV0YwYUdWeUlFMURVQ0IwYjI5c2N4SU5iV053T2k4dmQyVmhkR2hsY2hvYkNndG5aWFJmZDJWaGRHaGxjZ29NWjJWMFgyWnZjbVZqWVhOMEdtQUtLVWRwZEVoMVlpQkJVRWtnY21WaFpDOTNjbWwwWlNCMWJtUmxjaUF2Y21Wd2IzTXZZV050WlM4cUVoZGxaM0psYzNNNkx5OWhjR2t1WjJsMGFIVmlMbU52YlJvYUVnTkhSVlFTQkZ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MWJtUmxjaUF2Y21Wd2IzTXZZV050WlM4cUVoZGxaM0psYzNNNkx5OWhjR2t1WjJsMGFIVmlMbU52YlJvYUVnTkhSVlFTQkZCUFUxUWFEUzl5WlhCdmN5OWhZMjFsTHlvYUx3b1hSMlZ0YVc1cElHbHVabVZ5Wlc1alpTQndjbVZtYVhnU0ZHbHVabVZ5Wlc1alpUb3ZMMmRsYldsdWFTNHFJZ1lJZ0pXa3lRYwoJdGFyX2Jsb2NrEgAYAyIKCggIhwgSAxiGCBIkCAASIBQXNY6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKIiIKINv2oB2wODCIU391vjtbkJp3aAPx8Ix6LD9a+MkNfycb",
"target_service": "inference://gemini2.pro",
"protocol": "/libp2p-http",
"method": "POST",
@@ -63,7 +63,7 @@
},
{
"name": "two_hop_intersection_mcp_allowed",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBroAwr9AgrfAkNoQnZjbU5vWlhOMGNtRjBiM0l0YUc5d0VoZFBjbU5vWlhOMGNtRjBiM0lnVkdGem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b9bVDXHXVm1uiXY1notjc4doOJafrIKGrICCscBCrQBQ2d4emRXSmhaMlZ1ZEMxb2IzQVNGMU4xWW1GblpXNTBJRTVoY25KdmQyVmtJRk5qYjNCbEdoNFNEVzFqY0RvdkwzZGxZWFJvWlhJYURRb0xaMlYwWDNkbFlYUm9aWElhTmhJWFpXZHlaWE56T2k4dllYQnBMbWRwZEdoMVlpNWpiMjBhR3hJRFIwVlVHaFF2Y21Wd2IzTXZZV050WlM5d2RXSnNhV012S2lJR0NJQ0J2OFVIEgAYAyIKCggIhwgSAxiICBIkCAASIAvYbmkL5+X0Kk3UbQLhYYL3SxSTIg421jMHEkwObc6MGkBV7tZMJOGG7n+EBbNlqczf6vcArH4LtxYw5GY0GOGdi3VK2HwDL/H/iQcwJBXYZe9NU13S77woFlx6KdKLY8kEIiIKIPR4MzhP2tokhQbAxQDJCNT8xiG54IvWNJHYYeo2Ol/B",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -72,7 +72,7 @@
},
{
"name": "two_hop_intersection_mcp_dropped_tool_denied",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBroAwr9AgrfAkNoQnZjbU5vWlhOM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TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKGrICCscBCrQBQ2d4emRXSmhaMlZ1ZEMxb2IzQVNGMU4xWW1GblpXNTBJRTVoY25KdmQyVmtJRk5qYjNCbEdoNFNEVzFqY0RvdkwzZGxZWFJvWlhJYURRb0xaMlYwWDNkbFlYUm9aWElhTmhJWFpXZHlaWE56T2k4dllYQnBMbWRwZEdoMVlpNWpiMjBhR3hJRFIwVlVHaFF2Y21Wd2IzTXZZV050WlM5d2RXSnNhV012S2lJR0NJQ0J2OFVIEgAYAyIKCggIhwgSAxiICBIkCAASIAvYbmkL5+X0Kk3UbQLhYYL3SxSTIg421jMHEkwObc6MGkBV7tZMJOGG7n+EBbNlqczf6vcArH4LtxYw5GY0GOGdi3VK2HwDL/H/iQcwJBXYZe9NU13S77woFlx6KdKLY8kEIiIKIPR4MzhP2tokhQbAxQDJCNT8xiG54IvWNJHYYeo2Ol/B",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_forecast",
@@ -80,7 +80,7 @@
},
{
"name": "two_hop_intersection_http_allowed",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfy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6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKGrICCscBCrQBQ2d4emRXSmhaMlZ1ZEMxb2IzQVNGMU4xWW1GblpXNTBJRTVoY25KdmQyVmtJRk5qYjNCbEdoNFNEVzFqY0RvdkwzZGxZWFJvWlhJYURRb0xaMlYwWDNkbFlYUm9aWElhTmhJWFpXZHlaWE56T2k4dllYQnBMbWRwZEdoMVlpNWpiMjBhR3hJRFIwVlVHaFF2Y21Wd2IzTXZZV050WlM5d2RXSnNhV012S2lJR0NJQ0J2OFVIEgAYAyIKCggIhwgSAxiICBIkCAASIAvYbmkL5+X0Kk3UbQLhYYL3SxSTIg421jMHEkwObc6MGkBV7tZMJOGG7n+EBbNlqczf6vcArH4LtxYw5GY0GOGdi3VK2HwDL/H/iQcwJBXYZe9NU13S77woFlx6KdKLY8kEIiIKIPR4MzhP2tokhQbAxQDJCNT8xiG54IvWNJHYYeo2Ol/B",
"target_service": "egress://api.github.com",
"protocol": "/libp2p-http",
"method": "GET",
@@ -90,7 +90,7 @@
},
{
"name": "two_hop_intersection_http_dropped_method_denied",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEP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rEgAYAyIKCggIhwgSAxiGCBIkCAASIBQXNY6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKGrICCscBCrQBQ2d4emRXSmhaMlZ1ZEMxb2IzQVNGMU4xWW1GblpXNTBJRTVoY25KdmQyVmtJRk5qYjNCbEdoNFNEVzFqY0RvdkwzZGxZWFJvWlhJYURRb0xaMlYwWDNkbFlYUm9aWElhTmhJWFpXZHlaWE56T2k4dllYQnBMbWRwZEdoMVlpNWpiMjBhR3hJRFIwVlVHaFF2Y21Wd2IzTXZZV050WlM5d2RXSnNhV012S2lJR0NJQ0J2OFVIEgAYAyIKCggIhwgSAxiICBIkCAASIAvYbmkL5+X0Kk3UbQLhYYL3SxSTIg421jMHEkwObc6MGkBV7tZMJOGG7n+EBbNlqczf6vcArH4LtxYw5GY0GOGdi3VK2HwDL/H/iQcwJBXYZe9NU13S77woFlx6KdKLY8kEIiIKIPR4MzhP2tokhQbAxQDJCNT8xiG54IvWNJHYYeo2Ol/B",
"target_service": "egress://api.github.com",
"protocol": "/libp2p-http",
"method": "POST",
@@ -99,7 +99,7 @@
},
{
"name": "two_hop_intersection_http_dropped_path_denied",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJR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HFJZ1lJZ0pXa3lRYwoJdGFyX2Jsb2NrEgAYAyIKCggIhwgSAxiGCBIkCAASIBQXNY6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKGrICCscBCrQBQ2d4emRXSmhaMlZ1ZEMxb2IzQVNGMU4xWW1GblpXNTBJRTVoY25KdmQyVmtJRk5qYjNCbEdoNFNEVzFqY0RvdkwzZGxZWFJvWlhJYURRb0xaMlYwWDNkbFlYUm9aWElhTmhJWFpXZHlaWE56T2k4dllYQnBMbWRwZEdoMVlpNWpiMjBhR3hJRFIwVlVHaFF2Y21Wd2IzTXZZV050WlM5d2RXSnNhV012S2lJR0NJQ0J2OFVIEgAYAyIKCggIhwgSAxiICBIkCAASIAvYbmkL5+X0Kk3UbQLhYYL3SxSTIg421jMHEkwObc6MGkBV7tZMJOGG7n+EBbNlqczf6vcArH4LtxYw5GY0GOGdi3VK2HwDL/H/iQcwJBXYZe9NU13S77woFlx6KdKLY8kEIiIKIPR4MzhP2tokhQbAxQDJCNT8xiG54IvWNJHYYeo2Ol/B",
"target_service": "egress://api.github.com",
"protocol": "/libp2p-http",
"method": "GET",
@@ -108,7 +108,7 @@
},
{
"name": "two_hop_intersection_connect_tunnel_denied",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw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bHVabVZ5Wlc1alpUb3ZMMmRsYldsdWFTNHFJZ1lJZ0pXa3lRYwoJdGFyX2Jsb2NrEgAYAyIKCggIhwgSAxiGCBIkCAASIBQXNY6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKGrICCscBCrQBQ2d4emRXSmhaMlZ1ZEMxb2IzQVNGMU4xWW1GblpXNTBJRTVoY25KdmQyVmtJRk5qYjNCbEdoNFNEVzFqY0RvdkwzZGxZWFJvWlhJYURRb0xaMlYwWDNkbFlYUm9aWElhTmhJWFpXZHlaWE56T2k4dllYQnBMbWRwZEdoMVlpNWpiMjBhR3hJRFIwVlVHaFF2Y21Wd2IzTXZZV050WlM5d2RXSnNhV012S2lJR0NJQ0J2OFVIEgAYAyIKCggIhwgSAxiICBIkCAASIAvYbmkL5+X0Kk3UbQLhYYL3SxSTIg421jMHEkwObc6MGkBV7tZMJOGG7n+EBbNlqczf6vcArH4LtxYw5GY0GOGdi3VK2HwDL/H/iQcwJBXYZe9NU13S77woFlx6KdKLY8kEIiIKIPR4MzhP2tokhQbAxQDJCNT8xiG54IvWNJHYYeo2Ol/B",
"target_service": "egress://api.github.com",
"protocol": "/libp2p-http",
"method": "CONNECT",
@@ -116,7 +116,7 @@
},
{
"name": "sealed_two_hop_allowed",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABI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CdmN5OWhZMjFsTHlvYUx3b1hSMlZ0YVc1cElHbHVabVZ5Wlc1alpTQndjbVZtYVhnU0ZHbHVabVZ5Wlc1alpUb3ZMMmRsYldsdWFTNHFJZ1lJZ0pXa3lRYwoJdGFyX2Jsb2NrEgAYAyIKCggIhwgSAxiGCBIkCAASIBQXNY6G0bWAeVzUrbFoBLMim4WnejmqrgspvM6xRMkzGkBBz27TQK695YVjyYRMpY5s9yiLx9Ww9yT/3lX1qdNgtaDz19xbhBlvKb9bVDXHXVm1uiXY1notjc4doOJafrIKGrICCscBCrQBQ2d4emRXSmhaMlZ1ZEMxb2IzQVNGMU4xWW1GblpXNTBJRTVoY25KdmQyVmtJRk5qYjNCbEdoNFNEVzFqY0RvdkwzZGxZWFJvWlhJYURRb0xaMlYwWDNkbFlYUm9aWElhTmhJWFpXZHlaWE56T2k4dllYQnBMbWRwZEdoMVlpNWpiMjBhR3hJRFIwVlVHaFF2Y21Wd2IzTXZZV050WlM5d2RXSnNhV012S2lJR0NJQ0J2OFVIEgAYAyIKCggIhwgSAxiICBIkCAASIAvYbmkL5+X0Kk3UbQLhYYL3SxSTIg421jMHEkwObc6MGkBV7tZMJOGG7n+EBbNlqczf6vcArH4LtxYw5GY0GOGdi3VK2HwDL/H/iQcwJBXYZe9NU13S77woFlx6KdKLY8kEIkISQA1VOKjFLTnj1d3v+8bAq8li57PNHyqzn55zdsSOGa237yCEKbkgeGp+ohyL9Ez5ZYT6/yWPL/I8BZBmfVPYow0=",
"target_service": "egress://api.github.com",
"protocol": "/libp2p-http",
"method": "GET",
@@ -126,7 +126,7 @@
},
{
"name": "expired_tar_block_rejected",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3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rEgAYAyIKCggIhwgSAxiGCBIkCAASIDmqDO8qXj37jBrfsm+c2BfwVdi8Ie02mE/SwR/2MT3oGkBh42OWB5YAYX4iYITB/DwRLOJ8TEtoh3gU46dZS8KYNb2O5vqT9VF5KpH98gN7smErZXwxVcqVzTwYCgusPlEEIiIKIAnlUp7TxNVuI+/63/4wm77I/9jW4aVVYlB+ESUcVtZh",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -134,7 +134,7 @@
},
{
"name": "empty_rules_tar_denied",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBqZAQovChJDZ3RsYlhCMGVTMXlkV3hsY3cKCXRhcl9ibG9jaxIAGAMiCgoICIcIEgMYhggSJAgAEiBbbMLEihgDAHkaU5hKBJ5fTfV4UWGQbUDGh8vTCTyWsBpAshmLPB3ZHLs1A6OTzbGqIUtOlp+xUnLgnBpoYYfLWplgZRd5/qmZf+Wcz/obyJxJ8aSgTADmI+xf5xQo3meICSIiCiBHvh4yvZeGsn5PNI1h1/wCFnkU0SJJHVTXIah8pT5/Ug==",
+ "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV00zaVgxYlVqUTZXam5MODd3VnZHd3o2djRNV0EzZ3FnWllEQ3N6VDdHWUdzCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpATceRioCiQ11uq6xI0Fdhp8xR0xQPkm4BjGqT9lFdcR95a9Yc/9hfxG2ES3T9/Sv2TOv1HlkaILyRWrBasEnPDxqZAQovChJDZ3RsYlhCMGVTMXlkV3hsY3cKCXRhcl9ibG9jaxIAGAMiCgoICIcIEgMYhggSJAgAEiBbbMLEihgDAHkaU5hKBJ5fTfV4UWGQbUDGh8vTCTyWsBpAshmLPB3ZHLs1A6OTzbGqIUtOlp+xUnLgnBpoYYfLWplgZRd5/qmZf+Wcz/obyJxJ8aSgTADmI+xf5xQo3meICSIiCiBHvh4yvZeGsn5PNI1h1/wCFnkU0SJJHVTXIah8pT5/Ug==",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -142,7 +142,7 @@
},
{
"name": "nine_blocks_rejected",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAE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EiAwKGr0DbBACVBC8/l9oZY/VI+JOdn4VYmOqj7vBaSqIhpAvXuxSG0/kbBhz6E9WTIxGvSEUkK0jJwqvWgQin9pku1eO6ta2eZqLTZ/wx387T1cKyhqcYtira922YfZeTXHDhp6ChASABgDIgoKCAiHCBIDGIYIEiQIABIgOEVjzCHRGTfbpE/5N9OSFkET1WK/oy5U2aHt3IsEFH4aQJJ3eXJlpczzcU49oXfx/ogG5UGwzjpkQW4fRcc/Jzu6FqwOOnrk1uQoVZlG6EY4ekv6/mvXy2pTqupbWR46UwIiIgogfi0tYNTtpZFazXp+fktESOD23GVeYbjJLfFAi8RR0Po=",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -150,7 +150,7 @@
},
{
"name": "block_with_rule_rejected",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBqEBAqZAwrfAkNoQnZjbU5vWlhOMGNtRjBiM0l0YUc5d0VoZFBjbU5vWlhOMGNtRjBiM0lnVkdGemF5QlRZMjl3WlJvX0NoRlhaV0YwYUdWeUlFMURVQ0IwYjI5c2N4SU5iV053T2k4dmQyVmhkR2hsY2hvYkNndG5aWFJmZDJWaGRHaGxjZ29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c5d0VoZFBjbU5vWlhOMGNtRjBiM0lnVkdGemF5QlRZMjl3WlJvX0NoRlhaV0YwYUdWeUlFMURVQ0IwYjI5c2N4SU5iV053T2k4dmQyVmhkR2hsY2hvYkNndG5aWFJmZDJWaGRHaGxjZ29NWjJWMFgyWnZjbVZqWVhOMEdtQUtLVWRwZEVoMVlpQkJVRWtnY21WaFpDOTNjbWwwWlNCMWJtUmxjaUF2Y21Wd2IzTXZZV050WlM4cUVoZGxaM0psYzNNNkx5OWhjR2t1WjJsMGFIVmlMbU52YlJvYUVnTkhSVlFTQkZCUFUxUWFEUzl5WlhCdmN5OWhZMjFsTHlvYUx3b1hSMlZ0YVc1cElHbHVabVZ5Wlc1alpTQndjbVZtYVhnU0ZHbHVabVZ5Wlc1alpUb3ZMMmRsYldsdWFTNHFJZ1lJZ0pXa3lRYwoJdGFyX2Jsb2NrCgFhCgF4EgAYAyIKCggIhwgSAxiGCCoUCggIiQgSAwiICBIICIcIEgMIiAgSJAgAEiC241UBz8Oqmg+XK2B3QUYoX/B8oMCRK2t9DskATxUMqxpAvxMo/oaU8ovOVXMR6eOZe18bRiOrIO/KFSPGFRVVwNQF8haDRFNuxu9BEJuGzXJb6vt9LIt/t7LsG4dXieETDyIiCiCCovzsWKG57vNX+1Ib3vyQ94Yh1J7OR/ECPS4jYmuc7w==",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -158,7 +158,7 @@
},
{
"name": "block_with_check_rejected",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgY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5Wlc1alpTQndjbVZtYVhnU0ZHbHVabVZ5Wlc1alpUb3ZMMmRsYldsdWFTNHFJZ1lJZ0pXa3lRYwoJdGFyX2Jsb2NrCgVleHRyYRIAGAMiCgoICIcIEgMYhggiCgoICIcIEgMYiAgSJAgAEiBpBvS/Atpc3S2vWBsxDvTbzJtLOyeMPwl8T34DCJl3uxpALzKAps28UEYiELcwmzPoTpkkF3qIWTV0ThWmlbUqfMVIKzJBqcJug/49rqfwO93fU1YuHZmVC2ACzw2EXu/5CSIiCiAS5Aqs+9XTl08fO1Z380wIe7GXH/eEfiD6R2zRYKntEA==",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -174,7 +174,7 @@
},
{
"name": "block_with_wrong_predicate_rejected",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBqvAQpFCjQxMkQzS29vV01YcWNaWENWazc4bkhjczRiTGpYZENaRFZwOUVQYVpDcWtMeVFMTXRQak1YEgAYAyIJCgcIGBIDGIYIEiQIABIgCAb+IXecKnPE3tk/Pjl2etJ3IyZdkyUgn/AIhxkIzeIaQO3eHEjFbaMosjdmlb2DSV3uSaM0ENe5idFx0qODjAgZr2EmUxdgNsajM01PRYHnltYsYBgKD7LrF/G5YSgq1AgiIgog4uoVKX2jAj+Cg4TRkSu5RVtpP5CKfvXTQM1GX1GnU9c=",
+ "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV00zaVgxYlVqUTZXam5MODd3VnZHd3o2djRNV0EzZ3FnWllEQ3N6VDdHWUdzCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpATceRioCiQ11uq6xI0Fdhp8xR0xQPkm4BjGqT9lFdcR95a9Yc/9hfxG2ES3T9/Sv2TOv1HlkaILyRWrBasEnPDxqvAQpFCjQxMkQzS29vV0VCaHdFbUFxWW1MZ3B1NFJSQlpjUzU4ZHdzNmFNMmlVbW1lZ25UZ3I3eTRFEgAYAyIJCgcIGBIDGIYIEiQIABIgCAb+IXecKnPE3tk/Pjl2etJ3IyZdkyUgn/AIhxkIzeIaQBE4hfoQn3Azfvro/UvTj1s1kkrEwicvPvcGn72t5EQW+WIEge3dYZwTGqGQ0FusHuVLttmP4pGIl3LT3DHpLw8iIgog4uoVKX2jAj+Cg4TRkSu5RVtpP5CKfvXTQM1GX1GnU9c=",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -182,7 +182,7 @@
},
{
"name": "block_with_bytes_term_rejected",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVz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+q+bighDy35Q6IAEUA9f2uchpAaj5BfYaybLIKiN6zazy7GIp4ung5Cco77ZvJFFWoBbm1mDwHlpbKlej9JqgSuylgJbYSnF0FXTZmdzKFgao7DCIiCiDMlwwL1ipr6UGSI1bOT0AIWwI8C7KaOohZNkUjginfKQ==",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -190,7 +190,7 @@
},
{
"name": "block_with_unknown_proto_field_rejected",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBrsAwqBAwrjAkNoQnZjbU5vWlhOMGNtRjBiM0l0YUc5d0VoZFBjbU5vWlhOMGNtRjBiM0lnVkdGemF5QlRZMjl3WlJvX0NoRlhaV0YwYUdWeUlFMURVQ0IwYjI5c2N4SU5iV053T2k4dmQyVmhkR2hsY2hvYkNndG5aWFJmZDJWaGRHaGxjZ29NWjJWMFgyWnZjbVZqWVhOMEdtQUtLVWRwZEVoMVlpQkJVRWtnY21WaFpDOTNjbWwwWlNCMWJtUmxjaUF2Y21Wd2IzTXZZV050WlM4cUVoZGxaM0psYzNNNkx5OWhjR2t1WjJsMGFIVmlMbU52YlJvYUVnTkhSVlFTQkZCUFUxUWFEUzl5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JtUmxjaUF2Y21Wd2IzTXZZV050WlM4cUVoZGxaM0psYzNNNkx5OWhjR2t1WjJsMGFIVmlMbU52YlJvYUVnTkhSVlFTQkZCUFUxUWFEUzl5WlhCdmN5OWhZMjFsTHlvYUx3b1hSMlZ0YVc1cElHbHVabVZ5Wlc1alpTQndjbVZtYVhnU0ZHbHVabVZ5Wlc1alpUb3ZMMmRsYldsdWFTNHFJZ1lJZ0pXa3lRZVlCZ0UKCXRhcl9ibG9jaxIAGAMiCgoICIcIEgMYhggSJAgAEiBBIRTvKmmJ5rNJe6EPNeWg9kGY5WYauVYNqrc9CREuABpAlaATXoQPY1/oM+9+eTW7MaczdApHsB/4OAMuAlZHW3ye1yk6tky3sdu6tb0w9RyiKRMtjBcxlMIzV5k9XBYaCSIiCiBstsVc0rbPKHGOyaua2i404dF4YzkR2AAFt27r/eqNXw==",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -198,7 +198,7 @@
},
{
"name": "delegated_token_no_node_fact_allowed",
- "biscuit_b64": "EoMDCpgCCgpleHBpcmF0aW9uCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCgphY3Rvcl9ub2RlCg5jbGllbnRfcGVlcl9pZAoRYWxpY2VAZXhhbXBsZS5jb20KBWFsaWNlCgdhbmFseXN0ChlncmFudGVkX3NlcnZpY2VfYWxsX3R5cGVzChhncmFudGVkX3RhcmdldF9hbGxfZmFjdHMSABgDIg0KCwiACBIGIIDXjNIHIgoKCAiCCBIDGIEIIgoKCAiDCBIDGIEIIgkKBwgOEgMYhAgiCQoHCAoSAxiFCCIJCgcIBhIDGIYIIgkKBwiHCBICMAEiCQoHCIgIEgIwARIkCAASILbMbqLs7S/MNUxxdSQyxdy0fmV7eikjJdOF/vP9vqUMGkDV9r4B5SgKQepmB0ZNKUBFf1eupQV6j2ZUbJZhpIyyc8sGMhkrQzrKjhaAeAu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WUVNCRkJQVTFRYURTOXlaWEJ2Y3k5aFkyMWxMeW9hTHdvWFIyVnRhVzVwSUdsdVptVnlaVzVqWlNCd2NtVm1hWGdTRkdsdVptVnlaVzVqWlRvdkwyZGxiV2x1YVM0cUlnWUlnSldreVFjCgl0YXJfYmxvY2sSABgDIgoKCAiKCBIDGIkIEiQIABIgjWfu1jbf2FAZ5u7DzJCw++MS8TEJR3kTqMWwR8T8SZcaQHYLptOauiTs8YlbrLtGlI9QlOizbN6osUoPYQG8XtKB5IUkStCssvW/43CzYFSc6PJBTOK9sEY3EAnJR+fyhAUiIgogrTiAvUeC8RC237jw942MXsf/Uk6sW4xDtEuKBr7porw=",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
@@ -215,7 +215,7 @@
},
{
"name": "cloud_broker_resources_and_permissions_allowed_on_wire",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBqpAgq+AQqgAUNoQmpiRzkxWkMxaWNtOXJaWEl0YUc5d0dsd1NHV1ZuY21WemN6b3ZMM016TG1GdFlYcHZibUYzY3k1amIyMGFJeElEUjBWVUdnNHZZV050WlMxaWRXTnJaWFF2S2lJTWN6TTZSMlYwVD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ViN0bJ8TxAgu7wCDFb7yWOkcOecbU80j2EZqIJShZ5gV0PTGLQudIpPQnTdMHEdaCyIiCiDPuMFdxCTzdM6VGFXH7Cda82/CSeTp/KPD0k3MV6jwTw==",
"target_service": "egress://s3.amazonaws.com",
"protocol": "/libp2p-http",
"method": "GET",
@@ -225,7 +225,7 @@
},
{
"name": "empty_allowed_services_in_rule_rejected",
- "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV0FHQkRGVm1kSFVveERxUE5QTk1BOEFhVFFkWEFHZ1FKM0xhTHFxRndVcURDCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpAqWmvzVIQDA16+58k7MYmYju5P1OK+76sguEPgkDYgMQ/iZ/zoA+FYbJEuO/FL5wNRfyeceFE786q07t2H8o6BBrrAQqAAQpjQ2hObGJYQjBlUzF6WlhKMmFXTmxjeTF5ZFd4bEdpc0tLVTFwYzNOcGJtY2dZV3hzYjNkbFpGOXpaWEoyYVdObGN5QnRkWE4wSUdaaGFXd2dZMnh2YzJWa0lnWUlnSldreVFjCgl0YXJfYmxvY2sSABgDIgoKCAiHCBIDGIYIEiQIABIgIwG4TDYvxFlW0z2x/JKXLZW+HdLBpHwjJQshrg5/EPEaQIL3+0UEZBNc5/xCXYSIKcYUiWXbuyWTlI3HGPkdl9zEQEbyT/STqIp7NN610qLRlFyPiN3Kh9ebhFxMJlr/AA8iIgoghP5SbmYzS3Ha3+75tqRxEIdXgHBZzLz6YrPeOpGfa/0=",
+ "biscuit_b64": "EsgCCt0BCjQxMkQzS29vV00zaVgxYlVqUTZXam5MODd3VnZHd3o2djRNV0EzZ3FnWllEQ3N6VDdHWUdzCg5jbGllbnRfcGVlcl9pZAoKZXhwaXJhdGlvbgoObWVzaDpyb2xlOm5vZGUKGWdyYW50ZWRfc2VydmljZV9hbGxfdHlwZXMKE3RhcmdldF91bnJlc3RyaWN0ZWQSABgDIgkKBwgYEgMYgAgiCgoICIEIEgMYgAgiDQoLCIIIEgYggNeM0gciCQoHCAYSAxiDCCIJCgcIhAgSAjABIgkKBwiFCBICMAESJAgAEiBUX43O/Qfw/GwUrGvQvztcbbUkORZ4eRxi4VKg6nIJJRpATceRioCiQ11uq6xI0Fdhp8xR0xQPkm4BjGqT9lFdcR95a9Yc/9hfxG2ES3T9/Sv2TOv1HlkaILyRWrBasEnPDxrrAQqAAQpjQ2hObGJYQjBlUzF6WlhKMmFXTmxjeTF5ZFd4bEdpc0tLVTFwYzNOcGJtY2dZV3hzYjNkbFpGOXpaWEoyYVdObGN5QnRkWE4wSUdaaGFXd2dZMnh2YzJWa0lnWUlnSldreVFjCgl0YXJfYmxvY2sSABgDIgoKCAiHCBIDGIYIEiQIABIgIwG4TDYvxFlW0z2x/JKXLZW+HdLBpHwjJQshrg5/EPEaQIL3+0UEZBNc5/xCXYSIKcYUiWXbuyWTlI3HGPkdl9zEQEbyT/STqIp7NN610qLRlFyPiN3Kh9ebhFxMJlr/AA8iIgoghP5SbmYzS3Ha3+75tqRxEIdXgHBZzLz6YrPeOpGfa/0=",
"target_service": "mcp://weather",
"protocol": "/mesh/mcp/1.0.0",
"mcp_tool": "get_weather",
diff --git a/tests/integration/a2a_test.go b/tests/integration/a2a_test.go
index 076b43e7..a530e204 100644
--- a/tests/integration/a2a_test.go
+++ b/tests/integration/a2a_test.go
@@ -32,7 +32,7 @@ import (
)
// headerRoundTripper stamps fixed headers (mesh auth, labels) on every
-// request so the stock A2A SDK client needs no SAM-specific code.
+// request so the stock A2A SDK client needs no Agent Mesh-specific code.
type headerRoundTripper struct {
headers map[string]string
}
@@ -59,7 +59,7 @@ func meshHTTPClient(token string, extra map[string]string) *http.Client {
// holds a message exchange, and a region-mismatched request is refused
// fail-closed before any payload leaves node B.
func TestA2ACUJ(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
_, hubAddr := startMockRouter(t)
homeA := t.TempDir()
diff --git a/tests/integration/auth_test.go b/tests/integration/auth_test.go
index f6f75d7a..866c5437 100644
--- a/tests/integration/auth_test.go
+++ b/tests/integration/auth_test.go
@@ -27,7 +27,7 @@ import (
)
func TestNodeAuthEnforcementIntegration(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
_, mockRouterAddr := startMockRouter(t)
home := t.TempDir()
@@ -93,7 +93,7 @@ func TestNodeAuthEnforcementIntegration(t *testing.T) {
{"readyz is public", "GET", "/readyz", http.StatusOK, false},
// Services are declared in configuration only: the former runtime
// registration endpoints are gone, so /mesh/service/register is just
- // another egress-proxy path behind auth like any /sam/ path.
+ // another egress-proxy path behind auth like any /mesh/ path.
{"discover is protected", "GET", "/mesh/service/discover?type=mcp&name=test", http.StatusUnauthorized, false},
{"egress proxy is protected", "GET", "/mesh/", http.StatusUnauthorized, false},
{"register path is protected like any egress path", "POST", "/mesh/service/register", http.StatusUnauthorized, false},
diff --git a/tests/integration/biscuit_expiry_test.go b/tests/integration/biscuit_expiry_test.go
index 03ca0704..a1c4bed8 100644
--- a/tests/integration/biscuit_expiry_test.go
+++ b/tests/integration/biscuit_expiry_test.go
@@ -48,7 +48,7 @@ const expiryMargin = 2 * time.Second
// A real control plane mints a real biscuit over the real /register flow, and
// the same token is then presented to both verification paths: the generic
// verifier (identity.VerifyBiscuit) and the node dataplane authorizer
-// (SamNode.VerifyBiscuitToken, the tool-invocation path). Before the expiry
+// (AgentMeshNode.VerifyBiscuitToken, the tool-invocation path). Before the expiry
// both accept it; after the expiry both must reject it. The bug was that the
// dataplane kept accepting, because it never injected the time fact that the
// expiration check reads.
@@ -58,7 +58,7 @@ const expiryMargin = 2 * time.Second
// the node's proactive refresh) reports that same instant rather than the OIDC
// token's own, much later, expiry.
func TestBiscuitExpiryIsEnforcedOnEveryPath(t *testing.T) {
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
@@ -122,7 +122,7 @@ func TestBiscuitExpiryIsEnforcedOnEveryPath(t *testing.T) {
}
defer func() { _ = store.Close() }()
- samNode, err := node.NewSamNode(node.Options{
+ samNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: privKey,
Store: store,
ControlPlanePubKey: cpPubKey,
diff --git a/tests/integration/call_test.go b/tests/integration/call_test.go
index 478e0ba9..97a4cc5b 100644
--- a/tests/integration/call_test.go
+++ b/tests/integration/call_test.go
@@ -20,11 +20,11 @@ import (
"time"
)
-func TestSamNodeRunHelp(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+func TestAgentMeshNodeRunHelp(t *testing.T) {
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
stdout, stderr, err := runCommand(t, repoRoot(t), 10*time.Second, nil, "", nodeBin, "run", "--help")
if err != nil {
- t.Fatalf("sam-node run --help failed: %v\nstdout:\n%s\nstderr:\n%s", err, stdout, stderr)
+ t.Fatalf("agentmesh-node run --help failed: %v\nstdout:\n%s\nstderr:\n%s", err, stdout, stderr)
}
out := stdout + stderr
if !strings.Contains(out, "Start the mesh node") {
diff --git a/tests/integration/catalog_test.go b/tests/integration/catalog_test.go
index dcad35d3..4555012e 100644
--- a/tests/integration/catalog_test.go
+++ b/tests/integration/catalog_test.go
@@ -145,7 +145,7 @@ func (a *authRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)
}
func TestCatalogRoutingAndFailover(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
_, routerAddr := startMockRouter(t)
homeA := t.TempDir()
diff --git a/tests/integration/datapath_test.go b/tests/integration/datapath_test.go
index e0003c87..c2406082 100644
--- a/tests/integration/datapath_test.go
+++ b/tests/integration/datapath_test.go
@@ -33,7 +33,7 @@ import (
)
func TestIntegrationStdioDatapath(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
_, routerAddr := startMockRouter(t)
homeA := t.TempDir()
@@ -135,7 +135,7 @@ func TestIntegrationStdioDatapath(t *testing.T) {
}
func TestIntegrationHTTPDatapath(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
_, routerAddr := startMockRouter(t)
homeA := t.TempDir()
diff --git a/tests/integration/debug_endpoints_test.go b/tests/integration/debug_endpoints_test.go
index 3faf21e4..cca7776c 100644
--- a/tests/integration/debug_endpoints_test.go
+++ b/tests/integration/debug_endpoints_test.go
@@ -79,7 +79,7 @@ func debugGet(t *testing.T, apiAddr, path string) string {
}
func TestDebugEndpoints(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
@@ -201,7 +201,7 @@ roles: []
t.Run("logs", func(t *testing.T) {
resp := debugGet(t, actualApiAddrA, "/debug/logs")
- if !strings.Contains(resp, "Starting MCP server") && !strings.Contains(resp, "SAM Node Online") {
+ if !strings.Contains(resp, "Starting MCP server") && !strings.Contains(resp, "Agent Mesh Node Online") {
t.Errorf("expected logs to contain startup messages, got: %v", resp)
}
})
diff --git a/tests/integration/egress_test.go b/tests/integration/egress_test.go
index 30ee7a1a..63dd306c 100644
--- a/tests/integration/egress_test.go
+++ b/tests/integration/egress_test.go
@@ -42,7 +42,7 @@ import (
// the callers; and a policy update withdraws a destination without a
// restart.
func TestEgressDestinationCUJ(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
diff --git a/tests/integration/enroll_status_polling_test.go b/tests/integration/enroll_status_polling_test.go
index 52cae06b..83f22027 100644
--- a/tests/integration/enroll_status_polling_test.go
+++ b/tests/integration/enroll_status_polling_test.go
@@ -149,7 +149,7 @@ func TestEnrollStatusPollingCollectsBiscuit(t *testing.T) {
if err != nil {
t.Fatalf("failed to generate node key: %v", err)
}
- samNode, err := node.NewSamNode(node.Options{
+ samNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: priv,
Store: nodeStore,
ListenAddrs: []string{"/ip4/127.0.0.1/tcp/0"},
diff --git a/tests/integration/failover_test.go b/tests/integration/failover_test.go
index f5191ab7..83fe69ff 100644
--- a/tests/integration/failover_test.go
+++ b/tests/integration/failover_test.go
@@ -37,9 +37,9 @@ import (
)
func TestFailoverUpdatesRelay(t *testing.T) {
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
- routerBin := buildBinary(t, "./cmd/sam-router")
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
+ routerBin := buildBinary(t, "./cmd/agentmesh-router")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
diff --git a/tests/integration/fallback_test.go b/tests/integration/fallback_test.go
index 88111dcd..2824a03e 100644
--- a/tests/integration/fallback_test.go
+++ b/tests/integration/fallback_test.go
@@ -55,7 +55,7 @@ func (s *safeBuffer) String() string {
// next start (a redeploy moves every router's address); the node must ask
// the control plane for the current ones, reach one, and remember it.
func TestSelfHealingHTTPFallback(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
diff --git a/tests/integration/federation_test.go b/tests/integration/federation_test.go
index fa756169..aad111cb 100644
--- a/tests/integration/federation_test.go
+++ b/tests/integration/federation_test.go
@@ -35,9 +35,9 @@ import (
)
func TestRouterFederationAndRelay(t *testing.T) {
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
- routerBin := buildBinary(t, "./cmd/sam-router")
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
+ routerBin := buildBinary(t, "./cmd/agentmesh-router")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
clientBin := buildBinary(t, "./cmd/mcp-client")
tmpDir := t.TempDir()
@@ -146,7 +146,7 @@ roles:
var stdoutRouterA, stderrRouterA safeBuffer
cmdRouterA.Stdout = &stdoutRouterA
cmdRouterA.Stderr = &stderrRouterA
- cmdRouterA.Env = append(os.Environ(), "SAM_TEST_DNS_SERVER="+dnsServer.conn.LocalAddr().String())
+ cmdRouterA.Env = append(os.Environ(), "AGENTMESH_TEST_DNS_SERVER="+dnsServer.conn.LocalAddr().String())
if err := cmdRouterA.Start(); err != nil {
t.Fatalf("failed to start Router A: %v", err)
}
@@ -164,7 +164,7 @@ roles:
var stdoutRouterB, stderrRouterB safeBuffer
cmdRouterB.Stdout = &stdoutRouterB
cmdRouterB.Stderr = &stderrRouterB
- cmdRouterB.Env = append(os.Environ(), "SAM_TEST_DNS_SERVER="+dnsServer.conn.LocalAddr().String())
+ cmdRouterB.Env = append(os.Environ(), "AGENTMESH_TEST_DNS_SERVER="+dnsServer.conn.LocalAddr().String())
if err := cmdRouterB.Start(); err != nil {
t.Fatalf("failed to start Router B: %v", err)
}
@@ -226,7 +226,7 @@ roles:
svcDecl{Type: "mcp", Name: "federated-tool", TargetURL: mcpServer.URL},
svcDecl{Type: "mcp", Name: "raw-pipe", TargetURL: rawServer.URL}),
)
- nodeACmd.Env = append(os.Environ(), "SAM_TEST_DNS_SERVER="+dnsServer.conn.LocalAddr().String())
+ nodeACmd.Env = append(os.Environ(), "AGENTMESH_TEST_DNS_SERVER="+dnsServer.conn.LocalAddr().String())
var nodeStdoutA, nodeStderrA safeBuffer
nodeACmd.Stdout = io.MultiWriter(os.Stdout, &nodeStdoutA)
nodeACmd.Stderr = io.MultiWriter(os.Stderr, &nodeStderrA)
@@ -247,7 +247,7 @@ roles:
"--discovery-interval", "100ms",
"--allow-loopback=true",
)
- nodeBCmd.Env = append(os.Environ(), "SAM_TEST_DNS_SERVER="+dnsServer.conn.LocalAddr().String())
+ nodeBCmd.Env = append(os.Environ(), "AGENTMESH_TEST_DNS_SERVER="+dnsServer.conn.LocalAddr().String())
var nodeStdoutB, nodeStderrB safeBuffer
nodeBCmd.Stdout = io.MultiWriter(os.Stdout, &nodeStdoutB)
nodeBCmd.Stderr = io.MultiWriter(os.Stderr, &nodeStderrB)
diff --git a/tests/integration/identity_evidence_test.go b/tests/integration/identity_evidence_test.go
index b6377a84..f9f52d7c 100644
--- a/tests/integration/identity_evidence_test.go
+++ b/tests/integration/identity_evidence_test.go
@@ -44,12 +44,12 @@ import (
// node, connect to an exact peer, and collect fresh independently verifiable
// peer evidence before any provider request.
func TestIdentityEvidenceOperatorFlow(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
_, controlPlaneURL, pinnedControlPlaneKey := startMockRouterWithControlPlaneKey(t)
ownerHome := t.TempDir()
providerHome := t.TempDir()
- socketDir, err := os.MkdirTemp("", "sam-evidence-")
+ socketDir, err := os.MkdirTemp("", "agentmesh-evidence-")
if err != nil {
t.Fatalf("create short socket directory: %v", err)
}
diff --git a/tests/integration/local_policy_test.go b/tests/integration/local_policy_test.go
index 77c91d45..4f562634 100644
--- a/tests/integration/local_policy_test.go
+++ b/tests/integration/local_policy_test.go
@@ -25,7 +25,7 @@ import (
)
func TestLocalPolicyCanGrantPermissions(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
@@ -132,7 +132,7 @@ attenuation:
}
func TestLocalPolicyCannotBypassControlPlaneTargetConstraint(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
diff --git a/tests/integration/login_test.go b/tests/integration/login_test.go
index 50b4cb1c..25de2e8a 100644
--- a/tests/integration/login_test.go
+++ b/tests/integration/login_test.go
@@ -95,7 +95,7 @@ func storedMembership(t *testing.T, dataDir string) ([]byte, string) {
return identity, cpURL
}
-// join runs `sam-node join` for the node living under env, with the mock
+// join runs `agentmesh-node join` for the node living under env, with the mock
// provider playing the user who signs in.
func join(t *testing.T, nodeBin string, env []string, cpURL string, extra ...string) {
t.Helper()
@@ -103,7 +103,7 @@ func join(t *testing.T, nodeBin string, env []string, cpURL string, extra ...str
args = append(args, cpURL)
stdout, stderr, err := runCommandWithCallback(t, repoRoot(t), 15*time.Second, env, "", nodeBin, args...)
if err != nil {
- t.Fatalf("sam-node %s: %v\nstdout:\n%s\nstderr:\n%s", strings.Join(args, " "), err, stdout, stderr)
+ t.Fatalf("agentmesh-node %s: %v\nstdout:\n%s\nstderr:\n%s", strings.Join(args, " "), err, stdout, stderr)
}
}
@@ -146,8 +146,8 @@ func enrolledAs(t *testing.T, cpPort int, peerID string, subject string) []byte
return stored.Biscuit
}
-func TestSamNodeJoin(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+func TestAgentMeshNodeJoin(t *testing.T) {
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
cpPort, cpURL := startMesh(t, filepath.Join(tmpDir, "mesh"), oidcURL, mintToken)
@@ -176,12 +176,12 @@ func TestSamNodeJoin(t *testing.T) {
waitForPeerOnRouter(t, cpPort, testAdminToken, peerID, 10*time.Second)
}
-// TestSamNodeJoinOfflineAccessSavesRefreshToken guards against a real bug:
-// interactiveJoin used a *node.SamNode with no Store, so InteractiveLogin's
+// TestAgentMeshNodeJoinOfflineAccessSavesRefreshToken guards against a real bug:
+// interactiveJoin used a *node.AgentMeshNode with no Store, so InteractiveLogin's
// "if n.Store != nil" guard silently skipped persisting the refresh token,
// breaking --offline-access for both "join" and "run --join".
-func TestSamNodeJoinOfflineAccessSavesRefreshToken(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+func TestAgentMeshNodeJoinOfflineAccessSavesRefreshToken(t *testing.T) {
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
cpPort, cpURL := startMesh(t, filepath.Join(tmpDir, "mesh"), oidcURL, mintToken)
@@ -210,12 +210,12 @@ func TestSamNodeJoinOfflineAccessSavesRefreshToken(t *testing.T) {
}
}
-// TestSamNodeRunWithoutIdentityServesEnrollment covers a node that has never
+// TestAgentMeshNodeRunWithoutIdentityServesEnrollment covers a node that has never
// enrolled: it must not fail, nor block on a login it cannot complete
// without a terminal, but serve the enrollment-only MCP surface until
// someone enrolls it.
-func TestSamNodeRunWithoutIdentityServesEnrollment(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+func TestAgentMeshNodeRunWithoutIdentityServesEnrollment(t *testing.T) {
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
for _, tc := range []struct {
name string
args []string
@@ -240,11 +240,11 @@ func TestSamNodeRunWithoutIdentityServesEnrollment(t *testing.T) {
}
}
-// TestSamNodeRunWithStoredIdentity covers the everyday restart: a node that
+// TestAgentMeshNodeRunWithStoredIdentity covers the everyday restart: a node that
// enrolled once comes back with no token and no --control-plane, on what it
// stored, and the router admits it again.
-func TestSamNodeRunWithStoredIdentity(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+func TestAgentMeshNodeRunWithStoredIdentity(t *testing.T) {
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
cpPort, cpURL := startMesh(t, filepath.Join(tmpDir, "mesh"), oidcURL, mintToken)
@@ -277,12 +277,12 @@ func TestSamNodeRunWithStoredIdentity(t *testing.T) {
}
}
-// TestSamNodeRunControlPlaneMismatch covers a node enrolled with one mesh
+// TestAgentMeshNodeRunControlPlaneMismatch covers a node enrolled with one mesh
// being pointed at another: it must refuse, with or without --join, keeping
// its identity for the first mesh and leaving no trace on the second, and
// "reset" must clear the way for a fresh enrollment there.
-func TestSamNodeRunControlPlaneMismatch(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+func TestAgentMeshNodeRunControlPlaneMismatch(t *testing.T) {
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
cpPortA, cpURLA := startMesh(t, filepath.Join(tmpDir, "meshA"), oidcURL, mintToken)
@@ -308,14 +308,14 @@ func TestSamNodeRunControlPlaneMismatch(t *testing.T) {
} {
n := launchNode(t, nodeBin, env, home, append(args, "--allow-loopback", "--api-token-path", token)...)
if err := n.exitsWithin(t, 10*time.Second); err == nil {
- t.Fatalf("sam-node %s exited cleanly against a mesh it is not enrolled with", strings.Join(args, " "))
+ t.Fatalf("agentmesh-node %s exited cleanly against a mesh it is not enrolled with", strings.Join(args, " "))
}
identity, storedURL := storedMembership(t, dataDir)
if !bytes.Equal(identity, issuedByA) || storedURL != cpURLA {
- t.Fatalf("sam-node %s changed the stored membership (control plane now %q)", strings.Join(args, " "), storedURL)
+ t.Fatalf("agentmesh-node %s changed the stored membership (control plane now %q)", strings.Join(args, " "), storedURL)
}
if fetchAdminStatus(t, cpPortB, testAdminToken).enrolledNode(peerID) != nil {
- t.Fatalf("sam-node %s enrolled with mesh B", strings.Join(args, " "))
+ t.Fatalf("agentmesh-node %s enrolled with mesh B", strings.Join(args, " "))
}
}
@@ -323,7 +323,7 @@ func TestSamNodeRunControlPlaneMismatch(t *testing.T) {
// peer ID, stays.
stdout, stderr, err := runCommand(t, repoRoot(t), 5*time.Second, env, "", nodeBin, "reset")
if err != nil {
- t.Fatalf("sam-node reset: %v\nstdout:\n%s\nstderr:\n%s", err, stdout, stderr)
+ t.Fatalf("agentmesh-node reset: %v\nstdout:\n%s\nstderr:\n%s", err, stdout, stderr)
}
if identity, storedURL := storedMembership(t, dataDir); len(identity) != 0 || storedURL != "" {
t.Fatalf("reset left a membership behind (control plane %q)", storedURL)
diff --git a/tests/integration/member_burst_test.go b/tests/integration/member_burst_test.go
index 5d20d207..e5940169 100644
--- a/tests/integration/member_burst_test.go
+++ b/tests/integration/member_burst_test.go
@@ -63,7 +63,7 @@ func TestMemberBurstJoinsConcurrently(t *testing.T) {
backend := httptest.NewServer(newBoundaryMCPHandler(t))
defer backend.Close()
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
providerDir := t.TempDir()
provider := launchNode(t, nodeBin, os.Environ(), providerDir, "run",
"--control-plane", controlPlane,
diff --git a/tests/integration/mesh_test.go b/tests/integration/mesh_test.go
index 422296bb..09b27eda 100644
--- a/tests/integration/mesh_test.go
+++ b/tests/integration/mesh_test.go
@@ -20,11 +20,11 @@ import (
"time"
)
-func TestSamControlPlaneHelp(t *testing.T) {
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
+func TestAgentMeshControlPlaneHelp(t *testing.T) {
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
stdout, stderr, err := runCommand(t, repoRoot(t), 10*time.Second, nil, "", cpBin, "--help")
if err != nil {
- t.Fatalf("sam-control-plane --help failed: %v\nstdout:\n%s\nstderr:\n%s", err, stdout, stderr)
+ t.Fatalf("agentmesh-control-plane --help failed: %v\nstdout:\n%s\nstderr:\n%s", err, stdout, stderr)
}
out := stdout + stderr
if !strings.Contains(out, "Agent Mesh - Control Plane") {
@@ -32,11 +32,11 @@ func TestSamControlPlaneHelp(t *testing.T) {
}
}
-func TestSamRouterHelp(t *testing.T) {
- routerBin := buildBinary(t, "./cmd/sam-router")
+func TestAgentMeshRouterHelp(t *testing.T) {
+ routerBin := buildBinary(t, "./cmd/agentmesh-router")
stdout, stderr, err := runCommand(t, repoRoot(t), 10*time.Second, nil, "", routerBin, "--help")
if err != nil {
- t.Fatalf("sam-router --help failed: %v\nstdout:\n%s\nstderr:\n%s", err, stdout, stderr)
+ t.Fatalf("agentmesh-router --help failed: %v\nstdout:\n%s\nstderr:\n%s", err, stdout, stderr)
}
out := stdout + stderr
if !strings.Contains(out, "Agent Mesh - libp2p Router Node") {
diff --git a/tests/integration/minimal_helpers_test.go b/tests/integration/minimal_helpers_test.go
index f2d28c9e..5f359470 100644
--- a/tests/integration/minimal_helpers_test.go
+++ b/tests/integration/minimal_helpers_test.go
@@ -88,7 +88,7 @@ func buildBinary(t *testing.T, pkgPath string) string {
b := entry.(*binaryBuild)
b.once.Do(func() {
root := repoRoot(t)
- dir, err := os.MkdirTemp("", "sam-integration-bin-")
+ dir, err := os.MkdirTemp("", "agentmesh-integration-bin-")
if err != nil {
b.err = err
return
@@ -407,12 +407,12 @@ func startControlPlaneAndRouter(t *testing.T, tmpDir string, oidcURL string, min
return cpPort, cleanup
}
-// startControlPlane starts a sam-control-plane under tmpDir, trusting oidcURL
+// startControlPlane starts a agentmesh-control-plane under tmpDir, trusting oidcURL
// and holding the policy in policyFile with the router role added, plus any
// extra flags. It returns the port and a stop function.
func startControlPlane(t *testing.T, tmpDir string, oidcURL string, policyFile string, extra ...string) (int, func()) {
t.Helper()
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
cpPort := getFreePort(t)
// Automatically adjust the policy file to grant the "router" role to group "routers"
@@ -444,13 +444,13 @@ func startControlPlane(t *testing.T, tmpDir string, oidcURL string, policyFile s
return cpPort, stop
}
-// startRouter starts a sam-router named name against the control plane on
+// startRouter starts a agentmesh-router named name against the control plane on
// cpPort, renewing its lease every second so the control plane's view of the
// router's peers is current. It returns the router's p2p address and a stop
// function.
func startRouter(t *testing.T, tmpDir string, cpPort int, mintToken func(map[string]interface{}) string, name string) (string, func()) {
t.Helper()
- routerBin := buildBinary(t, "./cmd/sam-router")
+ routerBin := buildBinary(t, "./cmd/agentmesh-router")
routerPort := getFreePort(t)
routerJWT := mintToken(map[string]interface{}{
diff --git a/tests/integration/multimaster_test.go b/tests/integration/multimaster_test.go
index 90d5d38e..0cfd52b5 100644
--- a/tests/integration/multimaster_test.go
+++ b/tests/integration/multimaster_test.go
@@ -37,8 +37,8 @@ import (
)
func TestMultiMasterControlPlane(t *testing.T) {
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
- routerBin := buildBinary(t, "./cmd/sam-router")
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
+ routerBin := buildBinary(t, "./cmd/agentmesh-router")
tmpDir := t.TempDir()
diff --git a/tests/integration/node_helpers_test.go b/tests/integration/node_helpers_test.go
index 27643069..59ec6634 100644
--- a/tests/integration/node_helpers_test.go
+++ b/tests/integration/node_helpers_test.go
@@ -35,7 +35,7 @@ import (
// addresses are known before it starts, because the test chooses the ports
// and the node's key lives in its store, so nothing has to be read back out.
-// backgroundNode is a `sam-node run` started by a test.
+// backgroundNode is a `agentmesh-node run` started by a test.
type backgroundNode struct {
cmd *exec.Cmd
apiAddr string // host:port the sidecar API listens on
@@ -78,7 +78,7 @@ func launchNode(t *testing.T, nodeBin string, env []string, logDir string, args
cmd.Stderr = logFile
if err := cmd.Start(); err != nil {
_ = logFile.Close()
- t.Fatalf("start sam-node: %v", err)
+ t.Fatalf("start agentmesh-node: %v", err)
}
n := &backgroundNode{
cmd: cmd,
@@ -116,9 +116,9 @@ func nodeDataDir(env []string, args []string) string {
}
}
if xdg != "" {
- return filepath.Join(xdg, "sam-mesh")
+ return filepath.Join(xdg, "agentmesh")
}
- return filepath.Join(home, ".config", "sam-mesh")
+ return filepath.Join(home, ".config", "agentmesh")
}
// ensureNodeKey creates the node's key in dataDir if there is none, exactly
@@ -153,7 +153,7 @@ func nodeToken(t *testing.T, env []string, args []string) string {
}
}
for _, e := range env {
- if v, ok := strings.CutPrefix(e, "SAM_API_TOKEN="); ok {
+ if v, ok := strings.CutPrefix(e, "AGENTMESH_API_TOKEN="); ok {
return v
}
}
@@ -167,7 +167,7 @@ func startBackgroundNode(t *testing.T, nodeBin string, routerAddr string, homeDi
env := append(os.Environ(),
"HOME="+homeDir,
"XDG_CONFIG_HOME="+filepath.Join(homeDir, ".config"),
- "SAM_API_TOKEN=test-token", // per-test overrides use --api-token-path, which wins
+ "AGENTMESH_API_TOKEN=test-token", // per-test overrides use --api-token-path, which wins
)
allArgs := append([]string{"run", "--control-plane", routerAddr, "--jwt", "test-jwt", "--allow-loopback"}, args...)
return launchNode(t, nodeBin, env, homeDir, allArgs...)
@@ -202,7 +202,7 @@ func (n *backgroundNode) waitForAPI(t *testing.T) string {
select {
case err := <-n.exited:
n.exited <- err
- t.Fatalf("sam-node exited (%v) before serving its API.\n--- node.log ---\n%s", err, n.log())
+ t.Fatalf("agentmesh-node exited (%v) before serving its API.\n--- node.log ---\n%s", err, n.log())
default:
}
resp, err := client.Get("http://" + n.apiAddr + "/healthz")
@@ -214,7 +214,7 @@ func (n *backgroundNode) waitForAPI(t *testing.T) string {
}
time.Sleep(100 * time.Millisecond)
}
- t.Fatalf("sam-node did not serve its API at %s in time.\n--- node.log ---\n%s", n.apiAddr, n.log())
+ t.Fatalf("agentmesh-node did not serve its API at %s in time.\n--- node.log ---\n%s", n.apiAddr, n.log())
return ""
}
@@ -226,7 +226,7 @@ func (n *backgroundNode) exitsWithin(t *testing.T, d time.Duration) error {
n.exited <- err
return err
case <-time.After(d):
- t.Fatalf("sam-node still running after %s.\n--- node.log ---\n%s", d, n.log())
+ t.Fatalf("agentmesh-node still running after %s.\n--- node.log ---\n%s", d, n.log())
return nil
}
}
@@ -237,7 +237,7 @@ func (n *backgroundNode) staysUp(t *testing.T, d time.Duration) {
select {
case err := <-n.exited:
n.exited <- err
- t.Fatalf("sam-node exited (%v) within %s.\n--- node.log ---\n%s", err, d, n.log())
+ t.Fatalf("agentmesh-node exited (%v) within %s.\n--- node.log ---\n%s", err, d, n.log())
case <-time.After(d):
}
}
@@ -254,7 +254,7 @@ func (n *backgroundNode) waitForEnrollmentSidecar(t *testing.T) {
select {
case err := <-n.exited:
n.exited <- err
- t.Fatalf("sam-node exited (%v) before serving its enrollment sidecar.\n--- node.log ---\n%s", err, n.log())
+ t.Fatalf("agentmesh-node exited (%v) before serving its enrollment sidecar.\n--- node.log ---\n%s", err, n.log())
default:
}
tools, err := listMCPTools(n.apiAddr)
@@ -269,7 +269,7 @@ func (n *backgroundNode) waitForEnrollmentSidecar(t *testing.T) {
last = err
time.Sleep(100 * time.Millisecond)
}
- t.Fatalf("sam-node at %s did not serve the enrollment sidecar in time: %v\n--- node.log ---\n%s", n.apiAddr, last, n.log())
+ t.Fatalf("agentmesh-node at %s did not serve the enrollment sidecar in time: %v\n--- node.log ---\n%s", n.apiAddr, last, n.log())
}
// listMCPTools opens a token-less MCP session against apiAddr and returns the
diff --git a/tests/integration/noise_test.go b/tests/integration/noise_test.go
index f52155c8..74a9876a 100644
--- a/tests/integration/noise_test.go
+++ b/tests/integration/noise_test.go
@@ -34,7 +34,7 @@ import (
// TestNoiseOnlyPeer pins what a browser member is on the wire: a peer that
// speaks Noise and no libp2p TLS. It authenticates with the router over
-// Noise, is relayed to a sam-node, and the relayed connection, upgraded end
+// Noise, is relayed to a agentmesh-node, and the relayed connection, upgraded end
// to end between the two of them, is Noise as well, so the node's auth
// handshake and a service call go through. A peer that speaks TLS still
// lands on TLS: it is offered first.
diff --git a/tests/integration/openai_facade_test.go b/tests/integration/openai_facade_test.go
index 887e8b36..2c0e7053 100644
--- a/tests/integration/openai_facade_test.go
+++ b/tests/integration/openai_facade_test.go
@@ -32,7 +32,7 @@ import (
// lists the model on /v1/models and serves /v1/chat/completions for it across
// the mesh.
func TestOpenAIFacadeCUJ(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
_, hubAddr := startMockRouter(t)
homeA := t.TempDir()
@@ -42,13 +42,13 @@ func TestOpenAIFacadeCUJ(t *testing.T) {
// Fake OpenAI-compatible backend on node A's side. The backend exists
// before the node: services are declared in the node's configuration,
// never registered at runtime.
- var sawSidecarToken, sawSamAuthHeader atomic.Bool
+ var sawSidecarToken, sawMeshAuthHeader atomic.Bool
backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if strings.Contains(r.Header.Get("Authorization"), apiToken) {
sawSidecarToken.Store(true)
}
if r.Header.Get(api.HeaderMeshAuthentication) != "" {
- sawSamAuthHeader.Store(true)
+ sawMeshAuthHeader.Store(true)
}
switch r.URL.Path {
case "/v1/models":
@@ -185,7 +185,7 @@ func TestOpenAIFacadeCUJ(t *testing.T) {
if sawSidecarToken.Load() {
t.Error("sidecar token leaked to the inference backend")
}
- if sawSamAuthHeader.Load() {
+ if sawMeshAuthHeader.Load() {
t.Errorf("%s header leaked to the inference backend", api.HeaderMeshAuthentication)
}
diff --git a/tests/integration/policy_grants_test.go b/tests/integration/policy_grants_test.go
index 6468e2d6..314161a1 100644
--- a/tests/integration/policy_grants_test.go
+++ b/tests/integration/policy_grants_test.go
@@ -43,11 +43,11 @@ import (
// while SaveMeshPolicy dropped it on the floor: the grant was configured, the
// API returned it, and the token was minted without it.
//
-// This drives the real sam-control-plane binary over its own REST API, so the
+// This drives the real agentmesh-control-plane binary over its own REST API, so the
// path under test is the deployed one: POST /policies -> database -> enrollment
// -> the facts actually inside the signed token.
func TestPolicyGrantsReachTheMintedToken(t *testing.T) {
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
tmpDir := t.TempDir()
const adminToken = "integration-admin-token"
diff --git a/tests/integration/policy_permutations_test.go b/tests/integration/policy_permutations_test.go
index e8b24f65..09ccbabe 100644
--- a/tests/integration/policy_permutations_test.go
+++ b/tests/integration/policy_permutations_test.go
@@ -82,7 +82,7 @@ func callMCPAllowError(t *testing.T, mcpAddr string, apiToken string, toolName s
}
func TestPolicyPermutations(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
diff --git a/tests/integration/readmission_test.go b/tests/integration/readmission_test.go
index f718481f..75464b0f 100644
--- a/tests/integration/readmission_test.go
+++ b/tests/integration/readmission_test.go
@@ -43,7 +43,7 @@ import (
// lapses, and must show the new one to every router it is connected to:
// otherwise the router keeps the first expiry and the member turns
// unreachable an hour after it started while every connection looks fine.
-// Every member implementation is run against a real router: sam-node, whose
+// Every member implementation is run against a real router: agentmesh-node, whose
// own renewal loop refreshes, and each SDK, which refreshes right after
// joining since the credential is shorter than its refresh lead. Two things
// are checked for each: the router's admission of the member moves to the
@@ -55,15 +55,15 @@ func TestMembersStayAdmittedAcrossCredentialRefresh(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
t.Cleanup(cancel)
mesh := startReadmissionMesh(t, ctx)
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
// How long the token every member joins with vouches for it: past each
- // runner's startup, short enough for sam-node's renewal loop, which
+ // runner's startup, short enough for agentmesh-node's renewal loop, which
// refreshes halfway through a credential this short, and for the test to
// outlive it.
const lifetime = 10 * time.Second
- t.Run("sam-node", func(t *testing.T) {
+ t.Run("agentmesh-node", func(t *testing.T) {
t.Parallel()
jwtFile := writeJWTFile(t, mesh.memberJWT("node-member", lifetime))
home := t.TempDir()
@@ -94,7 +94,7 @@ func TestMembersStayAdmittedAcrossCredentialRefresh(t *testing.T) {
}
jwtFile := writeJWTFile(t, mesh.memberJWT(runner.name+"-member", lifetime))
firstExpiry := time.Now().Add(lifetime)
- m := launchSDKRunner(t, runner.name, cmd, mesh.root, mesh.baseURL, "SAM_JWT_PATH="+jwtFile, "SAM_SDK_LISTEN_ADDRS=/ip4/127.0.0.1/tcp/0")
+ m := launchSDKRunner(t, runner.name, cmd, mesh.root, mesh.baseURL, "AGENTMESH_JWT_PATH="+jwtFile, "AGENTMESH_SDK_LISTEN_ADDRS=/ip4/127.0.0.1/tcp/0")
rewriteJWTFile(t, jwtFile, mesh.memberJWT(runner.name+"-member", time.Hour))
peerID, err := peer.Decode(m.report.PeerID)
if err != nil {
diff --git a/tests/integration/revocation_test.go b/tests/integration/revocation_test.go
index 60f544e8..b667cea5 100644
--- a/tests/integration/revocation_test.go
+++ b/tests/integration/revocation_test.go
@@ -36,9 +36,9 @@ import (
)
func TestNodeRevocationIntegration(t *testing.T) {
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
- routerBin := buildBinary(t, "./cmd/sam-router")
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
+ routerBin := buildBinary(t, "./cmd/agentmesh-router")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
clientBin := buildBinary(t, "./cmd/mcp-client")
tmpDir := t.TempDir()
diff --git a/tests/integration/rotation_offline_test.go b/tests/integration/rotation_offline_test.go
index 4aa64b56..3fe0ec41 100644
--- a/tests/integration/rotation_offline_test.go
+++ b/tests/integration/rotation_offline_test.go
@@ -62,7 +62,7 @@ func TestKeyRotationWhileMembersOffline(t *testing.T) {
// The SDK members start again from their state directories concurrently.
// The token path names no file: the member resumes or fails, it cannot enroll.
resumed := make([]*sdkMember, len(members.sdk))
- noToken := "SAM_BOOTSTRAP_TOKEN_PATH=" + filepath.Join(t.TempDir(), "no-token")
+ noToken := "AGENTMESH_BOOTSTRAP_TOKEN_PATH=" + filepath.Join(t.TempDir(), "no-token")
var wg sync.WaitGroup
for i, s := range members.sdk {
i, s := i, s
@@ -144,7 +144,7 @@ type offlineSDKMember struct {
func (s *offlineSDKMember) start(t *testing.T, mesh *sdkMesh, suffix string, env ...string) *sdkMember {
t.Helper()
cmd, _ := s.launcher.cmd(mesh.root)
- return launchSDKMember(t, s.launcher.name+suffix, cmd, mesh.root, mesh.baseURL, mesh.adminToken, append([]string{"SAM_SDK_STATE_DIR=" + s.stateDir}, env...)...)
+ return launchSDKMember(t, s.launcher.name+suffix, cmd, mesh.root, mesh.baseURL, mesh.adminToken, append([]string{"AGENTMESH_SDK_STATE_DIR=" + s.stateDir}, env...)...)
}
// assertBackUnderKey checks the member came back as the identity it kept,
@@ -183,7 +183,7 @@ type offlineMembers struct {
func enrollMembersThenStop(t *testing.T, mesh *sdkMesh) *offlineMembers {
t.Helper()
- members := &offlineMembers{nodeBin: buildBinary(t, "./cmd/sam-node")}
+ members := &offlineMembers{nodeBin: buildBinary(t, "./cmd/agentmesh-node")}
// A token is read only to enroll, so the file can go once the member
// holds a credential.
@@ -208,7 +208,7 @@ func enrollMembersThenStop(t *testing.T, mesh *sdkMesh) *offlineMembers {
wg.Add(1)
go func() {
defer wg.Done()
- slots[i].member = launchSDKMember(t, slots[i].launcher.name, slots[i].cmd, mesh.root, mesh.baseURL, mesh.adminToken, "SAM_SDK_STATE_DIR="+slots[i].stateDir)
+ slots[i].member = launchSDKMember(t, slots[i].launcher.name, slots[i].cmd, mesh.root, mesh.baseURL, mesh.adminToken, "AGENTMESH_SDK_STATE_DIR="+slots[i].stateDir)
}()
}
wg.Wait()
@@ -225,7 +225,7 @@ func enrollMembersThenStop(t *testing.T, mesh *sdkMesh) *offlineMembers {
t.Fatal(err)
}
members.nodeEnv = append(os.Environ(), "HOME="+members.nodeHome, "XDG_CONFIG_HOME="+filepath.Join(members.nodeHome, ".config"))
- socketDir, err := os.MkdirTemp("", "sam-rot-")
+ socketDir, err := os.MkdirTemp("", "agentmesh-rot-")
if err != nil {
t.Fatal(err)
}
@@ -290,7 +290,7 @@ func (o *offlineMembers) assertNodeBackUnderKey(t *testing.T, node *backgroundNo
waitForPeerOnRouter(t, mesh.cpPort, mesh.adminToken, o.nodeBefore.PeerId, 10*time.Second)
}
-// rotateSigningKey rotates as the sam-control-plane binary does: a new
+// rotateSigningKey rotates as the agentmesh-control-plane binary does: a new
// current key, the old one retiring over grace, the event on the mesh. It
// returns once every router presents a credential under the new key.
func rotateSigningKey(t *testing.T, ctx context.Context, mesh *sdkMesh, grace time.Duration) ed25519.PublicKey {
diff --git a/tests/integration/rotation_test.go b/tests/integration/rotation_test.go
index da5da72b..59911ab1 100644
--- a/tests/integration/rotation_test.go
+++ b/tests/integration/rotation_test.go
@@ -38,9 +38,9 @@ import (
// current key. Asserting only while the retiring key is still valid would
// pass with credentials nobody refreshed, which is the failure this pins.
func TestKeyRotationIntegration(t *testing.T) {
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
- routerBin := buildBinary(t, "./cmd/sam-router")
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
+ routerBin := buildBinary(t, "./cmd/agentmesh-router")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
@@ -134,7 +134,7 @@ roles:
// The owner socket serves /mesh/identity, the node's own credential;
// t.TempDir is too long for a socket path.
- socketDir, err := os.MkdirTemp("", "sam-rot-")
+ socketDir, err := os.MkdirTemp("", "agentmesh-rot-")
if err != nil {
t.Fatal(err)
}
diff --git a/tests/integration/router_shutdown_test.go b/tests/integration/router_shutdown_test.go
index cee33f6c..006a5812 100644
--- a/tests/integration/router_shutdown_test.go
+++ b/tests/integration/router_shutdown_test.go
@@ -32,8 +32,8 @@ import (
// lease expires. A router with the ttl off sends nothing and stays listed,
// as does a router that keeps running.
func TestRouterGracefulShutdownWithdrawsLease(t *testing.T) {
- cpBin := buildBinary(t, "./cmd/sam-control-plane")
- routerBin := buildBinary(t, "./cmd/sam-router")
+ cpBin := buildBinary(t, "./cmd/agentmesh-control-plane")
+ routerBin := buildBinary(t, "./cmd/agentmesh-router")
tmpDir := t.TempDir()
policyFile := filepath.Join(tmpDir, "policies.yaml")
diff --git a/tests/integration/sdk_a2a_test.go b/tests/integration/sdk_a2a_test.go
index 39d439df..0da7f61e 100644
--- a/tests/integration/sdk_a2a_test.go
+++ b/tests/integration/sdk_a2a_test.go
@@ -34,7 +34,7 @@ import (
// reaches the other language's agent by peer ID with the A2A SDK's client
// over the mesh SDK's transport. The caller fetches the agent card, sends a
// message and gets an answer that names the caller the agent's server saw
-// as the verified peer. A sam-node's egress proxy fetches the same card.
+// as the verified peer. A agentmesh-node's egress proxy fetches the same card.
// A language whose toolchain or A2A SDK is missing is skipped.
func TestNativeSDKA2A(t *testing.T) {
mesh := startSDKMesh(t)
@@ -60,15 +60,15 @@ func TestNativeSDKA2A(t *testing.T) {
errs := make([]error, len(launchers))
var wg sync.WaitGroup
for i := range launchers {
- jwtPath := filepath.Join(t.TempDir(), "sam-token")
+ jwtPath := filepath.Join(t.TempDir(), "agentmesh-token")
jwt := mesh.mintToken(map[string]interface{}{"sub": "mock-user", "roles": []string{api.RoleNode}})
if err := os.WriteFile(jwtPath, []byte(jwt+"\n"), 0o600); err != nil {
t.Fatal(err)
}
cmds[i].Env = append(os.Environ(),
- "SAM_CONTROL_PLANE_URL="+mesh.baseURL,
- "SAM_JWT_PATH="+jwtPath,
- "SAM_STATE_DIR="+filepath.Join(t.TempDir(), "state"),
+ "AGENTMESH_CONTROL_PLANE_URL="+mesh.baseURL,
+ "AGENTMESH_JWT_PATH="+jwtPath,
+ "AGENTMESH_STATE_DIR="+filepath.Join(t.TempDir(), "state"),
)
cmds[i].Dir = mesh.root
wg.Add(1)
@@ -105,7 +105,7 @@ func TestNativeSDKA2A(t *testing.T) {
if err := os.WriteFile(tokenPath, []byte(mintBootstrapToken(t, mesh.baseURL, mesh.adminToken)+"\n"), 0o600); err != nil {
t.Fatal(err)
}
- env := []string{"SAM_CONTROL_PLANE_URL=" + mesh.baseURL, "SAM_STATE_DIR=" + filepath.Join(t.TempDir(), "state"), "SAM_BOOTSTRAP_TOKEN_PATH=" + tokenPath}
+ env := []string{"AGENTMESH_CONTROL_PLANE_URL=" + mesh.baseURL, "AGENTMESH_STATE_DIR=" + filepath.Join(t.TempDir(), "state"), "AGENTMESH_BOOTSTRAP_TOKEN_PATH=" + tokenPath}
out := runExample(t, mesh.root, l, env, "a2a-call", target.peerID, "hello from "+l.name)
caller := expectLine(t, out, "on the mesh as ")
@@ -118,7 +118,7 @@ func TestNativeSDKA2A(t *testing.T) {
})
}
- // A sam-node reaches the same agent card through its egress proxy, and
+ // A agentmesh-node reaches the same agent card through its egress proxy, and
// rewrites the card's URL so an A2A client behind the node can use it.
for _, a := range agents {
status, body := egressGet(t, mesh.nodeAPI, "node-token", "/mesh/"+a.peerID+"/a2a/agent/.well-known/agent-card.json")
diff --git a/tests/integration/sdk_canary_test.go b/tests/integration/sdk_canary_test.go
index 120ae468..eee8a4b7 100644
--- a/tests/integration/sdk_canary_test.go
+++ b/tests/integration/sdk_canary_test.go
@@ -45,7 +45,7 @@ type canaryVerdict struct {
// 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
-// identity from SAM_STATE_DIR on the second call. The script reports each
+// identity from AGENTMESH_STATE_DIR on the second call. The script reports each
// call as one JSON line and keeps the readiness file while the last call
// succeeded; a failed call is reported by the line that names the error.
func TestSDKCanaryScript(t *testing.T) {
@@ -97,15 +97,15 @@ func TestSDKCanaryScript(t *testing.T) {
t.Run(caller.name+"-calls-"+agent.name+"-agent", func(t *testing.T) {
t.Parallel()
dir := t.TempDir()
- jwtPath := filepath.Join(dir, "sam-token")
+ jwtPath := filepath.Join(dir, "agentmesh-token")
jwt := mesh.mintToken(map[string]interface{}{"sub": "mock-user", "roles": []string{api.RoleNode}})
if err := os.WriteFile(jwtPath, []byte(jwt+"\n"), 0o600); err != nil {
t.Fatal(err)
}
env := []string{
- "SAM_CONTROL_PLANE_URL=" + mesh.baseURL,
- "SAM_INSECURE_CONTROL_PLANE=true",
- "SAM_JWT_PATH=" + jwtPath,
+ "AGENTMESH_CONTROL_PLANE_URL=" + mesh.baseURL,
+ "AGENTMESH_INSECURE_CONTROL_PLANE=true",
+ "AGENTMESH_JWT_PATH=" + jwtPath,
"PYTHONUNBUFFERED=1",
}
@@ -115,7 +115,7 @@ func TestSDKCanaryScript(t *testing.T) {
t.Fatal(err)
}
agentCmd, _ := agent.cmd(context.Background(), mesh.root, "a2a-agent")
- agentCmd.Env = append(os.Environ(), append(env, "SAM_STATE_DIR="+filepath.Join(dir, "agent"))...)
+ agentCmd.Env = append(os.Environ(), append(env, "AGENTMESH_STATE_DIR="+filepath.Join(dir, "agent"))...)
agentCmd.Dir = mesh.root
agentCmd.Stdout, agentCmd.Stderr = logFile, logFile
if err := agentCmd.Start(); err != nil {
@@ -133,7 +133,7 @@ func TestSDKCanaryScript(t *testing.T) {
callCmd, _ := caller.cmd(context.Background(), mesh.root, "a2a-call")
verdicts := runCanaryScript(t, script, dir, caller.name+"-calls-"+agent.name+"-agent", strings.Join(callCmd.Args, " "),
- append(env, "SAM_STATE_DIR="+filepath.Join(dir, "caller"), "INTERVAL=0"))
+ append(env, "AGENTMESH_STATE_DIR="+filepath.Join(dir, "caller"), "INTERVAL=0"))
for i := 0; i < 2; i++ {
v := <-verdicts
if !v.OK || v.Error != "" || v.AgentPeer == "" {
@@ -183,7 +183,7 @@ func runCanaryScript(t *testing.T, script, dir, canary, call string, env []strin
t.Helper()
cmd := exec.Command("sh", script)
cmd.Dir = dir
- cmd.Env = append(os.Environ(), append(env, "SAM_CANARY_DIR="+dir, "CANARY="+canary, "CALL="+call)...)
+ cmd.Env = append(os.Environ(), append(env, "AGENTMESH_CANARY_DIR="+dir, "CANARY="+canary, "CALL="+call)...)
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
stdout, err := cmd.StdoutPipe()
if err != nil {
diff --git a/tests/integration/sdk_enroll_test.go b/tests/integration/sdk_enroll_test.go
index bfa39330..acd38711 100644
--- a/tests/integration/sdk_enroll_test.go
+++ b/tests/integration/sdk_enroll_test.go
@@ -167,9 +167,9 @@ func TestNativeSDKs(t *testing.T) {
cmd.Stderr = &stderr
cmd.Dir = root
cmd.Env = append(os.Environ(),
- "SAM_CONTROL_PLANE_URL="+baseURL,
- "SAM_BOOTSTRAP_TOKEN_PATH="+tokenPath,
- "SAM_SDK_STATE_DIR="+stateDir,
+ "AGENTMESH_CONTROL_PLANE_URL="+baseURL,
+ "AGENTMESH_BOOTSTRAP_TOKEN_PATH="+tokenPath,
+ "AGENTMESH_SDK_STATE_DIR="+stateDir,
)
if err := cmd.Start(); err != nil {
t.Fatalf("failed to start %s runner: %v", runner.name, err)
@@ -197,7 +197,7 @@ func TestNativeSDKs(t *testing.T) {
}
verifySDKReport(t, ctx, store, cpPub, peerID, routerAddr, &report)
- // The state directory holds the identity in the encoding sam-node
+ // The state directory holds the identity in the encoding agentmesh-node
// uses and nothing world-readable.
keyBytes, err := os.ReadFile(filepath.Join(stateDir, "identity.key"))
if err != nil {
diff --git a/tests/integration/sdk_examples_test.go b/tests/integration/sdk_examples_test.go
index 92090a4c..4f08b91a 100644
--- a/tests/integration/sdk_examples_test.go
+++ b/tests/integration/sdk_examples_test.go
@@ -85,10 +85,10 @@ var acceptingLine = regexp.MustCompile(`^accepting (\S+) as (\S+)$`)
// TestNativeSDKExamples runs the programs the SDK READMEs and the Native
// SDKs guide embed, unchanged, against a real mesh, configured as the
// testnet canaries are (.github/k8s/sam-sdk-canary-template.yaml). Each
-// SDK's agent example enrolls with an OIDC token through SAM_JWT_PATH, the
+// SDK's agent example enrolls with an OIDC token through AGENTMESH_JWT_PATH, the
// way a Kubernetes workload does, and accepts A2A requests for a2a://agent,
// publishing nothing. Each SDK's call example enrolls with a bootstrap
-// token, reaches the sam-node's mcp://calc by name, and the other language's
+// token, reaches the agentmesh-node's mcp://calc by name, and the other language's
// agent (its own when the other toolchain is missing) by peer ID; the SDK
// finds the path through the router by itself. The first run spends the
// token, the later runs resume from the state directory without one.
@@ -113,15 +113,15 @@ func TestNativeSDKExamples(t *testing.T) {
errs := make([]error, len(launchers))
var wg sync.WaitGroup
for i := range launchers {
- jwtPath := filepath.Join(t.TempDir(), "sam-token")
+ jwtPath := filepath.Join(t.TempDir(), "agentmesh-token")
jwt := mesh.mintToken(map[string]interface{}{"sub": "mock-user", "roles": []string{api.RoleNode}})
if err := os.WriteFile(jwtPath, []byte(jwt+"\n"), 0o600); err != nil {
t.Fatal(err)
}
cmds[i].Env = append(os.Environ(),
- "SAM_CONTROL_PLANE_URL="+mesh.baseURL,
- "SAM_JWT_PATH="+jwtPath,
- "SAM_STATE_DIR="+filepath.Join(t.TempDir(), "state"),
+ "AGENTMESH_CONTROL_PLANE_URL="+mesh.baseURL,
+ "AGENTMESH_JWT_PATH="+jwtPath,
+ "AGENTMESH_STATE_DIR="+filepath.Join(t.TempDir(), "state"),
)
cmds[i].Dir = mesh.root
wg.Add(1)
@@ -161,10 +161,10 @@ func TestNativeSDKExamples(t *testing.T) {
if err := os.WriteFile(tokenPath, []byte(mintBootstrapToken(t, mesh.baseURL, mesh.adminToken)+"\n"), 0o600); err != nil {
t.Fatal(err)
}
- withToken := []string{"SAM_CONTROL_PLANE_URL=" + mesh.baseURL, "SAM_STATE_DIR=" + stateDir, "SAM_BOOTSTRAP_TOKEN_PATH=" + tokenPath}
+ withToken := []string{"AGENTMESH_CONTROL_PLANE_URL=" + mesh.baseURL, "AGENTMESH_STATE_DIR=" + stateDir, "AGENTMESH_BOOTSTRAP_TOKEN_PATH=" + tokenPath}
withoutToken := withToken[:2]
- // The first run spends the token: the sam-node's calc over MCP,
+ // The first run spends the token: the agentmesh-node's calc over MCP,
// found by name.
out := runExample(t, mesh.root, l, withToken, "call", "mcp://calc", "add", `{"a": 1, "b": 2}`)
caller := expectLine(t, out, "on the mesh as ")
@@ -200,7 +200,7 @@ func TestNativeSDKExamples(t *testing.T) {
egressPath := "/repos/acme/" + l.name
out = runExample(t, mesh.root, l, withoutToken, "call", "egress://"+sdkMeshEgressHost, egressPath)
if got := expectLine(t, out, "egress://"+sdkMeshEgressHost+" is served by "); got != mesh.samNode.peerID.String() {
- t.Fatalf("egress://%s is served by %s, want the sam-node %s", sdkMeshEgressHost, got, mesh.samNode.peerID)
+ t.Fatalf("egress://%s is served by %s, want the agentmesh-node %s", sdkMeshEgressHost, got, mesh.samNode.peerID)
}
expectLine(t, out, "204 ")
var reached *http.Request
@@ -223,7 +223,7 @@ func TestNativeSDKExamples(t *testing.T) {
// The state directory is the same layout in every implementation:
// the other SDK's call example resumes this identity from it, and
- // so does a sam-node after `state import`. Each proves it by
+ // so does a agentmesh-node after `state import`. Each proves it by
// reaching the agent as the same peer.
for _, other := range launchers {
if other.name == l.name {
@@ -239,7 +239,7 @@ func TestNativeSDKExamples(t *testing.T) {
}
importedNode := importStateIntoNode(t, mesh, stateDir)
if importedNode.peerID.String() != caller {
- t.Fatalf("sam-node imported %s's state directory as %s, want %s", l.name, importedNode.peerID, caller)
+ t.Fatalf("agentmesh-node imported %s's state directory as %s, want %s", l.name, importedNode.peerID, caller)
}
importedAPI := importedNode.waitForAPI(t)
waitForPeerOnRouter(t, mesh.cpPort, mesh.adminToken, caller, 10*time.Second)
@@ -253,18 +253,18 @@ func TestNativeSDKExamples(t *testing.T) {
}
}
-// importStateIntoNode runs `sam-node state import` on a fresh data directory
+// importStateIntoNode runs `agentmesh-node state import` on a fresh data directory
// and starts a node from it, so the node runs as the member the directory
// holds. The import refuses a token: the identity is already enrolled.
func importStateIntoNode(t *testing.T, mesh *sdkMesh, stateDir string) *backgroundNode {
t.Helper()
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
nodeHome := filepath.Join(t.TempDir(), "imported")
dataDir := filepath.Join(nodeHome, "data")
importCmd := exec.Command(nodeBin, "state", "import", stateDir, "--data-dir", dataDir)
importCmd.Dir = mesh.root
if out, err := importCmd.CombinedOutput(); err != nil {
- t.Fatalf("sam-node state import: %v\n%s", err, out)
+ t.Fatalf("agentmesh-node state import: %v\n%s", err, out)
}
return launchNode(t, nodeBin,
append(os.Environ(), "HOME="+nodeHome, "XDG_CONFIG_HOME="+filepath.Join(nodeHome, ".config")),
diff --git a/tests/integration/sdk_mesh_test.go b/tests/integration/sdk_mesh_test.go
index 277fe480..5c8c28fe 100644
--- a/tests/integration/sdk_mesh_test.go
+++ b/tests/integration/sdk_mesh_test.go
@@ -59,7 +59,7 @@ import (
)
// sdkMesh is the real mesh the SDK tests run against: a control plane
-// publishing gossip events, a sam-router, and a sam-node serving the MCP
+// publishing gossip events, a agentmesh-router, and a agentmesh-node serving the MCP
// service "calc" from a backend the test runs.
type sdkMesh struct {
root string
@@ -92,7 +92,7 @@ type sdkMesh struct {
// against a real credential from every implementation.
var sdkMeshLabels = map[string]string{"region": "na-us", "team": "platform"}
-// The egress destination the sam-node serves, assigned to it by label, and
+// The egress destination the agentmesh-node serves, assigned to it by label, and
// the credential the platform delivered to the node's host for it.
const (
sdkMeshEgressHost = "api.example.test"
@@ -149,7 +149,7 @@ func startSDKMesh(t *testing.T) *sdkMesh {
cpPort, _ := strconv.Atoi(portStr)
// Bans and rotations reach the mesh as gossip events through the routers,
- // as the sam-control-plane binary publishes them.
+ // as the agentmesh-control-plane binary publishes them.
publisher, err := controlplane.NewMeshPublisher(context.Background(), store, 500*time.Millisecond)
if err != nil {
t.Fatalf("failed to start mesh event publisher: %v", err)
@@ -212,7 +212,7 @@ egress:
}()
go func() {
defer rwg.Done()
- nodeBin = buildBinary(t, "./cmd/sam-node")
+ nodeBin = buildBinary(t, "./cmd/agentmesh-node")
}()
rwg.Wait()
routerAddrs := []string{routerA, routerB}
@@ -223,7 +223,7 @@ egress:
t.Fatalf("failed to load control plane signing key: %v", err)
}
- // The Go node: a sam-node enrolled through OIDC, listening on loopback,
+ // The Go node: a agentmesh-node enrolled through OIDC, listening on loopback,
// serving the MCP service "calc" from a backend this test runs.
backend := httptest.NewServer(newBoundaryMCPHandler(t))
t.Cleanup(backend.Close)
@@ -287,7 +287,7 @@ egress:
const sdkMeshAgentName = "echo-agent"
-const sdkMeshStockAgentCard = `{"name":"echo-agent","description":"stock agent behind a sam-node","version":"1.0.0",` +
+const sdkMeshStockAgentCard = `{"name":"echo-agent","description":"stock agent behind a agentmesh-node","version":"1.0.0",` +
`"capabilities":{"streaming":true},` +
`"supportedInterfaces":[{"url":"http://127.0.0.1:7777/","protocolBinding":"JSONRPC","protocolVersion":"1.0"},` +
`{"url":"127.0.0.1:50051","protocolBinding":"GRPC","protocolVersion":"1.0"}],` +
@@ -363,24 +363,24 @@ var sdkMemberLaunchers = []sdkRunner{
},
}
-// TestNativeSDKsMesh runs one mesh: a control plane, a sam-router, a
-// sam-node serving an MCP service, and one member per SDK, all real. It
+// TestNativeSDKsMesh runs one mesh: a control plane, a agentmesh-router, a
+// agentmesh-node serving an MCP service, and one member per SDK, all real. It
// then walks the connectivity matrix. Every member authenticates with the
// router and gets a relay reservation, which the router grants only to
-// admitted peers. Each SDK member reaches the sam-node directly and the
+// admitted peers. Each SDK member reaches the agentmesh-node directly and the
// other SDK member both directly and through the router, and on every path
// both ends verify each other's credential with the /mesh/auth/1.0.0
-// handshake. The sam-node reaches each SDK member through the router. A Go
+// handshake. The agentmesh-node reaches each SDK member through the router. A Go
// peer that is itself admitted does the same and also checks that a forged
-// credential gets no answer. Then each SDK member discovers the sam-node's
+// credential gets no answer. Then each SDK member discovers the agentmesh-node's
// service in the DHT, lists and calls its tools over /mesh/mcp/1.0.0 through
// the router, reads the node's own catalog, and is refused a service the
-// node does not have. Every member and the sam-node attest the same labels,
+// node does not have. Every member and the agentmesh-node attest the same labels,
// and the caller-side label requirement is run as one matrix from each SDK
// against the node and from the node against each SDK agent, so the three
// implementations agree on what a requirement of several pairs means. Then
// each SDK member accepts A2A requests for its
-// agent: the sam-node reaches it by peer ID through its egress proxy
+// agent: the agentmesh-node reaches it by peer ID through its egress proxy
// (/mesh/<peer>/a2a/agent/...), the other SDK member does the same over the
// mesh, the agent is in no discovery table, the member speaks no
// /mesh/mcp/1.0.0, and a Go peer holding a role the policy grants nothing is
@@ -435,17 +435,17 @@ func TestNativeSDKsMesh(t *testing.T) {
for _, m := range members {
m := m
t.Run(m.name, func(t *testing.T) {
- // SDK -> sam-node, directly: the node's HandleAuthHandshake
+ // SDK -> agentmesh-node, directly: the node's HandleAuthHandshake
// verifies the member's biscuit and answers with its own.
nodeCred := m.auth(t, samNode.p2pAddr)
if nodeCred.PeerID != samNode.peerID.String() || !contains(nodeCred.Roles, api.RoleNode) {
t.Fatalf("%s verified the node as %+v", m.name, nodeCred)
}
if !strings.Contains(samNode.log(), "Successfully authenticated peer "+m.report.PeerID) {
- t.Errorf("sam-node log does not record admitting %s", m.report.PeerID)
+ t.Errorf("agentmesh-node log does not record admitting %s", m.report.PeerID)
}
- // sam-node -> SDK, through the router: the node reaches the member
+ // agentmesh-node -> SDK, through the router: the node reaches the member
// on its relayed address, which the router only serves for
// authenticated peers on both ends.
connectPeerWithToken(t, nodeAPI, "node-token", m.report.RelayAddresses[0])
@@ -492,7 +492,7 @@ func TestNativeSDKsMesh(t *testing.T) {
// Services. The node advertises calc in the DHT once its backend
// answered a probe; the member finds it there and calls it through
- // the router, the way sam-node's call_remote_tool would.
+ // the router, the way agentmesh-node's call_remote_tool would.
providers := m.discoverUntil(t, "mcp", serviceName, samNode.peerID.String(), 20*time.Second)
if len(providers) != 1 {
t.Fatalf("%s discovered %+v for %s, want only the node", m.name, providers, serviceName)
@@ -588,7 +588,7 @@ func TestNativeSDKsMesh(t *testing.T) {
t.Run(m.name, func(t *testing.T) {
t.Parallel()
cmd := exec.Command(m.cmd.Path, m.cmd.Args[1:]...)
- floored := launchSDKMember(t, m.name+"-floored", cmd, root, baseURL, adminToken, "SAM_SDK_EGRESS_REQUIRE_LABELS=team=nobody")
+ floored := launchSDKMember(t, m.name+"-floored", cmd, root, baseURL, adminToken, "AGENTMESH_SDK_EGRESS_REQUIRE_LABELS=team=nobody")
byFloor := func(what, target, err string) {
if !strings.Contains(err, "LabelsNotSatisfied") {
t.Errorf("%s %s to %s was not refused by the floor: %q", floored.name, what, target, err)
@@ -655,12 +655,12 @@ func TestNativeSDKsMesh(t *testing.T) {
t.Run(m.name+"-accepts", func(t *testing.T) {
sdkPeer, _ := peer.Decode(m.report.PeerID)
- // sam-node -> SDK agent, through the egress proxy: the node
+ // agentmesh-node -> SDK agent, through the egress proxy: the node
// verifies the member's credential, then the member authorizes
// the node's and answers with who called.
status, body := egressGet(t, nodeAPI, "node-token", "/mesh/"+m.report.PeerID+"/a2a/agent/card")
if status != 200 {
- t.Fatalf("sam-node egress to %s agent: status %d, body %s", m.name, status, body)
+ t.Fatalf("agentmesh-node egress to %s agent: status %d, body %s", m.name, status, body)
}
var seen struct {
SDK string `json:"sdk"`
@@ -668,7 +668,7 @@ func TestNativeSDKsMesh(t *testing.T) {
Path string `json:"path"`
}
if json.Unmarshal([]byte(body), &seen) != nil || seen.SDK != m.name || seen.Peer != samNode.peerID.String() || seen.Path != "/card" {
- t.Fatalf("sam-node egress to %s agent answered %s", m.name, body)
+ t.Fatalf("agentmesh-node egress to %s agent answered %s", m.name, body)
}
// The node's caller-side requirement against the member's
@@ -680,7 +680,7 @@ func TestNativeSDKsMesh(t *testing.T) {
}
status, body := egressGetRequiring(t, nodeAPI, "node-token", "/mesh/"+m.report.PeerID+"/a2a/agent/card", tc.required)
if status != want {
- t.Errorf("sam-node requiring %v of %s (%s): status %d %s, want %d", tc.required, m.name, tc.name, status, strings.TrimSpace(body), want)
+ t.Errorf("agentmesh-node requiring %v of %s (%s): status %d %s, want %d", tc.required, m.name, tc.name, status, strings.TrimSpace(body), want)
}
}
@@ -810,7 +810,7 @@ func TestNativeSDKsMesh(t *testing.T) {
// The control plane rotates its signing key; the retiring key stays
// valid for its grace period, and the rotation is announced as the
- // sam-control-plane binary announces it. A member learns the new key
+ // agentmesh-control-plane binary announces it. A member learns the new key
// from the event or from its next pull, and since its credential
// predates the rotation, refreshes it under the new key.
newPub, newPriv, err := ed25519.GenerateKey(nil)
@@ -843,7 +843,7 @@ func TestNativeSDKsMesh(t *testing.T) {
if _, err := identity.VerifyBiscuitAndGetExpiry(fresh, sdkPeer, []ed25519.PublicKey{cpPub}, 5*time.Second); err == nil {
t.Fatalf("%s refreshed credential still verifies under the retiring key", m.name)
}
- // The mesh keeps working under the new credential: the sam-node
+ // The mesh keeps working under the new credential: the agentmesh-node
// learned the key from the same event.
deadline := time.Now().Add(10 * time.Second)
for {
@@ -915,7 +915,7 @@ func TestNativeSDKsAcrossRouters(t *testing.T) {
wg.Add(1)
go func() {
defer wg.Done()
- m := launchSDKMember(t, sp.launcher.name+"@"+sp.router[len(sp.router)-6:], sp.cmd, mesh.root, mesh.baseURL, mesh.adminToken, "SAM_SDK_ROUTERS="+sp.router)
+ m := launchSDKMember(t, sp.launcher.name+"@"+sp.router[len(sp.router)-6:], sp.cmd, mesh.root, mesh.baseURL, mesh.adminToken, "AGENTMESH_SDK_ROUTERS="+sp.router)
m.accept(t, "agent")
members[i] = placed{m, sp.router, sp.routerAddr}
}()
@@ -976,7 +976,7 @@ func TestNativeSDKsAcrossRouters(t *testing.T) {
// A router rescheduled keeps its key and comes back on another address. A
// member that reserved on it advertises a dead relayed address until it
// reserves again, and it must do so at the router's new address: here a
-// literal one, as sam-one hands out, so there is no name to re-resolve and
+// literal one, as agentmesh-one hands out, so there is no name to re-resolve and
// only the control plane's list, which the member pulls, names it.
func TestNativeSDKsFollowAMovedRouter(t *testing.T) {
mesh := startSDKMesh(t)
@@ -991,7 +991,7 @@ func TestNativeSDKsFollowAMovedRouter(t *testing.T) {
t.Logf("%s SDK skipped: %s", launcher.name, skip)
continue
}
- m := launchSDKMember(t, launcher.name, cmd, mesh.root, mesh.baseURL, mesh.adminToken, "SAM_SDK_ROUTERS="+router, "SAM_SDK_RELAY_CHECK_SECONDS=0.5")
+ m := launchSDKMember(t, launcher.name, cmd, mesh.root, mesh.baseURL, mesh.adminToken, "AGENTMESH_SDK_ROUTERS="+router, "AGENTMESH_SDK_RELAY_CHECK_SECONDS=0.5")
if got := routerIDs(m.report); !reflect.DeepEqual(got, []string{router}) {
t.Fatalf("%s joined through %v, want %s only", m.name, got, router)
}
@@ -1063,7 +1063,7 @@ func routerIDs(report sdkJoinReport) []string {
func startSDKMember(t *testing.T, name string, cmd *exec.Cmd, root, baseURL, adminToken string, routerAddrs []string) *sdkMember {
t.Helper()
- m := launchSDKMember(t, name, cmd, root, baseURL, adminToken, "SAM_SDK_LISTEN_ADDRS=/ip4/127.0.0.1/tcp/0")
+ m := launchSDKMember(t, name, cmd, root, baseURL, adminToken, "AGENTMESH_SDK_LISTEN_ADDRS=/ip4/127.0.0.1/tcp/0")
// Every router the control plane named admitted the member, in whatever
// order it was handed them; it reserved on the first of its own list.
var admitted []string
@@ -1104,9 +1104,9 @@ func launchSDKMember(t *testing.T, name string, cmd *exec.Cmd, root, baseURL, ad
t.Fatalf("failed to write bootstrap token: %v", err)
}
return launchSDKRunner(t, name, cmd, root, baseURL, append([]string{
- "SAM_BOOTSTRAP_TOKEN_PATH=" + tokenPath,
- "SAM_SDK_LABELS=" + labelsEnv(sdkMeshLabels),
- "SAM_SDK_EGRESS_REQUIRE_LABELS=region=" + sdkMeshLabels["region"],
+ "AGENTMESH_BOOTSTRAP_TOKEN_PATH=" + tokenPath,
+ "AGENTMESH_SDK_LABELS=" + labelsEnv(sdkMeshLabels),
+ "AGENTMESH_SDK_EGRESS_REQUIRE_LABELS=region=" + sdkMeshLabels["region"],
}, env...)...)
}
@@ -1115,8 +1115,8 @@ func launchSDKMember(t *testing.T, name string, cmd *exec.Cmd, root, baseURL, ad
func launchSDKRunner(t *testing.T, name string, cmd *exec.Cmd, root, baseURL string, env ...string) *sdkMember {
t.Helper()
cmd.Env = append(append(os.Environ(),
- "SAM_CONTROL_PLANE_URL="+baseURL,
- "SAM_SDK_STATE_DIR="+filepath.Join(t.TempDir(), "state"),
+ "AGENTMESH_CONTROL_PLANE_URL="+baseURL,
+ "AGENTMESH_SDK_STATE_DIR="+filepath.Join(t.TempDir(), "state"),
), env...)
cmd.Dir = root
m := &sdkMember{name: name, cmd: cmd, stderr: &bytes.Buffer{}}
@@ -1507,7 +1507,7 @@ func (m *sdkMember) readLine(t *testing.T, timeout time.Duration) []byte {
}
}
-// newAdmittedGoPeer is a libp2p host configured like sam-node's, connected
+// newAdmittedGoPeer is a libp2p host configured like agentmesh-node's, connected
// to every router and past their auth handshakes, so each relays for it.
func newAdmittedGoPeer(t *testing.T, ctx context.Context, cpPriv ed25519.PrivateKey, routerAddrs []string) host.Host {
t.Helper()
@@ -1583,7 +1583,7 @@ func tryMCPStream(ctx context.Context, h host.Host, target peer.ID, addr multiad
}
// libp2pHTTPGet is one GET over /libp2p-http with the biscuit in
-// X-Mesh-Biscuit, the way sam-node's egress proxy sends it.
+// X-Mesh-Biscuit, the way agentmesh-node's egress proxy sends it.
func libp2pHTTPGet(t *testing.T, ctx context.Context, h host.Host, target peer.ID, biscuit []byte, path string) (int, string) {
t.Helper()
client := &http.Client{Transport: libp2phttp.NewTransport(h), Timeout: 15 * time.Second}
@@ -1601,7 +1601,7 @@ func libp2pHTTPGet(t *testing.T, ctx context.Context, h host.Host, target peer.I
return resp.StatusCode, string(body)
}
-// egressGet is a GET through sam-node's egress proxy with the node API token.
+// egressGet is a GET through agentmesh-node's egress proxy with the node API token.
func egressGet(t *testing.T, apiAddr, token, path string) (int, string) {
t.Helper()
return egressGetRequiring(t, apiAddr, token, path, nil)
@@ -1628,8 +1628,8 @@ func egressGetRequiring(t *testing.T, apiAddr, token, path string, required map[
return resp.StatusCode, string(body)
}
-// labelsEnv renders labels as "k=v,k2=v2", the form the runners' SAM_SDK_LABELS
-// and sam-node's X-Mesh-Required-Labels both take, keys sorted.
+// labelsEnv renders labels as "k=v,k2=v2", the form the runners' AGENTMESH_SDK_LABELS
+// and agentmesh-node's X-Mesh-Required-Labels both take, keys sorted.
func labelsEnv(labels map[string]string) string {
keys := make([]string, 0, len(labels))
for k := range labels {
@@ -1707,7 +1707,7 @@ func tryAuthHandshake(ctx context.Context, h host.Host, target peer.ID, addr mul
}
// refuseForgedFrame checks that target answers a frame it cannot verify
-// with a closed stream and nothing else, as sam-node does.
+// with a closed stream and nothing else, as agentmesh-node does.
func refuseForgedFrame(t *testing.T, ctx context.Context, h host.Host, target peer.ID) {
t.Helper()
s, err := h.NewStream(network.WithAllowLimitedConn(ctx, "auth"), target, api.AuthProtocolID)
diff --git a/tests/integration/service_discovery_test.go b/tests/integration/service_discovery_test.go
index 67f0f542..457a04bf 100644
--- a/tests/integration/service_discovery_test.go
+++ b/tests/integration/service_discovery_test.go
@@ -29,7 +29,7 @@ import (
)
func TestServiceDiscovery(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
_, routerAddr := startMockRouter(t)
homeA := t.TempDir()
@@ -123,7 +123,7 @@ func TestServiceDiscovery(t *testing.T) {
}
func TestServiceDiscoveryStreaming(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
_, routerAddr := startMockRouter(t)
homeA := t.TempDir()
diff --git a/tests/integration/singleport_test.go b/tests/integration/singleport_test.go
index 76b7406d..24c003a6 100644
--- a/tests/integration/singleport_test.go
+++ b/tests/integration/singleport_test.go
@@ -35,7 +35,7 @@ import (
"github.com/multiformats/go-multiaddr"
)
-// TestSinglePortWebSocketAndHTTP pins the single-binary (sam-one) topology:
+// TestSinglePortWebSocketAndHTTP pins the single-binary (agentmesh-one) topology:
// one TCP socket, owned by the router's WebSocket transport, carries both
// libp2p traffic (WebSocket upgrades) and plain HTTP requests (fallback
// handler), including control-plane routes registered on the shared mux. The
@@ -136,7 +136,7 @@ func TestSinglePortWebSocketAndHTTP(t *testing.T) {
_ = resp.Body.Close()
}
- // 2. A default-transports libp2p client (same dial path as sam-node)
+ // 2. A default-transports libp2p client (same dial path as agentmesh-node)
// connects over the very same port.
dialer, err := libp2p.New(libp2p.NoListenAddrs)
if err != nil {
diff --git a/tests/integration/standalone_sdk_test.go b/tests/integration/standalone_sdk_test.go
index d02ee4fe..f738c9b8 100644
--- a/tests/integration/standalone_sdk_test.go
+++ b/tests/integration/standalone_sdk_test.go
@@ -40,7 +40,7 @@ import (
"github.com/google/agentmesh/internal/standalone"
)
-// TestStandaloneSDKAgents pins that both SDKs work with sam-one. Its
+// TestStandaloneSDKAgents pins that both SDKs work with agentmesh-one. Its
// embedded router listens on WebSocket alone, on the single port that also
// serves the control plane, so a member that dials TCP only never gets on.
// One agent example per language (sdk/js/examples/a2a-agent.ts,
@@ -57,9 +57,9 @@ func TestStandaloneSDKAgents(t *testing.T) {
}
// TestStandaloneSDKAgentsBehindTLSEdge is the same pair behind what
-// `sam-one --tunnel` puts in front of it: a TLS-terminating edge reached by
+// `agentmesh-one --tunnel` puts in front of it: a TLS-terminating edge reached by
// name, which selects the origin by the TLS server name and the Host header
-// and answers anything else with 403, as Cloudflare does. sam-one advertises
+// and answers anything else with 403, as Cloudflare does. agentmesh-one advertises
// its router as /dns4/localhost/tcp/<edge>/wss/p2p/<id>, so each SDK must
// carry the name to the edge instead of what it resolves to. Both SDKs
// trust the edge's certificate through the file their TLS stacks read
@@ -91,7 +91,7 @@ func startStandalone(t *testing.T, ctx context.Context, opts standalone.Options)
}
// runStandaloneSDKAgents runs each language's A2A agent example against
-// sam-one at publicURL and calls it with the other language's A2A caller.
+// agentmesh-one at publicURL and calls it with the other language's A2A caller.
func runStandaloneSDKAgents(t *testing.T, ctx context.Context, srv *standalone.Server, publicURL string, extraEnv []string) {
t.Helper()
root := repoRoot(t)
@@ -117,9 +117,9 @@ func runStandaloneSDKAgents(t *testing.T, ctx context.Context, srv *standalone.S
}
env := func(stateDir string) []string {
return append([]string{
- "SAM_CONTROL_PLANE_URL=" + publicURL,
- "SAM_BOOTSTRAP_TOKEN_PATH=" + tokenPath,
- "SAM_STATE_DIR=" + filepath.Join(t.TempDir(), stateDir),
+ "AGENTMESH_CONTROL_PLANE_URL=" + publicURL,
+ "AGENTMESH_BOOTSTRAP_TOKEN_PATH=" + tokenPath,
+ "AGENTMESH_STATE_DIR=" + filepath.Join(t.TempDir(), stateDir),
"PYTHONUNBUFFERED=1",
}, extraEnv...)
}
@@ -152,7 +152,7 @@ func runStandaloneSDKAgents(t *testing.T, ctx context.Context, srv *standalone.S
caller := expectLine(t, out, "on the mesh as ")
expectLine(t, out, "agent: Echo agent, ")
if want := caller + " said: hello from " + l.name; !strings.Contains(out, want) {
- t.Fatalf("%s calling the %s agent through sam-one: want %q in\n%s", l.name, target.name, want, out)
+ t.Fatalf("%s calling the %s agent through agentmesh-one: want %q in\n%s", l.name, target.name, want, out)
}
})
}
diff --git a/tests/integration/standalone_test.go b/tests/integration/standalone_test.go
index 0e56b7d2..c12f0735 100644
--- a/tests/integration/standalone_test.go
+++ b/tests/integration/standalone_test.go
@@ -35,9 +35,9 @@ import (
"google.golang.org/protobuf/encoding/protojson"
)
-// TestStandaloneNodeJoin pins the sam-one first-boot CUJ end to end: one
+// TestStandaloneNodeJoin pins the agentmesh-one first-boot CUJ end to end: one
// standalone server provisions its own tokens, policy and embedded router,
-// and a stock sam-node enrolls with the generated join token and connects to
+// and a stock agentmesh-node enrolls with the generated join token and connects to
// the router over WebSocket through the single public port.
func TestStandaloneNodeJoin(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
@@ -57,7 +57,7 @@ func TestStandaloneNodeJoin(t *testing.T) {
t.Cleanup(func() { _ = srv.Close() })
// First boot persisted the generated credentials.
- for _, f := range []string{"join-token", "admin-token", "router.key", "sam.db"} {
+ for _, f := range []string{"join-token", "admin-token", "router.key", "agentmesh.db"} {
if _, err := os.Stat(filepath.Join(dataDir, f)); err != nil {
t.Errorf("expected %s in data dir: %v", f, err)
}
@@ -199,7 +199,7 @@ func TestStandaloneNoJoinToken(t *testing.T) {
}
body, _ := io.ReadAll(resp.Body)
_ = resp.Body.Close()
- if resp.StatusCode != http.StatusOK || strings.Contains(string(body), "sam-one join token") {
+ if resp.StatusCode != http.StatusOK || strings.Contains(string(body), "agentmesh-one join token") {
t.Fatalf("token list = %s %s; want 200 without a join token", resp.Status, body)
}
@@ -275,7 +275,7 @@ func TestStandalonePolicyFileSeedsEgress(t *testing.T) {
}
// newStandaloneTestNode returns a started, unenrolled loopback node.
-func newStandaloneTestNode(t *testing.T, ctx context.Context) *node.SamNode {
+func newStandaloneTestNode(t *testing.T, ctx context.Context) *node.AgentMeshNode {
t.Helper()
nodeStore, err := node.NewStore(t.TempDir())
if err != nil {
@@ -287,7 +287,7 @@ func newStandaloneTestNode(t *testing.T, ctx context.Context) *node.SamNode {
if err != nil {
t.Fatalf("failed to generate node key: %v", err)
}
- samNode, err := node.NewSamNode(node.Options{
+ samNode, err := node.NewAgentMeshNode(node.Options{
PrivKey: priv,
Store: nodeStore,
ListenAddrs: []string{"/ip4/127.0.0.1/tcp/0"},
diff --git a/tests/integration/sts_cuj_test.go b/tests/integration/sts_cuj_test.go
index 7bc07218..9bf09b03 100644
--- a/tests/integration/sts_cuj_test.go
+++ b/tests/integration/sts_cuj_test.go
@@ -129,9 +129,9 @@ func startGRPCExtProcCallout(t *testing.T) string {
// TestSTSTaskScopedSecurityCUJ validates the Phase 3 Security Token Service (STS),
// Task-Scoped Biscuit Attenuation, OAuth 2.1 / PKCE, Envoy ext_authz and ext_proc,
// RFC 7009 Revocation, and Outbound Border JWT Minting journeys end-to-end across
-// real sam-control-plane, sam-router, and sam-node processes.
+// real agentmesh-control-plane, agentmesh-router, and agentmesh-node processes.
func TestSTSTaskScopedSecurityCUJ(t *testing.T) {
- nodeBin := buildBinary(t, "./cmd/sam-node")
+ nodeBin := buildBinary(t, "./cmd/agentmesh-node")
tmpDir := t.TempDir()
oidcURL, mintToken := startCustomMockOIDC(t)
@@ -350,7 +350,7 @@ egress:
contractorJWT := mintToken(map[string]any{"sub": "contractor-user", "email": "[email protected]"})
// Gateway proxy in front of caller node's mesh dataplane that consults
- // caller node's /ext_authz before forwarding through /sam/<pepPeer>/egress/api.github.com.
+ // caller node's /ext_authz before forwarding through /mesh/<pepPeer>/egress/api.github.com.
extAuthzGateway := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
checkURL := "http://" + callerAPI + "/ext_authz/egress/api.github.com" + r.URL.Path
checkReq, err := http.NewRequestWithContext(r.Context(), r.Method, checkURL, nil)
@@ -473,7 +473,7 @@ egress:
// 2. Allowed by both developer role and tar_block: GET /repos/acme/public/readme
// Also verifies the egress ext_proc callout mutated X-Ext-Proc-Inspected=true
- // and sam-node injected Authorization: Bearer ghp_upstream_secret.
+ // and agentmesh-node injected Authorization: Bearer ghp_upstream_secret.
if got, body := doWithCred(http.MethodGet, "/repos/acme/public/readme", taskBiscuit); got != http.StatusOK || !strings.Contains(body, `"auth":"Bearer ghp_upstream_secret"`) {
t.Fatalf("GET /repos/acme/public/readme with taskBiscuit: status=%d body=%s", got, body)
}
@@ -545,7 +545,7 @@ egress:
}
})
- t.Run("Gateway ext_proc over h2c datapath on live sam-node (egress credential injection and MCP tools/call across mesh)", func(t *testing.T) {
+ t.Run("Gateway ext_proc over h2c datapath on live agentmesh-node (egress credential injection and MCP tools/call across mesh)", func(t *testing.T) {
cc, err := grpc.NewClient("passthrough:///"+pepAPI, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
t.Fatalf("grpc.NewClient: %v", err)
@@ -646,7 +646,7 @@ egress:
applyMuts(bodyProcResp.GetRequestBody().GetResponse().GetHeaderMutation())
}
- // Route /sam/... requests through caller node's real libp2p mesh proxy,
+ // Route /mesh/... requests through caller node's real libp2p mesh proxy,
// and direct egress Host-routed requests to upstream.
targetBase := upstream.URL
if strings.HasPrefix(r.URL.Path, "/mesh/") {