Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pmoves/docker-compose.agents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,14 @@ services:
- A0_SET_browser_model_name=tensorzero::function_name::agent_zero
- A0_SET_browser_model_api_base=http://tensorzero-gateway:3000/openai/v1
- A0_SET_a2a_server_enabled=true
- A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:?MCP_SERVER_TOKEN must be set when a2a_server_enabled=true}
# A0_SET_mcp_server_token: soft default (CANONICAL_NAMES.md §5). The previous
# ${MCP_SERVER_TOKEN:?...} hard-require made *every* compose invocation on the
# shared file fail interpolation on nodes without the var — blocking bring-up
# of unrelated services (hit on Knuckles 2026-07-06). Use ${...:-} not :? —
# a pinned MCP_SERVER_TOKEN is STILL bridged to Agent Zero's setting (Codex
# #1977: AZ reads A0_SET_* not the plain env var, so the pin must be mapped);
# unset → empty, no hard-fail, Agent Zero auto-generates at startup.
- A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:-}
Comment on lines +88 to +95

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Remove A0_SET_mcp_server_token from environment:

environment: overrides env_file:, so A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:-} will blank out any pinned value from env.tier-agent whenever MCP_SERVER_TOKEN is unset in the host shell. Let env.tier-agent supply it instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pmoves/docker-compose.agents.yml` around lines 88 - 95, The
A0_SET_mcp_server_token entry in the compose service environment is overriding
env_file and can blank out the pinned token from env.tier-agent when
MCP_SERVER_TOKEN is unset. Remove this environment mapping from the relevant
service configuration so env.tier-agent remains the source of truth, and keep
the surrounding Agent Zero token handling in the compose setup unchanged.

# Host environment leak guard (see x-host-leak-guard docs above)
- SSL_CERT_FILE=
- SSL_CERT_DIR=
Expand Down
9 changes: 8 additions & 1 deletion pmoves/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2648,7 +2648,14 @@ services:
- A0_SET_browser_model_name=tensorzero::function_name::agent_zero
- A0_SET_browser_model_api_base=http://tensorzero-gateway:3000/openai/v1
- A0_SET_a2a_server_enabled=true
- A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:?MCP_SERVER_TOKEN must be set when a2a_server_enabled=true}
# A0_SET_mcp_server_token: soft default (CANONICAL_NAMES.md §5). The previous
# ${MCP_SERVER_TOKEN:?...} hard-require made *every* compose invocation on the
# shared file fail interpolation on nodes without the var — blocking bring-up
# of unrelated services (hit on Knuckles 2026-07-06). Use ${...:-} not :? —
# a pinned MCP_SERVER_TOKEN is STILL bridged to Agent Zero's setting (Codex
# #1977: AZ reads A0_SET_* not the plain env var, so the pin must be mapped);
# unset → empty, no hard-fail, Agent Zero auto-generates at startup.
- A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:-}
# Host environment leak guard (see x-host-leak-guard docs above)
- SSL_CERT_FILE=
- SSL_CERT_DIR=
Expand Down
8 changes: 8 additions & 0 deletions pmoves/env.tier-agent.example
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ DEEPRESEARCH_NOTEBOOK_EMBED=true
# Discord Publisher (optional)
# ---------------------------------------------------------------------------
DISCORD_WEBHOOK_URL= # Optional: Discord webhook for notifications

# ---------------------------------------------------------------------------
# Agent Zero MCP server token (CANONICAL_NAMES.md §5)
# ---------------------------------------------------------------------------
# Canonical home for the MCP/a2a token. Compose intentionally does NOT set
# A0_SET_mcp_server_token in its env list — pin it here to make it durable,
# or leave unset and Agent Zero auto-generates one at startup.
# A0_SET_mcp_server_token=
Comment on lines +77 to +84

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Documentation itself is correct, but conflicts with actual compose behavior.

This documentation correctly states the canonical pinning contract — pin A0_SET_mcp_server_token in env.tier-agent, leave unset for auto-generation. However, as written, this is currently broken by docker-compose.agents.yml and docker-compose.yml, both of which still set A0_SET_mcp_server_token=${MCP_SERVER_TOKEN:-} under environment:, which overrides whatever value is pinned here when MCP_SERVER_TOKEN is unset in the shell (see comments on those files). No change needed here once the compose files are fixed to drop that environment: entry.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pmoves/env.tier-agent.example` around lines 77 - 84, The documented pinning
contract for A0_SET_mcp_server_token is being overridden by the compose
configuration, so fix the compose files rather than this env example. In
docker-compose.agents.yml and docker-compose.yml, remove the environment entry
that sets A0_SET_mcp_server_token from MCP_SERVER_TOKEN so the value from
env.tier-agent can persist when pinned, and only leave it unset for
auto-generation behavior.

Loading