ccproxy.core.plugins.protocol¶
ccproxy.core.plugins.protocol
¶
Plugin protocol for provider plugins.
OAuthClientProtocol
¶
Bases: Protocol
Protocol for OAuth client implementations.
authenticate
async
¶
AuthCommandDefinition
¶
Bases: TypedDict
Definition for provider-specific auth command extensions.
ScheduledTaskDefinition
¶
Bases: TypedDict
Definition for a scheduled task from a plugin.
BasePlugin
¶
Bases: Protocol
Base protocol for all plugins.
initialize
async
¶
shutdown
async
¶
validate
async
¶
get_routes
¶
health_check
async
¶
get_scheduled_tasks
¶
Get scheduled task definitions for this plugin (optional).
Returns:
| Type | Description |
|---|---|
list[ScheduledTaskDefinition] | None
|
List of task definitions or None if no scheduled tasks needed |
get_config_class
¶
SystemPlugin
¶
Bases: BasePlugin, Protocol
Protocol for system plugins (non-provider plugins).
System plugins inherit all methods from BasePlugin and don't add any additional requirements. They don't proxy to external providers and therefore don't need adapters or provider configurations.
ProviderPlugin
¶
Bases: BasePlugin, Protocol
Enhanced protocol for provider plugins.
Provider plugins proxy requests to external API providers and therefore need additional methods for creating adapters and configurations.
create_adapter
¶
create_config
¶
get_oauth_client
async
¶
Get OAuth client for this plugin if it supports OAuth authentication.
Returns:
| Type | Description |
|---|---|
OAuthClientProtocol | None
|
OAuth client instance or None if plugin doesn't support OAuth |