forked from Alishahryar1/free-claude-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathports.py
More file actions
57 lines (41 loc) · 1.71 KB
/
Copy pathports.py
File metadata and controls
57 lines (41 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""Runtime capabilities consumed by the HTTP API adapter."""
from collections.abc import Mapping
from dataclasses import dataclass
from typing import Protocol
from free_claude_code.application.connected_accounts import (
ConnectedAccountLoginMode,
ConnectedAccountStatus,
)
from free_claude_code.application.model_metadata import ProviderModelRefreshResult
from free_claude_code.application.ports import RequestRuntimePort, TaskController
from free_claude_code.config.admin.state import ConfigInputValue
from free_claude_code.core.json_types import JsonObject
class AdminRuntimePort(Protocol):
"""Runtime operations exposed by the local Admin API."""
async def apply_admin_config(
self, updates: Mapping[str, ConfigInputValue]
) -> JsonObject: ...
def admin_status(self) -> JsonObject: ...
async def test_provider(self, provider_id: str) -> JsonObject: ...
async def refresh_models(self) -> ProviderModelRefreshResult: ...
async def request_restart(self) -> None: ...
async def connected_account_status(
self, provider_id: str
) -> ConnectedAccountStatus: ...
async def start_connected_account_login(
self,
provider_id: str,
mode: ConnectedAccountLoginMode,
) -> ConnectedAccountStatus: ...
async def cancel_connected_account_login(
self, provider_id: str
) -> ConnectedAccountStatus: ...
async def disconnect_connected_account(
self, provider_id: str
) -> ConnectedAccountStatus: ...
@dataclass(frozen=True, slots=True)
class ApiServices:
"""Complete runtime boundary required to construct the API application."""
requests: RequestRuntimePort
admin: AdminRuntimePort
tasks: TaskController