ccproxy.plugins.codex.detection_service¶
ccproxy.plugins.codex.detection_service
¶
Service for detecting Codex CLI using centralized detection.
CodexDetectionService
¶
CodexDetectionService(
settings,
cli_service=None,
codex_settings=None,
redact_sensitive_cache=True,
)
Service for automatically detecting Codex CLI headers at startup.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
Settings
|
Application settings |
required |
cli_service
|
CLIDetectionService | None
|
Optional CLI detection service for dependency injection. If None, creates its own instance. |
None
|
codex_settings
|
CodexSettings | None
|
Optional Codex plugin settings for plugin-specific configuration. If None, uses default configuration. |
None
|
Source code in ccproxy/plugins/codex/detection_service.py
initialize_detection
async
¶
Initialize Codex detection at startup.
Source code in ccproxy/plugins/codex/detection_service.py
get_cached_data
¶
get_detected_headers
¶
Return cached headers as structured data.
get_detected_prompts
¶
Return cached prompt metadata as structured data.
get_ignored_headers
¶
get_redacted_headers
¶
get_version
¶
Get the Codex CLI version.
Returns:
| Type | Description |
|---|---|
str
|
Version string or "unknown" if not available |
get_cli_path
¶
get_binary_path
¶
get_cli_health_info
¶
Get lightweight CLI health info using centralized detection, cached locally.
Returns:
| Type | Description |
|---|---|
CodexCliInfo
|
CodexCliInfo with availability, version, and binary path |
Source code in ccproxy/plugins/codex/detection_service.py
invalidate_cache
¶
Clear all cached detection data.
Source code in ccproxy/plugins/codex/detection_service.py
get_system_prompt
¶
Return an instructions dict for injection based on cached prompts.