The agent that turns websites into APIs!
release: v0.3.1 - Chrome extension beta
kalil0321875838f7465c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5e8786f..fd16f82 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).+## [0.3.1] - 2026-01-15++### Added+- **Chrome Extension (WIP)**: Beta support for capturing browser traffic via Chrome extension+ - Alternative to Playwright browser for HAR capture+ - Works with existing browser sessions+ - Note: This feature is work in progress and may have limitations++### Fixed+- **OpenCode Server**: Fixed error formatting and connection handling+- **Process Title**: Added process title for better identification in system monitors+- **Auth Error Handling**: Improved handling of authentication failures+## [0.3.0] - 2026-01-10### Addeddiff --git a/pyproject.toml b/pyproject.tomlindex 719cf53..38a095e 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[project]name = "reverse-api-engineer"-version = "0.3.0"+version = "0.3.1"description = "A tool to capture browser traffic for API reverse engineering"readme = "README.md"requires-python = ">=3.11"diff --git a/src/reverse_api/opencode_engineer.py b/src/reverse_api/opencode_engineer.pyindex 2d12975..47e7c84 100644--- a/src/reverse_api/opencode_engineer.py+++ b/src/reverse_api/opencode_engineer.py@@ -31,17 +31,17 @@ def format_error(e: Exception) -> str:"""Format exception with full details in a pretty, readable format."""error_type = type(e).__name__error_msg = str(e)-+# Build comprehensive error message with pretty formattinglines = []-+# Main error line - always show error type and messageif error_msg:lines.append(f"[bold red]✗ {error_type}[/bold red]")lines.append(f" {error_msg}")else:lines.append(f"[bold red]✗ {error_type}[/bold red] (no message)")-+# Add additional context for specific exception typesif isinstance(e, httpx.HTTPStatusError):if hasattr(e, "response") and e.response is not None:@@ -49,11 +49,12 @@ def format_error(e: Exception) -> str:status_code = e.response.status_codestatus_text = e.response.reason_phrase or "Unknown"lines.append(f"\n[dim]HTTP Status:[/dim] [yellow]{status_code}[/yellow] {status_text}")-+# Try to parse JSON response for better formattingtry:response_json = e.response.json()import json+response_text = json.dumps(response_json, indent=2)[:1000] # Limit to 1000 charslines.append(f"\n[dim]Response Body:[/dim]")# Split into lines and indent@@ -67,30 +68,31 @@ def format_error(e: Exception) -> str:lines.append(f" [dim]{response_text}[/dim]")except Exception:pass-+elif isinstance(e, httpx.ConnectError):lines.append(f"\n[dim]Unable to connect to OpenCode server[/dim]")if error_msg and "Connection refused" not in error_msg:lines.append(f" [dim]{error_msg}[/dim]")-+elif isinstance(e, httpx.ReadError):lines.append(f"\n[dim]Connection was interrupted while reading response[/dim]")if error_msg:lines.append(f" [dim]{error_msg}[/dim]")-+elif isinstance(e, httpx.TimeoutException):lines.append(f"\n[dim]Request timed out[/dim]")if error_msg:lines.append(f" [dim]{error_msg}[/dim]")-+# In debug mode, include tracebackif DEBUG:import traceback+tb_str = "".join(traceback.format_exception(type(e), e, e.__traceback__))lines.append(f"\n[dim]Traceback:[/dim]")for line in tb_str.split("\n"):lines.append(f" [dim]{line}[/dim]")-+return "\n".join(lines)