Skip to content

Commit 895dae4

Browse files
Claudelpcox
andcommitted
Fix documentation discrepancies: payload threshold and internal directories
- Update README.md default payload size threshold from 1024 to 10240 bytes (3 locations) - Add missing 9 internal directories to CONTRIBUTING.md project structure - Add missing 7 internal directories to AGENTS.md project structure - All 16 internal directories now documented in alphabetical order Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 9906684 commit 895dae4

3 files changed

Lines changed: 36 additions & 13 deletions

File tree

AGENTS.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,24 @@ Quick reference for AI agents working with MCP Gateway (Go-based MCP proxy serve
2121

2222
## Project Structure
2323

24+
- `internal/auth/` - Authentication header parsing and middleware
2425
- `internal/cmd/` - CLI (Cobra)
2526
- `internal/config/` - Config parsing (TOML/JSON) with validation
2627
- `validation.go` - Variable expansion and fail-fast validation
2728
- `validation_test.go` - 21 comprehensive validation tests
28-
- `internal/server/` - HTTP server (routed/unified modes)
29-
- `internal/mcp/` - MCP protocol types with enhanced error logging
30-
- `internal/launcher/` - Backend process management
29+
- `internal/difc/` - Data Information Flow Control
30+
- `internal/envutil/` - Environment variable utilities
3131
- `internal/guard/` - Security guards (NoopGuard active)
32-
- `internal/auth/` - Authentication header parsing and middleware
32+
- `internal/launcher/` - Backend process management
3333
- `internal/logger/` - Debug logging framework (micro logger)
34+
- `internal/mcp/` - MCP protocol types with enhanced error logging
35+
- `internal/middleware/` - HTTP middleware (jq schema processing)
36+
- `internal/server/` - HTTP server (routed/unified modes)
37+
- `internal/sys/` - System utilities
38+
- `internal/testutil/` - Test utilities and helpers
3439
- `internal/timeutil/` - Time formatting utilities
40+
- `internal/tty/` - Terminal detection utilities
41+
- `internal/version/` - Version management
3542

3643
## Key Tech
3744

CONTRIBUTING.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,26 +211,42 @@ awmg/
211211
├── Dockerfile # Container image
212212
├── Makefile # Build automation
213213
└── internal/
214+
├── auth/ # Authentication header parsing and middleware
214215
├── cmd/ # CLI commands (cobra)
215216
├── config/ # Configuration loading (TOML/JSON)
217+
├── difc/ # Data Information Flow Control
218+
├── envutil/ # Environment variable utilities
219+
├── guard/ # Security guards (NoopGuard active)
216220
├── launcher/ # Backend server management
221+
├── logger/ # Debug logging framework
217222
├── mcp/ # MCP protocol types & connection
223+
├── middleware/ # HTTP middleware (jq schema processing)
218224
├── server/ # HTTP server (routed/unified modes)
219-
├── guard/ # Security guards (NoopGuard active)
220-
├── logger/ # Debug logging framework
225+
├── sys/ # System utilities
226+
├── testutil/ # Test utilities and helpers
221227
├── timeutil/ # Time formatting utilities
222-
└── tty/ # Terminal detection utilities
228+
├── tty/ # Terminal detection utilities
229+
└── version/ # Version management
223230
```
224231

225232
### Key Directories
226233

234+
- **`internal/auth/`** - Authentication header parsing and middleware
227235
- **`internal/cmd/`** - CLI implementation using Cobra framework
228236
- **`internal/config/`** - Configuration parsing for TOML and JSON formats
229-
- **`internal/server/`** - HTTP server with routed and unified modes
230-
- **`internal/mcp/`** - MCP protocol types and JSON-RPC handling
231-
- **`internal/launcher/`** - Backend process management (Docker, stdio)
237+
- **`internal/difc/`** - Data Information Flow Control
238+
- **`internal/envutil/`** - Environment variable utilities
232239
- **`internal/guard/`** - Guard framework for resource labeling
240+
- **`internal/launcher/`** - Backend process management (Docker, stdio)
233241
- **`internal/logger/`** - Micro logger for debug output
242+
- **`internal/mcp/`** - MCP protocol types and JSON-RPC handling
243+
- **`internal/middleware/`** - HTTP middleware (jq schema processing)
244+
- **`internal/server/`** - HTTP server with routed and unified modes
245+
- **`internal/sys/`** - System utilities
246+
- **`internal/testutil/`** - Test utilities and helpers
247+
- **`internal/timeutil/`** - Time formatting utilities
248+
- **`internal/tty/`** - Terminal detection utilities
249+
- **`internal/version/`** - Version management
234250

235251
## Coding Conventions
236252

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ See **[Configuration Specification](https://github.com/github/gh-aw/blob/main/do
202202

203203
**Configuration Alternatives**:
204204
- **`payloadSizeThreshold`** is not supported in JSON stdin format. Use:
205-
- CLI flag: `--payload-size-threshold <bytes>` (default: 1024)
205+
- CLI flag: `--payload-size-threshold <bytes>` (default: 10240)
206206
- Environment variable: `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD=<bytes>`
207207
- Payloads **larger** than this threshold are stored to disk and return metadata
208208
- Payloads **smaller than or equal** to this threshold are returned inline
@@ -278,7 +278,7 @@ Flags:
278278
-l, --listen string HTTP server listen address (default "127.0.0.1:3000")
279279
--log-dir string Directory for log files (falls back to stdout if directory cannot be created) (default "/tmp/gh-aw/mcp-logs")
280280
--payload-dir string Directory for storing large payload files (segmented by session ID) (default "/tmp/jq-payloads")
281-
--payload-size-threshold int Size threshold (in bytes) for storing payloads to disk. Payloads larger than this are stored, smaller ones returned inline (default 1024)
281+
--payload-size-threshold int Size threshold (in bytes) for storing payloads to disk. Payloads larger than this are stored, smaller ones returned inline (default 10240)
282282
--routed Run in routed mode (each backend at /mcp/<server>)
283283
--sequential-launch Launch MCP servers sequentially during startup (parallel launch is default)
284284
--unified Run in unified mode (all backends at /mcp)
@@ -316,7 +316,7 @@ When running locally (`run.sh`), these variables are optional (warnings shown if
316316
| `MODE` | Gateway mode flag | `--routed` |
317317
| `MCP_GATEWAY_LOG_DIR` | Log file directory (sets default for `--log-dir` flag) | `/tmp/gh-aw/mcp-logs` |
318318
| `MCP_GATEWAY_PAYLOAD_DIR` | Large payload storage directory (sets default for `--payload-dir` flag) | `/tmp/jq-payloads` |
319-
| `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD` | Size threshold in bytes for payload storage (sets default for `--payload-size-threshold` flag) | `1024` |
319+
| `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD` | Size threshold in bytes for payload storage (sets default for `--payload-size-threshold` flag) | `10240` |
320320

321321
### Docker Configuration
322322

0 commit comments

Comments
 (0)