ccproxy.plugins.claude_sdk.detection_service¶
ccproxy.plugins.claude_sdk.detection_service
¶
Claude SDK CLI detection service using centralized detection.
ClaudeDetectionData
¶
ClaudeSDKDetectionService
¶
Service for detecting Claude CLI availability.
This detection service checks if the Claude CLI exists either as a direct binary in PATH or via package manager execution (e.g., bunx). Unlike the Claude API plugin, this doesn't support fallback mode as the SDK requires the actual CLI to be present.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
Settings
|
Application settings |
required |
cli_service
|
CLIDetectionService | None
|
Optional CLI detection service instance. If None, creates a new one. |
None
|
Source code in ccproxy/plugins/claude_sdk/detection_service.py
initialize_detection
async
¶
Initialize Claude CLI detection with caching.
Returns:
| Type | Description |
|---|---|
ClaudeDetectionData
|
ClaudeDetectionData with detection results |
Note
No fallback support - SDK requires actual CLI presence
Source code in ccproxy/plugins/claude_sdk/detection_service.py
get_version
¶
Get the detected Claude CLI version.
Returns:
| Type | Description |
|---|---|
str | None
|
Version string if available, None otherwise |
get_cli_path
¶
is_claude_available
¶
Check if Claude CLI is available.
Returns:
| Type | Description |
|---|---|
bool
|
True if Claude CLI was detected, False otherwise |
get_cli_health_info
¶
Return CLI health info model using current detection state.
Returns:
| Type | Description |
|---|---|
Any
|
ClaudeCliInfo with availability, version, and binary path |
Source code in ccproxy/plugins/claude_sdk/detection_service.py
invalidate_cache
¶
Clear all cached detection data.