Skip to content

Commit 9e76be9

Browse files
committed
docs: update documentation for v1.1.0 release
- Update CHANGELOG.md with v1.1.0 features and improvements - Update README.md to reflect JSON default format and new timeout recommendations - Update CONTRIBUTING.md examples to match current API - Bump version to 1.1.0 in __init__.py Changes include better default configuration documentation, updated examples, and comprehensive timeout guidance.
1 parent 37a4d35 commit 9e76be9

4 files changed

Lines changed: 88 additions & 38 deletions

File tree

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.0] - 2025-01-28
9+
10+
### Changed
11+
- **Default Format**: Changed default output format from "text" to "json" for structured responses
12+
- **Default Timeout**: Increased default timeout from 60 to 90 seconds for better reliability
13+
- **Documentation**: Updated function docstrings with timeout recommendations (60-120 seconds)
14+
- **User Experience**: Improved out-of-the-box configuration to prevent hanging issues
15+
16+
### Added
17+
- Enhanced timeout guidance in function documentation
18+
- Better default configuration for production use
19+
20+
### Fixed
21+
- Reduced likelihood of timeout-related hanging during complex queries
22+
- Improved structured output consistency with JSON default
23+
24+
## [1.0.1] - 2025-01-28
25+
26+
### Fixed
27+
- **Process Management**: Resolved infinite codex process spawning issue
28+
- **CLI Integration**: Improved subprocess handling for better stability
29+
30+
### Changed
31+
- **CI/CD**: Updated CI status badge URL to reflect new repository location
32+
- **Build Process**: Removed deprecated activation scripts and configuration files
33+
834
## [1.0.0] - 2025-01-28
935

1036
### Added

CONTRIBUTING.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,20 @@ import json
7777
def consult_codex(
7878
query: str,
7979
directory: str = ".",
80-
model: Optional[str] = None
80+
format: str = "json",
81+
timeout: Optional[int] = None
8182
) -> str:
8283
"""
8384
Send a query to Codex CLI.
8485
8586
Args:
8687
query: The question or prompt to send
8788
directory: Working directory for the query
88-
model: Optional model name (flash, pro)
89+
format: Output format - "text", "json", or "code" (default: "json")
90+
timeout: Optional timeout in seconds (recommended: 60-120)
8991
9092
Returns:
91-
Codex's response as a string
93+
Codex's response as a formatted string
9294
9395
Raises:
9496
RuntimeError: If CLI is not available or query fails
@@ -204,10 +206,11 @@ Please read our [Code of Conduct](CODE_OF_CONDUCT.md) for community interaction
204206
Before submitting, verify:
205207

206208
- [ ] MCP server starts without errors
207-
- [ ] `consult_codex` tool works with basic queries
208-
- [ ] `consult_codex_with_files` tool works with file attachments
209+
- [ ] `consult_codex` tool works with basic queries (defaults to JSON format)
210+
- [ ] `consult_codex_with_stdin` tool works with stdin content
211+
- [ ] `consult_codex_batch` tool works for batch processing
209212
- [ ] Error handling works properly (try invalid queries)
210-
- [ ] Both `start_server_dev.sh` and `start_server_uvx.sh` work
213+
- [ ] Timeout configuration works (test with CODEX_TIMEOUT environment variable)
211214
- [ ] Documentation is updated and accurate
212215

213216
### Integration Testing

README.md

Lines changed: 51 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ A lightweight MCP (Model Context Protocol) server that enables AI coding assista
1414
- **Direct Codex CLI Integration**: Zero API costs using official Codex CLI
1515
- **Simple MCP Tools**: Two core functions for basic queries and file analysis
1616
- **Stateless Operation**: No sessions, caching, or complex state management
17-
- **Production Ready**: Robust error handling with configurable 60-second timeouts
17+
- **Production Ready**: Robust error handling with configurable timeouts (default: 90 seconds)
1818
- **Minimal Dependencies**: Only requires `mcp>=1.0.0` and Codex CLI
1919
- **Easy Deployment**: Support for both uvx and traditional pip installation
2020
- **Universal MCP Compatibility**: Works with any MCP-compatible AI coding assistant
@@ -342,7 +342,7 @@ Once configured with any client, use the same two tools:
342342

343343
### Timeout Configuration
344344

345-
By default, Codex Bridge uses a 60-second timeout for all CLI operations. For longer queries (large files, complex analysis), you can configure a custom timeout using the `CODEX_BRIDGE_TIMEOUT` environment variable.
345+
By default, Codex Bridge uses a 90-second timeout for all CLI operations. For longer queries (large files, complex analysis), you can configure a custom timeout using the `CODEX_TIMEOUT` environment variable.
346346

347347
**Example configurations:**
348348

@@ -351,7 +351,7 @@ By default, Codex Bridge uses a 60-second timeout for all CLI operations. For lo
351351

352352
```bash
353353
# Add with custom timeout (120 seconds)
354-
claude mcp add codex-bridge -s user --env CODEX_BRIDGE_TIMEOUT=120 -- uvx codex-bridge
354+
claude mcp add codex-bridge -s user --env CODEX_TIMEOUT=120 -- uvx codex-bridge
355355
```
356356

357357
</details>
@@ -366,7 +366,7 @@ claude mcp add codex-bridge -s user --env CODEX_BRIDGE_TIMEOUT=120 -- uvx codex-
366366
"command": "uvx",
367367
"args": ["codex-bridge"],
368368
"env": {
369-
"CODEX_BRIDGE_TIMEOUT": "120"
369+
"CODEX_TIMEOUT": "120"
370370
}
371371
}
372372
}
@@ -376,46 +376,58 @@ claude mcp add codex-bridge -s user --env CODEX_BRIDGE_TIMEOUT=120 -- uvx codex-
376376
</details>
377377

378378
**Timeout Options:**
379-
- **Default**: 60 seconds (if not configured)
379+
- **Default**: 90 seconds (if not configured)
380380
- **Range**: Any positive integer (seconds)
381-
- **Recommended**: 120-300 seconds for large file analysis
382-
- **Invalid values**: Fall back to 60 seconds with warning
381+
- **Recommended**: 60-120 seconds for most queries, 120-300 for large file analysis
382+
- **Invalid values**: Fall back to 90 seconds with warning
383383

384384
## 🛠️ Available Tools
385385

386386
### `consult_codex`
387-
Direct CLI bridge for simple queries.
387+
Direct CLI bridge for simple queries with structured JSON output by default.
388388

389389
**Parameters:**
390390
- `query` (string): The question or prompt to send to Codex
391391
- `directory` (string): Working directory for the query (default: current directory)
392-
- `model` (string, optional): Model to use (optional)
392+
- `format` (string): Output format - "text", "json", or "code" (default: "json")
393+
- `timeout` (int, optional): Timeout in seconds (recommended: 60-120, default: 90)
393394

394395
**Example:**
395396
```python
396397
consult_codex(
397398
query="Find authentication patterns in this codebase",
398399
directory="/path/to/project",
399-
model="flash"
400+
format="json", # Default format
401+
timeout=90 # Default timeout
400402
)
401403
```
402404

403-
### `consult_codex_with_files`
404-
CLI bridge with file attachments for detailed analysis.
405+
### `consult_codex_with_stdin`
406+
CLI bridge with stdin content for pipeline-friendly execution.
405407

406408
**Parameters:**
407-
- `query` (string): The question or prompt to send to Codex
409+
- `stdin_content` (string): Content to pipe as stdin (file contents, diffs, logs)
410+
- `prompt` (string): The prompt to process the stdin content
408411
- `directory` (string): Working directory for the query
409-
- `files` (list): List of file paths relative to the directory
410-
- `model` (string, optional): Model to use (optional)
412+
- `format` (string): Output format - "text", "json", or "code" (default: "json")
413+
- `timeout` (int, optional): Timeout in seconds (recommended: 60-120, default: 90)
414+
415+
### `consult_codex_batch`
416+
Batch processing for multiple queries - perfect for CI/CD automation.
417+
418+
**Parameters:**
419+
- `queries` (list): List of query dictionaries with 'query' and optional 'timeout'
420+
- `directory` (string): Working directory for all queries
421+
- `format` (string): Output format - currently only "json" supported for batch
411422

412423
**Example:**
413424
```python
414-
consult_codex_with_files(
415-
query="Analyze these auth files and suggest improvements",
425+
consult_codex_with_stdin(
426+
stdin_content=open("src/auth.py").read(),
427+
prompt="Analyze this auth file and suggest improvements",
416428
directory="/path/to/project",
417-
files=["src/auth.py", "src/models.py"],
418-
model="pro"
429+
format="json", # Default format
430+
timeout=120 # Custom timeout for complex analysis
419431
)
420432
```
421433

@@ -433,21 +445,29 @@ consult_codex(
433445
### Detailed File Review
434446
```python
435447
# Analyze specific files
436-
consult_codex_with_files(
437-
query="Review these files and suggest security improvements",
448+
with open("/Users/dev/my-project/src/auth.py") as f:
449+
auth_content = f.read()
450+
451+
consult_codex_with_stdin(
452+
stdin_content=auth_content,
453+
prompt="Review this file and suggest security improvements",
438454
directory="/Users/dev/my-project",
439-
files=["src/auth.py", "src/middleware.py"],
440-
model="pro"
455+
format="json", # Structured output
456+
timeout=120 # Allow more time for detailed analysis
441457
)
442458
```
443459

444-
### Multi-file Analysis
460+
### Batch Processing
445461
```python
446-
# Compare multiple implementation files
447-
consult_codex_with_files(
448-
query="Compare these database implementations and recommend the best approach",
462+
# Process multiple queries at once
463+
consult_codex_batch(
464+
queries=[
465+
{"query": "Analyze authentication patterns", "timeout": 60},
466+
{"query": "Review database implementations", "timeout": 90},
467+
{"query": "Check security vulnerabilities", "timeout": 120}
468+
],
449469
directory="/Users/dev/my-project",
450-
files=["src/db/postgres.py", "src/db/sqlite.py", "src/db/redis.py"]
470+
format="json" # Always JSON for batch processing
451471
)
452472
```
453473

@@ -456,7 +476,8 @@ consult_codex_with_files(
456476
### Core Design
457477
- **CLI-First**: Direct subprocess calls to `codex` command
458478
- **Stateless**: Each tool call is independent with no session state
459-
- **Fixed Timeout**: 60-second maximum execution time
479+
- **Configurable Timeout**: 90-second default execution time (configurable)
480+
- **Structured Output**: JSON format by default for better integration
460481
- **Simple Error Handling**: Clear error messages with fail-fast approach
461482

462483
### Project Structure
@@ -516,7 +537,7 @@ codex --version
516537
### Common Error Messages
517538
- **"CLI not available"**: Codex CLI is not installed or not in PATH
518539
- **"Authentication required"**: Run `codex auth login`
519-
- **"Timeout after 60 seconds"**: Query took too long, try breaking it into smaller parts
540+
- **"Timeout after X seconds"**: Query took too long, try increasing timeout or breaking into smaller parts
520541

521542
## 🤝 Contributing
522543

src/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
MCP Codex Assistant - Simple CLI bridge to OpenAI Codex.
3-
Version 1.0.1 - Production ready, radically simplified.
3+
Version 1.1.0 - Improved defaults and configuration.
44
"""
55

66
from .mcp_server import main
77

8-
__version__ = "1.0.1"
8+
__version__ = "1.1.0"
99
__all__ = ["main"]

0 commit comments

Comments
 (0)