You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reconcile docs with runtime behavior for env vars, launch flags, and config semantics (#5779)
Nightly reconciliation found drift between docs/comments and
implementation across environment variables, startup behavior, and
config field support. This PR aligns operator-facing docs and inline
config comments with current code paths to remove ambiguity in
day-to-day usage.
- **Environment variable reference alignment**
- Added missing vars to `AGENTS.md`:
- `GITHUB_MCP_SERVER_TOKEN` (documented as highest-priority auth token)
- `OTEL_EXPORTER_OTLP_ENDPOINT`, `OTEL_SERVICE_NAME` (CLI default
sources for tracing flags)
- `AWMG_BINARY_PATH`, `AWMG_WASM_GUARD_PATH` (integration test
overrides)
- Corrected `run.sh` note in `AGENTS.md` to reflect actual priority:
`MCP_GATEWAY_PORT` first, then `PORT`.
- Updated `docs/ENVIRONMENT_VARIABLES.md` so `DOCKER_API_VERSION` is
documented under helper-script variables (not binary-consumed vars).
- **Launch/config discoverability**
- Documented `--sequential-launch` in both `AGENTS.md` and
`CONTRIBUTING.md`.
- Documented JSON stdin server `args` behavior in `AGENTS.md` (extra
Docker runtime args inserted before image).
- **Terminology and package description consistency**
- Aligned `CONTRIBUTING.md` package descriptions with `AGENTS.md`:
- `internal/guard`: `WriteSinkGuard` naming
- `internal/httputil`: “Shared HTTP helper utilities (server responses,
proxy transport)”
- **Config semantics clarification**
- Corrected `ServerConfig` comments for `RateLimitThreshold` and
`RateLimitCooldown` in `internal/config/config_core.go` to state
TOML-only support (not JSON stdin).
- **Example guidance cleanup**
- Added a clarifying comment in `config.example-payload-threshold.toml`
that `/tmp` there is a runtime data-dir example, distinct from agent
file-editing guidance.
```go
// Supported in TOML config only; the JSON stdin config does not currently accept this field.
RateLimitThreshold int `toml:"rate_limit_threshold" json:"rate_limit_threshold,omitempty"`
// Supported in TOML config only; the JSON stdin config does not currently accept this field.
RateLimitCooldown int `toml:"rate_limit_cooldown" json:"rate_limit_cooldown,omitempty"`
```
-`MCP_GATEWAY_TLS_KEY` - Path to TLS server private key PEM file; required when `MCP_GATEWAY_TLS_CERT` is set (sets default for `--tls-key`)
405
408
-`MCP_GATEWAY_CA_CERT` - Path to CA certificate PEM file for client certificate verification; enables mutual TLS (mTLS) when set alongside `MCP_GATEWAY_TLS_CERT`/`MCP_GATEWAY_TLS_KEY` (sets default for `--tls-ca`)
406
409
-`MCP_GATEWAY_HMAC_SECRET` - Shared HMAC-SHA256 secret for request signing and replay protection; when set, requests to MCP handlers must carry valid `X-MCP-Timestamp`, `X-MCP-Nonce`, and `X-MCP-Signature` headers (sets default for `--hmac-secret`)
410
+
-`OTEL_EXPORTER_OTLP_ENDPOINT` - OTLP HTTP endpoint for trace export; sets default for `--otlp-endpoint`
411
+
-`OTEL_SERVICE_NAME` - Service name in traces; sets default for `--otlp-service-name`
412
+
-`AWMG_BINARY_PATH` - Override binary path for integration tests
413
+
-`AWMG_WASM_GUARD_PATH` - Override WASM guard path for proxy integration tests
407
414
-`RUNNING_IN_CONTAINER` - Set to `"true"` to force container detection when `/.dockerenv` and cgroup detection are unavailable
408
415
409
-
**Note:**`MCP_GATEWAY_PORT` is read by the `awmg` binary for environment validation (`--validate-env`) only. Plain `PORT`, `HOST`, and `MODE` are not read by `awmg` directly. However, `run.sh` uses `PORT`, `HOST` (default: `0.0.0.0`), and `MODE` (default: `--routed`) to set the bind address and routing mode. Use the `--listen` and `--routed`/`--unified` flags when running `awmg` directly.
416
+
**Note:**`MCP_GATEWAY_PORT` is read by the `awmg` binary for environment validation (`--validate-env`) only. Plain `PORT`, `HOST`, and `MODE` are not read by `awmg` directly. However, `run.sh` uses `MCP_GATEWAY_PORT` (falling back to `PORT`), `HOST` (default: `0.0.0.0`), and `MODE` (default: `--routed`) to set the bind address and routing mode. Use the `--listen` and `--routed`/`--unified` flags when running `awmg` directly.
410
417
411
418
**File Logging:**
412
419
- Operational logs are always written to log files in the configured log directory
|`DOCKER_API_VERSION`| Docker API version (set by helper scripts, Docker client auto-negotiates) | Set by querying Docker daemon's current API version; falls back to `1.44` if detection fails |
58
+
59
+
### Helper/CLI Docker Variables
60
+
61
+
| Variable | Description | Default |
62
+
|----------|-------------|---------|
63
+
|`DOCKER_API_VERSION`| Docker API version used by helper scripts such as `run.sh`, integration test scripts, and `run_containerized.sh`. The Docker Go client in `awmg` auto-negotiates API version, but an exported `DOCKER_API_VERSION` can still affect `docker` CLI subprocesses launched with the inherited environment. | Set by querying Docker daemon's current API version; falls back to `1.44` if detection fails |
0 commit comments